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

Side by Side Diff: src/compiler/graph-builder.cc

Issue 464033002: Refactor building of lazy bailouts in AstGraphBuilder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/graph-builder.h" 5 #include "src/compiler/graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/generic-graph.h" 8 #include "src/compiler/generic-graph.h"
9 #include "src/compiler/generic-node.h" 9 #include "src/compiler/generic-node.h"
10 #include "src/compiler/generic-node-inl.h" 10 #include "src/compiler/generic-node-inl.h"
(...skipping 12 matching lines...) Expand all
23 CommonOperatorBuilder* common) 23 CommonOperatorBuilder* common)
24 : GraphBuilder(graph), 24 : GraphBuilder(graph),
25 common_(common), 25 common_(common),
26 environment_(NULL), 26 environment_(NULL),
27 current_context_(NULL), 27 current_context_(NULL),
28 exit_control_(NULL) {} 28 exit_control_(NULL) {}
29 29
30 30
31 Node* StructuredGraphBuilder::MakeNode(Operator* op, int value_input_count, 31 Node* StructuredGraphBuilder::MakeNode(Operator* op, int value_input_count,
32 Node** value_inputs) { 32 Node** value_inputs) {
33 DCHECK(op->InputCount() == value_input_count);
34
33 bool has_context = OperatorProperties::HasContextInput(op); 35 bool has_context = OperatorProperties::HasContextInput(op);
34 bool has_control = OperatorProperties::GetControlInputCount(op) == 1; 36 bool has_control = OperatorProperties::GetControlInputCount(op) == 1;
35 bool has_effect = OperatorProperties::GetEffectInputCount(op) == 1; 37 bool has_effect = OperatorProperties::GetEffectInputCount(op) == 1;
36 38
37 DCHECK(OperatorProperties::GetControlInputCount(op) < 2); 39 DCHECK(OperatorProperties::GetControlInputCount(op) < 2);
38 DCHECK(OperatorProperties::GetEffectInputCount(op) < 2); 40 DCHECK(OperatorProperties::GetEffectInputCount(op) < 2);
39 41
40 Node* result = NULL; 42 Node* result = NULL;
41 if (!has_context && !has_control && !has_effect) { 43 if (!has_context && !has_control && !has_effect) {
42 result = graph()->NewNode(op, value_input_count, value_inputs); 44 result = graph()->NewNode(op, value_input_count, value_inputs);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 if (!dead_control_.is_set()) { 234 if (!dead_control_.is_set()) {
233 Node* dead_node = graph()->NewNode(common_->Dead()); 235 Node* dead_node = graph()->NewNode(common_->Dead());
234 dead_control_.set(dead_node); 236 dead_control_.set(dead_node);
235 return dead_node; 237 return dead_node;
236 } 238 }
237 return dead_control_.get(); 239 return dead_control_.get();
238 } 240 }
239 } 241 }
240 } 242 }
241 } // namespace v8::internal::compiler 243 } // namespace v8::internal::compiler
OLDNEW
« src/compiler/ast-graph-builder.h ('K') | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698