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

Unified Diff: src/x64/full-codegen-x64.cc

Issue 5794002: Fix ARM and x64 compilation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
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
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index 574688c14df0c171d6e16ed7711cc0a30b620080..355cf9166266b04f8211d8edc63d5a1a5a8907a1 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -839,7 +839,9 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
__ bind(&update_each);
__ movq(result_register(), rbx);
// Perform the assignment as if via '='.
- EmitAssignment(stmt->each());
+ { EffectContext context(this);
+ EmitAssignment(stmt->each(), stmt->AssignmentId());
+ }
// Generate code for the body of the loop.
Visit(stmt->body());
@@ -1521,7 +1523,7 @@ void FullCodeGenerator::EmitBinaryOp(Token::Value op,
}
-void FullCodeGenerator::EmitAssignment(Expression* expr) {
+void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_id) {
// Invalid left-hand sides are rewritten to have a 'throw
// ReferenceError' on the left-hand side.
if (!expr->IsValidLeftHandSide()) {
@@ -1569,6 +1571,7 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
break;
}
}
+ context()->Plug(rax);
}
@@ -1641,8 +1644,6 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
}
__ bind(&done);
}
-
- context()->Plug(rax);
}
@@ -1679,10 +1680,9 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
__ push(Operand(rsp, kPointerSize)); // Receiver is under value.
__ CallRuntime(Runtime::kToFastProperties, 1);
__ pop(rax);
- context()->DropAndPlug(1, rax);
- } else {
- context()->Plug(rax);
+ __ Drop(1);
}
+ context()->Plug(rax);
}
@@ -3127,6 +3127,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
{ EffectContext context(this);
EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
Token::ASSIGN);
+ context.Plug(rax);
}
// For all contexts except kEffect: We have the result on
// top of the stack.
@@ -3137,6 +3138,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
// Perform the assignment as if via '='.
EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
Token::ASSIGN);
+ context()->Plug(rax);
}
break;
case NAMED_PROPERTY: {
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698