added more code to implement simple exception handling

This commit is contained in:
2021-03-02 15:58:13 +00:00
parent 6631779768
commit 307bdee5cc
2 changed files with 84 additions and 21 deletions

View File

@ -1784,7 +1784,7 @@ static int compile_try (hcl_t* hcl, hcl_cnode_t* src)
return -1;
}
hcl->c->blk.depth++;
if (store_temporary_variable_count_for_block(hcl, hcl->c->tv.wcount, hcl->c->tv.s.len, hcl->code.lit.len) <= -1) return -1;
/* TODO: HCL_TRAIT_INTERACTIVE??? */
if (emit_double_param_instruction(hcl, HCL_CODE_MAKE_BLOCK, 0, 0, HCL_CNODE_GET_LOC(cmd)) <= -1) return -1;
@ -1800,7 +1800,6 @@ static int compile_try (hcl_t* hcl, hcl_cnode_t* src)
return 0;
}
static HCL_INLINE int patch_nearest_post_try (hcl_t* hcl)
{
hcl_ooi_t jip, block_code_size;