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

Side by Side Diff: src/x64/lithium-codegen-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 7 #if V8_TARGET_ARCH_X64
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 2932 matching lines...) Expand 10 before | Expand all | Expand 10 after
2943 2943
2944 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2944 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2945 DCHECK(ToRegister(instr->context()).is(rsi)); 2945 DCHECK(ToRegister(instr->context()).is(rsi));
2946 DCHECK(ToRegister(instr->global_object()) 2946 DCHECK(ToRegister(instr->global_object())
2947 .is(LoadDescriptor::ReceiverRegister())); 2947 .is(LoadDescriptor::ReceiverRegister()));
2948 DCHECK(ToRegister(instr->result()).is(rax)); 2948 DCHECK(ToRegister(instr->result()).is(rax));
2949 2949
2950 __ Move(LoadDescriptor::NameRegister(), instr->name()); 2950 __ Move(LoadDescriptor::NameRegister(), instr->name());
2951 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2951 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2952 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2952 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2953 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 2953 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY,
2954 PREMONOMORPHIC).code(); 2954 PREMONOMORPHIC).code();
2955 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2955 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2956 } 2956 }
2957 2957
2958 2958
2959 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2959 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2960 Register context = ToRegister(instr->context()); 2960 Register context = ToRegister(instr->context());
2961 Register result = ToRegister(instr->result()); 2961 Register result = ToRegister(instr->result());
2962 __ movp(result, ContextOperand(context, instr->slot_index())); 2962 __ movp(result, ContextOperand(context, instr->slot_index()));
2963 if (instr->hydrogen()->RequiresHoleCheck()) { 2963 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
3059 } 3059 }
3060 3060
3061 3061
3062 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3062 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3063 DCHECK(ToRegister(instr->context()).is(rsi)); 3063 DCHECK(ToRegister(instr->context()).is(rsi));
3064 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3064 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3065 DCHECK(ToRegister(instr->result()).is(rax)); 3065 DCHECK(ToRegister(instr->result()).is(rax));
3066 3066
3067 __ Move(LoadDescriptor::NameRegister(), instr->name()); 3067 __ Move(LoadDescriptor::NameRegister(), instr->name());
3068 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3068 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3069 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3069 Handle<Code> ic =
3070 isolate(), NOT_CONTEXTUAL, 3070 CodeFactory::LoadICInOptimizedCode(
3071 instr->hydrogen()->initialization_state()).code(); 3071 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(),
3072 instr->hydrogen()->initialization_state()).code();
3072 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3073 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3073 } 3074 }
3074 3075
3075 3076
3076 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3077 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3077 Register function = ToRegister(instr->function()); 3078 Register function = ToRegister(instr->function());
3078 Register result = ToRegister(instr->result()); 3079 Register result = ToRegister(instr->result());
3079 3080
3080 // Get the prototype or initial map from the function. 3081 // Get the prototype or initial map from the function.
3081 __ movp(result, 3082 __ movp(result,
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
3357 3358
3358 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3359 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3359 DCHECK(ToRegister(instr->context()).is(rsi)); 3360 DCHECK(ToRegister(instr->context()).is(rsi));
3360 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3361 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3361 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3362 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3362 3363
3363 if (instr->hydrogen()->HasVectorAndSlot()) { 3364 if (instr->hydrogen()->HasVectorAndSlot()) {
3364 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3365 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3365 } 3366 }
3366 3367
3367 Handle<Code> ic = 3368 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
3368 CodeFactory::KeyedLoadICInOptimizedCode( 3369 isolate(), instr->hydrogen()->language_mode(),
3369 isolate(), instr->hydrogen()->initialization_state()).code(); 3370 instr->hydrogen()->initialization_state()).code();
3370 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3371 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3371 } 3372 }
3372 3373
3373 3374
3374 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3375 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3375 Register result = ToRegister(instr->result()); 3376 Register result = ToRegister(instr->result());
3376 3377
3377 if (instr->hydrogen()->from_inlined()) { 3378 if (instr->hydrogen()->from_inlined()) {
3378 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); 3379 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize));
3379 } else { 3380 } else {
(...skipping 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after
6069 RecordSafepoint(Safepoint::kNoLazyDeopt); 6070 RecordSafepoint(Safepoint::kNoLazyDeopt);
6070 } 6071 }
6071 6072
6072 6073
6073 #undef __ 6074 #undef __
6074 6075
6075 } // namespace internal 6076 } // namespace internal
6076 } // namespace v8 6077 } // namespace v8
6077 6078
6078 #endif // V8_TARGET_ARCH_X64 6079 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/lookup.h ('K') | « src/x64/full-codegen-x64.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698