Reviewers: Kevin Millikin,
Description:
CompileArrayPushCall should not use context register as a scratch.
[email protected]
Please review this at http://codereview.chromium.org/8330026/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/ia32/stub-cache-ia32.cc
M src/x64/stub-cache-x64.cc
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index
b14f66929c3ae4355ededebffbf9b4619f8b103c..3c5f6323e17a939ad8ace8783fa588d68a4ca3f5
100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -1511,8 +1511,8 @@ MaybeObject*
CallStubCompiler::CompileArrayPushCall(Object* object,
// the new element is non-Smi. For now, delegate to the builtin.
Label no_fast_elements_check;
__ JumpIfSmi(edi, &no_fast_elements_check);
- __ mov(esi, FieldOperand(edx, HeapObject::kMapOffset));
- __ CheckFastObjectElements(esi, &call_builtin, Label::kFar);
+ __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset));
+ __ CheckFastObjectElements(ecx, &call_builtin, Label::kFar);
__ bind(&no_fast_elements_check);
// We could be lucky and the elements array could be at the top of
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index
bd723df653fe014dccccbe3e7efe60d4add426b2..9eea3477ab5801553ad073071e5db293a5ec0bfb
100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -1488,8 +1488,8 @@ MaybeObject*
CallStubCompiler::CompileArrayPushCall(Object* object,
// the new element is non-Smi. For now, delegate to the builtin.
Label no_fast_elements_check;
__ JumpIfSmi(rdi, &no_fast_elements_check);
- __ movq(rsi, FieldOperand(rdx, HeapObject::kMapOffset));
- __ CheckFastObjectElements(rsi, &call_builtin, Label::kFar);
+ __ movq(rcx, FieldOperand(rdx, HeapObject::kMapOffset));
+ __ CheckFastObjectElements(rcx, &call_builtin, Label::kFar);
__ bind(&no_fast_elements_check);
ExternalReference new_space_allocation_top =
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev