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

Side by Side Diff: test/cctest/compiler/simplified-graph-builder.cc

Issue 437183002: Make start node a value input to parameter nodes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add start node as input to parameter nodes. 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 "test/cctest/compiler/simplified-graph-builder.h" 5 #include "test/cctest/compiler/simplified-graph-builder.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
11 SimplifiedGraphBuilder::SimplifiedGraphBuilder( 11 SimplifiedGraphBuilder::SimplifiedGraphBuilder(
12 Graph* graph, CommonOperatorBuilder* common, 12 Graph* graph, CommonOperatorBuilder* common,
13 MachineOperatorBuilder* machine, SimplifiedOperatorBuilder* simplified) 13 MachineOperatorBuilder* machine, SimplifiedOperatorBuilder* simplified)
14 : StructuredGraphBuilder(graph, common), 14 : StructuredGraphBuilder(graph, common),
15 machine_(machine), 15 machine_(machine),
16 simplified_(simplified) {} 16 simplified_(simplified) {}
17 17
18 18
19 void SimplifiedGraphBuilder::Begin() { 19 void SimplifiedGraphBuilder::Begin(int num_parameters) {
20 DCHECK(graph()->start() == NULL); 20 DCHECK(graph()->start() == NULL);
21 Node* start = graph()->NewNode(common()->Start()); 21 Node* start = graph()->NewNode(common()->Start(num_parameters));
22 graph()->SetStart(start); 22 graph()->SetStart(start);
23 set_environment(new (zone()) Environment(this, start)); 23 set_environment(new (zone()) Environment(this, start));
24 } 24 }
25 25
26 26
27 void SimplifiedGraphBuilder::Return(Node* value) { 27 void SimplifiedGraphBuilder::Return(Node* value) {
28 Node* control = NewNode(common()->Return(), value); 28 Node* control = NewNode(common()->Return(), value);
29 UpdateControlDependencyToLeaveFunction(control); 29 UpdateControlDependencyToLeaveFunction(control);
30 } 30 }
31 31
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 Node* SimplifiedGraphBuilder::Environment::Peek(size_t depth) { 70 Node* SimplifiedGraphBuilder::Environment::Peek(size_t depth) {
71 DCHECK(depth < values()->size()); 71 DCHECK(depth < values()->size());
72 size_t index = values()->size() - depth - 1; 72 size_t index = values()->size() - depth - 1;
73 return values()->at(index); 73 return values()->at(index);
74 } 74 }
75 75
76 } // namespace compiler 76 } // namespace compiler
77 } // namespace internal 77 } // namespace internal
78 } // namespace v8 78 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/simplified-graph-builder.h ('k') | test/cctest/compiler/test-js-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698