| 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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" | 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2593 | 2593 |
| 2594 | 2594 |
| 2595 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2595 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2596 DCHECK(ToRegister(instr->context()).is(esi)); | 2596 DCHECK(ToRegister(instr->context()).is(esi)); |
| 2597 DCHECK(ToRegister(instr->global_object()) | 2597 DCHECK(ToRegister(instr->global_object()) |
| 2598 .is(LoadDescriptor::ReceiverRegister())); | 2598 .is(LoadDescriptor::ReceiverRegister())); |
| 2599 DCHECK(ToRegister(instr->result()).is(eax)); | 2599 DCHECK(ToRegister(instr->result()).is(eax)); |
| 2600 | 2600 |
| 2601 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 2601 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
| 2602 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2602 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 2603 Handle<Code> ic = | 2603 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
| 2604 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(), | 2604 isolate(), instr->typeof_mode(), PREMONOMORPHIC) |
| 2605 SLOPPY, PREMONOMORPHIC).code(); | 2605 .code(); |
| 2606 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2606 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2607 } | 2607 } |
| 2608 | 2608 |
| 2609 | 2609 |
| 2610 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2610 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2611 Register context = ToRegister(instr->context()); | 2611 Register context = ToRegister(instr->context()); |
| 2612 Register result = ToRegister(instr->result()); | 2612 Register result = ToRegister(instr->result()); |
| 2613 __ mov(result, ContextOperand(context, instr->slot_index())); | 2613 __ mov(result, ContextOperand(context, instr->slot_index())); |
| 2614 | 2614 |
| 2615 if (instr->hydrogen()->RequiresHoleCheck()) { | 2615 if (instr->hydrogen()->RequiresHoleCheck()) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2710 } | 2710 } |
| 2711 | 2711 |
| 2712 | 2712 |
| 2713 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2713 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 2714 DCHECK(ToRegister(instr->context()).is(esi)); | 2714 DCHECK(ToRegister(instr->context()).is(esi)); |
| 2715 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2715 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 2716 DCHECK(ToRegister(instr->result()).is(eax)); | 2716 DCHECK(ToRegister(instr->result()).is(eax)); |
| 2717 | 2717 |
| 2718 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 2718 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
| 2719 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2719 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 2720 Handle<Code> ic = | 2720 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
| 2721 CodeFactory::LoadICInOptimizedCode( | 2721 isolate(), NOT_INSIDE_TYPEOF, |
| 2722 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(), | 2722 instr->hydrogen()->initialization_state()) |
| 2723 instr->hydrogen()->initialization_state()).code(); | 2723 .code(); |
| 2724 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2724 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2725 } | 2725 } |
| 2726 | 2726 |
| 2727 | 2727 |
| 2728 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2728 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 2729 Register function = ToRegister(instr->function()); | 2729 Register function = ToRegister(instr->function()); |
| 2730 Register temp = ToRegister(instr->temp()); | 2730 Register temp = ToRegister(instr->temp()); |
| 2731 Register result = ToRegister(instr->result()); | 2731 Register result = ToRegister(instr->result()); |
| 2732 | 2732 |
| 2733 // Get the prototype or initial map from the function. | 2733 // Get the prototype or initial map from the function. |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2949 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 2949 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
| 2950 DCHECK(ToRegister(instr->context()).is(esi)); | 2950 DCHECK(ToRegister(instr->context()).is(esi)); |
| 2951 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2951 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 2952 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 2952 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
| 2953 | 2953 |
| 2954 if (instr->hydrogen()->HasVectorAndSlot()) { | 2954 if (instr->hydrogen()->HasVectorAndSlot()) { |
| 2955 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 2955 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
| 2956 } | 2956 } |
| 2957 | 2957 |
| 2958 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( | 2958 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( |
| 2959 isolate(), instr->hydrogen()->language_mode(), | 2959 isolate(), instr->hydrogen()->initialization_state()) |
| 2960 instr->hydrogen()->initialization_state()).code(); | 2960 .code(); |
| 2961 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2961 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2962 } | 2962 } |
| 2963 | 2963 |
| 2964 | 2964 |
| 2965 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 2965 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 2966 Register result = ToRegister(instr->result()); | 2966 Register result = ToRegister(instr->result()); |
| 2967 | 2967 |
| 2968 if (instr->hydrogen()->from_inlined()) { | 2968 if (instr->hydrogen()->from_inlined()) { |
| 2969 __ lea(result, Operand(esp, -2 * kPointerSize)); | 2969 __ lea(result, Operand(esp, -2 * kPointerSize)); |
| 2970 } else { | 2970 } else { |
| (...skipping 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5422 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5422 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5423 } | 5423 } |
| 5424 | 5424 |
| 5425 | 5425 |
| 5426 #undef __ | 5426 #undef __ |
| 5427 | 5427 |
| 5428 } // namespace internal | 5428 } // namespace internal |
| 5429 } // namespace v8 | 5429 } // namespace v8 |
| 5430 | 5430 |
| 5431 #endif // V8_TARGET_ARCH_IA32 | 5431 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |