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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.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/s390/lithium-s390.cc ('k') | src/crankshaft/x64/lithium-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.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 2516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 AllowDeferredHandleDereference vector_structure_check; 2527 AllowDeferredHandleDereference vector_structure_check;
2528 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2528 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
2529 __ Move(vector_register, vector); 2529 __ Move(vector_register, vector);
2530 // No need to allocate this register. 2530 // No need to allocate this register.
2531 FeedbackVectorSlot slot = instr->hydrogen()->slot(); 2531 FeedbackVectorSlot slot = instr->hydrogen()->slot();
2532 int index = vector->GetIndex(slot); 2532 int index = vector->GetIndex(slot);
2533 __ Move(slot_register, Smi::FromInt(index)); 2533 __ Move(slot_register, Smi::FromInt(index));
2534 } 2534 }
2535 2535
2536 2536
2537 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2538 DCHECK(ToRegister(instr->context()).is(rsi));
2539 DCHECK(ToRegister(instr->result()).is(rax));
2540
2541 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2542 Handle<Code> ic =
2543 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2544 .code();
2545 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2546 }
2547
2548
2549 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2537 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2550 Register context = ToRegister(instr->context()); 2538 Register context = ToRegister(instr->context());
2551 Register result = ToRegister(instr->result()); 2539 Register result = ToRegister(instr->result());
2552 __ movp(result, ContextOperand(context, instr->slot_index())); 2540 __ movp(result, ContextOperand(context, instr->slot_index()));
2553 if (instr->hydrogen()->RequiresHoleCheck()) { 2541 if (instr->hydrogen()->RequiresHoleCheck()) {
2554 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2542 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
2555 if (instr->hydrogen()->DeoptimizesOnHole()) { 2543 if (instr->hydrogen()->DeoptimizesOnHole()) {
2556 DeoptimizeIf(equal, instr, DeoptimizeReason::kHole); 2544 DeoptimizeIf(equal, instr, DeoptimizeReason::kHole);
2557 } else { 2545 } else {
2558 Label is_not_hole; 2546 Label is_not_hole;
(...skipping 2961 matching lines...) Expand 10 before | Expand all | Expand 10 after
5520 __ bind(deferred->exit()); 5508 __ bind(deferred->exit());
5521 __ bind(&done); 5509 __ bind(&done);
5522 } 5510 }
5523 5511
5524 #undef __ 5512 #undef __
5525 5513
5526 } // namespace internal 5514 } // namespace internal
5527 } // namespace v8 5515 } // namespace v8
5528 5516
5529 #endif // V8_TARGET_ARCH_X64 5517 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/s390/lithium-s390.cc ('k') | src/crankshaft/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698