From 2655d7f0b025f7f8a5d54b9a5807f56d762de6e8 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 20 Apr 2021 13:45:22 +0000 Subject: [PATCH] updated HCL_PROCESS_NAMED_INSTVARS 12 to 13 --- lib/comp.c | 22 ---------------------- lib/hcl.h | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/lib/comp.c b/lib/comp.c index f9fbaac..82755ad 100644 --- a/lib/comp.c +++ b/lib/comp.c @@ -1904,9 +1904,6 @@ static int compile_try (hcl_t* hcl, hcl_cnode_t* src) if (push_cblk(hcl, HCL_CNODE_GET_LOC(src), HCL_CBLK_TYPE_TRY) <= -1) return -1; /* TODO: HCL_TRAIT_INTERACTIVE??? */ -#if 0 - if (emit_double_param_instruction(hcl, HCL_CODE_MAKE_BLOCK, 0, 0, HCL_CNODE_GET_LOC(cmd)) <= -1) return -1; - #endif jump_inst_pos = hcl->code.bc.len; if (emit_single_param_instruction(hcl, HCL_CODE_TRY_ENTER, MAX_CODE_JUMP, HCL_CNODE_GET_LOC(cmd)) <= -1) return -1; @@ -1941,7 +1938,6 @@ static HCL_INLINE int patch_nearest_post_try (hcl_t* hcl, hcl_ooi_t* catch_skip_ if (emit_byte_instruction(hcl, HCL_CODE_PUSH_NIL, HCL_CNODE_GET_LOC(cf->operand)) <= -1) return -1; } - if (emit_byte_instruction(hcl, HCL_CODE_TRY_EXIT, HCL_CNODE_GET_LOC(cf->operand)) <= -1) return -1; *catch_skip_jip = hcl->code.bc.len; @@ -1957,24 +1953,6 @@ static HCL_INLINE int patch_nearest_post_try (hcl_t* hcl, hcl_ooi_t* catch_skip_ } patch_long_jump (hcl, jip, block_code_size); /* patch TRY_ENTER */ -#if 0 - /* beginning of the elif/else block code */ - /* to drop the result of the conditional when the conditional is false */ - if (emit_byte_instruction (hcl, HCL_CODE_POP_STACKTOP, HCL_CNODE_GET_LOC(cf->operand)) <= -1) return -1; -#endif - -#if 0 - /* this is the actual beginning */ - HCL_ASSERT (hcl, hcl->code.bc.len < HCL_SMOOI_MAX); - body_pos = hcl->code.bc.len; - - /* modify the POST_TRY frame */ - HCL_ASSERT (hcl, cf->opcode == COP_POST_TRY); - HCL_ASSERT (hcl, cf->operand != HCL_NULL); - cf->u.post_try_catch.body_pos = body_pos; - cf->u.post_try_catch.jump_inst_pos = jump_inst_pos; -#endif - return 0; } diff --git a/lib/hcl.h b/lib/hcl.h index 85cdd24..b3510b7 100644 --- a/lib/hcl.h +++ b/lib/hcl.h @@ -642,7 +642,7 @@ struct hcl_context_t hcl_oop_t slot[1]; /* stack */ }; -#define HCL_PROCESS_NAMED_INSTVARS 12 +#define HCL_PROCESS_NAMED_INSTVARS 13 typedef struct hcl_process_t hcl_process_t; typedef struct hcl_process_t* hcl_oop_process_t;