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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 1419823003: Remove support for "loads and stores to global vars through property cell shortcuts inst… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@disable-shortcuts
Patch Set: Addressing comments Created 5 years, 1 month 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/crankshaft/mips64/lithium-mips64.cc ('k') | src/crankshaft/ppc/lithium-ppc.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/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.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/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after
2907 2907
2908 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 2908 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
2909 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2909 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2910 Handle<Code> ic = 2910 Handle<Code> ic =
2911 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(), 2911 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
2912 SLOPPY, PREMONOMORPHIC).code(); 2912 SLOPPY, PREMONOMORPHIC).code();
2913 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2913 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2914 } 2914 }
2915 2915
2916 2916
2917 void LCodeGen::DoLoadGlobalViaContext(LLoadGlobalViaContext* instr) {
2918 DCHECK(ToRegister(instr->context()).is(cp));
2919 DCHECK(ToRegister(instr->result()).is(r3));
2920
2921 int const slot = instr->slot_index();
2922 int const depth = instr->depth();
2923 if (depth <= LoadGlobalViaContextStub::kMaximumDepth) {
2924 __ mov(LoadGlobalViaContextDescriptor::SlotRegister(), Operand(slot));
2925 Handle<Code> stub =
2926 CodeFactory::LoadGlobalViaContext(isolate(), depth).code();
2927 CallCode(stub, RelocInfo::CODE_TARGET, instr);
2928 } else {
2929 __ Push(Smi::FromInt(slot));
2930 __ CallRuntime(Runtime::kLoadGlobalViaContext, 1);
2931 }
2932 }
2933
2934
2935 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2917 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2936 Register context = ToRegister(instr->context()); 2918 Register context = ToRegister(instr->context());
2937 Register result = ToRegister(instr->result()); 2919 Register result = ToRegister(instr->result());
2938 __ LoadP(result, ContextOperand(context, instr->slot_index())); 2920 __ LoadP(result, ContextOperand(context, instr->slot_index()));
2939 if (instr->hydrogen()->RequiresHoleCheck()) { 2921 if (instr->hydrogen()->RequiresHoleCheck()) {
2940 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 2922 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2941 if (instr->hydrogen()->DeoptimizesOnHole()) { 2923 if (instr->hydrogen()->DeoptimizesOnHole()) {
2942 __ cmp(result, ip); 2924 __ cmp(result, ip);
2943 DeoptimizeIf(eq, instr, Deoptimizer::kHole); 2925 DeoptimizeIf(eq, instr, Deoptimizer::kHole);
2944 } else { 2926 } else {
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
4309 } 4291 }
4310 4292
4311 __ mov(StoreDescriptor::NameRegister(), Operand(instr->name())); 4293 __ mov(StoreDescriptor::NameRegister(), Operand(instr->name()));
4312 Handle<Code> ic = CodeFactory::StoreICInOptimizedCode( 4294 Handle<Code> ic = CodeFactory::StoreICInOptimizedCode(
4313 isolate(), instr->language_mode(), 4295 isolate(), instr->language_mode(),
4314 instr->hydrogen()->initialization_state()).code(); 4296 instr->hydrogen()->initialization_state()).code();
4315 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4297 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4316 } 4298 }
4317 4299
4318 4300
4319 void LCodeGen::DoStoreGlobalViaContext(LStoreGlobalViaContext* instr) {
4320 DCHECK(ToRegister(instr->context()).is(cp));
4321 DCHECK(ToRegister(instr->value())
4322 .is(StoreGlobalViaContextDescriptor::ValueRegister()));
4323
4324 int const slot = instr->slot_index();
4325 int const depth = instr->depth();
4326 if (depth <= StoreGlobalViaContextStub::kMaximumDepth) {
4327 __ mov(StoreGlobalViaContextDescriptor::SlotRegister(), Operand(slot));
4328 Handle<Code> stub = CodeFactory::StoreGlobalViaContext(
4329 isolate(), depth, instr->language_mode()).code();
4330 CallCode(stub, RelocInfo::CODE_TARGET, instr);
4331 } else {
4332 __ Push(Smi::FromInt(slot));
4333 __ push(StoreGlobalViaContextDescriptor::ValueRegister());
4334 __ CallRuntime(is_strict(instr->language_mode())
4335 ? Runtime::kStoreGlobalViaContext_Strict
4336 : Runtime::kStoreGlobalViaContext_Sloppy,
4337 2);
4338 }
4339 }
4340
4341
4342 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 4301 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
4343 Representation representation = instr->hydrogen()->length()->representation(); 4302 Representation representation = instr->hydrogen()->length()->representation();
4344 DCHECK(representation.Equals(instr->hydrogen()->index()->representation())); 4303 DCHECK(representation.Equals(instr->hydrogen()->index()->representation()));
4345 DCHECK(representation.IsSmiOrInteger32()); 4304 DCHECK(representation.IsSmiOrInteger32());
4346 4305
4347 Condition cc = instr->hydrogen()->allow_equality() ? lt : le; 4306 Condition cc = instr->hydrogen()->allow_equality() ? lt : le;
4348 if (instr->length()->IsConstantOperand()) { 4307 if (instr->length()->IsConstantOperand()) {
4349 int32_t length = ToInteger32(LConstantOperand::cast(instr->length())); 4308 int32_t length = ToInteger32(LConstantOperand::cast(instr->length()));
4350 Register index = ToRegister(instr->index()); 4309 Register index = ToRegister(instr->index());
4351 if (representation.IsSmi()) { 4310 if (representation.IsSmi()) {
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after
6121 __ Push(scope_info); 6080 __ Push(scope_info);
6122 __ push(ToRegister(instr->function())); 6081 __ push(ToRegister(instr->function()));
6123 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6082 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6124 RecordSafepoint(Safepoint::kNoLazyDeopt); 6083 RecordSafepoint(Safepoint::kNoLazyDeopt);
6125 } 6084 }
6126 6085
6127 6086
6128 #undef __ 6087 #undef __
6129 } // namespace internal 6088 } // namespace internal
6130 } // namespace v8 6089 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-mips64.cc ('k') | src/crankshaft/ppc/lithium-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698