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

Side by Side Diff: src/x87/lithium-codegen-x87.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/x87/full-codegen-x87.cc ('k') | src/x87/lithium-x87.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 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
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 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3122 3122
3123 3123
3124 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 3124 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
3125 DCHECK(ToRegister(instr->context()).is(esi)); 3125 DCHECK(ToRegister(instr->context()).is(esi));
3126 DCHECK(ToRegister(instr->global_object()) 3126 DCHECK(ToRegister(instr->global_object())
3127 .is(LoadDescriptor::ReceiverRegister())); 3127 .is(LoadDescriptor::ReceiverRegister()));
3128 DCHECK(ToRegister(instr->result()).is(eax)); 3128 DCHECK(ToRegister(instr->result()).is(eax));
3129 3129
3130 __ mov(LoadDescriptor::NameRegister(), instr->name()); 3130 __ mov(LoadDescriptor::NameRegister(), instr->name());
3131 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 3131 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
3132 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 3132 Handle<Code> ic =
3133 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY, 3133 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
3134 PREMONOMORPHIC).code(); 3134 SLOPPY, PREMONOMORPHIC).code();
3135 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3135 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3136 } 3136 }
3137 3137
3138 3138
3139 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 3139 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
3140 Register context = ToRegister(instr->context()); 3140 Register context = ToRegister(instr->context());
3141 Register result = ToRegister(instr->result()); 3141 Register result = ToRegister(instr->result());
3142 __ mov(result, ContextOperand(context, instr->slot_index())); 3142 __ mov(result, ContextOperand(context, instr->slot_index()));
3143 3143
3144 if (instr->hydrogen()->RequiresHoleCheck()) { 3144 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
3235 3235
3236 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3236 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3237 DCHECK(ToRegister(instr->context()).is(esi)); 3237 DCHECK(ToRegister(instr->context()).is(esi));
3238 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3238 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3239 DCHECK(ToRegister(instr->result()).is(eax)); 3239 DCHECK(ToRegister(instr->result()).is(eax));
3240 3240
3241 __ mov(LoadDescriptor::NameRegister(), instr->name()); 3241 __ mov(LoadDescriptor::NameRegister(), instr->name());
3242 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3242 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3243 Handle<Code> ic = 3243 Handle<Code> ic =
3244 CodeFactory::LoadICInOptimizedCode( 3244 CodeFactory::LoadICInOptimizedCode(
3245 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(), 3245 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
3246 instr->hydrogen()->initialization_state()).code(); 3246 instr->hydrogen()->initialization_state()).code();
3247 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3247 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3248 } 3248 }
3249 3249
3250 3250
3251 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3251 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3252 Register function = ToRegister(instr->function()); 3252 Register function = ToRegister(instr->function());
3253 Register temp = ToRegister(instr->temp()); 3253 Register temp = ToRegister(instr->temp());
3254 Register result = ToRegister(instr->result()); 3254 Register result = ToRegister(instr->result());
3255 3255
(...skipping 3166 matching lines...) Expand 10 before | Expand all | Expand 10 after
6422 RecordSafepoint(Safepoint::kNoLazyDeopt); 6422 RecordSafepoint(Safepoint::kNoLazyDeopt);
6423 } 6423 }
6424 6424
6425 6425
6426 #undef __ 6426 #undef __
6427 6427
6428 } // namespace internal 6428 } // namespace internal
6429 } // namespace v8 6429 } // namespace v8
6430 6430
6431 #endif // V8_TARGET_ARCH_X87 6431 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | src/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698