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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
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 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after
2915 2915
2916 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2916 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2917 DCHECK(ToRegister(instr->context()).is(esi)); 2917 DCHECK(ToRegister(instr->context()).is(esi));
2918 DCHECK(ToRegister(instr->global_object()) 2918 DCHECK(ToRegister(instr->global_object())
2919 .is(LoadDescriptor::ReceiverRegister())); 2919 .is(LoadDescriptor::ReceiverRegister()));
2920 DCHECK(ToRegister(instr->result()).is(eax)); 2920 DCHECK(ToRegister(instr->result()).is(eax));
2921 2921
2922 __ mov(LoadDescriptor::NameRegister(), instr->name()); 2922 __ mov(LoadDescriptor::NameRegister(), instr->name());
2923 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2923 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2924 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2924 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2925 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 2925 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY,
2926 PREMONOMORPHIC).code(); 2926 PREMONOMORPHIC).code();
2927 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2927 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2928 } 2928 }
2929 2929
2930 2930
2931 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2931 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2932 Register context = ToRegister(instr->context()); 2932 Register context = ToRegister(instr->context());
2933 Register result = ToRegister(instr->result()); 2933 Register result = ToRegister(instr->result());
2934 __ mov(result, ContextOperand(context, instr->slot_index())); 2934 __ mov(result, ContextOperand(context, instr->slot_index()));
2935 2935
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 } 3031 }
3032 3032
3033 3033
3034 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3034 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3035 DCHECK(ToRegister(instr->context()).is(esi)); 3035 DCHECK(ToRegister(instr->context()).is(esi));
3036 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3036 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3037 DCHECK(ToRegister(instr->result()).is(eax)); 3037 DCHECK(ToRegister(instr->result()).is(eax));
3038 3038
3039 __ mov(LoadDescriptor::NameRegister(), instr->name()); 3039 __ mov(LoadDescriptor::NameRegister(), instr->name());
3040 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3040 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3041 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3041 Handle<Code> ic =
3042 isolate(), NOT_CONTEXTUAL, 3042 CodeFactory::LoadICInOptimizedCode(
3043 instr->hydrogen()->initialization_state()).code(); 3043 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(),
3044 instr->hydrogen()->initialization_state()).code();
3044 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3045 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3045 } 3046 }
3046 3047
3047 3048
3048 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3049 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3049 Register function = ToRegister(instr->function()); 3050 Register function = ToRegister(instr->function());
3050 Register temp = ToRegister(instr->temp()); 3051 Register temp = ToRegister(instr->temp());
3051 Register result = ToRegister(instr->result()); 3052 Register result = ToRegister(instr->result());
3052 3053
3053 // Get the prototype or initial map from the function. 3054 // Get the prototype or initial map from the function.
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
3277 DCHECK(ToRegister(instr->context()).is(esi)); 3278 DCHECK(ToRegister(instr->context()).is(esi));
3278 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3279 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3279 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3280 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3280 3281
3281 if (instr->hydrogen()->HasVectorAndSlot()) { 3282 if (instr->hydrogen()->HasVectorAndSlot()) {
3282 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3283 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3283 } 3284 }
3284 3285
3285 Handle<Code> ic = 3286 Handle<Code> ic =
3286 CodeFactory::KeyedLoadICInOptimizedCode( 3287 CodeFactory::KeyedLoadICInOptimizedCode(
3287 isolate(), instr->hydrogen()->initialization_state()).code(); 3288 isolate(), instr->hydrogen()->language_mode(),
3289 instr->hydrogen()->initialization_state()).code();
3288 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3290 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3289 } 3291 }
3290 3292
3291 3293
3292 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3294 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3293 Register result = ToRegister(instr->result()); 3295 Register result = ToRegister(instr->result());
3294 3296
3295 if (instr->hydrogen()->from_inlined()) { 3297 if (instr->hydrogen()->from_inlined()) {
3296 __ lea(result, Operand(esp, -2 * kPointerSize)); 3298 __ lea(result, Operand(esp, -2 * kPointerSize));
3297 } else { 3299 } else {
(...skipping 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after
5869 RecordSafepoint(Safepoint::kNoLazyDeopt); 5871 RecordSafepoint(Safepoint::kNoLazyDeopt);
5870 } 5872 }
5871 5873
5872 5874
5873 #undef __ 5875 #undef __
5874 5876
5875 } // namespace internal 5877 } // namespace internal
5876 } // namespace v8 5878 } // namespace v8
5877 5879
5878 #endif // V8_TARGET_ARCH_IA32 5880 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | src/lookup.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698