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 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2825 __ mov(result, Operand::ForCell(instr->hydrogen()->cell().handle())); | 2825 __ mov(result, Operand::ForCell(instr->hydrogen()->cell().handle())); |
2826 if (instr->hydrogen()->RequiresHoleCheck()) { | 2826 if (instr->hydrogen()->RequiresHoleCheck()) { |
2827 __ cmp(result, factory()->the_hole_value()); | 2827 __ cmp(result, factory()->the_hole_value()); |
2828 DeoptimizeIf(equal, instr->environment()); | 2828 DeoptimizeIf(equal, instr->environment()); |
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(edx)); | 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(ecx, instr->name()); | 2838 __ mov(LoadIC::NameRegister(), instr->name()); |
2839 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2839 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
2840 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); | 2840 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); |
2841 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2841 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2842 } | 2842 } |
2843 | 2843 |
2844 | 2844 |
2845 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2845 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
2846 Register value = ToRegister(instr->value()); | 2846 Register value = ToRegister(instr->value()); |
2847 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); | 2847 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); |
2848 | 2848 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2959 } else if (operand->IsRegister()) { | 2959 } else if (operand->IsRegister()) { |
2960 __ push(ToRegister(operand)); | 2960 __ push(ToRegister(operand)); |
2961 } else { | 2961 } else { |
2962 __ push(ToOperand(operand)); | 2962 __ push(ToOperand(operand)); |
2963 } | 2963 } |
2964 } | 2964 } |
2965 | 2965 |
2966 | 2966 |
2967 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2967 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
2968 ASSERT(ToRegister(instr->context()).is(esi)); | 2968 ASSERT(ToRegister(instr->context()).is(esi)); |
2969 ASSERT(ToRegister(instr->object()).is(edx)); | 2969 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
2970 ASSERT(ToRegister(instr->result()).is(eax)); | 2970 ASSERT(ToRegister(instr->result()).is(eax)); |
2971 | 2971 |
2972 __ mov(ecx, instr->name()); | 2972 __ mov(LoadIC::NameRegister(), instr->name()); |
2973 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); | 2973 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); |
2974 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2974 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2975 } | 2975 } |
2976 | 2976 |
2977 | 2977 |
2978 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2978 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
2979 Register function = ToRegister(instr->function()); | 2979 Register function = ToRegister(instr->function()); |
2980 Register temp = ToRegister(instr->temp()); | 2980 Register temp = ToRegister(instr->temp()); |
2981 Register result = ToRegister(instr->result()); | 2981 Register result = ToRegister(instr->result()); |
2982 | 2982 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3200 return Operand(elements_pointer_reg, | 3200 return Operand(elements_pointer_reg, |
3201 ToRegister(key), | 3201 ToRegister(key), |
3202 scale_factor, | 3202 scale_factor, |
3203 base_offset); | 3203 base_offset); |
3204 } | 3204 } |
3205 } | 3205 } |
3206 | 3206 |
3207 | 3207 |
3208 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3208 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3209 ASSERT(ToRegister(instr->context()).is(esi)); | 3209 ASSERT(ToRegister(instr->context()).is(esi)); |
3210 ASSERT(ToRegister(instr->object()).is(edx)); | 3210 ASSERT(ToRegister(instr->object()).is(KeyedLoadIC::ReceiverRegister())); |
3211 ASSERT(ToRegister(instr->key()).is(ecx)); | 3211 ASSERT(ToRegister(instr->key()).is(KeyedLoadIC::NameRegister())); |
3212 | 3212 |
3213 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 3213 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
3214 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3214 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3215 } | 3215 } |
3216 | 3216 |
3217 | 3217 |
3218 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3218 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3219 Register result = ToRegister(instr->result()); | 3219 Register result = ToRegister(instr->result()); |
3220 | 3220 |
3221 if (instr->hydrogen()->from_inlined()) { | 3221 if (instr->hydrogen()->from_inlined()) { |
(...skipping 2440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5662 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5662 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); |
5663 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5663 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5664 } | 5664 } |
5665 | 5665 |
5666 | 5666 |
5667 #undef __ | 5667 #undef __ |
5668 | 5668 |
5669 } } // namespace v8::internal | 5669 } } // namespace v8::internal |
5670 | 5670 |
5671 #endif // V8_TARGET_ARCH_IA32 | 5671 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |