| 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" |
| 11 #include "src/compiler/node.h" | 11 #include "src/compiler/node.h" |
| 12 #include "src/compiler/operator.h" | 12 #include "src/compiler/operator.h" |
| 13 #include "src/compiler/schedule.h" | 13 #include "src/compiler/schedule.h" |
| 14 #include "test/cctest/cctest.h" | 14 #include "test/cctest/cctest.h" |
| 15 | 15 |
| 16 using namespace v8::internal; | 16 using namespace v8::internal; |
| 17 using namespace v8::internal::compiler; | 17 using namespace v8::internal::compiler; |
| 18 | 18 |
| 19 static SimpleOperator dummy_operator(IrOpcode::kParameter, Operator::kNoWrite, | 19 static Operator dummy_operator(IrOpcode::kParameter, Operator::kNoWrite, |
| 20 0, 0, "dummy"); | 20 "dummy", 0, 0, 0, 0, 0, 0); |
| 21 | 21 |
| 22 TEST(TestScheduleAllocation) { | 22 TEST(TestScheduleAllocation) { |
| 23 HandleAndZoneScope scope; | 23 HandleAndZoneScope scope; |
| 24 Schedule schedule(scope.main_zone()); | 24 Schedule schedule(scope.main_zone()); |
| 25 | 25 |
| 26 CHECK_NE(NULL, schedule.start()); | 26 CHECK_NE(NULL, schedule.start()); |
| 27 CHECK_EQ(schedule.start(), schedule.GetBlockById(BasicBlock::Id::FromInt(0))); | 27 CHECK_EQ(schedule.start(), schedule.GetBlockById(BasicBlock::Id::FromInt(0))); |
| 28 } | 28 } |
| 29 | 29 |
| 30 | 30 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 Node* start = graph.NewNode(common.Start(0)); | 168 Node* start = graph.NewNode(common.Start(0)); |
| 169 graph.SetStart(start); | 169 graph.SetStart(start); |
| 170 Node* param0 = graph.NewNode(common.Parameter(0), graph.start()); | 170 Node* param0 = graph.NewNode(common.Parameter(0), graph.start()); |
| 171 Node* param1 = graph.NewNode(common.Parameter(1), graph.start()); | 171 Node* param1 = graph.NewNode(common.Parameter(1), graph.start()); |
| 172 | 172 |
| 173 Node* mul = graph.NewNode(machine.Int32Mul(), param0, param1); | 173 Node* mul = graph.NewNode(machine.Int32Mul(), param0, param1); |
| 174 Node* ret = graph.NewNode(common.Return(), mul, start); | 174 Node* ret = graph.NewNode(common.Return(), mul, start); |
| 175 | 175 |
| 176 USE(ret); | 176 USE(ret); |
| 177 } | 177 } |
| OLD | NEW |