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

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

Issue 340034: Rename the Location type tags to be consistent with our current naming... (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
« no previous file with comments | « src/location.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/fast-codegen-x64.cc
===================================================================
--- src/x64/fast-codegen-x64.cc (revision 3171)
+++ src/x64/fast-codegen-x64.cc (working copy)
@@ -118,11 +118,11 @@
void FastCodeGenerator::Move(Location destination, Slot* source) {
switch (destination.type()) {
- case Location::UNINITIALIZED:
+ case Location::kUninitialized:
UNREACHABLE();
- case Location::EFFECT:
+ case Location::kEffect:
break;
- case Location::VALUE:
+ case Location::kValue:
__ push(Operand(rbp, SlotOffset(source)));
break;
}
@@ -131,11 +131,11 @@
void FastCodeGenerator::Move(Location destination, Literal* expr) {
switch (destination.type()) {
- case Location::UNINITIALIZED:
+ case Location::kUninitialized:
UNREACHABLE();
- case Location::EFFECT:
+ case Location::kEffect:
break;
- case Location::VALUE:
+ case Location::kValue:
__ Push(expr->handle());
break;
}
@@ -144,10 +144,10 @@
void FastCodeGenerator::Move(Slot* destination, Location source) {
switch (source.type()) {
- case Location::UNINITIALIZED: // Fall through.
- case Location::EFFECT:
+ case Location::kUninitialized: // Fall through.
+ case Location::kEffect:
UNREACHABLE();
- case Location::VALUE:
+ case Location::kValue:
__ pop(Operand(rbp, SlotOffset(destination)));
break;
}
@@ -156,12 +156,12 @@
void FastCodeGenerator::DropAndMove(Location destination, Register source) {
switch (destination.type()) {
- case Location::UNINITIALIZED:
+ case Location::kUninitialized:
UNREACHABLE();
- case Location::EFFECT:
+ case Location::kEffect:
__ addq(rsp, Immediate(kPointerSize));
break;
- case Location::VALUE:
+ case Location::kValue:
__ movq(Operand(rsp, 0), source);
break;
}
@@ -364,12 +364,12 @@
}
}
switch (expr->location().type()) {
- case Location::UNINITIALIZED:
+ case Location::kUninitialized:
UNREACHABLE();
- case Location::EFFECT:
+ case Location::kEffect:
if (result_saved) __ addq(rsp, Immediate(kPointerSize));
break;
- case Location::VALUE:
+ case Location::kValue:
if (!result_saved) __ push(rax);
break;
}
@@ -438,12 +438,12 @@
}
switch (expr->location().type()) {
- case Location::UNINITIALIZED:
+ case Location::kUninitialized:
UNREACHABLE();
- case Location::EFFECT:
+ case Location::kEffect:
if (result_saved) __ addq(rsp, Immediate(kPointerSize));
break;
- case Location::VALUE:
+ case Location::kValue:
if (!result_saved) __ push(rax);
break;
}
@@ -494,13 +494,13 @@
ASSERT(rhs->location().is_value());
Visit(rhs);
switch (expr->location().type()) {
- case Location::UNINITIALIZED:
+ case Location::kUninitialized:
UNREACHABLE();
- case Location::EFFECT:
+ case Location::kEffect:
// Case 'var = temp'. Discard right-hand-side temporary.
Move(var->slot(), rhs->location());
break;
- case Location::VALUE:
+ case Location::kValue:
// Case 'temp1 <- (var = temp0)'. Preserve right-hand-side
// temporary on the stack.
__ movq(kScratchRegister, Operand(rsp, 0));
@@ -545,12 +545,12 @@
__ addq(rsp, Immediate(kPointerSize));
}
switch (expr->location().type()) {
- case Location::UNINITIALIZED:
+ case Location::kUninitialized:
UNREACHABLE();
- case Location::VALUE:
+ case Location::kValue:
__ movq(Operand(rsp, 0), rax);
break;
- case Location::EFFECT:
+ case Location::kEffect:
__ addq(rsp, Immediate(kPointerSize));
break;
}
@@ -669,14 +669,14 @@
Visit(left);
ASSERT(left->location().is_value());
switch (destination.type()) {
- case Location::UNINITIALIZED:
+ case Location::kUninitialized:
UNREACHABLE();
- case Location::EFFECT:
+ case Location::kEffect:
// Pop the left-hand value into rax because we will not need it as the
// final result.
__ pop(rax);
break;
- case Location::VALUE:
+ case Location::kValue:
// Copy the left-hand value into rax because we may need it as the
// final result.
__ movq(rax, Operand(rsp, 0));
@@ -713,12 +713,8 @@
__ addq(rsp, Immediate(kPointerSize));
}
// Save or discard the right-hand value as needed.
- if (right->AsLiteral() != NULL) {
- Move(destination, right->AsLiteral());
- } else {
- Visit(right);
- Move(destination, right->location());
- }
+ Visit(right);
+ ASSERT_EQ(destination.type(), right->location().type());
__ bind(&done);
}
« no previous file with comments | « src/location.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698