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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" | 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2385 AllowDeferredHandleDereference vector_structure_check; | 2385 AllowDeferredHandleDereference vector_structure_check; |
2386 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); | 2386 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
2387 __ mov(vector_register, vector); | 2387 __ mov(vector_register, vector); |
2388 // No need to allocate this register. | 2388 // No need to allocate this register. |
2389 FeedbackVectorSlot slot = instr->hydrogen()->slot(); | 2389 FeedbackVectorSlot slot = instr->hydrogen()->slot(); |
2390 int index = vector->GetIndex(slot); | 2390 int index = vector->GetIndex(slot); |
2391 __ mov(slot_register, Immediate(Smi::FromInt(index))); | 2391 __ mov(slot_register, Immediate(Smi::FromInt(index))); |
2392 } | 2392 } |
2393 | 2393 |
2394 | 2394 |
2395 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | |
2396 DCHECK(ToRegister(instr->context()).is(esi)); | |
2397 DCHECK(ToRegister(instr->result()).is(eax)); | |
2398 | |
2399 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | |
2400 Handle<Code> ic = | |
2401 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) | |
2402 .code(); | |
2403 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
2404 } | |
2405 | |
2406 | |
2407 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2395 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
2408 Register context = ToRegister(instr->context()); | 2396 Register context = ToRegister(instr->context()); |
2409 Register result = ToRegister(instr->result()); | 2397 Register result = ToRegister(instr->result()); |
2410 __ mov(result, ContextOperand(context, instr->slot_index())); | 2398 __ mov(result, ContextOperand(context, instr->slot_index())); |
2411 | 2399 |
2412 if (instr->hydrogen()->RequiresHoleCheck()) { | 2400 if (instr->hydrogen()->RequiresHoleCheck()) { |
2413 __ cmp(result, factory()->the_hole_value()); | 2401 __ cmp(result, factory()->the_hole_value()); |
2414 if (instr->hydrogen()->DeoptimizesOnHole()) { | 2402 if (instr->hydrogen()->DeoptimizesOnHole()) { |
2415 DeoptimizeIf(equal, instr, DeoptimizeReason::kHole); | 2403 DeoptimizeIf(equal, instr, DeoptimizeReason::kHole); |
2416 } else { | 2404 } else { |
(...skipping 2820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5237 __ bind(deferred->exit()); | 5225 __ bind(deferred->exit()); |
5238 __ bind(&done); | 5226 __ bind(&done); |
5239 } | 5227 } |
5240 | 5228 |
5241 #undef __ | 5229 #undef __ |
5242 | 5230 |
5243 } // namespace internal | 5231 } // namespace internal |
5244 } // namespace v8 | 5232 } // namespace v8 |
5245 | 5233 |
5246 #endif // V8_TARGET_ARCH_IA32 | 5234 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |