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/compiler/node.h" | 5 #include "src/compiler/node.h" |
6 #include "src/compiler/node-properties.h" | 6 #include "src/compiler/node-properties.h" |
7 #include "src/compiler/node-properties-inl.h" | 7 #include "src/compiler/node-properties-inl.h" |
8 #include "src/compiler/schedule.h" | 8 #include "src/compiler/schedule.h" |
9 #include "src/ostreams.h" | 9 #include "src/ostreams.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 namespace compiler { | 13 namespace compiler { |
14 | 14 |
15 OStream& operator<<(OStream& os, const BasicBlockData::Control& c) { | 15 OStream& operator<<(OStream& os, const BasicBlockData::Control& c) { |
16 switch (c) { | 16 switch (c) { |
17 case BasicBlockData::kNone: | 17 case BasicBlockData::kNone: |
18 return os << "none"; | 18 return os << "none"; |
19 case BasicBlockData::kGoto: | 19 case BasicBlockData::kGoto: |
20 return os << "goto"; | 20 return os << "goto"; |
21 case BasicBlockData::kBranch: | 21 case BasicBlockData::kBranch: |
22 return os << "branch"; | 22 return os << "branch"; |
23 case BasicBlockData::kReturn: | 23 case BasicBlockData::kReturn: |
24 return os << "return"; | 24 return os << "return"; |
25 case BasicBlockData::kThrow: | 25 case BasicBlockData::kThrow: |
26 return os << "throw"; | 26 return os << "throw"; |
27 case BasicBlockData::kCall: | |
28 return os << "call"; | |
29 case BasicBlockData::kDeoptimize: | |
30 return os << "deoptimize"; | |
31 } | 27 } |
32 UNREACHABLE(); | 28 UNREACHABLE(); |
33 return os; | 29 return os; |
34 } | 30 } |
35 | 31 |
36 | 32 |
37 OStream& operator<<(OStream& os, const Schedule& s) { | 33 OStream& operator<<(OStream& os, const Schedule& s) { |
38 // TODO(svenpanne) Const-correct the RPO stuff/iterators. | 34 // TODO(svenpanne) Const-correct the RPO stuff/iterators. |
39 BasicBlockVector* rpo = const_cast<Schedule*>(&s)->rpo_order(); | 35 BasicBlockVector* rpo = const_cast<Schedule*>(&s)->rpo_order(); |
40 for (BasicBlockVectorIter i = rpo->begin(); i != rpo->end(); ++i) { | 36 for (BasicBlockVectorIter i = rpo->begin(); i != rpo->end(); ++i) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 os << "B" << (*j)->id(); | 79 os << "B" << (*j)->id(); |
84 } | 80 } |
85 os << "\n"; | 81 os << "\n"; |
86 } | 82 } |
87 } | 83 } |
88 return os; | 84 return os; |
89 } | 85 } |
90 } // namespace compiler | 86 } // namespace compiler |
91 } // namespace internal | 87 } // namespace internal |
92 } // namespace v8 | 88 } // namespace v8 |
OLD | NEW |