Big Object naming refactor

* trait Obj -> Object
* Remove *Inst suffix from all object types. ObjInst -> Obj, IntInst ->
  Int, etc
* Type -> Ty, type_inst() -> ty(), type_name() -> ty_name()

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2024-09-26 11:07:12 -07:00
parent 3a9bee0e35
commit 9d5d094c5b
7 changed files with 342 additions and 356 deletions

View File

@@ -1,4 +1,4 @@
use crate::obj::function::UserFunctionInst;
use crate::obj::function::UserFunction;
use crate::obj::ObjP;
use crate::vm::{Chunk, JumpOpArg, Op};
@@ -151,11 +151,7 @@ pub fn disassemble(chunk: &Chunk, constants: &Vec<ObjP>, globals: &Vec<String>)
disassemble_chunk(chunk, constants, globals);
for constant in constants {
if let Some(fun) = constant
.borrow()
.as_any()
.downcast_ref::<UserFunctionInst>()
{
if let Some(fun) = constant.borrow().as_any().downcast_ref::<UserFunction>() {
println!();
println!(
"== {} starting on line {}",