Reviewers: Kevin Millikin, Message: Simple change, moving spills.
Description: Move spills inside SmiOperation and GenericBinaryOperation Please review this at http://codereview.chromium.org/17610 SVN Base: http://v8.googlecode.com/svn/branches/experimental/toiger/ Affected files: M src/codegen-ia32.cc Index: src/codegen-ia32.cc =================================================================== --- src/codegen-ia32.cc (revision 1054) +++ 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(); @@ -4154,16 +4154,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); } } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
