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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 3129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3140 DCHECK(ToRegister(instr->context()).is(esi)); | 3140 DCHECK(ToRegister(instr->context()).is(esi)); |
3141 DCHECK(ToRegister(instr->global_object()) | 3141 DCHECK(ToRegister(instr->global_object()) |
3142 .is(LoadDescriptor::ReceiverRegister())); | 3142 .is(LoadDescriptor::ReceiverRegister())); |
3143 DCHECK(ToRegister(instr->result()).is(eax)); | 3143 DCHECK(ToRegister(instr->result()).is(eax)); |
3144 | 3144 |
3145 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 3145 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
3146 if (FLAG_vector_ics) { | 3146 if (FLAG_vector_ics) { |
3147 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3147 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
3148 } | 3148 } |
3149 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 3149 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
3150 Handle<Code> ic = CodeFactory::LoadIC(isolate(), mode).code(); | 3150 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code(); |
3151 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3151 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3152 } | 3152 } |
3153 | 3153 |
3154 | 3154 |
3155 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 3155 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
3156 Register value = ToRegister(instr->value()); | 3156 Register value = ToRegister(instr->value()); |
3157 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); | 3157 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); |
3158 | 3158 |
3159 // If the cell we are storing to contains the hole it could have | 3159 // If the cell we are storing to contains the hole it could have |
3160 // been deleted from the property dictionary. In that case, we need | 3160 // been deleted from the property dictionary. In that case, we need |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3270 | 3270 |
3271 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3271 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3272 DCHECK(ToRegister(instr->context()).is(esi)); | 3272 DCHECK(ToRegister(instr->context()).is(esi)); |
3273 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3273 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3274 DCHECK(ToRegister(instr->result()).is(eax)); | 3274 DCHECK(ToRegister(instr->result()).is(eax)); |
3275 | 3275 |
3276 __ mov(LoadDescriptor::NameRegister(), instr->name()); | 3276 __ mov(LoadDescriptor::NameRegister(), instr->name()); |
3277 if (FLAG_vector_ics) { | 3277 if (FLAG_vector_ics) { |
3278 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3278 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
3279 } | 3279 } |
3280 Handle<Code> ic = CodeFactory::LoadIC(isolate(), NOT_CONTEXTUAL).code(); | 3280 Handle<Code> ic = |
| 3281 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code(); |
3281 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3282 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3282 } | 3283 } |
3283 | 3284 |
3284 | 3285 |
3285 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3286 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
3286 Register function = ToRegister(instr->function()); | 3287 Register function = ToRegister(instr->function()); |
3287 Register temp = ToRegister(instr->temp()); | 3288 Register temp = ToRegister(instr->temp()); |
3288 Register result = ToRegister(instr->result()); | 3289 Register result = ToRegister(instr->result()); |
3289 | 3290 |
3290 // Get the prototype or initial map from the function. | 3291 // Get the prototype or initial map from the function. |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3493 | 3494 |
3494 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3495 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3495 DCHECK(ToRegister(instr->context()).is(esi)); | 3496 DCHECK(ToRegister(instr->context()).is(esi)); |
3496 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3497 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3497 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3498 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
3498 | 3499 |
3499 if (FLAG_vector_ics) { | 3500 if (FLAG_vector_ics) { |
3500 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3501 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
3501 } | 3502 } |
3502 | 3503 |
3503 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code(); | 3504 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code(); |
3504 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3505 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3505 } | 3506 } |
3506 | 3507 |
3507 | 3508 |
3508 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3509 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3509 Register result = ToRegister(instr->result()); | 3510 Register result = ToRegister(instr->result()); |
3510 | 3511 |
3511 if (instr->hydrogen()->from_inlined()) { | 3512 if (instr->hydrogen()->from_inlined()) { |
3512 __ lea(result, Operand(esp, -2 * kPointerSize)); | 3513 __ lea(result, Operand(esp, -2 * kPointerSize)); |
3513 } else { | 3514 } else { |
(...skipping 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6296 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6297 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6297 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6298 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6298 } | 6299 } |
6299 | 6300 |
6300 | 6301 |
6301 #undef __ | 6302 #undef __ |
6302 | 6303 |
6303 } } // namespace v8::internal | 6304 } } // namespace v8::internal |
6304 | 6305 |
6305 #endif // V8_TARGET_ARCH_X87 | 6306 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |