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

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: rebase 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/arm/full-codegen-arm.cc ('k') | src/arm64/code-stubs-arm64.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 #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 2934 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 2945
2946 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2946 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2947 DCHECK(ToRegister(instr->context()).is(cp)); 2947 DCHECK(ToRegister(instr->context()).is(cp));
2948 DCHECK(ToRegister(instr->global_object()) 2948 DCHECK(ToRegister(instr->global_object())
2949 .is(LoadDescriptor::ReceiverRegister())); 2949 .is(LoadDescriptor::ReceiverRegister()));
2950 DCHECK(ToRegister(instr->result()).is(r0)); 2950 DCHECK(ToRegister(instr->result()).is(r0));
2951 2951
2952 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 2952 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
2953 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2953 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2954 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2954 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2955 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 2955 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY,
2956 PREMONOMORPHIC).code(); 2956 PREMONOMORPHIC).code();
2957 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2957 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2958 } 2958 }
2959 2959
2960 2960
2961 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2961 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2962 Register context = ToRegister(instr->context()); 2962 Register context = ToRegister(instr->context());
2963 Register result = ToRegister(instr->result()); 2963 Register result = ToRegister(instr->result());
2964 __ ldr(result, ContextOperand(context, instr->slot_index())); 2964 __ ldr(result, ContextOperand(context, instr->slot_index()));
2965 if (instr->hydrogen()->RequiresHoleCheck()) { 2965 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
3041 3041
3042 3042
3043 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3043 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3044 DCHECK(ToRegister(instr->context()).is(cp)); 3044 DCHECK(ToRegister(instr->context()).is(cp));
3045 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3045 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3046 DCHECK(ToRegister(instr->result()).is(r0)); 3046 DCHECK(ToRegister(instr->result()).is(r0));
3047 3047
3048 // Name is always in r2. 3048 // Name is always in r2.
3049 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 3049 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3050 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3050 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3051 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3051 Handle<Code> ic =
3052 isolate(), NOT_CONTEXTUAL, 3052 CodeFactory::LoadICInOptimizedCode(
3053 instr->hydrogen()->initialization_state()).code(); 3053 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(),
3054 instr->hydrogen()->initialization_state()).code();
3054 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); 3055 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
3055 } 3056 }
3056 3057
3057 3058
3058 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3059 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3059 Register scratch = scratch0(); 3060 Register scratch = scratch0();
3060 Register function = ToRegister(instr->function()); 3061 Register function = ToRegister(instr->function());
3061 Register result = ToRegister(instr->result()); 3062 Register result = ToRegister(instr->result());
3062 3063
3063 // Get the prototype or initial map from the function. 3064 // Get the prototype or initial map from the function.
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
3350 3351
3351 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3352 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3352 DCHECK(ToRegister(instr->context()).is(cp)); 3353 DCHECK(ToRegister(instr->context()).is(cp));
3353 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3354 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3354 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3355 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3355 3356
3356 if (instr->hydrogen()->HasVectorAndSlot()) { 3357 if (instr->hydrogen()->HasVectorAndSlot()) {
3357 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3358 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3358 } 3359 }
3359 3360
3360 Handle<Code> ic = 3361 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
3361 CodeFactory::KeyedLoadICInOptimizedCode( 3362 isolate(), instr->hydrogen()->language_mode(),
3362 isolate(), instr->hydrogen()->initialization_state()).code(); 3363 instr->hydrogen()->initialization_state()).code();
3363 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); 3364 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
3364 } 3365 }
3365 3366
3366 3367
3367 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3368 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3368 Register scratch = scratch0(); 3369 Register scratch = scratch0();
3369 Register result = ToRegister(instr->result()); 3370 Register result = ToRegister(instr->result());
3370 3371
3371 if (instr->hydrogen()->from_inlined()) { 3372 if (instr->hydrogen()->from_inlined()) {
3372 __ sub(result, sp, Operand(2 * kPointerSize)); 3373 __ sub(result, sp, Operand(2 * kPointerSize));
(...skipping 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after
5960 __ push(ToRegister(instr->function())); 5961 __ push(ToRegister(instr->function()));
5961 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5962 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5962 RecordSafepoint(Safepoint::kNoLazyDeopt); 5963 RecordSafepoint(Safepoint::kNoLazyDeopt);
5963 } 5964 }
5964 5965
5965 5966
5966 #undef __ 5967 #undef __
5967 5968
5968 } // namespace internal 5969 } // namespace internal
5969 } // namespace v8 5970 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698