| 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/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2842 | 2842 |
| 2843 | 2843 |
| 2844 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2844 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2845 DCHECK(ToRegister(instr->context()).is(esi)); | 2845 DCHECK(ToRegister(instr->context()).is(esi)); |
| 2846 DCHECK(ToRegister(instr->global_object()) | 2846 DCHECK(ToRegister(instr->global_object()) |
| 2847 .is(LoadDescriptor::ReceiverRegister())); | 2847 .is(LoadDescriptor::ReceiverRegister())); |
| 2848 DCHECK(ToRegister(instr->result()).is(eax)); | 2848 DCHECK(ToRegister(instr->result()).is(eax)); |
| 2849 | 2849 |
| 2850 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 2850 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
| 2851 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2851 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 2852 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2852 Handle<Code> ic = |
| 2853 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY, | 2853 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(), |
| 2854 PREMONOMORPHIC).code(); | 2854 SLOPPY, PREMONOMORPHIC).code(); |
| 2855 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2855 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2856 } | 2856 } |
| 2857 | 2857 |
| 2858 | 2858 |
| 2859 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2859 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2860 Register context = ToRegister(instr->context()); | 2860 Register context = ToRegister(instr->context()); |
| 2861 Register result = ToRegister(instr->result()); | 2861 Register result = ToRegister(instr->result()); |
| 2862 __ mov(result, ContextOperand(context, instr->slot_index())); | 2862 __ mov(result, ContextOperand(context, instr->slot_index())); |
| 2863 | 2863 |
| 2864 if (instr->hydrogen()->RequiresHoleCheck()) { | 2864 if (instr->hydrogen()->RequiresHoleCheck()) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2961 | 2961 |
| 2962 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2962 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 2963 DCHECK(ToRegister(instr->context()).is(esi)); | 2963 DCHECK(ToRegister(instr->context()).is(esi)); |
| 2964 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2964 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 2965 DCHECK(ToRegister(instr->result()).is(eax)); | 2965 DCHECK(ToRegister(instr->result()).is(eax)); |
| 2966 | 2966 |
| 2967 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 2967 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
| 2968 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2968 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 2969 Handle<Code> ic = | 2969 Handle<Code> ic = |
| 2970 CodeFactory::LoadICInOptimizedCode( | 2970 CodeFactory::LoadICInOptimizedCode( |
| 2971 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(), | 2971 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(), |
| 2972 instr->hydrogen()->initialization_state()).code(); | 2972 instr->hydrogen()->initialization_state()).code(); |
| 2973 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2973 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2974 } | 2974 } |
| 2975 | 2975 |
| 2976 | 2976 |
| 2977 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2977 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 2978 Register function = ToRegister(instr->function()); | 2978 Register function = ToRegister(instr->function()); |
| 2979 Register temp = ToRegister(instr->temp()); | 2979 Register temp = ToRegister(instr->temp()); |
| 2980 Register result = ToRegister(instr->result()); | 2980 Register result = ToRegister(instr->result()); |
| 2981 | 2981 |
| (...skipping 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5808 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5808 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5809 } | 5809 } |
| 5810 | 5810 |
| 5811 | 5811 |
| 5812 #undef __ | 5812 #undef __ |
| 5813 | 5813 |
| 5814 } // namespace internal | 5814 } // namespace internal |
| 5815 } // namespace v8 | 5815 } // namespace v8 |
| 5816 | 5816 |
| 5817 #endif // V8_TARGET_ARCH_IA32 | 5817 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |