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

Unified Diff: src/hydrogen.h

Issue 22796020: Reland "Use V8_FINAL and V8_OVERRIDE in various places, fixing bugs revealed by them.". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « src/ast.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 004aa16a8784337f874768166b75833c6eea8086..af31b60a5bc009c61bef2b42a60df546946b6c8e 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -53,10 +53,10 @@ class LChunk;
class LiveRange;
-class HBasicBlock: public ZoneObject {
+class HBasicBlock V8_FINAL : public ZoneObject {
public:
explicit HBasicBlock(HGraph* graph);
- virtual ~HBasicBlock() { }
+ ~HBasicBlock() { }
// Simple accessors.
int block_id() const { return block_id_; }
@@ -220,7 +220,7 @@ class HBasicBlock: public ZoneObject {
};
-class HPredecessorIterator BASE_EMBEDDED {
+class HPredecessorIterator V8_FINAL BASE_EMBEDDED {
public:
explicit HPredecessorIterator(HBasicBlock* block)
: predecessor_list_(block->predecessors()), current_(0) { }
@@ -235,7 +235,7 @@ class HPredecessorIterator BASE_EMBEDDED {
};
-class HInstructionIterator BASE_EMBEDDED {
+class HInstructionIterator V8_FINAL BASE_EMBEDDED {
public:
explicit HInstructionIterator(HBasicBlock* block)
: instr_(block->first()) {
@@ -255,7 +255,7 @@ class HInstructionIterator BASE_EMBEDDED {
};
-class HLoopInformation: public ZoneObject {
+class HLoopInformation V8_FINAL : public ZoneObject {
public:
HLoopInformation(HBasicBlock* loop_header, Zone* zone)
: back_edges_(4, zone),
@@ -264,7 +264,7 @@ class HLoopInformation: public ZoneObject {
stack_check_(NULL) {
blocks_.Add(loop_header, zone);
}
- virtual ~HLoopInformation() {}
+ ~HLoopInformation() {}
const ZoneList<HBasicBlock*>* back_edges() const { return &back_edges_; }
const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; }
@@ -303,7 +303,7 @@ class HLoopInformation: public ZoneObject {
class BoundsCheckTable;
class InductionVariableBlocksTable;
-class HGraph: public ZoneObject {
+class HGraph V8_FINAL : public ZoneObject {
public:
explicit HGraph(CompilationInfo* info);
@@ -523,7 +523,7 @@ enum FrameType {
};
-class HEnvironment: public ZoneObject {
+class HEnvironment V8_FINAL : public ZoneObject {
public:
HEnvironment(HEnvironment* outer,
Scope* scope,
@@ -793,33 +793,37 @@ class AstContext {
};
-class EffectContext: public AstContext {
+class EffectContext V8_FINAL : public AstContext {
public:
explicit EffectContext(HOptimizedGraphBuilder* owner)
: AstContext(owner, Expression::kEffect) {
}
virtual ~EffectContext();
- virtual void ReturnValue(HValue* value);
- virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id);
- virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id);
+ virtual void ReturnValue(HValue* value) V8_OVERRIDE;
+ virtual void ReturnInstruction(HInstruction* instr,
+ BailoutId ast_id) V8_OVERRIDE;
+ virtual void ReturnControl(HControlInstruction* instr,
+ BailoutId ast_id) V8_OVERRIDE;
virtual void ReturnContinuation(HIfContinuation* continuation,
- BailoutId ast_id);
+ BailoutId ast_id) V8_OVERRIDE;
};
-class ValueContext: public AstContext {
+class ValueContext V8_FINAL : public AstContext {
public:
ValueContext(HOptimizedGraphBuilder* owner, ArgumentsAllowedFlag flag)
: AstContext(owner, Expression::kValue), flag_(flag) {
}
virtual ~ValueContext();
- virtual void ReturnValue(HValue* value);
- virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id);
- virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id);
+ virtual void ReturnValue(HValue* value) V8_OVERRIDE;
+ virtual void ReturnInstruction(HInstruction* instr,
+ BailoutId ast_id) V8_OVERRIDE;
+ virtual void ReturnControl(HControlInstruction* instr,
+ BailoutId ast_id) V8_OVERRIDE;
virtual void ReturnContinuation(HIfContinuation* continuation,
- BailoutId ast_id);
+ BailoutId ast_id) V8_OVERRIDE;
bool arguments_allowed() { return flag_ == ARGUMENTS_ALLOWED; }
@@ -828,7 +832,7 @@ class ValueContext: public AstContext {
};
-class TestContext: public AstContext {
+class TestContext V8_FINAL : public AstContext {
public:
TestContext(HOptimizedGraphBuilder* owner,
Expression* condition,
@@ -840,11 +844,13 @@ class TestContext: public AstContext {
if_false_(if_false) {
}
- virtual void ReturnValue(HValue* value);
- virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id);
- virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id);
+ virtual void ReturnValue(HValue* value) V8_OVERRIDE;
+ virtual void ReturnInstruction(HInstruction* instr,
+ BailoutId ast_id) V8_OVERRIDE;
+ virtual void ReturnControl(HControlInstruction* instr,
+ BailoutId ast_id) V8_OVERRIDE;
virtual void ReturnContinuation(HIfContinuation* continuation,
- BailoutId ast_id);
+ BailoutId ast_id) V8_OVERRIDE;
static TestContext* cast(AstContext* context) {
ASSERT(context->IsTest());
@@ -866,7 +872,7 @@ class TestContext: public AstContext {
};
-class FunctionState {
+class FunctionState V8_FINAL {
public:
FunctionState(HOptimizedGraphBuilder* owner,
CompilationInfo* info,
@@ -933,7 +939,7 @@ class FunctionState {
};
-class HIfContinuation {
+class HIfContinuation V8_FINAL {
public:
HIfContinuation() { continuation_captured_ = false; }
~HIfContinuation() { ASSERT(!continuation_captured_); }
@@ -1272,7 +1278,7 @@ class HGraphBuilder {
void AddIncrementCounter(StatsCounter* counter,
HValue* context);
- class IfBuilder {
+ class IfBuilder V8_FINAL {
public:
explicit IfBuilder(HGraphBuilder* builder,
int position = RelocInfo::kNoPosition);
@@ -1402,7 +1408,7 @@ class HGraphBuilder {
HBasicBlock* merge_block_;
};
- class LoopBuilder {
+ class LoopBuilder V8_FINAL {
public:
enum Direction {
kPreIncrement,
@@ -1443,7 +1449,7 @@ class HGraphBuilder {
void BuildNewSpaceArrayCheck(HValue* length,
ElementsKind kind);
- class JSArrayBuilder {
+ class JSArrayBuilder V8_FINAL {
public:
JSArrayBuilder(HGraphBuilder* builder,
ElementsKind kind,
@@ -1642,12 +1648,13 @@ inline HInstruction* HGraphBuilder::NewUncasted<HContext>() {
}
-class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
+class HOptimizedGraphBuilder V8_FINAL
+ : public HGraphBuilder, public AstVisitor {
public:
// A class encapsulating (lazily-allocated) break and continue blocks for
// a breakable statement. Separated from BreakAndContinueScope so that it
// can have a separate lifetime.
- class BreakAndContinueInfo BASE_EMBEDDED {
+ class BreakAndContinueInfo V8_FINAL BASE_EMBEDDED {
public:
explicit BreakAndContinueInfo(BreakableStatement* target,
int drop_extra = 0)
@@ -1673,7 +1680,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
// A helper class to maintain a stack of current BreakAndContinueInfo
// structures mirroring BreakableStatement nesting.
- class BreakAndContinueScope BASE_EMBEDDED {
+ class BreakAndContinueScope V8_FINAL BASE_EMBEDDED {
public:
BreakAndContinueScope(BreakAndContinueInfo* info,
HOptimizedGraphBuilder* owner)
@@ -1699,7 +1706,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
explicit HOptimizedGraphBuilder(CompilationInfo* info);
- virtual bool BuildGraph();
+ virtual bool BuildGraph() V8_OVERRIDE;
// Simple accessors.
BreakAndContinueScope* break_scope() const { return break_scope_; }
@@ -1885,9 +1892,9 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
template <class Instruction> HInstruction* PreProcessCall(Instruction* call);
void SetUpScope(Scope* scope);
- virtual void VisitStatements(ZoneList<Statement*>* statements);
+ virtual void VisitStatements(ZoneList<Statement*>* statements) V8_OVERRIDE;
-#define DECLARE_VISIT(type) virtual void Visit##type(type* node);
+#define DECLARE_VISIT(type) virtual void Visit##type(type* node) V8_OVERRIDE;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
@@ -2166,7 +2173,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
Zone* AstContext::zone() const { return owner_->zone(); }
-class HStatistics: public Malloced {
+class HStatistics V8_FINAL: public Malloced {
public:
HStatistics()
: timing_(5),
@@ -2225,7 +2232,7 @@ class HPhase : public CompilationPhase {
};
-class HTracer: public Malloced {
+class HTracer V8_FINAL : public Malloced {
public:
explicit HTracer(int isolate_id)
: trace_(&string_allocator_), indent_(0) {
@@ -2246,7 +2253,7 @@ class HTracer: public Malloced {
void TraceLiveRanges(const char* name, LAllocator* allocator);
private:
- class Tag BASE_EMBEDDED {
+ class Tag V8_FINAL BASE_EMBEDDED {
public:
Tag(HTracer* tracer, const char* name) {
name_ = name;
@@ -2311,7 +2318,7 @@ class HTracer: public Malloced {
};
-class NoObservableSideEffectsScope {
+class NoObservableSideEffectsScope V8_FINAL {
public:
explicit NoObservableSideEffectsScope(HGraphBuilder* builder) :
builder_(builder) {
« no previous file with comments | « src/ast.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698