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

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

Issue 1168093002: [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: slim down, improve tests 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
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/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
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 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 3031
3032 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 3032 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
3033 DCHECK(ToRegister(instr->context()).is(cp)); 3033 DCHECK(ToRegister(instr->context()).is(cp));
3034 DCHECK(ToRegister(instr->global_object()) 3034 DCHECK(ToRegister(instr->global_object())
3035 .is(LoadDescriptor::ReceiverRegister())); 3035 .is(LoadDescriptor::ReceiverRegister()));
3036 DCHECK(ToRegister(instr->result()).is(r0)); 3036 DCHECK(ToRegister(instr->result()).is(r0));
3037 3037
3038 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 3038 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3039 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 3039 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
3040 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 3040 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
3041 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 3041 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY,
3042 PREMONOMORPHIC).code(); 3042 PREMONOMORPHIC).code();
3043 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3043 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3044 } 3044 }
3045 3045
3046 3046
3047 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 3047 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
3048 Register context = ToRegister(instr->context()); 3048 Register context = ToRegister(instr->context());
3049 Register result = ToRegister(instr->result()); 3049 Register result = ToRegister(instr->result());
3050 __ ldr(result, ContextOperand(context, instr->slot_index())); 3050 __ ldr(result, ContextOperand(context, instr->slot_index()));
3051 if (instr->hydrogen()->RequiresHoleCheck()) { 3051 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 3127
3128 3128
3129 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3129 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3130 DCHECK(ToRegister(instr->context()).is(cp)); 3130 DCHECK(ToRegister(instr->context()).is(cp));
3131 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3131 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3132 DCHECK(ToRegister(instr->result()).is(r0)); 3132 DCHECK(ToRegister(instr->result()).is(r0));
3133 3133
3134 // Name is always in r2. 3134 // Name is always in r2.
3135 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 3135 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3136 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3136 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3137 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3137 Handle<Code> ic =
3138 isolate(), NOT_CONTEXTUAL, 3138 CodeFactory::LoadICInOptimizedCode(
3139 instr->hydrogen()->initialization_state()).code(); 3139 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(),
3140 instr->hydrogen()->initialization_state()).code();
3140 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); 3141 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
3141 } 3142 }
3142 3143
3143 3144
3144 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3145 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3145 Register scratch = scratch0(); 3146 Register scratch = scratch0();
3146 Register function = ToRegister(instr->function()); 3147 Register function = ToRegister(instr->function());
3147 Register result = ToRegister(instr->result()); 3148 Register result = ToRegister(instr->result());
3148 3149
3149 // Get the prototype or initial map from the function. 3150 // Get the prototype or initial map from the function.
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
3436 3437
3437 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3438 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3438 DCHECK(ToRegister(instr->context()).is(cp)); 3439 DCHECK(ToRegister(instr->context()).is(cp));
3439 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3440 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3440 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3441 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3441 3442
3442 if (instr->hydrogen()->HasVectorAndSlot()) { 3443 if (instr->hydrogen()->HasVectorAndSlot()) {
3443 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3444 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3444 } 3445 }
3445 3446
3446 Handle<Code> ic = 3447 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
3447 CodeFactory::KeyedLoadICInOptimizedCode( 3448 isolate(), instr->hydrogen()->language_mode(),
3448 isolate(), instr->hydrogen()->initialization_state()).code(); 3449 instr->hydrogen()->initialization_state()).code();
3449 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); 3450 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
3450 } 3451 }
3451 3452
3452 3453
3453 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3454 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3454 Register scratch = scratch0(); 3455 Register scratch = scratch0();
3455 Register result = ToRegister(instr->result()); 3456 Register result = ToRegister(instr->result());
3456 3457
3457 if (instr->hydrogen()->from_inlined()) { 3458 if (instr->hydrogen()->from_inlined()) {
3458 __ sub(result, sp, Operand(2 * kPointerSize)); 3459 __ sub(result, sp, Operand(2 * kPointerSize));
(...skipping 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after
6046 __ push(ToRegister(instr->function())); 6047 __ push(ToRegister(instr->function()));
6047 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6048 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6048 RecordSafepoint(Safepoint::kNoLazyDeopt); 6049 RecordSafepoint(Safepoint::kNoLazyDeopt);
6049 } 6050 }
6050 6051
6051 6052
6052 #undef __ 6053 #undef __
6053 6054
6054 } // namespace internal 6055 } // namespace internal
6055 } // namespace v8 6056 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | src/lookup.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698