Skip to content

Commit

Permalink
codegen: MoveVars moved temporary variables also
Browse files Browse the repository at this point in the history
issue was reported at #795
  • Loading branch information
kaigai committed Jul 3, 2024
1 parent 5e7b418 commit c3a73fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2803,6 +2803,10 @@ __codegen_build_movevars_one(codegen_context *context, int depth, int gist_depth
{
const codegen_kvar_defitem *kvdef = lfirst(lc);

/* temporary variables? */
if (kvdef->kv_offset < 0)
continue;

if ((kvdef->kv_depth >= 0 &&
kvdef->kv_depth <= depth &&
kvdef->kv_maxref > depth) ||
Expand Down

0 comments on commit c3a73fa

Please sign in to comment.