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

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: fix arm64 port 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 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2902 2902
2903 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2903 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2904 DCHECK(ToRegister(instr->context()).is(rsi)); 2904 DCHECK(ToRegister(instr->context()).is(rsi));
2905 DCHECK(ToRegister(instr->global_object()) 2905 DCHECK(ToRegister(instr->global_object())
2906 .is(LoadDescriptor::ReceiverRegister())); 2906 .is(LoadDescriptor::ReceiverRegister()));
2907 DCHECK(ToRegister(instr->result()).is(rax)); 2907 DCHECK(ToRegister(instr->result()).is(rax));
2908 2908
2909 __ Move(LoadDescriptor::NameRegister(), instr->name()); 2909 __ Move(LoadDescriptor::NameRegister(), instr->name());
2910 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2910 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2911 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2911 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2912 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 2912 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY,
2913 PREMONOMORPHIC).code(); 2913 PREMONOMORPHIC).code();
2914 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2914 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2915 } 2915 }
2916 2916
2917 2917
2918 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2918 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2919 Register context = ToRegister(instr->context()); 2919 Register context = ToRegister(instr->context());
2920 Register result = ToRegister(instr->result()); 2920 Register result = ToRegister(instr->result());
2921 __ movp(result, ContextOperand(context, instr->slot_index())); 2921 __ movp(result, ContextOperand(context, instr->slot_index()));
2922 if (instr->hydrogen()->RequiresHoleCheck()) { 2922 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 } 3018 }
3019 3019
3020 3020
3021 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3021 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3022 DCHECK(ToRegister(instr->context()).is(rsi)); 3022 DCHECK(ToRegister(instr->context()).is(rsi));
3023 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3023 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3024 DCHECK(ToRegister(instr->result()).is(rax)); 3024 DCHECK(ToRegister(instr->result()).is(rax));
3025 3025
3026 __ Move(LoadDescriptor::NameRegister(), instr->name()); 3026 __ Move(LoadDescriptor::NameRegister(), instr->name());
3027 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3027 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3028 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3028 Handle<Code> ic =
3029 isolate(), NOT_CONTEXTUAL, 3029 CodeFactory::LoadICInOptimizedCode(
3030 instr->hydrogen()->initialization_state()).code(); 3030 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(),
3031 instr->hydrogen()->initialization_state()).code();
3031 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3032 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3032 } 3033 }
3033 3034
3034 3035
3035 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3036 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3036 Register function = ToRegister(instr->function()); 3037 Register function = ToRegister(instr->function());
3037 Register result = ToRegister(instr->result()); 3038 Register result = ToRegister(instr->result());
3038 3039
3039 // Get the prototype or initial map from the function. 3040 // Get the prototype or initial map from the function.
3040 __ movp(result, 3041 __ movp(result,
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
3316 3317
3317 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3318 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3318 DCHECK(ToRegister(instr->context()).is(rsi)); 3319 DCHECK(ToRegister(instr->context()).is(rsi));
3319 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3320 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3320 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3321 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3321 3322
3322 if (instr->hydrogen()->HasVectorAndSlot()) { 3323 if (instr->hydrogen()->HasVectorAndSlot()) {
3323 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3324 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3324 } 3325 }
3325 3326
3326 Handle<Code> ic = 3327 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
3327 CodeFactory::KeyedLoadICInOptimizedCode( 3328 isolate(), instr->hydrogen()->language_mode(),
3328 isolate(), instr->hydrogen()->initialization_state()).code(); 3329 instr->hydrogen()->initialization_state()).code();
3329 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3330 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3330 } 3331 }
3331 3332
3332 3333
3333 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3334 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3334 Register result = ToRegister(instr->result()); 3335 Register result = ToRegister(instr->result());
3335 3336
3336 if (instr->hydrogen()->from_inlined()) { 3337 if (instr->hydrogen()->from_inlined()) {
3337 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); 3338 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize));
3338 } else { 3339 } else {
(...skipping 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after
6028 RecordSafepoint(Safepoint::kNoLazyDeopt); 6029 RecordSafepoint(Safepoint::kNoLazyDeopt);
6029 } 6030 }
6030 6031
6031 6032
6032 #undef __ 6033 #undef __
6033 6034
6034 } // namespace internal 6035 } // namespace internal
6035 } // namespace v8 6036 } // namespace v8
6036 6037
6037 #endif // V8_TARGET_ARCH_X64 6038 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698