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

Unified Diff: src/compiler/pipeline.cc

Issue 448113002: Minor simplification and cleanup of graph builder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/compiler/graph-builder.cc ('k') | test/cctest/compiler/simplified-graph-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 1752882779c78fe7b2f3baf11e6172a140e9083f..ca47b70bef7bc889ec94265b3f68c96ce931f467 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -85,16 +85,25 @@ class AstGraphBuilderWithPositions : public AstGraphBuilder {
public:
explicit AstGraphBuilderWithPositions(CompilationInfo* info, JSGraph* jsgraph,
SourcePositionTable* source_positions)
- : AstGraphBuilder(info, jsgraph, source_positions) {}
+ : AstGraphBuilder(info, jsgraph), source_positions_(source_positions) {}
+
+ bool CreateGraph() V8_OVERRIDE {
+ SourcePositionTable::Scope pos(source_positions_,
+ SourcePosition::Unknown());
+ return AstGraphBuilder::CreateGraph();
+ }
#define DEF_VISIT(type) \
virtual void Visit##type(type* node) V8_OVERRIDE { \
- SourcePositionTable::Scope pos(source_positions(), \
+ SourcePositionTable::Scope pos(source_positions_, \
SourcePosition(node->position())); \
AstGraphBuilder::Visit##type(node); \
}
AST_NODE_LIST(DEF_VISIT)
#undef DEF_VISIT
+
+ private:
+ SourcePositionTable* source_positions_;
};
« no previous file with comments | « src/compiler/graph-builder.cc ('k') | test/cctest/compiler/simplified-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698