Index: src/ic/x64/handler-compiler-x64.cc |
diff --git a/src/ic/x64/handler-compiler-x64.cc b/src/ic/x64/handler-compiler-x64.cc |
index 96231d9a36fa6f476f6af218baaa123c48875507..97b948b1500a444d15da8177d2c42a7e63d5835b 100644 |
--- a/src/ic/x64/handler-compiler-x64.cc |
+++ b/src/ic/x64/handler-compiler-x64.cc |
@@ -593,28 +593,23 @@ |
void NamedLoadHandlerCompiler::GenerateLoadCallback( |
Register reg, Handle<AccessorInfo> callback) { |
- DCHECK(!AreAliased(kScratchRegister, scratch2(), scratch3(), receiver())); |
- DCHECK(!AreAliased(kScratchRegister, scratch2(), scratch3(), reg)); |
- |
// Insert additional parameters into the stack frame above return address. |
- __ PopReturnAddressTo(scratch3()); |
- |
- // Build v8::PropertyCallbackInfo::args_ array on the stack and push property |
- // name below the exit frame to make GC aware of them. |
- STATIC_ASSERT(PropertyCallbackArguments::kShouldThrowOnErrorIndex == 0); |
- STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 1); |
- STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 2); |
- STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 3); |
- STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 4); |
- STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 5); |
- STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 6); |
- STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 7); |
- |
+ DCHECK(!scratch4().is(reg)); |
+ __ PopReturnAddressTo(scratch4()); |
+ |
+ STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); |
+ STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); |
+ STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); |
+ STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); |
+ STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); |
+ STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); |
+ STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6); |
__ Push(receiver()); // receiver |
Handle<Object> data(callback->data(), isolate()); |
if (data->IsUndefined() || data->IsSmi()) { |
__ Push(data); |
} else { |
+ DCHECK(!scratch2().is(reg)); |
Handle<WeakCell> cell = |
isolate()->factory()->NewWeakCell(Handle<HeapObject>::cast(data)); |
// The callback is alive if this instruction is executed, |
@@ -622,15 +617,17 @@ |
__ GetWeakValue(scratch2(), cell); |
__ Push(scratch2()); |
} |
+ DCHECK(!kScratchRegister.is(reg)); |
__ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex); |
__ Push(kScratchRegister); // return value |
__ Push(kScratchRegister); // return value default |
__ PushAddress(ExternalReference::isolate_address(isolate())); |
__ Push(reg); // holder |
- __ Push(Smi::FromInt(0)); // should_throw_on_error -> false |
- |
__ Push(name()); // name |
- __ PushReturnAddressFrom(scratch3()); |
+ // Save a pointer to where we pushed the arguments pointer. This will be |
+ // passed as the const PropertyAccessorInfo& to the C++ callback. |
+ |
+ __ PushReturnAddressFrom(scratch4()); |
// Abi for CallApiGetter |
Register api_function_address = ApiGetterDescriptor::function_address(); |
@@ -725,8 +722,7 @@ |
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
- Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, |
- LanguageMode language_mode) { |
+ Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback) { |
Register holder_reg = Frontend(name); |
__ PopReturnAddressTo(scratch1()); |
@@ -742,7 +738,6 @@ |
} |
__ Push(name); |
__ Push(value()); |
- __ Push(Smi::FromInt(language_mode)); |
__ PushReturnAddressFrom(scratch1()); |
// Do tail-call to the runtime system. |