| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 __ PushReturnAddressFrom(scratch2()); | 671 __ PushReturnAddressFrom(scratch2()); |
| 672 | 672 |
| 673 ExternalReference ref = ExternalReference( | 673 ExternalReference ref = ExternalReference( |
| 674 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); | 674 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); |
| 675 __ TailCallExternalReference( | 675 __ TailCallExternalReference( |
| 676 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1); | 676 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1); |
| 677 } | 677 } |
| 678 | 678 |
| 679 | 679 |
| 680 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 680 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
| 681 Handle<JSObject> object, Handle<Name> name, | 681 Handle<JSObject> object, Handle<Name> name, int accessor_index) { |
| 682 Handle<ExecutableAccessorInfo> callback) { | |
| 683 Register holder_reg = Frontend(name); | 682 Register holder_reg = Frontend(name); |
| 684 | 683 |
| 685 __ PopReturnAddressTo(scratch1()); | 684 __ PopReturnAddressTo(scratch1()); |
| 686 __ Push(receiver()); | 685 __ Push(receiver()); |
| 687 __ Push(holder_reg); | 686 __ Push(holder_reg); |
| 688 __ Push(callback); // callback info | 687 __ Push(Smi::FromInt(accessor_index)); |
| 689 __ Push(name); | 688 __ Push(name); |
| 690 __ Push(value()); | 689 __ Push(value()); |
| 691 __ PushReturnAddressFrom(scratch1()); | 690 __ PushReturnAddressFrom(scratch1()); |
| 692 | 691 |
| 693 // Do tail-call to the runtime system. | 692 // Do tail-call to the runtime system. |
| 694 ExternalReference store_callback_property = | 693 ExternalReference store_callback_property = |
| 695 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); | 694 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); |
| 696 __ TailCallExternalReference(store_callback_property, 5, 1); | 695 __ TailCallExternalReference(store_callback_property, 5, 1); |
| 697 | 696 |
| 698 // Return the generated code. | 697 // Return the generated code. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 // Return the generated code. | 757 // Return the generated code. |
| 759 return GetCode(kind(), Code::NORMAL, name); | 758 return GetCode(kind(), Code::NORMAL, name); |
| 760 } | 759 } |
| 761 | 760 |
| 762 | 761 |
| 763 #undef __ | 762 #undef __ |
| 764 } | 763 } |
| 765 } // namespace v8::internal | 764 } // namespace v8::internal |
| 766 | 765 |
| 767 #endif // V8_TARGET_ARCH_X64 | 766 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |