Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 38578c773739e459a322d3dac87ced9e6ff9a662..93923a70349b69e339fdac2c980703f09310b9ca 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -503,12 +503,7 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
STATIC_ASSERT(kFastApiCallArguments == 6); |
__ lea(eax, Operand(esp, kFastApiCallArguments * kPointerSize)); |
- |
- // API function gets reference to the v8::Arguments. If CPU profiler |
- // is enabled wrapper function will be called and we need to pass |
- // address of the callback as additional parameter, always allocate |
- // space for it. |
- const int kApiArgc = 1 + 1; |
+ const int kApiArgc = 1; // API function gets reference to the v8::Arguments. |
// Allocate the v8::Arguments structure in the arguments' space since |
// it's not controlled by GC. |
@@ -522,26 +517,20 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
__ PrepareCallApiFunction(kApiArgc + kApiStackSpace, returns_handle); |
// v8::Arguments::implicit_args_. |
- __ mov(ApiParameterOperand(2, returns_handle), eax); |
+ __ mov(ApiParameterOperand(1, returns_handle), eax); |
__ add(eax, Immediate(argc * kPointerSize)); |
// v8::Arguments::values_. |
- __ mov(ApiParameterOperand(3, returns_handle), eax); |
+ __ mov(ApiParameterOperand(2, returns_handle), eax); |
// v8::Arguments::length_. |
- __ Set(ApiParameterOperand(4, returns_handle), Immediate(argc)); |
+ __ Set(ApiParameterOperand(3, returns_handle), Immediate(argc)); |
// v8::Arguments::is_construct_call_. |
- __ Set(ApiParameterOperand(5, returns_handle), Immediate(0)); |
+ __ Set(ApiParameterOperand(4, returns_handle), Immediate(0)); |
// v8::InvocationCallback's argument. |
- __ lea(eax, ApiParameterOperand(2, returns_handle)); |
+ __ lea(eax, ApiParameterOperand(1, returns_handle)); |
__ mov(ApiParameterOperand(0, returns_handle), eax); |
- Address thunk_address = returns_handle |
- ? FUNCTION_ADDR(&InvokeInvocationCallback) |
- : FUNCTION_ADDR(&InvokeFunctionCallback); |
- |
__ CallApiFunctionAndReturn(function_address, |
- thunk_address, |
- ApiParameterOperand(1, returns_handle), |
argc + kFastApiCallArguments + 1, |
returns_handle, |
kFastApiCallArguments + 1); |
@@ -850,14 +839,8 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm, |
Register storage_reg = name_reg; |
- if (details.type() == CONSTANT_FUNCTION) { |
- Handle<HeapObject> constant( |
- HeapObject::cast(descriptors->GetValue(descriptor))); |
- __ LoadHeapObject(scratch1, constant); |
- __ cmp(value_reg, scratch1); |
- __ j(not_equal, miss_restore_name); |
- } else if (FLAG_track_fields && representation.IsSmi()) { |
- __ JumpIfNotSmi(value_reg, miss_restore_name); |
+ if (FLAG_track_fields && representation.IsSmi()) { |
+ __ JumpIfNotSmi(value_reg, miss_restore_name); |
} else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
__ JumpIfSmi(value_reg, miss_restore_name); |
} else if (FLAG_track_double_fields && representation.IsDouble()) { |
@@ -901,8 +884,7 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm, |
ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
// Perform map transition for the receiver if necessary. |
- if (details.type() == FIELD && |
- object->map()->unused_property_fields() == 0) { |
+ if (object->map()->unused_property_fields() == 0) { |
// The properties must be extended before we can store the value. |
// We jump to a runtime call that extends the properties array. |
__ pop(scratch1); // Return address. |
@@ -931,8 +913,6 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm, |
OMIT_REMEMBERED_SET, |
OMIT_SMI_CHECK); |
- if (details.type() == CONSTANT_FUNCTION) return; |
- |
int index = transition->instance_descriptors()->GetFieldIndex( |
transition->LastAdded()); |
@@ -1426,9 +1406,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( |
// array for v8::Arguments::values_, handler for name and pointer |
// to the values (it considered as smi in GC). |
const int kStackSpace = PropertyCallbackArguments::kArgsLength + 2; |
- // Allocate space for opional callback address parameter in case |
- // CPU profiler is active. |
- const int kApiArgc = 2 + 1; |
+ const int kApiArgc = 2; |
Address getter_address = v8::ToCData<Address>(callback->getter()); |
bool returns_handle = |
@@ -1444,13 +1422,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( |
// garbage collection but instead return the allocation failure |
// object. |
- Address thunk_address = returns_handle |
- ? FUNCTION_ADDR(&InvokeAccessorGetter) |
- : FUNCTION_ADDR(&InvokeAccessorGetterCallback); |
- |
__ CallApiFunctionAndReturn(getter_address, |
- thunk_address, |
- ApiParameterOperand(2, returns_handle), |
kStackSpace, |
returns_handle, |
6); |