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

Unified Diff: src/ia32/lithium-ia32.cc

Issue 5964005: Shorten live ranges of argument subexpressions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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
Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index e1148fc186f767bd087b103486a86fda00b61753..f54c81bbe8de1353d275d9c886fb7bdb94812940 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -288,7 +288,8 @@ void LCallGlobal::PrintDataTo(StringStream* stream) const {
void LCallKnownGlobal::PrintDataTo(StringStream* stream) const {
- stream->Add("#%d / ", arity());
+ LUnaryOperation::PrintDataTo(stream);
+ stream->Add(" #%d / ", arity());
}
@@ -1354,7 +1355,7 @@ LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) {
LInstruction* LChunkBuilder::DoCallConstantFunction(
HCallConstantFunction* instr) {
- argument_count_ -= instr->argument_count();
+ DecrementArgumentCount(instr->argument_count());
return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr);
}
@@ -1389,46 +1390,47 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) {
ASSERT(instr->key()->representation().IsTagged());
- argument_count_ -= instr->argument_count();
+ DecrementArgumentCount(instr->argument_count());
UseFixed(instr->key(), ecx);
return MarkAsCall(DefineFixed(new LCallKeyed, eax), instr);
}
LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) {
- argument_count_ -= instr->argument_count();
+ DecrementArgumentCount(instr->argument_count());
return MarkAsCall(DefineFixed(new LCallNamed, eax), instr);
}
LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) {
- argument_count_ -= instr->argument_count();
+ DecrementArgumentCount(instr->argument_count());
return MarkAsCall(DefineFixed(new LCallGlobal, eax), instr);
}
LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) {
- argument_count_ -= instr->argument_count();
- return MarkAsCall(DefineFixed(new LCallKnownGlobal, eax), instr);
+ LOperand* receiver = UseFixed(instr->receiver(), eax);
+ DecrementArgumentCount(instr->argument_count());
+ return MarkAsCall(DefineFixed(new LCallKnownGlobal(receiver), eax), instr);
}
LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) {
LOperand* constructor = UseFixed(instr->constructor(), edi);
- argument_count_ -= instr->argument_count();
+ DecrementArgumentCount(instr->argument_count());
LInstruction* result = new LCallNew(constructor);
return MarkAsCall(DefineFixed(result, eax), instr);
}
LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) {
- argument_count_ -= instr->argument_count();
+ DecrementArgumentCount(instr->argument_count());
return MarkAsCall(DefineFixed(new LCallFunction, eax), instr);
}
LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
- argument_count_ -= instr->argument_count();
+ DecrementArgumentCount(instr->argument_count());
return MarkAsCall(DefineFixed(new LCallRuntime, eax), instr);
}
@@ -2013,7 +2015,7 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) {
- argument_count_ -= instr->argument_count();
+ DecrementArgumentCount(instr->argument_count());
return MarkAsCall(DefineFixed(new LCallStub, eax), instr);
}
@@ -2094,7 +2096,8 @@ LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
HEnvironment* inner = outer->CopyForInlining(instr->closure(),
instr->function(),
false,
- undefined);
+ undefined,
+ NULL);
current_block_->UpdateEnvironment(inner);
chunk_->AddInlinedClosure(instr->closure());
return NULL;

Powered by Google App Engine
This is Rietveld 408576698