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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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/mips64/full-codegen-mips64.cc ('k') | src/mips64/lithium-mips64.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2977 2977
2978 2978
2979 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2979 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2980 DCHECK(ToRegister(instr->context()).is(cp)); 2980 DCHECK(ToRegister(instr->context()).is(cp));
2981 DCHECK(ToRegister(instr->global_object()) 2981 DCHECK(ToRegister(instr->global_object())
2982 .is(LoadDescriptor::ReceiverRegister())); 2982 .is(LoadDescriptor::ReceiverRegister()));
2983 DCHECK(ToRegister(instr->result()).is(v0)); 2983 DCHECK(ToRegister(instr->result()).is(v0));
2984 2984
2985 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2985 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2986 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2986 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2987 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2987 Handle<Code> ic =
2988 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY, 2988 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
2989 PREMONOMORPHIC).code(); 2989 SLOPPY, PREMONOMORPHIC).code();
2990 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2990 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2991 } 2991 }
2992 2992
2993 2993
2994 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2994 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2995 Register context = ToRegister(instr->context()); 2995 Register context = ToRegister(instr->context());
2996 Register result = ToRegister(instr->result()); 2996 Register result = ToRegister(instr->result());
2997 2997
2998 __ ld(result, ContextOperand(context, instr->slot_index())); 2998 __ ld(result, ContextOperand(context, instr->slot_index()));
2999 if (instr->hydrogen()->RequiresHoleCheck()) { 2999 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
3095 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3095 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3096 DCHECK(ToRegister(instr->context()).is(cp)); 3096 DCHECK(ToRegister(instr->context()).is(cp));
3097 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3097 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3098 DCHECK(ToRegister(instr->result()).is(v0)); 3098 DCHECK(ToRegister(instr->result()).is(v0));
3099 3099
3100 // Name is always in a2. 3100 // Name is always in a2.
3101 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 3101 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
3102 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3102 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3103 Handle<Code> ic = 3103 Handle<Code> ic =
3104 CodeFactory::LoadICInOptimizedCode( 3104 CodeFactory::LoadICInOptimizedCode(
3105 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(), 3105 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
3106 instr->hydrogen()->initialization_state()).code(); 3106 instr->hydrogen()->initialization_state()).code();
3107 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3107 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3108 } 3108 }
3109 3109
3110 3110
3111 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3111 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3112 Register scratch = scratch0(); 3112 Register scratch = scratch0();
3113 Register function = ToRegister(instr->function()); 3113 Register function = ToRegister(instr->function());
3114 Register result = ToRegister(instr->result()); 3114 Register result = ToRegister(instr->result());
3115 3115
(...skipping 3095 matching lines...) Expand 10 before | Expand all | Expand 10 after
6211 __ Push(at, ToRegister(instr->function())); 6211 __ Push(at, ToRegister(instr->function()));
6212 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6212 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6213 RecordSafepoint(Safepoint::kNoLazyDeopt); 6213 RecordSafepoint(Safepoint::kNoLazyDeopt);
6214 } 6214 }
6215 6215
6216 6216
6217 #undef __ 6217 #undef __
6218 6218
6219 } // namespace internal 6219 } // namespace internal
6220 } // namespace v8 6220 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698