OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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" |
11 #include "src/ic/ic.h" | 11 #include "src/ic/ic.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 #define __ ACCESS_MASM(masm) | 16 #define __ ACCESS_MASM(masm) |
17 | 17 |
18 | 18 |
19 void ElementHandlerCompiler::GenerateLoadSlow(MacroAssembler* masm) { | |
20 // Return address is on the stack. | |
21 LoadIC_PushArgs(masm); | |
22 | |
23 // Do tail-call to runtime routine. | |
24 ExternalReference ref(IC_Utility(IC::kKeyedLoadIC_Slow), masm->isolate()); | |
25 __ TailCallExternalReference(ref, 2, 1); | |
26 } | |
27 | |
28 | |
29 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( | 19 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( |
30 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, | 20 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, |
31 int accessor_index, int expected_arguments, Register scratch) { | 21 int accessor_index, int expected_arguments, Register scratch) { |
32 { | 22 { |
33 FrameScope scope(masm, StackFrame::INTERNAL); | 23 FrameScope scope(masm, StackFrame::INTERNAL); |
34 | 24 |
35 if (accessor_index >= 0) { | 25 if (accessor_index >= 0) { |
36 DCHECK(!holder.is(scratch)); | 26 DCHECK(!holder.is(scratch)); |
37 DCHECK(!receiver.is(scratch)); | 27 DCHECK(!receiver.is(scratch)); |
38 // Call the JavaScript getter with the receiver on the stack. | 28 // Call the JavaScript getter with the receiver on the stack. |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 // Return the generated code. | 805 // Return the generated code. |
816 return GetCode(kind(), Code::NORMAL, name); | 806 return GetCode(kind(), Code::NORMAL, name); |
817 } | 807 } |
818 | 808 |
819 | 809 |
820 #undef __ | 810 #undef __ |
821 } // namespace internal | 811 } // namespace internal |
822 } // namespace v8 | 812 } // namespace v8 |
823 | 813 |
824 #endif // V8_TARGET_ARCH_X87 | 814 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |