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/operator.h" | 5 #include "src/compiler/operator.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 std::ostream& operator<<(std::ostream& os, const Operator& op) { | 42 std::ostream& operator<<(std::ostream& os, const Operator& op) { |
43 op.PrintTo(os); | 43 op.PrintTo(os); |
44 return os; | 44 return os; |
45 } | 45 } |
46 | 46 |
47 void Operator::PrintToImpl(std::ostream& os, PrintVerbosity verbose) const { | 47 void Operator::PrintToImpl(std::ostream& os, PrintVerbosity verbose) const { |
48 os << mnemonic(); | 48 os << mnemonic(); |
49 } | 49 } |
50 | 50 |
| 51 void Operator::PrintPropsTo(std::ostream& os) const { |
| 52 std::string separator = ""; |
| 53 |
| 54 #define PRINT_PROP_IF_SET(name) \ |
| 55 if (HasProperty(Operator::k##name)) { \ |
| 56 os << separator; \ |
| 57 os << #name; \ |
| 58 separator = ", "; \ |
| 59 } |
| 60 OPERATOR_PROPERTY_LIST(PRINT_PROP_IF_SET) |
| 61 #undef PRINT_PROP_IF_SET |
| 62 } |
| 63 |
51 } // namespace compiler | 64 } // namespace compiler |
52 } // namespace internal | 65 } // namespace internal |
53 } // namespace v8 | 66 } // namespace v8 |
OLD | NEW |