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

Unified Diff: src/x64/lithium-x64.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/x64/lithium-x64.h ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-x64.cc
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
index 3c150e21c91d8abc494fdceed031b3801d0c0680..f1710bd561036c290ba54f0c581f0ce876b4dc62 100644
--- a/src/x64/lithium-x64.cc
+++ b/src/x64/lithium-x64.cc
@@ -374,6 +374,12 @@ LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) {
}
+void LLoadGlobalViaContext::PrintDataTo(StringStream* stream) {
+ stream->Add(String::cast(*name())->ToCString().get());
+ stream->Add(" depth:%d slot:%d", depth(), slot_index());
+}
+
+
void LStoreNamedField::PrintDataTo(StringStream* stream) {
object()->PrintTo(stream);
std::ostringstream os;
@@ -392,6 +398,14 @@ void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
}
+void LStoreGlobalViaContext::PrintDataTo(StringStream* stream) {
+ stream->Add(String::cast(*name())->ToCString().get());
+ stream->Add(" <- ");
+ value()->PrintTo(stream);
+ stream->Add(" depth:%d slot:%d", depth(), slot_index());
+}
+
+
void LLoadKeyed::PrintDataTo(StringStream* stream) {
elements()->PrintTo(stream);
stream->Add("[");
@@ -2106,6 +2120,15 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
}
+LInstruction* LChunkBuilder::DoLoadGlobalViaContext(
+ HLoadGlobalViaContext* instr) {
+ LOperand* context = UseFixed(instr->context(), rsi);
+ DCHECK(instr->slot_index() > 0);
+ LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context);
+ return MarkAsCall(DefineFixed(result, rax), instr);
+}
+
+
LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
LOperand* context = UseRegisterAtStart(instr->value());
LInstruction* result =
@@ -2471,6 +2494,19 @@ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
}
+LInstruction* LChunkBuilder::DoStoreGlobalViaContext(
+ HStoreGlobalViaContext* instr) {
+ LOperand* context = UseFixed(instr->context(), rsi);
+ LOperand* value = UseFixed(instr->value(),
+ StoreGlobalViaContextDescriptor::ValueRegister());
+ DCHECK(instr->slot_index() > 0);
+
+ LStoreGlobalViaContext* result =
+ new (zone()) LStoreGlobalViaContext(context, value);
+ return MarkAsCall(result, instr);
+}
+
+
LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
LOperand* context = UseFixed(instr->context(), rsi);
LOperand* left = UseFixed(instr->left(), rdx);
« no previous file with comments | « src/x64/lithium-x64.h ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698