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

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

Issue 1185343005: Revert of Revert of [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/x87/full-codegen-x87.cc ('k') | test/cctest/test-api.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 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 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after
3109 3109
3110 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 3110 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
3111 DCHECK(ToRegister(instr->context()).is(esi)); 3111 DCHECK(ToRegister(instr->context()).is(esi));
3112 DCHECK(ToRegister(instr->global_object()) 3112 DCHECK(ToRegister(instr->global_object())
3113 .is(LoadDescriptor::ReceiverRegister())); 3113 .is(LoadDescriptor::ReceiverRegister()));
3114 DCHECK(ToRegister(instr->result()).is(eax)); 3114 DCHECK(ToRegister(instr->result()).is(eax));
3115 3115
3116 __ mov(LoadDescriptor::NameRegister(), instr->name()); 3116 __ mov(LoadDescriptor::NameRegister(), instr->name());
3117 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 3117 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
3118 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 3118 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
3119 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 3119 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY,
3120 PREMONOMORPHIC).code(); 3120 PREMONOMORPHIC).code();
3121 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3121 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3122 } 3122 }
3123 3123
3124 3124
3125 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 3125 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
3126 Register context = ToRegister(instr->context()); 3126 Register context = ToRegister(instr->context());
3127 Register result = ToRegister(instr->result()); 3127 Register result = ToRegister(instr->result());
3128 __ mov(result, ContextOperand(context, instr->slot_index())); 3128 __ mov(result, ContextOperand(context, instr->slot_index()));
3129 3129
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
3219 } 3219 }
3220 3220
3221 3221
3222 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3222 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3223 DCHECK(ToRegister(instr->context()).is(esi)); 3223 DCHECK(ToRegister(instr->context()).is(esi));
3224 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3224 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3225 DCHECK(ToRegister(instr->result()).is(eax)); 3225 DCHECK(ToRegister(instr->result()).is(eax));
3226 3226
3227 __ mov(LoadDescriptor::NameRegister(), instr->name()); 3227 __ mov(LoadDescriptor::NameRegister(), instr->name());
3228 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3228 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3229 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3229 Handle<Code> ic =
3230 isolate(), NOT_CONTEXTUAL, 3230 CodeFactory::LoadICInOptimizedCode(
3231 instr->hydrogen()->initialization_state()).code(); 3231 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(),
3232 instr->hydrogen()->initialization_state()).code();
3232 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3233 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3233 } 3234 }
3234 3235
3235 3236
3236 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3237 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3237 Register function = ToRegister(instr->function()); 3238 Register function = ToRegister(instr->function());
3238 Register temp = ToRegister(instr->temp()); 3239 Register temp = ToRegister(instr->temp());
3239 Register result = ToRegister(instr->result()); 3240 Register result = ToRegister(instr->result());
3240 3241
3241 // Get the prototype or initial map from the function. 3242 // Get the prototype or initial map from the function.
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
3460 3461
3461 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3462 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3462 DCHECK(ToRegister(instr->context()).is(esi)); 3463 DCHECK(ToRegister(instr->context()).is(esi));
3463 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3464 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3464 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3465 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3465 3466
3466 if (instr->hydrogen()->HasVectorAndSlot()) { 3467 if (instr->hydrogen()->HasVectorAndSlot()) {
3467 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3468 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3468 } 3469 }
3469 3470
3470 Handle<Code> ic = 3471 Handle<Code> ic = Handle<Code> ic =
3471 CodeFactory::KeyedLoadICInOptimizedCode( 3472 CodeFactory::KeyedLoadICInOptimizedCode(
3472 isolate(), instr->hydrogen()->initialization_state()).code(); 3473 isolate(), instr->hydrogen()->language_mode(),
3474 instr->hydrogen()->initialization_state()).code();
3473 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3475 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3474 } 3476 }
3475 3477
3476 3478
3477 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3479 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3478 Register result = ToRegister(instr->result()); 3480 Register result = ToRegister(instr->result());
3479 3481
3480 if (instr->hydrogen()->from_inlined()) { 3482 if (instr->hydrogen()->from_inlined()) {
3481 __ lea(result, Operand(esp, -2 * kPointerSize)); 3483 __ lea(result, Operand(esp, -2 * kPointerSize));
3482 } else { 3484 } else {
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after
6397 RecordSafepoint(Safepoint::kNoLazyDeopt); 6399 RecordSafepoint(Safepoint::kNoLazyDeopt);
6398 } 6400 }
6399 6401
6400 6402
6401 #undef __ 6403 #undef __
6402 6404
6403 } // namespace internal 6405 } // namespace internal
6404 } // namespace v8 6406 } // namespace v8
6405 6407
6406 #endif // V8_TARGET_ARCH_X87 6408 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698