Index: src/fast-codegen.cc |
=================================================================== |
--- src/fast-codegen.cc (revision 3175) |
+++ src/fast-codegen.cc (working copy) |
@@ -73,32 +73,19 @@ |
// All platform macro assemblers in {ia32,x64,arm} have a push(Register) |
// function. |
-void FastCodeGenerator::Move(Location destination, Register source) { |
- switch (destination.type()) { |
- case Location::kUninitialized: |
+void FastCodeGenerator::Move(Expression::Context context, Register source) { |
+ switch (context) { |
+ case Expression::kUninitialized: |
UNREACHABLE(); |
- case Location::kEffect: |
+ case Expression::kEffect: |
break; |
- case Location::kValue: |
+ case Expression::kValue: |
masm_->push(source); |
break; |
} |
} |
-// All platform macro assemblers in {ia32,x64,arm} have a pop(Register) |
-// function. |
-void FastCodeGenerator::Move(Register destination, Location source) { |
- switch (source.type()) { |
- case Location::kUninitialized: // Fall through. |
- case Location::kEffect: |
- UNREACHABLE(); |
- case Location::kValue: |
- masm_->pop(destination); |
- } |
-} |
- |
- |
void FastCodeGenerator::VisitDeclarations( |
ZoneList<Declaration*>* declarations) { |
int length = declarations->length(); |
@@ -323,7 +310,7 @@ |
void FastCodeGenerator::VisitLiteral(Literal* expr) { |
- Move(expr->location(), expr); |
+ Move(expr->context(), expr); |
} |