diff --git a/src/compiler.c b/src/compiler.c index 102c7c9..730e388 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -73,12 +73,6 @@ static noom_Exit noomC_addconst_bool(noomV_Function *func, const noom_bool_t b) } // yeah ^^^^^^^^^ -static noom_Exit noomC_addconst_obj(noomV_Function *func, noom_LuaVM *vm, const noomV_ObjTag tag, const noom_uint_t size) { - noomV_Object *obj = noomV_allocObj(vm, tag, size); - if (obj == 0) return NOOM_ENOMEM; - return noomC_addconst(func, (noomV_Value){.tag = NOOMV_VOBJ, .autoclose = 0, .isptr = 0, .obj = obj}); -} - static noom_Exit noomC_addconst_str(noomV_Function *func, noom_LuaVM *vm, const char *str, const noom_uint_t len) { noomV_String *s = noomV_allocStr(vm, str, len); if (s == 0) return NOOM_ENOMEM; @@ -367,5 +361,5 @@ noom_Exit noomC_compile(noom_LuaVM *vm, const noomP_Parser *parser, const noomP_ } vm->mainThread->stack[vm->mainThread->stacklen++] = (noomV_Value){.tag = NOOMV_VOBJ, .autoclose = 0, .isptr = 0, .obj = (noomV_Object*)program}; - return NOOM_OK + return NOOM_OK; }