OLD | NEW |
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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/generic-node-inl.h" | 8 #include "src/compiler/generic-node-inl.h" |
9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 140 } |
141 | 141 |
142 | 142 |
143 TEST(BuildMulNodeGraph) { | 143 TEST(BuildMulNodeGraph) { |
144 HandleAndZoneScope scope; | 144 HandleAndZoneScope scope; |
145 Schedule schedule(scope.main_zone()); | 145 Schedule schedule(scope.main_zone()); |
146 Graph graph(scope.main_zone()); | 146 Graph graph(scope.main_zone()); |
147 CommonOperatorBuilder common(scope.main_zone()); | 147 CommonOperatorBuilder common(scope.main_zone()); |
148 MachineOperatorBuilder machine(scope.main_zone(), kMachineWord32); | 148 MachineOperatorBuilder machine(scope.main_zone(), kMachineWord32); |
149 | 149 |
150 Node* start = graph.NewNode(common.Start()); | 150 Node* start = graph.NewNode(common.Start(0)); |
151 graph.SetStart(start); | 151 graph.SetStart(start); |
152 Node* param0 = graph.NewNode(common.Parameter(0)); | 152 Node* param0 = graph.NewNode(common.Parameter(0), graph.start()); |
153 Node* param1 = graph.NewNode(common.Parameter(1)); | 153 Node* param1 = graph.NewNode(common.Parameter(1), graph.start()); |
154 | 154 |
155 Node* mul = graph.NewNode(machine.Int32Mul(), param0, param1); | 155 Node* mul = graph.NewNode(machine.Int32Mul(), param0, param1); |
156 Node* ret = graph.NewNode(common.Return(), mul, start); | 156 Node* ret = graph.NewNode(common.Return(), mul, start); |
157 | 157 |
158 USE(ret); | 158 USE(ret); |
159 } | 159 } |
OLD | NEW |