| Index: src/arm/fast-codegen-arm.cc
|
| ===================================================================
|
| --- src/arm/fast-codegen-arm.cc (revision 3073)
|
| +++ src/arm/fast-codegen-arm.cc (working copy)
|
| @@ -105,7 +105,6 @@
|
| void FastCodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) {
|
| Comment cmnt(masm_, "[ ExpressionStatement");
|
| Visit(stmt->expression());
|
| - __ pop();
|
| }
|
|
|
|
|
| @@ -124,15 +123,23 @@
|
|
|
| void FastCodeGenerator::VisitSlot(Slot* expr) {
|
| Comment cmnt(masm_, "[ Slot");
|
| - __ ldr(ip, MemOperand(fp, SlotOffset(expr)));
|
| - __ push(ip);
|
| + if (expr->location().is_temporary()) {
|
| + __ ldr(ip, MemOperand(fp, SlotOffset(expr)));
|
| + __ push(ip);
|
| + } else {
|
| + ASSERT(expr->location().is_nowhere());
|
| + }
|
| }
|
|
|
|
|
| void FastCodeGenerator::VisitLiteral(Literal* expr) {
|
| Comment cmnt(masm_, "[ Literal");
|
| - __ mov(ip, Operand(expr->handle()));
|
| - __ push(ip);
|
| + if (expr->location().is_temporary()) {
|
| + __ mov(ip, Operand(expr->handle()));
|
| + __ push(ip);
|
| + } else {
|
| + ASSERT(expr->location().is_nowhere());
|
| + }
|
| }
|
|
|
|
|
| @@ -144,7 +151,13 @@
|
|
|
| Variable* var = expr->target()->AsVariableProxy()->AsVariable();
|
| ASSERT(var != NULL && var->slot() != NULL);
|
| - __ ldr(ip, MemOperand(sp));
|
| +
|
| + if (expr->location().is_temporary()) {
|
| + __ ldr(ip, MemOperand(sp));
|
| + } else {
|
| + ASSERT(expr->location().is_nowhere());
|
| + __ pop(ip);
|
| + }
|
| __ str(ip, MemOperand(fp, SlotOffset(var->slot())));
|
| }
|
|
|
|
|