Push version 2.1.10 to trunk.
Fixed scons build issues.
Fixed a couple of minor bugs.
git-svn-id: http://v8.googlecode.com/svn/trunk@4294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index e554a31..315600b 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -276,14 +276,15 @@
Register holder,
Register name,
JSObject* holder_obj) {
- __ push(receiver);
- __ push(holder);
__ push(name);
InterceptorInfo* interceptor = holder_obj->GetNamedInterceptor();
ASSERT(!Heap::InNewSpace(interceptor));
- __ mov(receiver, Immediate(Handle<Object>(interceptor)));
+ Register scratch = name;
+ __ mov(scratch, Immediate(Handle<Object>(interceptor)));
+ __ push(scratch);
__ push(receiver);
- __ push(FieldOperand(receiver, InterceptorInfo::kDataOffset));
+ __ push(holder);
+ __ push(FieldOperand(scratch, InterceptorInfo::kDataOffset));
}
@@ -1045,17 +1046,16 @@
__ push(receiver); // receiver
__ push(reg); // holder
__ mov(other, Immediate(callback_handle));
- __ push(other);
__ push(FieldOperand(other, AccessorInfo::kDataOffset)); // data
__ push(name_reg); // name
// Save a pointer to where we pushed the arguments pointer.
- // This will be passed as the const Arguments& to the C++ callback.
+ // This will be passed as the const AccessorInfo& to the C++ callback.
__ mov(eax, esp);
- __ add(Operand(eax), Immediate(5 * kPointerSize));
+ __ add(Operand(eax), Immediate(4 * kPointerSize));
__ mov(ebx, esp);
// Do call through the api.
- ASSERT_EQ(6, ApiGetterEntryStub::kStackSpace);
+ ASSERT_EQ(5, ApiGetterEntryStub::kStackSpace);
Address getter_address = v8::ToCData<Address>(callback->getter());
ApiFunction fun(getter_address);
ApiGetterEntryStub stub(callback_handle, &fun);
@@ -1251,8 +1251,7 @@
__ j(not_equal, &miss);
if (argc == 1) { // Otherwise fall through to call builtin.
- Label call_builtin, exit, with_rset_update,
- attempt_to_grow_elements, finish_push;
+ Label call_builtin, exit, with_rset_update, attempt_to_grow_elements;
// Get the array's length into eax and calculate new length.
__ mov(eax, FieldOperand(edx, JSArray::kLengthOffset));
@@ -1278,8 +1277,6 @@
__ mov(ecx, Operand(esp, argc * kPointerSize));
__ mov(Operand(edx, 0), ecx);
- __ bind(&finish_push);
-
// Check if value is a smi.
__ test(ecx, Immediate(kSmiTagMask));
__ j(not_zero, &with_rset_update);
@@ -1318,10 +1315,13 @@
// We fit and could grow elements.
__ mov(Operand::StaticVariable(new_space_allocation_top), ecx);
__ mov(ecx, Operand(esp, argc * kPointerSize));
+
+ // Push the argument...
__ mov(Operand(edx, 0), ecx);
+ // ... and fill the rest with holes.
for (int i = 1; i < kAllocationDelta; i++) {
__ mov(Operand(edx, i * kPointerSize),
- Immediate(Factory::undefined_value()));
+ Immediate(Factory::the_hole_value()));
}
// Restore receiver to edx as finish sequence assumes it's here.
@@ -1332,7 +1332,8 @@
Immediate(kAllocationDelta));
__ mov(FieldOperand(edx, JSArray::kLengthOffset), eax);
- __ jmp(&finish_push);
+ // Elements are in new space, so no remembered set updates are necessary.
+ __ ret((argc + 1) * kPointerSize);
__ bind(&call_builtin);
}