mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Drop leftover regs in 'for' iterator assignment, too.
This commit is contained in:
parent
a7bec69a75
commit
aef4edddba
@ -2207,6 +2207,8 @@ static void assign_adjust(LexState *ls, BCReg nvars, BCReg nexps, ExpDesc *e)
|
||||
bcemit_nil(fs, reg, (BCReg)extra);
|
||||
}
|
||||
}
|
||||
if (nexps > nvars)
|
||||
ls->fs->freereg -= nexps - nvars; /* Drop leftover regs. */
|
||||
}
|
||||
|
||||
/* Recursively parse assignment statement. */
|
||||
@ -2240,8 +2242,6 @@ static void parse_assignment(LexState *ls, LHSVarList *lh, BCReg nvars)
|
||||
return;
|
||||
}
|
||||
assign_adjust(ls, nvars, nexps, &e);
|
||||
if (nexps > nvars)
|
||||
ls->fs->freereg -= nexps - nvars; /* Drop leftover regs. */
|
||||
}
|
||||
/* Assign RHS to LHS and recurse downwards. */
|
||||
expr_init(&e, VNONRELOC, ls->fs->freereg-1);
|
||||
|
Loading…
Reference in New Issue
Block a user