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

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

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 5 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/x64/full-codegen-x64.cc ('k') | src/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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
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 2859 matching lines...) Expand 10 before | Expand all | Expand 10 after
2870 2870
2871 2871
2872 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2872 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2873 DCHECK(ToRegister(instr->context()).is(rsi)); 2873 DCHECK(ToRegister(instr->context()).is(rsi));
2874 DCHECK(ToRegister(instr->global_object()) 2874 DCHECK(ToRegister(instr->global_object())
2875 .is(LoadDescriptor::ReceiverRegister())); 2875 .is(LoadDescriptor::ReceiverRegister()));
2876 DCHECK(ToRegister(instr->result()).is(rax)); 2876 DCHECK(ToRegister(instr->result()).is(rax));
2877 2877
2878 __ Move(LoadDescriptor::NameRegister(), instr->name()); 2878 __ Move(LoadDescriptor::NameRegister(), instr->name());
2879 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2879 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2880 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2880 Handle<Code> ic =
2881 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY, 2881 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
2882 PREMONOMORPHIC).code(); 2882 SLOPPY, PREMONOMORPHIC).code();
2883 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2883 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2884 } 2884 }
2885 2885
2886 2886
2887 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2887 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2888 Register context = ToRegister(instr->context()); 2888 Register context = ToRegister(instr->context());
2889 Register result = ToRegister(instr->result()); 2889 Register result = ToRegister(instr->result());
2890 __ movp(result, ContextOperand(context, instr->slot_index())); 2890 __ movp(result, ContextOperand(context, instr->slot_index()));
2891 if (instr->hydrogen()->RequiresHoleCheck()) { 2891 if (instr->hydrogen()->RequiresHoleCheck()) {
2892 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2892 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
2989 2989
2990 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2990 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2991 DCHECK(ToRegister(instr->context()).is(rsi)); 2991 DCHECK(ToRegister(instr->context()).is(rsi));
2992 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2992 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2993 DCHECK(ToRegister(instr->result()).is(rax)); 2993 DCHECK(ToRegister(instr->result()).is(rax));
2994 2994
2995 __ Move(LoadDescriptor::NameRegister(), instr->name()); 2995 __ Move(LoadDescriptor::NameRegister(), instr->name());
2996 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 2996 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2997 Handle<Code> ic = 2997 Handle<Code> ic =
2998 CodeFactory::LoadICInOptimizedCode( 2998 CodeFactory::LoadICInOptimizedCode(
2999 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(), 2999 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
3000 instr->hydrogen()->initialization_state()).code(); 3000 instr->hydrogen()->initialization_state()).code();
3001 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3001 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3002 } 3002 }
3003 3003
3004 3004
3005 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3005 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3006 Register function = ToRegister(instr->function()); 3006 Register function = ToRegister(instr->function());
3007 Register result = ToRegister(instr->result()); 3007 Register result = ToRegister(instr->result());
3008 3008
3009 // Get the prototype or initial map from the function. 3009 // Get the prototype or initial map from the function.
(...skipping 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after
6008 RecordSafepoint(Safepoint::kNoLazyDeopt); 6008 RecordSafepoint(Safepoint::kNoLazyDeopt);
6009 } 6009 }
6010 6010
6011 6011
6012 #undef __ 6012 #undef __
6013 6013
6014 } // namespace internal 6014 } // namespace internal
6015 } // namespace v8 6015 } // namespace v8
6016 6016
6017 #endif // V8_TARGET_ARCH_X64 6017 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698