Add virtual destructors to address a gcc warning.

TBR=plesner@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b092d558
......@@ -38,6 +38,8 @@ namespace internal {
// generated.
class Value : public ZoneObject {
public:
virtual ~Value() {}
virtual void ToRegister(MacroAssembler* masm, Register reg) = 0;
#ifdef DEBUG
......@@ -51,7 +53,9 @@ class Constant : public Value {
public:
explicit Constant(Handle<Object> handle) : handle_(handle) {}
virtual void ToRegister(MacroAssembler* masm, Register reg);
virtual ~Constant() {}
void ToRegister(MacroAssembler* masm, Register reg);
#ifdef DEBUG
void Print();
......@@ -67,6 +71,8 @@ class Constant : public Value {
// be generated.
class Instruction : public ZoneObject {
public:
virtual ~Instruction() {}
virtual void Compile(MacroAssembler* masm) = 0;
#ifdef DEBUG
......@@ -80,6 +86,8 @@ class ReturnInstr : public Instruction {
public:
explicit ReturnInstr(Value* value) : value_(value) {}
virtual ~ReturnInstr() {}
void Compile(MacroAssembler* masm);
#ifdef DEBUG
......@@ -102,6 +110,8 @@ class CfgNode : public ZoneObject {
#endif
}
virtual ~CfgNode() {}
bool is_marked() { return is_marked_; }
static void Reset();
......@@ -137,6 +147,8 @@ class InstructionBlock : public CfgNode {
public:
InstructionBlock() : successor_(NULL), instructions_(4) {}
virtual ~InstructionBlock() {}
static InstructionBlock* cast(CfgNode* node) {
ASSERT(node->is_block());
return reinterpret_cast<InstructionBlock*>(node);
......@@ -172,6 +184,8 @@ class EntryNode : public CfgNode {
public:
EntryNode(FunctionLiteral* fun, InstructionBlock* succ);
virtual ~EntryNode() {}
void Unmark();
void Compile(MacroAssembler* masm);
......@@ -193,6 +207,8 @@ class ExitNode : public CfgNode {
public:
explicit ExitNode(FunctionLiteral* fun);
virtual ~ExitNode() {}
void Unmark();
void Compile(MacroAssembler* masm);
......
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