| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 __ push(scratch2()); // restore old return address | 683 __ push(scratch2()); // restore old return address |
| 684 | 684 |
| 685 ExternalReference ref = ExternalReference( | 685 ExternalReference ref = ExternalReference( |
| 686 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); | 686 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); |
| 687 __ TailCallExternalReference( | 687 __ TailCallExternalReference( |
| 688 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1); | 688 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1); |
| 689 } | 689 } |
| 690 | 690 |
| 691 | 691 |
| 692 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 692 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
| 693 Handle<JSObject> object, Handle<Name> name, | 693 Handle<JSObject> object, Handle<Name> name, int accessor_index) { |
| 694 Handle<ExecutableAccessorInfo> callback) { | |
| 695 Register holder_reg = Frontend(name); | 694 Register holder_reg = Frontend(name); |
| 696 | 695 |
| 697 __ pop(scratch1()); // remove the return address | 696 __ pop(scratch1()); // remove the return address |
| 698 __ push(receiver()); | 697 __ push(receiver()); |
| 699 __ push(holder_reg); | 698 __ push(holder_reg); |
| 700 __ Push(callback); | 699 __ Push(Smi::FromInt(accessor_index)); |
| 701 __ Push(name); | 700 __ Push(name); |
| 702 __ push(value()); | 701 __ push(value()); |
| 703 __ push(scratch1()); // restore return address | 702 __ push(scratch1()); // restore return address |
| 704 | 703 |
| 705 // Do tail-call to the runtime system. | 704 // Do tail-call to the runtime system. |
| 706 ExternalReference store_callback_property = | 705 ExternalReference store_callback_property = |
| 707 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); | 706 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); |
| 708 __ TailCallExternalReference(store_callback_property, 5, 1); | 707 __ TailCallExternalReference(store_callback_property, 5, 1); |
| 709 | 708 |
| 710 // Return the generated code. | 709 // Return the generated code. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 // Return the generated code. | 769 // Return the generated code. |
| 771 return GetCode(kind(), Code::NORMAL, name); | 770 return GetCode(kind(), Code::NORMAL, name); |
| 772 } | 771 } |
| 773 | 772 |
| 774 | 773 |
| 775 #undef __ | 774 #undef __ |
| 776 } | 775 } |
| 777 } // namespace v8::internal | 776 } // namespace v8::internal |
| 778 | 777 |
| 779 #endif // V8_TARGET_ARCH_IA32 | 778 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |