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

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: rebase 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/ppc/full-codegen-ppc.cc ('k') | src/runtime/runtime.h » ('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 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 3007 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 3018
3019 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 3019 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
3020 DCHECK(ToRegister(instr->context()).is(cp)); 3020 DCHECK(ToRegister(instr->context()).is(cp));
3021 DCHECK(ToRegister(instr->global_object()) 3021 DCHECK(ToRegister(instr->global_object())
3022 .is(LoadDescriptor::ReceiverRegister())); 3022 .is(LoadDescriptor::ReceiverRegister()));
3023 DCHECK(ToRegister(instr->result()).is(r3)); 3023 DCHECK(ToRegister(instr->result()).is(r3));
3024 3024
3025 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 3025 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3026 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 3026 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
3027 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 3027 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
3028 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 3028 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY,
3029 PREMONOMORPHIC).code(); 3029 PREMONOMORPHIC).code();
3030 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3030 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3031 } 3031 }
3032 3032
3033 3033
3034 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 3034 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
3035 Register context = ToRegister(instr->context()); 3035 Register context = ToRegister(instr->context());
3036 Register result = ToRegister(instr->result()); 3036 Register result = ToRegister(instr->result());
3037 __ LoadP(result, ContextOperand(context, instr->slot_index())); 3037 __ LoadP(result, ContextOperand(context, instr->slot_index()));
3038 if (instr->hydrogen()->RequiresHoleCheck()) { 3038 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 3134
3135 3135
3136 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3136 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3137 DCHECK(ToRegister(instr->context()).is(cp)); 3137 DCHECK(ToRegister(instr->context()).is(cp));
3138 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3138 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3139 DCHECK(ToRegister(instr->result()).is(r3)); 3139 DCHECK(ToRegister(instr->result()).is(r3));
3140 3140
3141 // Name is always in r5. 3141 // Name is always in r5.
3142 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 3142 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3143 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3143 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3144 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3144 Handle<Code> ic =
3145 isolate(), NOT_CONTEXTUAL, 3145 CodeFactory::LoadICInOptimizedCode(
3146 instr->hydrogen()->initialization_state()).code(); 3146 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(),
3147 instr->hydrogen()->initialization_state()).code();
3147 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3148 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3148 } 3149 }
3149 3150
3150 3151
3151 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3152 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3152 Register scratch = scratch0(); 3153 Register scratch = scratch0();
3153 Register function = ToRegister(instr->function()); 3154 Register function = ToRegister(instr->function());
3154 Register result = ToRegister(instr->result()); 3155 Register result = ToRegister(instr->result());
3155 3156
3156 // Get the prototype or initial map from the function. 3157 // Get the prototype or initial map from the function.
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
3508 3509
3509 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3510 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3510 DCHECK(ToRegister(instr->context()).is(cp)); 3511 DCHECK(ToRegister(instr->context()).is(cp));
3511 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3512 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3512 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3513 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3513 3514
3514 if (instr->hydrogen()->HasVectorAndSlot()) { 3515 if (instr->hydrogen()->HasVectorAndSlot()) {
3515 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3516 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3516 } 3517 }
3517 3518
3518 Handle<Code> ic = 3519 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
3519 CodeFactory::KeyedLoadICInOptimizedCode( 3520 isolate(), instr->hydrogen()->language_mode(),
3520 isolate(), instr->hydrogen()->initialization_state()).code(); 3521 instr->hydrogen()->initialization_state()).code();
3521 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3522 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3522 } 3523 }
3523 3524
3524 3525
3525 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3526 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3526 Register scratch = scratch0(); 3527 Register scratch = scratch0();
3527 Register result = ToRegister(instr->result()); 3528 Register result = ToRegister(instr->result());
3528 3529
3529 if (instr->hydrogen()->from_inlined()) { 3530 if (instr->hydrogen()->from_inlined()) {
3530 __ subi(result, sp, Operand(2 * kPointerSize)); 3531 __ subi(result, sp, Operand(2 * kPointerSize));
(...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after
6233 __ Push(scope_info); 6234 __ Push(scope_info);
6234 __ push(ToRegister(instr->function())); 6235 __ push(ToRegister(instr->function()));
6235 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6236 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6236 RecordSafepoint(Safepoint::kNoLazyDeopt); 6237 RecordSafepoint(Safepoint::kNoLazyDeopt);
6237 } 6238 }
6238 6239
6239 6240
6240 #undef __ 6241 #undef __
6241 } // namespace internal 6242 } // namespace internal
6242 } // namespace v8 6243 } // namespace v8
OLDNEW
« no previous file with comments | « 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