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

Unified Diff: src/mips64/lithium-codegen-mips64.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/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/lithium-codegen-mips64.cc
diff --git a/src/mips64/lithium-codegen-mips64.cc b/src/mips64/lithium-codegen-mips64.cc
index fc741330be41e6b9352dc13c50495547a31a5fa0..de7d5189235c0ec6f557b4db86063c8c86d177fa 100644
--- a/src/mips64/lithium-codegen-mips64.cc
+++ b/src/mips64/lithium-codegen-mips64.cc
@@ -2999,6 +2999,22 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
}
+void LCodeGen::DoLoadGlobalViaContext(LLoadGlobalViaContext* instr) {
+ DCHECK(ToRegister(instr->context()).is(cp));
+ DCHECK(ToRegister(instr->result()).is(v0));
+
+ __ li(LoadGlobalViaContextDescriptor::DepthRegister(),
+ Operand(Smi::FromInt(instr->depth())));
+ __ li(LoadGlobalViaContextDescriptor::SlotRegister(),
+ Operand(Smi::FromInt(instr->slot_index())));
+ __ li(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());
@@ -4381,6 +4397,25 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
}
+void LCodeGen::DoStoreGlobalViaContext(LStoreGlobalViaContext* instr) {
+ DCHECK(ToRegister(instr->context()).is(cp));
+ DCHECK(ToRegister(instr->value())
+ .is(StoreGlobalViaContextDescriptor::ValueRegister()));
+
+ __ li(StoreGlobalViaContextDescriptor::DepthRegister(),
+ Operand(Smi::FromInt(instr->depth())));
+ __ li(StoreGlobalViaContextDescriptor::SlotRegister(),
+ Operand(Smi::FromInt(instr->slot_index())));
+ __ li(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) {
Condition cc = instr->hydrogen()->allow_equality() ? hi : hs;
Operand operand((int64_t)0);
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698