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

Unified Diff: src/fast-codegen.cc

Issue 342035: Move the Location class into the AST Expression class as a member.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698