Skip to content
Merged
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: 6 additions & 2 deletions hscript/Interp.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1730,18 +1730,22 @@ class Interp {
if(isKeyValue)
declared.push({n: ithv, old: locals.get(ithv), depth: depth});
declared.push({n: n, old: locals.get(n), depth: depth});
#if hl
var it:Iterator<Dynamic> = makeIterator(expr(it), isKeyValue);
#else
var it = makeIterator(expr(it), isKeyValue);
var _hasNext = it.hasNext;
var _next = it.next;
#end
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 (#if hl it.hasNext() #else _hasNext() #end) {
var next:Dynamic = #if hl it.next() #else _next() #end ;
if (isKeyValue) {
if (reuseVar) {
kvDecl.r = next.key;
Expand Down