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

Unified Diff: src/compiler/ast-graph-builder.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/ast-graph-builder.h ('k') | src/compiler/control-builders.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index ac5070869f41eee26104ef4d15452e4846432d42..2c242cbe1434c28cf76f0ef8bfb583fa277fa69e 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -16,12 +16,10 @@ namespace v8 {
namespace internal {
namespace compiler {
-AstGraphBuilder::AstGraphBuilder(CompilationInfo* info, JSGraph* jsgraph,
- SourcePositionTable* source_positions)
+AstGraphBuilder::AstGraphBuilder(CompilationInfo* info, JSGraph* jsgraph)
: StructuredGraphBuilder(jsgraph->graph(), jsgraph->common()),
info_(info),
jsgraph_(jsgraph),
- source_positions_(source_positions),
globals_(0, info->zone()),
breakable_(NULL),
execution_context_(NULL) {
@@ -55,13 +53,9 @@ bool AstGraphBuilder::CreateGraph() {
Scope* scope = info()->scope();
DCHECK(graph() != NULL);
- SourcePositionTable::Scope start_pos(
- source_positions(),
- SourcePosition(info()->shared_info()->start_position()));
-
// Set up the basic structure of the graph.
- graph()->SetStart(
- graph()->NewNode(common()->Start(info()->num_parameters())));
+ int parameter_count = info()->num_parameters();
+ graph()->SetStart(graph()->NewNode(common()->Start(parameter_count)));
// Initialize the top-level environment.
Environment env(this, scope, graph()->start());
@@ -98,10 +92,6 @@ bool AstGraphBuilder::CreateGraph() {
VisitStatements(info()->function()->body());
if (HasStackOverflow()) return false;
- SourcePositionTable::Scope end_pos(
- source_positions(),
- SourcePosition(info()->shared_info()->end_position() - 1));
-
// Emit tracing call if requested to do so.
if (FLAG_trace) {
// TODO(mstarzinger): Only traces implicit return.
@@ -1958,10 +1948,9 @@ Node* AstGraphBuilder::BuildBinaryOp(Node* left, Node* right, Token::Value op) {
void AstGraphBuilder::BuildLazyBailout(Node* node, BailoutId ast_id) {
if (OperatorProperties::CanLazilyDeoptimize(node->op())) {
// The deopting node should have an outgoing control dependency.
- DCHECK(GetControlDependency() == node);
+ DCHECK(environment()->GetControlDependency() == node);
- StructuredGraphBuilder::Environment* continuation_env =
- environment_internal();
+ StructuredGraphBuilder::Environment* continuation_env = environment();
// Create environment for the deoptimization block, and build the block.
StructuredGraphBuilder::Environment* deopt_env =
CopyEnvironment(continuation_env);
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/control-builders.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698