Fix bug in r6930 and r6933
The loading the register used for the null object was to early and it could be clobbered. TBR=karlklose@chromium.org BUG=none TEST=mozilla/ecma_3/Statements/regress-131348 Review URL: http://codereview.chromium.org/6578020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
7560fa903b
commit
1ef2b9a385
@ -880,10 +880,6 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
|||||||
ForIn loop_statement(this, stmt);
|
ForIn loop_statement(this, stmt);
|
||||||
increment_loop_depth();
|
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
|
// Get the object to enumerate over. Both SpiderMonkey and JSC
|
||||||
// ignore null and undefined in contrast to the specification; see
|
// ignore null and undefined in contrast to the specification; see
|
||||||
// ECMA-262 section 12.6.4.
|
// ECMA-262 section 12.6.4.
|
||||||
@ -891,6 +887,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
|||||||
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
|
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
|
||||||
__ cmp(r0, ip);
|
__ cmp(r0, ip);
|
||||||
__ b(eq, &exit);
|
__ b(eq, &exit);
|
||||||
|
Register null_value = r5;
|
||||||
|
__ LoadRoot(null_value, Heap::kNullValueRootIndex);
|
||||||
__ cmp(r0, null_value);
|
__ cmp(r0, null_value);
|
||||||
__ b(eq, &exit);
|
__ b(eq, &exit);
|
||||||
|
|
||||||
|
@ -854,16 +854,14 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
|||||||
ForIn loop_statement(this, stmt);
|
ForIn loop_statement(this, stmt);
|
||||||
increment_loop_depth();
|
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
|
// Get the object to enumerate over. Both SpiderMonkey and JSC
|
||||||
// ignore null and undefined in contrast to the specification; see
|
// ignore null and undefined in contrast to the specification; see
|
||||||
// ECMA-262 section 12.6.4.
|
// ECMA-262 section 12.6.4.
|
||||||
VisitForAccumulatorValue(stmt->enumerable());
|
VisitForAccumulatorValue(stmt->enumerable());
|
||||||
__ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
|
__ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
|
||||||
__ j(equal, &exit);
|
__ j(equal, &exit);
|
||||||
|
Register null_value = rdi;
|
||||||
|
__ LoadRoot(null_value, Heap::kNullValueRootIndex);
|
||||||
__ cmpq(rax, null_value);
|
__ cmpq(rax, null_value);
|
||||||
__ j(equal, &exit);
|
__ j(equal, &exit);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user