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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2829 } | 2829 } |
2830 } | 2830 } |
2831 | 2831 |
2832 | 2832 |
2833 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2833 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
2834 ASSERT(ToRegister(instr->context()).is(esi)); | 2834 ASSERT(ToRegister(instr->context()).is(esi)); |
2835 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); | 2835 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); |
2836 ASSERT(ToRegister(instr->result()).is(eax)); | 2836 ASSERT(ToRegister(instr->result()).is(eax)); |
2837 | 2837 |
2838 __ mov(LoadIC::NameRegister(), instr->name()); | 2838 __ mov(LoadIC::NameRegister(), instr->name()); |
| 2839 if (FLAG_vector_ics) { |
| 2840 // No need to allocate this register. |
| 2841 ASSERT(LoadIC::SlotRegister().is(eax)); |
| 2842 __ mov(LoadIC::SlotRegister(), instr->hydrogen()->slot()); |
| 2843 } |
2839 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2844 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
2840 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); | 2845 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); |
2841 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2846 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2842 } | 2847 } |
2843 | 2848 |
2844 | 2849 |
2845 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2850 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
2846 Register value = ToRegister(instr->value()); | 2851 Register value = ToRegister(instr->value()); |
2847 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); | 2852 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); |
2848 | 2853 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2963 } | 2968 } |
2964 } | 2969 } |
2965 | 2970 |
2966 | 2971 |
2967 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2972 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
2968 ASSERT(ToRegister(instr->context()).is(esi)); | 2973 ASSERT(ToRegister(instr->context()).is(esi)); |
2969 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 2974 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
2970 ASSERT(ToRegister(instr->result()).is(eax)); | 2975 ASSERT(ToRegister(instr->result()).is(eax)); |
2971 | 2976 |
2972 __ mov(LoadIC::NameRegister(), instr->name()); | 2977 __ mov(LoadIC::NameRegister(), instr->name()); |
| 2978 if (FLAG_vector_ics) { |
| 2979 // No need to allocate this register. |
| 2980 ASSERT(LoadIC::SlotRegister().is(eax)); |
| 2981 __ mov(LoadIC::SlotRegister(), instr->hydrogen()->slot()); |
| 2982 } |
2973 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); | 2983 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); |
2974 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2984 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2975 } | 2985 } |
2976 | 2986 |
2977 | 2987 |
2978 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2988 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
2979 Register function = ToRegister(instr->function()); | 2989 Register function = ToRegister(instr->function()); |
2980 Register temp = ToRegister(instr->temp()); | 2990 Register temp = ToRegister(instr->temp()); |
2981 Register result = ToRegister(instr->result()); | 2991 Register result = ToRegister(instr->result()); |
2982 | 2992 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3203 base_offset); | 3213 base_offset); |
3204 } | 3214 } |
3205 } | 3215 } |
3206 | 3216 |
3207 | 3217 |
3208 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3218 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3209 ASSERT(ToRegister(instr->context()).is(esi)); | 3219 ASSERT(ToRegister(instr->context()).is(esi)); |
3210 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3220 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
3211 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); | 3221 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); |
3212 | 3222 |
| 3223 if (FLAG_vector_ics) { |
| 3224 // No need to allocate this register. |
| 3225 ASSERT(LoadIC::SlotRegister().is(eax)); |
| 3226 __ mov(LoadIC::SlotRegister(), instr->hydrogen()->slot()); |
| 3227 } |
| 3228 |
3213 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 3229 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
3214 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3230 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3215 } | 3231 } |
3216 | 3232 |
3217 | 3233 |
3218 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3234 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3219 Register result = ToRegister(instr->result()); | 3235 Register result = ToRegister(instr->result()); |
3220 | 3236 |
3221 if (instr->hydrogen()->from_inlined()) { | 3237 if (instr->hydrogen()->from_inlined()) { |
3222 __ lea(result, Operand(esp, -2 * kPointerSize)); | 3238 __ lea(result, Operand(esp, -2 * kPointerSize)); |
(...skipping 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5662 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5678 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5663 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5679 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5664 } | 5680 } |
5665 | 5681 |
5666 | 5682 |
5667 #undef __ | 5683 #undef __ |
5668 | 5684 |
5669 } } // namespace v8::internal | 5685 } } // namespace v8::internal |
5670 | 5686 |
5671 #endif // V8_TARGET_ARCH_IA32 | 5687 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |