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 3226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3237 | 3237 |
3238 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3238 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3239 DCHECK(ToRegister(instr->context()).is(esi)); | 3239 DCHECK(ToRegister(instr->context()).is(esi)); |
3240 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3240 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3241 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3241 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
3242 | 3242 |
3243 if (FLAG_vector_ics) { | 3243 if (FLAG_vector_ics) { |
3244 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3244 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
3245 } | 3245 } |
3246 | 3246 |
3247 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code(); | 3247 Handle<Code> ic = |
| 3248 CodeFactory::KeyedLoadICInOptimizedCode( |
| 3249 isolate(), instr->hydrogen()->initialization_state()).code(); |
3248 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3250 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3249 } | 3251 } |
3250 | 3252 |
3251 | 3253 |
3252 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3254 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3253 Register result = ToRegister(instr->result()); | 3255 Register result = ToRegister(instr->result()); |
3254 | 3256 |
3255 if (instr->hydrogen()->from_inlined()) { | 3257 if (instr->hydrogen()->from_inlined()) { |
3256 __ lea(result, Operand(esp, -2 * kPointerSize)); | 3258 __ lea(result, Operand(esp, -2 * kPointerSize)); |
3257 } else { | 3259 } else { |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4348 } | 4350 } |
4349 } | 4351 } |
4350 | 4352 |
4351 | 4353 |
4352 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { | 4354 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { |
4353 DCHECK(ToRegister(instr->context()).is(esi)); | 4355 DCHECK(ToRegister(instr->context()).is(esi)); |
4354 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); | 4356 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); |
4355 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); | 4357 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); |
4356 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); | 4358 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); |
4357 | 4359 |
4358 Handle<Code> ic = | 4360 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode( |
4359 CodeFactory::KeyedStoreIC(isolate(), instr->language_mode()).code(); | 4361 isolate(), instr->language_mode(), |
| 4362 instr->hydrogen()->initialization_state()).code(); |
4360 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4363 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
4361 } | 4364 } |
4362 | 4365 |
4363 | 4366 |
4364 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { | 4367 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { |
4365 Register object = ToRegister(instr->object()); | 4368 Register object = ToRegister(instr->object()); |
4366 Register temp = ToRegister(instr->temp()); | 4369 Register temp = ToRegister(instr->temp()); |
4367 Label no_memento_found; | 4370 Label no_memento_found; |
4368 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); | 4371 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); |
4369 DeoptimizeIf(equal, instr, Deoptimizer::kMementoFound); | 4372 DeoptimizeIf(equal, instr, Deoptimizer::kMementoFound); |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5778 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5781 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5779 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5782 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5780 } | 5783 } |
5781 | 5784 |
5782 | 5785 |
5783 #undef __ | 5786 #undef __ |
5784 | 5787 |
5785 } } // namespace v8::internal | 5788 } } // namespace v8::internal |
5786 | 5789 |
5787 #endif // V8_TARGET_ARCH_IA32 | 5790 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |