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

Side by Side Diff: src/ppc/lithium-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 3060
3061 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 3061 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
3062 DCHECK(ToRegister(instr->context()).is(cp)); 3062 DCHECK(ToRegister(instr->context()).is(cp));
3063 DCHECK(ToRegister(instr->global_object()) 3063 DCHECK(ToRegister(instr->global_object())
3064 .is(LoadDescriptor::ReceiverRegister())); 3064 .is(LoadDescriptor::ReceiverRegister()));
3065 DCHECK(ToRegister(instr->result()).is(r3)); 3065 DCHECK(ToRegister(instr->result()).is(r3));
3066 3066
3067 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 3067 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3068 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 3068 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
3069 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 3069 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
3070 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 3070 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY,
3071 PREMONOMORPHIC).code(); 3071 PREMONOMORPHIC).code();
3072 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3072 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3073 } 3073 }
3074 3074
3075 3075
3076 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 3076 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
3077 Register context = ToRegister(instr->context()); 3077 Register context = ToRegister(instr->context());
3078 Register result = ToRegister(instr->result()); 3078 Register result = ToRegister(instr->result());
3079 __ LoadP(result, ContextOperand(context, instr->slot_index())); 3079 __ LoadP(result, ContextOperand(context, instr->slot_index()));
3080 if (instr->hydrogen()->RequiresHoleCheck()) { 3080 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
3176 3176
3177 3177
3178 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3178 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3179 DCHECK(ToRegister(instr->context()).is(cp)); 3179 DCHECK(ToRegister(instr->context()).is(cp));
3180 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3180 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3181 DCHECK(ToRegister(instr->result()).is(r3)); 3181 DCHECK(ToRegister(instr->result()).is(r3));
3182 3182
3183 // Name is always in r5. 3183 // Name is always in r5.
3184 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 3184 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3185 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3185 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3186 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3186 Handle<Code> ic =
3187 isolate(), NOT_CONTEXTUAL, 3187 CodeFactory::LoadICInOptimizedCode(
3188 instr->hydrogen()->initialization_state()).code(); 3188 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(),
3189 instr->hydrogen()->initialization_state()).code();
3189 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3190 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3190 } 3191 }
3191 3192
3192 3193
3193 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3194 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3194 Register scratch = scratch0(); 3195 Register scratch = scratch0();
3195 Register function = ToRegister(instr->function()); 3196 Register function = ToRegister(instr->function());
3196 Register result = ToRegister(instr->result()); 3197 Register result = ToRegister(instr->result());
3197 3198
3198 // Get the prototype or initial map from the function. 3199 // Get the prototype or initial map from the function.
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
3552 DCHECK(ToRegister(instr->context()).is(cp)); 3553 DCHECK(ToRegister(instr->context()).is(cp));
3553 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3554 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3554 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3555 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3555 3556
3556 if (instr->hydrogen()->HasVectorAndSlot()) { 3557 if (instr->hydrogen()->HasVectorAndSlot()) {
3557 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3558 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3558 } 3559 }
3559 3560
3560 Handle<Code> ic = 3561 Handle<Code> ic =
3561 CodeFactory::KeyedLoadICInOptimizedCode( 3562 CodeFactory::KeyedLoadICInOptimizedCode(
3562 isolate(), instr->hydrogen()->initialization_state()).code(); 3563 isolate(), instr->hydrogen()->language_mode(),
3564 instr->hydrogen()->initialization_state()).code();
3563 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3565 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3564 } 3566 }
3565 3567
3566 3568
3567 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3569 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3568 Register scratch = scratch0(); 3570 Register scratch = scratch0();
3569 Register result = ToRegister(instr->result()); 3571 Register result = ToRegister(instr->result());
3570 3572
3571 if (instr->hydrogen()->from_inlined()) { 3573 if (instr->hydrogen()->from_inlined()) {
3572 __ subi(result, sp, Operand(2 * kPointerSize)); 3574 __ subi(result, sp, Operand(2 * kPointerSize));
(...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after
6275 __ Push(scope_info); 6277 __ Push(scope_info);
6276 __ push(ToRegister(instr->function())); 6278 __ push(ToRegister(instr->function()));
6277 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6279 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6278 RecordSafepoint(Safepoint::kNoLazyDeopt); 6280 RecordSafepoint(Safepoint::kNoLazyDeopt);
6279 } 6281 }
6280 6282
6281 6283
6282 #undef __ 6284 #undef __
6283 } // namespace internal 6285 } // namespace internal
6284 } // namespace v8 6286 } // namespace v8
OLDNEW
« src/lookup.h ('K') | « src/ppc/full-codegen-ppc.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698