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

Unified Diff: src/codegen-ia32.cc

Issue 17610: Move spills inside SmiOperation and GenericBinaryOperation (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 1058)
+++ src/codegen-ia32.cc (working copy)
@@ -781,12 +781,11 @@
if (op == Token::COMMA) {
// Simply discard left value.
- frame_->EmitPop(eax);
- frame_->Drop();
- frame_->EmitPush(eax);
+ frame_->Nip(1);
return;
}
+ VirtualFrame::SpilledScope spilled_scope(this);
// Set the flags based on the operation, type and loop nesting level.
GenericBinaryFlags flags;
switch (op) {
@@ -1028,6 +1027,7 @@
// TODO(1217802): Optimize some special cases of operations
// involving a smi literal (multiply by 2, shift by 0, etc.).
+ VirtualFrame::SpilledScope spilled_scope(this);
// Get the literal value.
int int_value = Smi::cast(*value)->value();
@@ -4163,7 +4163,6 @@
}
} else {
- VirtualFrame::SpilledScope spilled_scope(this);
// NOTE: The code below assumes that the slow cases (calls to runtime)
// never return a constant/immutable object.
OverwriteMode overwrite_mode = NO_OVERWRITE;
@@ -4181,16 +4180,16 @@
Literal* rliteral = node->right()->AsLiteral();
if (IsInlineSmi(rliteral)) {
- LoadAndSpill(node->left());
+ Load(node->left());
SmiOperation(node->op(), node->type(), rliteral->handle(), false,
overwrite_mode);
} else if (IsInlineSmi(lliteral)) {
- LoadAndSpill(node->right());
+ Load(node->right());
SmiOperation(node->op(), node->type(), lliteral->handle(), true,
overwrite_mode);
} else {
- LoadAndSpill(node->left());
- LoadAndSpill(node->right());
+ Load(node->left());
+ Load(node->right());
GenericBinaryOperation(node->op(), node->type(), overwrite_mode);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698