Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions hscript/Interp.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1730,18 +1730,16 @@ class Interp {
if(isKeyValue)
declared.push({n: ithv, old: locals.get(ithv), depth: depth});
declared.push({n: n, old: locals.get(n), depth: depth});
var it = makeIterator(expr(it), isKeyValue);
var _hasNext = it.hasNext;
var _next = it.next;
var it:Iterator<Dynamic> = makeIterator(expr(it), isKeyValue);
var reuseVar = depth == 0 || !bodyHasFunctionLiteral(e);
var kvDecl:DeclaredVar = null;
var varDecl:DeclaredVar = null;
if (reuseVar) {
if (isKeyValue) kvDecl = {r: null, depth: depth};
varDecl = {r: null, depth: depth};
}
while (_hasNext()) {
var next = _next();
while (it.hasNext()) {
var next:Dynamic = it.next();
if (isKeyValue) {
if (reuseVar) {
kvDecl.r = next.key;
Expand Down