OLD | NEW |
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 "src/compiler/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/base/lazy-instance.h" | 8 #include "src/base/lazy-instance.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 size_t hash_value(RelocatablePtrConstantInfo const& p) { | 161 size_t hash_value(RelocatablePtrConstantInfo const& p) { |
162 return base::hash_combine(p.value(), p.rmode(), p.type()); | 162 return base::hash_combine(p.value(), p.rmode(), p.type()); |
163 } | 163 } |
164 | 164 |
165 std::ostream& operator<<(std::ostream& os, | 165 std::ostream& operator<<(std::ostream& os, |
166 RelocatablePtrConstantInfo const& p) { | 166 RelocatablePtrConstantInfo const& p) { |
167 return os << p.value() << "|" << p.rmode() << "|" << p.type(); | 167 return os << p.value() << "|" << p.rmode() << "|" << p.type(); |
168 } | 168 } |
169 | 169 |
| 170 std::ostream& operator<<(std::ostream& os, |
| 171 const ZoneVector<MachineType>* types) { |
| 172 // Print all the MachineTypes, separated by commas. |
| 173 bool first = true; |
| 174 for (MachineType elem : *types) { |
| 175 if (!first) { |
| 176 os << ", "; |
| 177 } |
| 178 first = false; |
| 179 os << elem; |
| 180 } |
| 181 return os; |
| 182 } |
| 183 |
170 #define CACHED_OP_LIST(V) \ | 184 #define CACHED_OP_LIST(V) \ |
171 V(Dead, Operator::kFoldable, 0, 0, 0, 1, 1, 1) \ | 185 V(Dead, Operator::kFoldable, 0, 0, 0, 1, 1, 1) \ |
172 V(DeoptimizeIf, Operator::kFoldable, 2, 1, 1, 0, 1, 1) \ | 186 V(DeoptimizeIf, Operator::kFoldable, 2, 1, 1, 0, 1, 1) \ |
173 V(DeoptimizeUnless, Operator::kFoldable, 2, 1, 1, 0, 1, 1) \ | 187 V(DeoptimizeUnless, Operator::kFoldable, 2, 1, 1, 0, 1, 1) \ |
174 V(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ | 188 V(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
175 V(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ | 189 V(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
176 V(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ | 190 V(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
177 V(IfDefault, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ | 191 V(IfDefault, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
178 V(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1) \ | 192 V(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1) \ |
179 V(Terminate, Operator::kKontrol, 0, 1, 1, 0, 0, 1) \ | 193 V(Terminate, Operator::kKontrol, 0, 1, 1, 0, 0, 1) \ |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 CommonOperatorBuilder::CreateFrameStateFunctionInfo( | 901 CommonOperatorBuilder::CreateFrameStateFunctionInfo( |
888 FrameStateType type, int parameter_count, int local_count, | 902 FrameStateType type, int parameter_count, int local_count, |
889 Handle<SharedFunctionInfo> shared_info) { | 903 Handle<SharedFunctionInfo> shared_info) { |
890 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 904 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
891 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); | 905 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); |
892 } | 906 } |
893 | 907 |
894 } // namespace compiler | 908 } // namespace compiler |
895 } // namespace internal | 909 } // namespace internal |
896 } // namespace v8 | 910 } // namespace v8 |
OLD | NEW |