Index: src/ic/arm64/handler-compiler-arm64.cc |
diff --git a/src/ic/arm64/handler-compiler-arm64.cc b/src/ic/arm64/handler-compiler-arm64.cc |
index 2444b6918e502c2d9620f105f3bbdc4229006dc5..f8045211154764e6c9c803d50ad884198f3bb1d3 100644 |
--- a/src/ic/arm64/handler-compiler-arm64.cc |
+++ b/src/ic/arm64/handler-compiler-arm64.cc |
@@ -221,12 +221,12 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall( |
void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
MacroAssembler* masm, Handle<HeapType> type, Register receiver, |
- Register holder, int accessor_index, int expected_arguments) { |
+ Register holder, int accessor_index, int expected_arguments, |
+ Register scratch) { |
// ----------- S t a t e ------------- |
// -- lr : return address |
// ----------------------------------- |
Label miss; |
- |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
@@ -234,11 +234,15 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
__ Push(value()); |
if (accessor_index >= 0) { |
+ DCHECK(!AreAliased(holder, scratch)); |
+ DCHECK(!AreAliased(receiver, scratch)); |
+ DCHECK(!AreAliased(value(), scratch)); |
// Call the JavaScript setter with receiver and value on the stack. |
if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
// Swap in the global receiver. |
- __ Ldr(receiver, |
+ __ Ldr(scratch, |
FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
+ receiver = scratch; |
} |
__ Push(receiver, value()); |
ParameterCount actual(1); |
@@ -263,16 +267,20 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( |
void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
MacroAssembler* masm, Handle<HeapType> type, Register receiver, |
- Register holder, int accessor_index, int expected_arguments) { |
+ Register holder, int accessor_index, int expected_arguments, |
+ Register scratch) { |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
if (accessor_index >= 0) { |
+ DCHECK(!AreAliased(holder, scratch)); |
+ DCHECK(!AreAliased(receiver, scratch)); |
// Call the JavaScript getter with the receiver on the stack. |
if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
// Swap in the global receiver. |
- __ Ldr(receiver, |
+ __ Ldr(scratch, |
FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
+ receiver = scratch; |
} |
__ Push(receiver); |
ParameterCount actual(0); |