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 #ifndef V8_COMPILER_OPERATOR_H_ | 5 #ifndef V8_COMPILER_OPERATOR_H_ |
6 #define V8_COMPILER_OPERATOR_H_ | 6 #define V8_COMPILER_OPERATOR_H_ |
7 | 7 |
8 #include <ostream> // NOLINT(readability/streams) | 8 #include <ostream> // NOLINT(readability/streams) |
9 | 9 |
10 #include "src/base/flags.h" | 10 #include "src/base/flags.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 kNoProperties = 0, | 37 kNoProperties = 0, |
38 kReducible = 1 << 0, // Participates in strength reduction. | 38 kReducible = 1 << 0, // Participates in strength reduction. |
39 kCommutative = 1 << 1, // OP(a, b) == OP(b, a) for all inputs. | 39 kCommutative = 1 << 1, // OP(a, b) == OP(b, a) for all inputs. |
40 kAssociative = 1 << 2, // OP(a, OP(b,c)) == OP(OP(a,b), c) for all inputs. | 40 kAssociative = 1 << 2, // OP(a, OP(b,c)) == OP(OP(a,b), c) for all inputs. |
41 kIdempotent = 1 << 3, // OP(a); OP(a) == OP(a). | 41 kIdempotent = 1 << 3, // OP(a); OP(a) == OP(a). |
42 kNoRead = 1 << 4, // Has no scheduling dependency on Effects | 42 kNoRead = 1 << 4, // Has no scheduling dependency on Effects |
43 kNoWrite = 1 << 5, // Does not modify any Effects and thereby | 43 kNoWrite = 1 << 5, // Does not modify any Effects and thereby |
44 // create new scheduling dependencies. | 44 // create new scheduling dependencies. |
45 kNoThrow = 1 << 6, // Can never generate an exception. | 45 kNoThrow = 1 << 6, // Can never generate an exception. |
46 kFoldable = kNoRead | kNoWrite, | 46 kFoldable = kNoRead | kNoWrite, |
| 47 kKontrol = kFoldable | kNoThrow, |
47 kEliminatable = kNoWrite | kNoThrow, | 48 kEliminatable = kNoWrite | kNoThrow, |
48 kPure = kNoRead | kNoWrite | kNoThrow | kIdempotent | 49 kPure = kNoRead | kNoWrite | kNoThrow | kIdempotent |
49 }; | 50 }; |
50 typedef base::Flags<Property, uint8_t> Properties; | 51 typedef base::Flags<Property, uint8_t> Properties; |
51 | 52 |
52 // Constructor. | 53 // Constructor. |
53 Operator(Opcode opcode, Properties properties, const char* mnemonic, | 54 Operator(Opcode opcode, Properties properties, const char* mnemonic, |
54 size_t value_in, size_t effect_in, size_t control_in, | 55 size_t value_in, size_t effect_in, size_t control_in, |
55 size_t value_out, size_t effect_out, size_t control_out); | 56 size_t value_out, size_t effect_out, size_t control_out); |
56 | 57 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 return reinterpret_cast<const Operator1<double, base::bit_equal_to<double>, | 187 return reinterpret_cast<const Operator1<double, base::bit_equal_to<double>, |
187 base::bit_hash<double>>*>(op) | 188 base::bit_hash<double>>*>(op) |
188 ->parameter(); | 189 ->parameter(); |
189 } | 190 } |
190 | 191 |
191 } // namespace compiler | 192 } // namespace compiler |
192 } // namespace internal | 193 } // namespace internal |
193 } // namespace v8 | 194 } // namespace v8 |
194 | 195 |
195 #endif // V8_COMPILER_OPERATOR_H_ | 196 #endif // V8_COMPILER_OPERATOR_H_ |
OLD | NEW |