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 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
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 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 DCHECK(ToRegister(instr->context()).is(cp)); | 3026 DCHECK(ToRegister(instr->context()).is(cp)); |
3027 DCHECK(ToRegister(instr->global_object()) | 3027 DCHECK(ToRegister(instr->global_object()) |
3028 .is(LoadDescriptor::ReceiverRegister())); | 3028 .is(LoadDescriptor::ReceiverRegister())); |
3029 DCHECK(ToRegister(instr->result()).is(r0)); | 3029 DCHECK(ToRegister(instr->result()).is(r0)); |
3030 | 3030 |
3031 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3031 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3032 if (FLAG_vector_ics) { | 3032 if (FLAG_vector_ics) { |
3033 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3033 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
3034 } | 3034 } |
3035 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 3035 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
3036 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code(); | 3036 Handle<Code> ic = |
| 3037 CodeFactory::LoadICInOptimizedCode(isolate(), mode, UNINITIALIZED).code(); |
3037 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3038 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3038 } | 3039 } |
3039 | 3040 |
3040 | 3041 |
3041 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 3042 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
3042 Register value = ToRegister(instr->value()); | 3043 Register value = ToRegister(instr->value()); |
3043 Register cell = scratch0(); | 3044 Register cell = scratch0(); |
3044 | 3045 |
3045 // Load the cell. | 3046 // Load the cell. |
3046 __ mov(cell, Operand(instr->hydrogen()->cell().handle())); | 3047 __ mov(cell, Operand(instr->hydrogen()->cell().handle())); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3148 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3149 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3149 DCHECK(ToRegister(instr->context()).is(cp)); | 3150 DCHECK(ToRegister(instr->context()).is(cp)); |
3150 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3151 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3151 DCHECK(ToRegister(instr->result()).is(r0)); | 3152 DCHECK(ToRegister(instr->result()).is(r0)); |
3152 | 3153 |
3153 // Name is always in r2. | 3154 // Name is always in r2. |
3154 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3155 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3155 if (FLAG_vector_ics) { | 3156 if (FLAG_vector_ics) { |
3156 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3157 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
3157 } | 3158 } |
3158 Handle<Code> ic = | 3159 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
3159 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code(); | 3160 isolate(), NOT_CONTEXTUAL, |
| 3161 instr->hydrogen()->initialization_state()).code(); |
3160 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3162 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
3161 } | 3163 } |
3162 | 3164 |
3163 | 3165 |
3164 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3166 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
3165 Register scratch = scratch0(); | 3167 Register scratch = scratch0(); |
3166 Register function = ToRegister(instr->function()); | 3168 Register function = ToRegister(instr->function()); |
3167 Register result = ToRegister(instr->result()); | 3169 Register result = ToRegister(instr->result()); |
3168 | 3170 |
3169 // Get the prototype or initial map from the function. | 3171 // Get the prototype or initial map from the function. |
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4301 } | 4303 } |
4302 } | 4304 } |
4303 | 4305 |
4304 | 4306 |
4305 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { | 4307 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
4306 DCHECK(ToRegister(instr->context()).is(cp)); | 4308 DCHECK(ToRegister(instr->context()).is(cp)); |
4307 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); | 4309 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); |
4308 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); | 4310 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); |
4309 | 4311 |
4310 __ mov(StoreDescriptor::NameRegister(), Operand(instr->name())); | 4312 __ mov(StoreDescriptor::NameRegister(), Operand(instr->name())); |
4311 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->language_mode()); | 4313 Handle<Code> ic = |
| 4314 StoreIC::initialize_stub(isolate(), instr->language_mode(), |
| 4315 instr->hydrogen()->initialization_state()); |
4312 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 4316 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
4313 } | 4317 } |
4314 | 4318 |
4315 | 4319 |
4316 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { | 4320 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { |
4317 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs; | 4321 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs; |
4318 if (instr->index()->IsConstantOperand()) { | 4322 if (instr->index()->IsConstantOperand()) { |
4319 Operand index = ToOperand(instr->index()); | 4323 Operand index = ToOperand(instr->index()); |
4320 Register length = ToRegister(instr->length()); | 4324 Register length = ToRegister(instr->length()); |
4321 __ cmp(length, index); | 4325 __ cmp(length, index); |
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5976 __ Push(scope_info); | 5980 __ Push(scope_info); |
5977 __ push(ToRegister(instr->function())); | 5981 __ push(ToRegister(instr->function())); |
5978 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5982 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5979 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5983 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5980 } | 5984 } |
5981 | 5985 |
5982 | 5986 |
5983 #undef __ | 5987 #undef __ |
5984 | 5988 |
5985 } } // namespace v8::internal | 5989 } } // namespace v8::internal |
OLD | NEW |