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

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

Issue 1912633002: [ic] Split LoadIC into LoadGlobalIC and LoadIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 6 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-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('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 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 2560
2561 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2561 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2562 DCHECK(ToRegister(instr->context()).is(rsi)); 2562 DCHECK(ToRegister(instr->context()).is(rsi));
2563 DCHECK(ToRegister(instr->global_object()) 2563 DCHECK(ToRegister(instr->global_object())
2564 .is(LoadDescriptor::ReceiverRegister())); 2564 .is(LoadDescriptor::ReceiverRegister()));
2565 DCHECK(ToRegister(instr->result()).is(rax)); 2565 DCHECK(ToRegister(instr->result()).is(rax));
2566 2566
2567 __ Move(LoadDescriptor::NameRegister(), instr->name()); 2567 __ Move(LoadDescriptor::NameRegister(), instr->name());
2568 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2568 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2569 Handle<Code> ic = 2569 Handle<Code> ic =
2570 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode()) 2570 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode())
2571 .code(); 2571 .code();
2572 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2572 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2573 } 2573 }
2574 2574
2575 2575
2576 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2576 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2577 Register context = ToRegister(instr->context()); 2577 Register context = ToRegister(instr->context());
2578 Register result = ToRegister(instr->result()); 2578 Register result = ToRegister(instr->result());
2579 __ movp(result, ContextOperand(context, instr->slot_index())); 2579 __ movp(result, ContextOperand(context, instr->slot_index()));
2580 if (instr->hydrogen()->RequiresHoleCheck()) { 2580 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
2676 } 2676 }
2677 2677
2678 2678
2679 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2679 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2680 DCHECK(ToRegister(instr->context()).is(rsi)); 2680 DCHECK(ToRegister(instr->context()).is(rsi));
2681 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2681 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2682 DCHECK(ToRegister(instr->result()).is(rax)); 2682 DCHECK(ToRegister(instr->result()).is(rax));
2683 2683
2684 __ Move(LoadDescriptor::NameRegister(), instr->name()); 2684 __ Move(LoadDescriptor::NameRegister(), instr->name());
2685 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 2685 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2686 Handle<Code> ic = 2686 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code();
2687 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code();
2688 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2687 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2689 } 2688 }
2690 2689
2691 2690
2692 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2691 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2693 Register function = ToRegister(instr->function()); 2692 Register function = ToRegister(instr->function());
2694 Register result = ToRegister(instr->result()); 2693 Register result = ToRegister(instr->result());
2695 2694
2696 // Get the prototype or initial map from the function. 2695 // Get the prototype or initial map from the function.
2697 __ movp(result, 2696 __ movp(result,
(...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after
5594 __ bind(deferred->exit()); 5593 __ bind(deferred->exit());
5595 __ bind(&done); 5594 __ bind(&done);
5596 } 5595 }
5597 5596
5598 #undef __ 5597 #undef __
5599 5598
5600 } // namespace internal 5599 } // namespace internal
5601 } // namespace v8 5600 } // namespace v8
5602 5601
5603 #endif // V8_TARGET_ARCH_X64 5602 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698