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

Unified Diff: src/ppc/lithium-codegen-ppc.cc

Issue 1228113008: Crankshaft part of the 'loads and stores to global vars through property cell shortcuts' feature. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments + regression test Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/lithium-mips64.cc ('k') | src/ppc/lithium-ppc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/lithium-codegen-ppc.cc
diff --git a/src/ppc/lithium-codegen-ppc.cc b/src/ppc/lithium-codegen-ppc.cc
index 87e1a8d4966d82a4ddff17af5f2522d22a0d7d57..8968f2fc09de4adfd3ab3363e5db9c18295844d7 100644
--- a/src/ppc/lithium-codegen-ppc.cc
+++ b/src/ppc/lithium-codegen-ppc.cc
@@ -3060,6 +3060,23 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
}
+void LCodeGen::DoLoadGlobalViaContext(LLoadGlobalViaContext* instr) {
+ DCHECK(ToRegister(instr->context()).is(cp));
+ DCHECK(ToRegister(instr->result()).is(r3));
+
+ __ mov(LoadGlobalViaContextDescriptor::DepthRegister(),
+ Operand(Smi::FromInt(instr->depth())));
+ __ mov(LoadGlobalViaContextDescriptor::SlotRegister(),
+ Operand(Smi::FromInt(instr->slot_index())));
+ __ mov(LoadGlobalViaContextDescriptor::NameRegister(),
+ Operand(instr->name()));
+
+ Handle<Code> stub =
+ CodeFactory::LoadGlobalViaContext(isolate(), instr->depth()).code();
+ CallCode(stub, RelocInfo::CODE_TARGET, instr);
+}
+
+
void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
Register context = ToRegister(instr->context());
Register result = ToRegister(instr->result());
@@ -4463,6 +4480,25 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
}
+void LCodeGen::DoStoreGlobalViaContext(LStoreGlobalViaContext* instr) {
+ DCHECK(ToRegister(instr->context()).is(cp));
+ DCHECK(ToRegister(instr->value())
+ .is(StoreGlobalViaContextDescriptor::ValueRegister()));
+
+ __ mov(StoreGlobalViaContextDescriptor::DepthRegister(),
+ Operand(Smi::FromInt(instr->depth())));
+ __ mov(StoreGlobalViaContextDescriptor::SlotRegister(),
+ Operand(Smi::FromInt(instr->slot_index())));
+ __ mov(StoreGlobalViaContextDescriptor::NameRegister(),
+ Operand(instr->name()));
+
+ Handle<Code> stub =
+ CodeFactory::StoreGlobalViaContext(isolate(), instr->depth(),
+ instr->language_mode()).code();
+ CallCode(stub, RelocInfo::CODE_TARGET, instr);
+}
+
+
void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
Representation representation = instr->hydrogen()->length()->representation();
DCHECK(representation.Equals(instr->hydrogen()->index()->representation()));
« no previous file with comments | « src/mips64/lithium-mips64.cc ('k') | src/ppc/lithium-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698