Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: src/crankshaft/arm/lithium-codegen-arm.cc

Issue 2396023002: [crankshaft] Remove HLoadGlobalGeneric and use HCallWithDescriptor instead to call LoadGlobalIC. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/arm/lithium-arm.cc ('k') | src/crankshaft/arm64/lithium-arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/crankshaft/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 2578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 AllowDeferredHandleDereference vector_structure_check; 2589 AllowDeferredHandleDereference vector_structure_check;
2590 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2590 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2591 __ Move(vector_register, vector); 2591 __ Move(vector_register, vector);
2592 // No need to allocate this register. 2592 // No need to allocate this register.
2593 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2593 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2594 int index = vector->GetIndex(slot); 2594 int index = vector->GetIndex(slot);
2595 __ mov(slot_register, Operand(Smi::FromInt(index))); 2595 __ mov(slot_register, Operand(Smi::FromInt(index)));
2596 } 2596 }
2597 2597
2598 2598
2599 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2600 DCHECK(ToRegister(instr->context()).is(cp));
2601 DCHECK(ToRegister(instr->result()).is(r0));
2602
2603 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2604 Handle<Code> ic =
2605 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2606 .code();
2607 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2608 }
2609
2610
2611 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2599 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2612 Register context = ToRegister(instr->context()); 2600 Register context = ToRegister(instr->context());
2613 Register result = ToRegister(instr->result()); 2601 Register result = ToRegister(instr->result());
2614 __ ldr(result, ContextMemOperand(context, instr->slot_index())); 2602 __ ldr(result, ContextMemOperand(context, instr->slot_index()));
2615 if (instr->hydrogen()->RequiresHoleCheck()) { 2603 if (instr->hydrogen()->RequiresHoleCheck()) {
2616 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 2604 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2617 __ cmp(result, ip); 2605 __ cmp(result, ip);
2618 if (instr->hydrogen()->DeoptimizesOnHole()) { 2606 if (instr->hydrogen()->DeoptimizesOnHole()) {
2619 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole); 2607 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole);
2620 } else { 2608 } else {
(...skipping 2858 matching lines...) Expand 10 before | Expand all | Expand 10 after
5479 __ ldr(result, FieldMemOperand(scratch, 5467 __ ldr(result, FieldMemOperand(scratch,
5480 FixedArray::kHeaderSize - kPointerSize)); 5468 FixedArray::kHeaderSize - kPointerSize));
5481 __ bind(deferred->exit()); 5469 __ bind(deferred->exit());
5482 __ bind(&done); 5470 __ bind(&done);
5483 } 5471 }
5484 5472
5485 #undef __ 5473 #undef __
5486 5474
5487 } // namespace internal 5475 } // namespace internal
5488 } // namespace v8 5476 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-arm.cc ('k') | src/crankshaft/arm64/lithium-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698