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

Unified Diff: src/codegen-ia32.cc

Issue 19706: Remove spills from complex assignments. Some compound assignments now... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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 | « no previous file | src/virtual-frame-ia32.cc » ('j') | src/virtual-frame-ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 1192)
+++ src/codegen-ia32.cc (working copy)
@@ -3134,6 +3134,7 @@
frame_->Push(Smi::FromInt(0));
return;
}
+ Variable* var = node->target()->AsVariableProxy()->AsVariable();
if (node->op() == Token::ASSIGN ||
node->op() == Token::INIT_VAR ||
@@ -3141,19 +3142,23 @@
Load(node->value());
} else {
- VirtualFrame::SpilledScope spilled_scope(this);
- target.GetValueAndSpill(NOT_INSIDE_TYPEOF);
+// VirtualFrame::SpilledScope spilled_scope(this);
Kevin Millikin (Chromium) 2009/02/03 09:48:55 Remove code rather than commenting it out.
Literal* literal = node->value()->AsLiteral();
+ Variable* right_var = node->value()->AsVariableProxy()->AsVariable();
+ if (literal != NULL || (right_var != NULL && right_var != var)) {
Kevin Millikin (Chromium) 2009/02/03 09:48:55 This needs a simple comment saying what you are do
+ target.TakeValue(NOT_INSIDE_TYPEOF);
+ } else {
+ target.GetValue(NOT_INSIDE_TYPEOF);
+ }
if (IsInlineSmi(literal)) {
SmiOperation(node->binary_op(), node->type(), literal->handle(), false,
NO_OVERWRITE);
} else {
- LoadAndSpill(node->value());
+ Load(node->value());
GenericBinaryOperation(node->binary_op(), node->type());
}
}
- Variable* var = node->target()->AsVariableProxy()->AsVariable();
if (var != NULL &&
var->mode() == Variable::CONST &&
node->op() != Token::INIT_VAR && node->op() != Token::INIT_CONST) {
« no previous file with comments | « no previous file | src/virtual-frame-ia32.cc » ('j') | src/virtual-frame-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698