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 18307: Make separate spilled scopes for each unary operation. (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 1089)
+++ src/codegen-ia32.cc (working copy)
@@ -3763,7 +3763,6 @@
void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) {
- VirtualFrame::SpilledScope spilled_scope(this);
// Note that because of NOT and an optimization in comparison of a typeof
// expression to a literal string, this function can fail to leave a value
// on top of the frame or in the cc register.
@@ -3772,11 +3771,13 @@
Token::Value op = node->op();
if (op == Token::NOT) {
+ VirtualFrame::SpilledScope spilled_scope(this);
LoadConditionAndSpill(node->expression(), NOT_INSIDE_TYPEOF,
false_target(), true_target(), true);
cc_reg_ = NegateCondition(cc_reg_);
} else if (op == Token::DELETE) {
+ VirtualFrame::SpilledScope spilled_scope(this);
Property* property = node->expression()->AsProperty();
if (property != NULL) {
LoadAndSpill(property->obj());
@@ -3820,6 +3821,7 @@
}
} else if (op == Token::TYPEOF) {
+ VirtualFrame::SpilledScope spilled_scope(this);
// Special case for loading the typeof expression; see comment on
// LoadTypeofExpression().
LoadTypeofExpression(node->expression());
@@ -3827,7 +3829,7 @@
frame_->EmitPush(eax);
} else {
- LoadAndSpill(node->expression());
+ Load(node->expression());
switch (op) {
case Token::NOT:
case Token::DELETE:
@@ -3836,6 +3838,7 @@
break;
case Token::SUB: {
+ VirtualFrame::SpilledScope spilled_scope(this);
UnarySubStub stub;
// TODO(1222589): remove dependency of TOS being cached inside stub
frame_->EmitPop(eax);
@@ -3845,6 +3848,7 @@
}
case Token::BIT_NOT: {
+ VirtualFrame::SpilledScope spilled_scope(this);
// Smi check.
JumpTarget smi_label(this);
JumpTarget continue_label(this);
@@ -3864,11 +3868,14 @@
break;
}
- case Token::VOID:
+ case Token::VOID: {
+ VirtualFrame::SpilledScope spilled_scope(this);
__ mov(frame_->Top(), Factory::undefined_value());
break;
+ }
case Token::ADD: {
+ VirtualFrame::SpilledScope spilled_scope(this);
// Smi check.
JumpTarget continue_label(this);
frame_->EmitPop(eax);
« 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