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

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

Issue 1185343005: Revert of Revert of [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x64/full-codegen-x64.cc ('k') | src/x87/code-stubs-x87.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 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 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after
2857 2857
2858 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2858 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2859 DCHECK(ToRegister(instr->context()).is(rsi)); 2859 DCHECK(ToRegister(instr->context()).is(rsi));
2860 DCHECK(ToRegister(instr->global_object()) 2860 DCHECK(ToRegister(instr->global_object())
2861 .is(LoadDescriptor::ReceiverRegister())); 2861 .is(LoadDescriptor::ReceiverRegister()));
2862 DCHECK(ToRegister(instr->result()).is(rax)); 2862 DCHECK(ToRegister(instr->result()).is(rax));
2863 2863
2864 __ Move(LoadDescriptor::NameRegister(), instr->name()); 2864 __ Move(LoadDescriptor::NameRegister(), instr->name());
2865 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2865 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2866 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2866 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2867 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 2867 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY,
2868 PREMONOMORPHIC).code(); 2868 PREMONOMORPHIC).code();
2869 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2869 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2870 } 2870 }
2871 2871
2872 2872
2873 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2873 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2874 Register context = ToRegister(instr->context()); 2874 Register context = ToRegister(instr->context());
2875 Register result = ToRegister(instr->result()); 2875 Register result = ToRegister(instr->result());
2876 __ movp(result, ContextOperand(context, instr->slot_index())); 2876 __ movp(result, ContextOperand(context, instr->slot_index()));
2877 if (instr->hydrogen()->RequiresHoleCheck()) { 2877 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
2973 } 2973 }
2974 2974
2975 2975
2976 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2976 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2977 DCHECK(ToRegister(instr->context()).is(rsi)); 2977 DCHECK(ToRegister(instr->context()).is(rsi));
2978 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2978 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2979 DCHECK(ToRegister(instr->result()).is(rax)); 2979 DCHECK(ToRegister(instr->result()).is(rax));
2980 2980
2981 __ Move(LoadDescriptor::NameRegister(), instr->name()); 2981 __ Move(LoadDescriptor::NameRegister(), instr->name());
2982 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 2982 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2983 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 2983 Handle<Code> ic =
2984 isolate(), NOT_CONTEXTUAL, 2984 CodeFactory::LoadICInOptimizedCode(
2985 instr->hydrogen()->initialization_state()).code(); 2985 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(),
2986 instr->hydrogen()->initialization_state()).code();
2986 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2987 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2987 } 2988 }
2988 2989
2989 2990
2990 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2991 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2991 Register function = ToRegister(instr->function()); 2992 Register function = ToRegister(instr->function());
2992 Register result = ToRegister(instr->result()); 2993 Register result = ToRegister(instr->result());
2993 2994
2994 // Get the prototype or initial map from the function. 2995 // Get the prototype or initial map from the function.
2995 __ movp(result, 2996 __ movp(result,
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
3271 3272
3272 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3273 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3273 DCHECK(ToRegister(instr->context()).is(rsi)); 3274 DCHECK(ToRegister(instr->context()).is(rsi));
3274 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3275 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3275 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3276 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3276 3277
3277 if (instr->hydrogen()->HasVectorAndSlot()) { 3278 if (instr->hydrogen()->HasVectorAndSlot()) {
3278 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3279 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3279 } 3280 }
3280 3281
3281 Handle<Code> ic = 3282 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
3282 CodeFactory::KeyedLoadICInOptimizedCode( 3283 isolate(), instr->hydrogen()->language_mode(),
3283 isolate(), instr->hydrogen()->initialization_state()).code(); 3284 instr->hydrogen()->initialization_state()).code();
3284 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3285 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3285 } 3286 }
3286 3287
3287 3288
3288 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3289 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3289 Register result = ToRegister(instr->result()); 3290 Register result = ToRegister(instr->result());
3290 3291
3291 if (instr->hydrogen()->from_inlined()) { 3292 if (instr->hydrogen()->from_inlined()) {
3292 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); 3293 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize));
3293 } else { 3294 } else {
(...skipping 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after
5983 RecordSafepoint(Safepoint::kNoLazyDeopt); 5984 RecordSafepoint(Safepoint::kNoLazyDeopt);
5984 } 5985 }
5985 5986
5986 5987
5987 #undef __ 5988 #undef __
5988 5989
5989 } // namespace internal 5990 } // namespace internal
5990 } // namespace v8 5991 } // namespace v8
5991 5992
5992 #endif // V8_TARGET_ARCH_X64 5993 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « 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