| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 holder()); | 732 holder()); |
| 733 | 733 |
| 734 ExternalReference ref = ExternalReference( | 734 ExternalReference ref = ExternalReference( |
| 735 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); | 735 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); |
| 736 __ TailCallExternalReference( | 736 __ TailCallExternalReference( |
| 737 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1); | 737 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1); |
| 738 } | 738 } |
| 739 | 739 |
| 740 | 740 |
| 741 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 741 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
| 742 Handle<JSObject> object, Handle<Name> name, | 742 Handle<JSObject> object, Handle<Name> name, int accessor_index) { |
| 743 Handle<ExecutableAccessorInfo> callback) { | |
| 744 ASM_LOCATION("NamedStoreHandlerCompiler::CompileStoreCallback"); | 743 ASM_LOCATION("NamedStoreHandlerCompiler::CompileStoreCallback"); |
| 745 Register holder_reg = Frontend(name); | 744 Register holder_reg = Frontend(name); |
| 746 | 745 |
| 747 // Stub never generated for non-global objects that require access checks. | 746 // Stub never generated for non-global objects that require access checks. |
| 748 DCHECK(holder()->IsJSGlobalProxy() || !holder()->IsAccessCheckNeeded()); | 747 DCHECK(holder()->IsJSGlobalProxy() || !holder()->IsAccessCheckNeeded()); |
| 749 | 748 |
| 750 // receiver() and holder_reg can alias. | 749 // receiver() and holder_reg can alias. |
| 751 DCHECK(!AreAliased(receiver(), scratch1(), scratch2(), value())); | 750 DCHECK(!AreAliased(receiver(), scratch1(), scratch2(), value())); |
| 752 DCHECK(!AreAliased(holder_reg, scratch1(), scratch2(), value())); | 751 DCHECK(!AreAliased(holder_reg, scratch1(), scratch2(), value())); |
| 753 __ Mov(scratch1(), Operand(callback)); | 752 __ Mov(scratch1(), Operand(Smi::FromInt(accessor_index))); |
| 754 __ Mov(scratch2(), Operand(name)); | 753 __ Mov(scratch2(), Operand(name)); |
| 755 __ Push(receiver(), holder_reg, scratch1(), scratch2(), value()); | 754 __ Push(receiver(), holder_reg, scratch1(), scratch2(), value()); |
| 756 | 755 |
| 757 // Do tail-call to the runtime system. | 756 // Do tail-call to the runtime system. |
| 758 ExternalReference store_callback_property = | 757 ExternalReference store_callback_property = |
| 759 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); | 758 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); |
| 760 __ TailCallExternalReference(store_callback_property, 5, 1); | 759 __ TailCallExternalReference(store_callback_property, 5, 1); |
| 761 | 760 |
| 762 // Return the generated code. | 761 // Return the generated code. |
| 763 return GetCode(kind(), Code::FAST, name); | 762 return GetCode(kind(), Code::FAST, name); |
| 764 } | 763 } |
| 765 | 764 |
| 766 | 765 |
| 767 #undef __ | 766 #undef __ |
| 768 } | 767 } |
| 769 } // namespace v8::internal | 768 } // namespace v8::internal |
| 770 | 769 |
| 771 #endif // V8_TARGET_ARCH_IA32 | 770 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |