Revision: 6937
Author: [email protected]
Date: Thu Feb 24 07:26:27 2011
Log: Fix bug in r6930 and r6933
The loading the register used for the null object was to early and it could
be clobbered.
[email protected]
BUG=none
TEST=mozilla/ecma_3/Statements/regress-131348
Review URL: http://codereview.chromium.org/6578020
http://code.google.com/p/v8/source/detail?r=6937
Modified:
/branches/bleeding_edge/src/arm/full-codegen-arm.cc
/branches/bleeding_edge/src/x64/full-codegen-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Thu Feb 24 03:39:27
2011
+++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Thu Feb 24 07:26:27
2011
@@ -880,10 +880,6 @@
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.
@@ -891,6 +887,8 @@
__ 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);
=======================================
--- /branches/bleeding_edge/src/x64/full-codegen-x64.cc Thu Feb 24 05:37:59
2011
+++ /branches/bleeding_edge/src/x64/full-codegen-x64.cc Thu Feb 24 07:26:27
2011
@@ -854,16 +854,14 @@
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);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev