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

Unified Diff: src/cfg.h

Issue 160449: Add virtual destructors to address a gcc warning. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cfg.h
===================================================================
--- src/cfg.h (revision 2596)
+++ src/cfg.h (working copy)
@@ -38,6 +38,8 @@
// generated.
class Value : public ZoneObject {
public:
+ virtual ~Value() {}
+
virtual void ToRegister(MacroAssembler* masm, Register reg) = 0;
#ifdef DEBUG
@@ -51,8 +53,10 @@
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();
#endif
@@ -67,6 +71,8 @@
// be generated.
class Instruction : public ZoneObject {
public:
+ virtual ~Instruction() {}
+
virtual void Compile(MacroAssembler* masm) = 0;
#ifdef DEBUG
@@ -80,6 +86,8 @@
public:
explicit ReturnInstr(Value* value) : value_(value) {}
+ virtual ~ReturnInstr() {}
+
void Compile(MacroAssembler* masm);
#ifdef DEBUG
@@ -102,6 +110,8 @@
#endif
}
+ virtual ~CfgNode() {}
+
bool is_marked() { return is_marked_; }
static void Reset();
@@ -137,6 +147,8 @@
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 @@
public:
EntryNode(FunctionLiteral* fun, InstructionBlock* succ);
+ virtual ~EntryNode() {}
+
void Unmark();
void Compile(MacroAssembler* masm);
@@ -193,6 +207,8 @@
public:
explicit ExitNode(FunctionLiteral* fun);
+ virtual ~ExitNode() {}
+
void Unmark();
void Compile(MacroAssembler* masm);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698