ForIn loop_statement(this, stmt);
increment_loop_depth();
- // Load null value as it is used several times below.
- Register null_value = r5;
- __ LoadRoot(null_value, Heap::kNullValueRootIndex);
-
// Get the object to enumerate over. Both SpiderMonkey and JSC
// ignore null and undefined in contrast to the specification; see
// ECMA-262 section 12.6.4.
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
__ cmp(r0, ip);
__ b(eq, &exit);
+ Register null_value = r5;
+ __ LoadRoot(null_value, Heap::kNullValueRootIndex);
__ cmp(r0, null_value);
__ b(eq, &exit);
ForIn loop_statement(this, stmt);
increment_loop_depth();
- // Load null value as it is used several times below.
- Register null_value = rdi;
- __ LoadRoot(null_value, Heap::kNullValueRootIndex);
-
// Get the object to enumerate over. Both SpiderMonkey and JSC
// ignore null and undefined in contrast to the specification; see
// ECMA-262 section 12.6.4.
VisitForAccumulatorValue(stmt->enumerable());
__ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
__ j(equal, &exit);
+ Register null_value = rdi;
+ __ LoadRoot(null_value, Heap::kNullValueRootIndex);
__ cmpq(rax, null_value);
__ j(equal, &exit);