Line data Source code
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/type-hints.h"
6 :
7 : namespace v8 {
8 : namespace internal {
9 :
10 0 : std::ostream& operator<<(std::ostream& os, BinaryOperationHint hint) {
11 0 : switch (hint) {
12 : case BinaryOperationHint::kNone:
13 0 : return os << "None";
14 : case BinaryOperationHint::kSignedSmall:
15 0 : return os << "SignedSmall";
16 : case BinaryOperationHint::kSignedSmallInputs:
17 0 : return os << "SignedSmallInputs";
18 : case BinaryOperationHint::kSigned32:
19 0 : return os << "Signed32";
20 : case BinaryOperationHint::kNumber:
21 0 : return os << "Number";
22 : case BinaryOperationHint::kNumberOrOddball:
23 0 : return os << "NumberOrOddball";
24 : case BinaryOperationHint::kConsOneByteString:
25 0 : return os << "ConsOneByteString";
26 : case BinaryOperationHint::kConsTwoByteString:
27 0 : return os << "ConsTwoByteString";
28 : case BinaryOperationHint::kConsString:
29 0 : return os << "ConsString";
30 : case BinaryOperationHint::kString:
31 0 : return os << "String";
32 : case BinaryOperationHint::kBigInt:
33 0 : return os << "BigInt";
34 : case BinaryOperationHint::kAny:
35 0 : return os << "Any";
36 : }
37 0 : UNREACHABLE();
38 : }
39 :
40 0 : std::ostream& operator<<(std::ostream& os, CompareOperationHint hint) {
41 0 : switch (hint) {
42 : case CompareOperationHint::kNone:
43 0 : return os << "None";
44 : case CompareOperationHint::kSignedSmall:
45 0 : return os << "SignedSmall";
46 : case CompareOperationHint::kNumber:
47 0 : return os << "Number";
48 : case CompareOperationHint::kNumberOrOddball:
49 0 : return os << "NumberOrOddball";
50 : case CompareOperationHint::kInternalizedString:
51 0 : return os << "InternalizedString";
52 : case CompareOperationHint::kString:
53 0 : return os << "String";
54 : case CompareOperationHint::kSymbol:
55 0 : return os << "Symbol";
56 : case CompareOperationHint::kBigInt:
57 0 : return os << "BigInt";
58 : case CompareOperationHint::kReceiver:
59 0 : return os << "Receiver";
60 : case CompareOperationHint::kReceiverOrNullOrUndefined:
61 0 : return os << "ReceiverOrNullOrUndefined";
62 : case CompareOperationHint::kAny:
63 0 : return os << "Any";
64 : }
65 0 : UNREACHABLE();
66 : }
67 :
68 0 : std::ostream& operator<<(std::ostream& os, ForInHint hint) {
69 0 : switch (hint) {
70 : case ForInHint::kNone:
71 0 : return os << "None";
72 : case ForInHint::kEnumCacheKeys:
73 0 : return os << "EnumCacheKeys";
74 : case ForInHint::kEnumCacheKeysAndIndices:
75 0 : return os << "EnumCacheKeysAndIndices";
76 : case ForInHint::kAny:
77 0 : return os << "Any";
78 : }
79 0 : UNREACHABLE();
80 : }
81 :
82 0 : std::ostream& operator<<(std::ostream& os, const StringAddFlags& flags) {
83 0 : switch (flags) {
84 : case STRING_ADD_CHECK_NONE:
85 0 : return os << "CheckNone";
86 : case STRING_ADD_CONVERT_LEFT:
87 0 : return os << "ConvertLeft";
88 : case STRING_ADD_CONVERT_RIGHT:
89 0 : return os << "ConvertRight";
90 : }
91 0 : UNREACHABLE();
92 : }
93 :
94 : } // namespace internal
95 120216 : } // namespace v8
|