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

Unified Diff: src/arm64/lithium-codegen-arm64.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/arm64/lithium-arm64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/lithium-codegen-arm64.cc
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc
index a9edbb9ba338445e9c4a7e2c13d3f3ef0ff5395d..66420f8d9d20e2664da39dd1f41ad5c483fad89f 100644
--- a/src/arm64/lithium-codegen-arm64.cc
+++ b/src/arm64/lithium-codegen-arm64.cc
@@ -3375,6 +3375,23 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
}
+void LCodeGen::DoLoadGlobalViaContext(LLoadGlobalViaContext* instr) {
+ DCHECK(ToRegister(instr->context()).is(cp));
+ DCHECK(ToRegister(instr->result()).is(x0));
+
+ __ 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);
+}
+
+
MemOperand LCodeGen::PrepareKeyedExternalArrayOperand(
Register key,
Register base,
@@ -5513,6 +5530,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::DoStringAdd(LStringAdd* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->left()).Is(x1));
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698