Revision: 2599 Author: [email protected] Date: Fri Jul 31 04:34:47 2009 Log: Add virtual destructors to address a gcc warning.
[email protected] Review URL: http://codereview.chromium.org/160449 http://code.google.com/p/v8/source/detail?r=2599 Modified: /branches/bleeding_edge/src/cfg.h ======================================= --- /branches/bleeding_edge/src/cfg.h Fri Jul 31 04:06:17 2009 +++ /branches/bleeding_edge/src/cfg.h Fri Jul 31 04:34:47 2009 @@ -38,6 +38,8 @@ // generated. class Value : public ZoneObject { public: + virtual ~Value() {} + virtual void ToRegister(MacroAssembler* masm, Register reg) = 0; #ifdef DEBUG @@ -51,7 +53,9 @@ 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 @@ // be generated. class Instruction : public ZoneObject { public: + virtual ~Instruction() {} + virtual void Compile(MacroAssembler* masm) = 0; #ifdef DEBUG @@ -79,6 +85,8 @@ class ReturnInstr : public Instruction { public: explicit ReturnInstr(Value* value) : value_(value) {} + + virtual ~ReturnInstr() {} void Compile(MacroAssembler* masm); @@ -101,6 +109,8 @@ number_ = -1; #endif } + + virtual ~CfgNode() {} bool is_marked() { return is_marked_; } @@ -136,6 +146,8 @@ class InstructionBlock : public CfgNode { public: InstructionBlock() : successor_(NULL), instructions_(4) {} + + virtual ~InstructionBlock() {} static InstructionBlock* cast(CfgNode* node) { ASSERT(node->is_block()); @@ -171,6 +183,8 @@ class EntryNode : public CfgNode { public: EntryNode(FunctionLiteral* fun, InstructionBlock* succ); + + virtual ~EntryNode() {} void Unmark(); @@ -192,6 +206,8 @@ class ExitNode : public CfgNode { public: explicit ExitNode(FunctionLiteral* fun); + + virtual ~ExitNode() {} void Unmark(); --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
