diff --git a/main/test/ast.c b/main/test/ast.c index 1ddfd565..5e8c415e 100644 --- a/main/test/ast.c +++ b/main/test/ast.c @@ -252,10 +252,6 @@ int main(int argc, char **argv) { "huge.fib", vm_main_test_huge_fib ); - // vm_test( - // "table.env", - // vm_main_test_table_env - // ); vm_test( "table.load.basic", vm_main_test_table_load_basic diff --git a/vm/backend/exec.c b/vm/backend/exec.c index f1849c99..5dc4d9b6 100644 --- a/vm/backend/exec.c +++ b/vm/backend/exec.c @@ -38,7 +38,6 @@ void *vm_cache_comp(const char *comp, const char *flags, const char *src, const void *handle = LoadLibrary(so_file); void *sym = GetProcAddress(handle, entry); remove(so_file); - // printf("\n", sym); return sym; } #else @@ -107,7 +106,6 @@ void *vm_cache_comp(const char *comp, const char *flags, const char *src, const void *handle = dlopen(so_file, RTLD_LAZY); void *sym = dlsym(handle, entry); remove(so_file); - // printf("\n", sym); return sym; } #endif diff --git a/vm/backend/tb.c b/vm/backend/tb.c index 0b4dbe72..5b99e624 100644 --- a/vm/backend/tb.c +++ b/vm/backend/tb.c @@ -135,10 +135,6 @@ vm_std_value_t vm_tb_run_repl(vm_config_t *config, vm_block_t *entry, vm_blocks_ for (size_t i = 0; i < blocks->len; i++) { vm_block_t *block = blocks->blocks[i]; - // for (size_t j = 0; j < block->cache.len; j++) { - // vm_rblock_reset(block->cache.keys[j]); - // vm_free_block_sub(block->cache.values[j]); - // } block->cache.len = 0; } diff --git a/vm/backend/tb_dyn.h b/vm/backend/tb_dyn.h index 7886dac7..74a5bb76 100644 --- a/vm/backend/tb_dyn.h +++ b/vm/backend/tb_dyn.h @@ -702,9 +702,6 @@ TB_Node *vm_tb_dyn_block(vm_tb_dyn_state_t *state, vm_block_t *block) { TB_Node *is_number1 = tb_inst_region(state->func); TB_Node *is_number2 = tb_inst_region(state->func); TB_Node *is_error = tb_inst_region(state->func); - // tb_inst_set_region_name(state->func, is_number1, -1, "br_arg1_num"); - // tb_inst_set_region_name(state->func, is_number2, -1, "br_arg2_num"); - // tb_inst_set_region_name(state->func, is_error, -1, "is_error"); vm_tb_dyn_pair_t arg1 = vm_tb_dyn_arg(state, branch.args[0]); vm_tb_dyn_pair_t arg2 = vm_tb_dyn_arg(state, branch.args[1]); @@ -894,13 +891,6 @@ TB_Node *vm_tb_dyn_block(vm_tb_dyn_state_t *state, vm_block_t *block) { { tb_inst_set_control(state->func, is_closure); - // TB_PrototypeParam *call_proto_params = vm_malloc(sizeof(TB_PrototypeParam) * num_args); - - // for (size_t arg = 0; branch.args[arg].type != VM_ARG_NONE; arg++) { - // call_proto_params[arg * 2 + 0] = (TB_PrototypeParam){VM_TB_TYPE_VALUE}; - // call_proto_params[arg * 2 + 1] = (TB_PrototypeParam){VM_TB_TYPE_TAG}; - // } - TB_PrototypeParam call_proto_params[1] = { {TB_TYPE_PTR}, }; @@ -1023,16 +1013,6 @@ void vm_tb_dyn_func(vm_tb_dyn_state_t *state, TB_Function *xfunc, vm_block_t *en state->regs = vm_malloc(sizeof(vm_tb_dyn_pair_t) * entry->nregs); for (size_t i = 0; i < entry->nregs; i++) { - // TB_Node *ptr = tb_inst_local(state->func, sizeof(vm_std_value_t *), 4); - // TB_Node *local = tb_inst_member_access(state->func, locals, sizeof(vm_std_value_t) * i); - // tb_inst_store( - // state->func, - // TB_TYPE_PTR, - // ptr, - // local, - // 4, - // false - // ); state->regs[i] = (vm_tb_dyn_pair_t) { .tag = tb_inst_local(state->func, sizeof(vm_tag_t), 1), .val = tb_inst_local(state->func, sizeof(vm_value_t), 4), @@ -1106,12 +1086,6 @@ void vm_tb_dyn_func(vm_tb_dyn_state_t *state, TB_Function *xfunc, vm_block_t *en tb_inst_set_control(state->func, compiled_start); tb_inst_goto(state->func, compiled_first); - - // TB_Node *returns[2] = { - // tb_inst_uint(state->func, VM_TB_TYPE_VALUE, 0), - // tb_inst_uint(state->func, TB_TYPE_PTR, (uint64_t) (size_t) VM_TAG_NIL), - // }; - // tb_inst_ret(state->func, num_returns, returns); } vm_tb_dyn_func_t *vm_tb_dyn_comp(vm_tb_dyn_state_t *state, vm_block_t *entry) { diff --git a/vm/backend/tb_ver.h b/vm/backend/tb_ver.h index b8d6d807..77e65ca2 100644 --- a/vm/backend/tb_ver.h +++ b/vm/backend/tb_ver.h @@ -1938,7 +1938,6 @@ static void *vm_tb_ver_rfunc_comp(vm_rblock_t *rblock) { } static void vm_tb_ver_rblock_del(vm_rblock_t *rblock) { - // TB_JIT *jit = rblock->jit; } static void *vm_tb_ver_full_comp(vm_tb_ver_state_t *state, vm_block_t *block) { diff --git a/vm/std/io.c b/vm/std/io.c index 90c7e93d..23a028e6 100644 --- a/vm/std/io.c +++ b/vm/std/io.c @@ -240,16 +240,6 @@ void vm_io_debug(vm_io_buffer_t *out, size_t indent, const char *prefix, vm_std_ } break; } - // case VM_TAG_I64: { - // vm_std_value_t val = (vm_std_value_t){ - // .tag = p.val_tag, - // .value = p.val_val, - // }; - // char buf[64]; - // snprintf(buf, 63, "%" PRIi64 " = ", p.key_val.i64); - // vm_io_debug(out, indent + 1, buf, val, &next); - // break; - // } case VM_TAG_I8: { vm_std_value_t val = (vm_std_value_t){ .tag = p.val_tag, @@ -341,7 +331,6 @@ void vm_io_debug(vm_io_buffer_t *out, size_t indent, const char *prefix, vm_std_ default: { vm_indent(out, indent, prefix); vm_io_buffer_format(out, "<0x%zx: %p>\n", (size_t)vm_type_tag(value.tag), value.value.all); - // __builtin_trap(); break; } }