Commit 94cf2737 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Cleanup of contexts in the full code generator.

Review URL: http://codereview.chromium.org/3449004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 06c86740
This diff is collapsed.
......@@ -172,18 +172,6 @@ class Statement: public AstNode {
class Expression: public AstNode {
public:
enum Context {
// Not assigned a context yet, or else will not be visited during
// code generation.
kUninitialized,
// Evaluated for its side effects.
kEffect,
// Evaluated for its value (and side effects).
kValue,
// Evaluated for control flow (and side effects).
kTest
};
Expression() : bitfields_(0) {}
virtual Expression* AsExpression() { return this; }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1361,6 +1361,13 @@ void MacroAssembler::Drop(int stack_elements) {
}
void MacroAssembler::Move(Register dst, Register src) {
if (!dst.is(src)) {
mov(dst, src);
}
}
void MacroAssembler::Move(Register dst, Handle<Object> value) {
mov(dst, value);
}
......
......@@ -505,6 +505,9 @@ class MacroAssembler: public Assembler {
void Call(Label* target) { call(target); }
// Move if the registers are not identical.
void Move(Register target, Register source);
void Move(Register target, Handle<Object> value);
Handle<Object> CodeObject() { return code_object_; }
......
This diff is collapsed.
......@@ -1207,6 +1207,15 @@ SmiIndex MacroAssembler::SmiToNegativeIndex(Register dst,
}
void MacroAssembler::Move(Register dst, Register src) {
if (!dst.is(src)) {
movq(dst, src);
}
}
void MacroAssembler::Move(Register dst, Handle<Object> source) {
ASSERT(!source->IsFailure());
if (source->IsSmi()) {
......
......@@ -557,6 +557,9 @@ class MacroAssembler: public Assembler {
void Set(Register dst, int64_t x);
void Set(const Operand& dst, int64_t x);
// Move if the registers are not identical.
void Move(Register target, Register source);
// Handle support
void Move(Register dst, Handle<Object> source);
void Move(const Operand& dst, Handle<Object> source);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment