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_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 2868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2879 | 2879 |
2880 | 2880 |
2881 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2881 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
2882 DCHECK(ToRegister(instr->context()).is(esi)); | 2882 DCHECK(ToRegister(instr->context()).is(esi)); |
2883 DCHECK(ToRegister(instr->global_object()) | 2883 DCHECK(ToRegister(instr->global_object()) |
2884 .is(LoadDescriptor::ReceiverRegister())); | 2884 .is(LoadDescriptor::ReceiverRegister())); |
2885 DCHECK(ToRegister(instr->result()).is(eax)); | 2885 DCHECK(ToRegister(instr->result()).is(eax)); |
2886 | 2886 |
2887 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 2887 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
2888 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2888 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
2889 Handle<Code> ic = | 2889 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
2890 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(), | 2890 isolate(), instr->typeof_mode(), PREMONOMORPHIC) |
2891 SLOPPY, PREMONOMORPHIC).code(); | 2891 .code(); |
2892 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2892 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2893 } | 2893 } |
2894 | 2894 |
2895 | 2895 |
2896 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2896 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
2897 Register context = ToRegister(instr->context()); | 2897 Register context = ToRegister(instr->context()); |
2898 Register result = ToRegister(instr->result()); | 2898 Register result = ToRegister(instr->result()); |
2899 __ mov(result, ContextOperand(context, instr->slot_index())); | 2899 __ mov(result, ContextOperand(context, instr->slot_index())); |
2900 | 2900 |
2901 if (instr->hydrogen()->RequiresHoleCheck()) { | 2901 if (instr->hydrogen()->RequiresHoleCheck()) { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2990 } | 2990 } |
2991 | 2991 |
2992 | 2992 |
2993 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2993 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
2994 DCHECK(ToRegister(instr->context()).is(esi)); | 2994 DCHECK(ToRegister(instr->context()).is(esi)); |
2995 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2995 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
2996 DCHECK(ToRegister(instr->result()).is(eax)); | 2996 DCHECK(ToRegister(instr->result()).is(eax)); |
2997 | 2997 |
2998 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 2998 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
2999 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2999 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
3000 Handle<Code> ic = | 3000 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
3001 CodeFactory::LoadICInOptimizedCode( | 3001 isolate(), NOT_INSIDE_TYPEOF, |
3002 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(), | 3002 instr->hydrogen()->initialization_state()) |
3003 instr->hydrogen()->initialization_state()).code(); | 3003 .code(); |
3004 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3004 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3005 } | 3005 } |
3006 | 3006 |
3007 | 3007 |
3008 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3008 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
3009 Register function = ToRegister(instr->function()); | 3009 Register function = ToRegister(instr->function()); |
3010 Register temp = ToRegister(instr->temp()); | 3010 Register temp = ToRegister(instr->temp()); |
3011 Register result = ToRegister(instr->result()); | 3011 Register result = ToRegister(instr->result()); |
3012 | 3012 |
3013 // Get the prototype or initial map from the function. | 3013 // Get the prototype or initial map from the function. |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3226 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3226 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3227 DCHECK(ToRegister(instr->context()).is(esi)); | 3227 DCHECK(ToRegister(instr->context()).is(esi)); |
3228 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3228 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3229 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3229 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
3230 | 3230 |
3231 if (instr->hydrogen()->HasVectorAndSlot()) { | 3231 if (instr->hydrogen()->HasVectorAndSlot()) { |
3232 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3232 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
3233 } | 3233 } |
3234 | 3234 |
3235 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( | 3235 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( |
3236 isolate(), instr->hydrogen()->language_mode(), | 3236 isolate(), instr->hydrogen()->initialization_state()) |
3237 instr->hydrogen()->initialization_state()).code(); | 3237 .code(); |
3238 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3238 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3239 } | 3239 } |
3240 | 3240 |
3241 | 3241 |
3242 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3242 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3243 Register result = ToRegister(instr->result()); | 3243 Register result = ToRegister(instr->result()); |
3244 | 3244 |
3245 if (instr->hydrogen()->from_inlined()) { | 3245 if (instr->hydrogen()->from_inlined()) { |
3246 __ lea(result, Operand(esp, -2 * kPointerSize)); | 3246 __ lea(result, Operand(esp, -2 * kPointerSize)); |
3247 } else { | 3247 } else { |
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5988 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5988 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5989 } | 5989 } |
5990 | 5990 |
5991 | 5991 |
5992 #undef __ | 5992 #undef __ |
5993 | 5993 |
5994 } // namespace internal | 5994 } // namespace internal |
5995 } // namespace v8 | 5995 } // namespace v8 |
5996 | 5996 |
5997 #endif // V8_TARGET_ARCH_X87 | 5997 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |