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
This commit is contained in:
kmillikin@chromium.org 2009-07-31 11:34:47 +00:00
parent b092d55890
commit e2ae01b6ef

View File

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