v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
type-hints.cc
Go to the documentation of this file.
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
6
7#include <ostream>
8
9#include "src/base/logging.h"
10
11namespace v8 {
12namespace internal {
13
14std::ostream& operator<<(std::ostream& os, BinaryOperationHint hint) {
15 switch (hint) {
17 return os << "None";
19 return os << "SignedSmall";
21 return os << "SignedSmallInputs";
23 return os << "AdditiveSafeInteger";
25 return os << "Number";
27 return os << "NumberOrOddball";
29 return os << "String";
31 return os << "StringOrStringWrapper";
33 return os << "BigInt";
35 return os << "BigInt64";
37 return os << "Any";
38 }
40}
41
42std::ostream& operator<<(std::ostream& os, CompareOperationHint hint) {
43 switch (hint) {
45 return os << "None";
47 return os << "SignedSmall";
49 return os << "Number";
51 return os << "NumberOrBoolean";
53 return os << "NumberOrOddball";
55 return os << "InternalizedString";
57 return os << "String";
59 return os << "Symbol";
61 return os << "BigInt";
63 return os << "BigInt64";
65 return os << "Receiver";
67 return os << "ReceiverOrNullOrUndefined";
69 return os << "Any";
70 }
72}
73
74std::ostream& operator<<(std::ostream& os, ForInHint hint) {
75 switch (hint) {
77 return os << "None";
79 return os << "EnumCacheKeys";
81 return os << "EnumCacheKeysAndIndices";
82 case ForInHint::kAny:
83 return os << "Any";
84 }
86}
87
88std::ostream& operator<<(std::ostream& os, const StringAddFlags& flags) {
89 switch (flags) {
91 return os << "CheckNone";
93 return os << "ConvertLeft";
95 return os << "ConvertRight";
96 }
98}
99
100} // namespace internal
101} // namespace v8
@ STRING_ADD_CONVERT_RIGHT
Definition type-hints.h:77
@ STRING_ADD_CHECK_NONE
Definition type-hints.h:74
@ STRING_ADD_CONVERT_LEFT
Definition type-hints.h:76
std::ostream & operator<<(std::ostream &os, AtomicMemoryOrder order)