OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "src/compiler/type-hints.h" |
| 6 |
| 7 namespace v8 { |
| 8 namespace internal { |
| 9 namespace compiler { |
| 10 |
| 11 std::ostream& operator<<(std::ostream& os, BinaryOperationHints::Hint hint) { |
| 12 switch (hint) { |
| 13 case BinaryOperationHints::kNone: |
| 14 return os << "None"; |
| 15 case BinaryOperationHints::kSignedSmall: |
| 16 return os << "SignedSmall"; |
| 17 case BinaryOperationHints::kSigned32: |
| 18 return os << "Signed32"; |
| 19 case BinaryOperationHints::kNumber: |
| 20 return os << "Number"; |
| 21 case BinaryOperationHints::kString: |
| 22 return os << "String"; |
| 23 case BinaryOperationHints::kAny: |
| 24 return os << "Any"; |
| 25 } |
| 26 UNREACHABLE(); |
| 27 return os; |
| 28 } |
| 29 |
| 30 |
| 31 std::ostream& operator<<(std::ostream& os, BinaryOperationHints hints) { |
| 32 return os << hints.left() << "*" << hints.right() << "->" << hints.result(); |
| 33 } |
| 34 |
| 35 } // namespace compiler |
| 36 } // namespace internal |
| 37 } // namespace v8 |
OLD | NEW |