| 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 #ifndef V8_COMPILER_COMMON_OPERATOR_H_ | 5 #ifndef V8_COMPILER_COMMON_OPERATOR_H_ |
| 6 #define V8_COMPILER_COMMON_OPERATOR_H_ | 6 #define V8_COMPILER_COMMON_OPERATOR_H_ |
| 7 | 7 |
| 8 #include "src/compiler/frame-states.h" | 8 #include "src/compiler/frame-states.h" |
| 9 #include "src/machine-type.h" | 9 #include "src/machine-type.h" |
| 10 #include "src/zone-containers.h" | 10 #include "src/zone-containers.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 return hint; | 44 return hint; |
| 45 } | 45 } |
| 46 | 46 |
| 47 inline size_t hash_value(BranchHint hint) { return static_cast<size_t>(hint); } | 47 inline size_t hash_value(BranchHint hint) { return static_cast<size_t>(hint); } |
| 48 | 48 |
| 49 std::ostream& operator<<(std::ostream&, BranchHint); | 49 std::ostream& operator<<(std::ostream&, BranchHint); |
| 50 | 50 |
| 51 BranchHint BranchHintOf(const Operator* const); | 51 BranchHint BranchHintOf(const Operator* const); |
| 52 | 52 |
| 53 | 53 |
| 54 // Deoptimize bailout kind. |
| 55 enum class DeoptimizeKind : uint8_t { kEager, kSoft }; |
| 56 |
| 57 size_t hash_value(DeoptimizeKind kind); |
| 58 |
| 59 std::ostream& operator<<(std::ostream&, DeoptimizeKind); |
| 60 |
| 61 DeoptimizeKind DeoptimizeKindOf(const Operator* const); |
| 62 |
| 63 |
| 54 // Prediction whether throw-site is surrounded by any local catch-scope. | 64 // Prediction whether throw-site is surrounded by any local catch-scope. |
| 55 enum class IfExceptionHint { kLocallyUncaught, kLocallyCaught }; | 65 enum class IfExceptionHint { kLocallyUncaught, kLocallyCaught }; |
| 56 | 66 |
| 57 size_t hash_value(IfExceptionHint hint); | 67 size_t hash_value(IfExceptionHint hint); |
| 58 | 68 |
| 59 std::ostream& operator<<(std::ostream&, IfExceptionHint); | 69 std::ostream& operator<<(std::ostream&, IfExceptionHint); |
| 60 | 70 |
| 61 | 71 |
| 62 class SelectParameters final { | 72 class SelectParameters final { |
| 63 public: | 73 public: |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 const Operator* End(size_t control_input_count); | 127 const Operator* End(size_t control_input_count); |
| 118 const Operator* Branch(BranchHint = BranchHint::kNone); | 128 const Operator* Branch(BranchHint = BranchHint::kNone); |
| 119 const Operator* IfTrue(); | 129 const Operator* IfTrue(); |
| 120 const Operator* IfFalse(); | 130 const Operator* IfFalse(); |
| 121 const Operator* IfSuccess(); | 131 const Operator* IfSuccess(); |
| 122 const Operator* IfException(IfExceptionHint hint); | 132 const Operator* IfException(IfExceptionHint hint); |
| 123 const Operator* Switch(size_t control_output_count); | 133 const Operator* Switch(size_t control_output_count); |
| 124 const Operator* IfValue(int32_t value); | 134 const Operator* IfValue(int32_t value); |
| 125 const Operator* IfDefault(); | 135 const Operator* IfDefault(); |
| 126 const Operator* Throw(); | 136 const Operator* Throw(); |
| 127 const Operator* Deoptimize(); | 137 const Operator* Deoptimize(DeoptimizeKind kind); |
| 128 const Operator* Return(int value_input_count = 1); | 138 const Operator* Return(int value_input_count = 1); |
| 129 const Operator* Terminate(); | 139 const Operator* Terminate(); |
| 130 | 140 |
| 131 const Operator* Start(int value_output_count); | 141 const Operator* Start(int value_output_count); |
| 132 const Operator* Loop(int control_input_count); | 142 const Operator* Loop(int control_input_count); |
| 133 const Operator* Merge(int control_input_count); | 143 const Operator* Merge(int control_input_count); |
| 134 const Operator* Parameter(int index, const char* debug_name = nullptr); | 144 const Operator* Parameter(int index, const char* debug_name = nullptr); |
| 135 | 145 |
| 136 const Operator* OsrNormalEntry(); | 146 const Operator* OsrNormalEntry(); |
| 137 const Operator* OsrLoopEntry(); | 147 const Operator* OsrLoopEntry(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 Zone* const zone_; | 189 Zone* const zone_; |
| 180 | 190 |
| 181 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); | 191 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); |
| 182 }; | 192 }; |
| 183 | 193 |
| 184 } // namespace compiler | 194 } // namespace compiler |
| 185 } // namespace internal | 195 } // namespace internal |
| 186 } // namespace v8 | 196 } // namespace v8 |
| 187 | 197 |
| 188 #endif // V8_COMPILER_COMMON_OPERATOR_H_ | 198 #endif // V8_COMPILER_COMMON_OPERATOR_H_ |
| OLD | NEW |