v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
type-hints.h
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
5#ifndef V8_OBJECTS_TYPE_HINTS_H_
6#define V8_OBJECTS_TYPE_HINTS_H_
7
8#include <stdint.h>
9
10#include <iosfwd>
11
12#include "src/base/flags.h"
13
14namespace v8 {
15namespace internal {
16
17// Type hints for an binary operation.
31
32inline size_t hash_value(BinaryOperationHint hint) {
33 return static_cast<unsigned>(hint);
34}
35
36std::ostream& operator<<(std::ostream&, BinaryOperationHint);
37
38// Type hints for an compare operation.
54
55inline size_t hash_value(CompareOperationHint hint) {
56 return static_cast<unsigned>(hint);
57}
58
59std::ostream& operator<<(std::ostream&, CompareOperationHint);
60
61// Type hints for for..in statements.
62enum class ForInHint : uint8_t {
63 kNone,
66 kAny
67};
68
69std::ostream& operator<<(std::ostream&, ForInHint);
70
71// TODO(ishell): make it an enum class.
73 // Omit both parameter checks.
75 // Convert parameters when check fails (instead of throwing an exception).
78};
79
80std::ostream& operator<<(std::ostream& os, const StringAddFlags& flags);
81
82} // namespace internal
83} // namespace v8
84
85#endif // V8_OBJECTS_TYPE_HINTS_H_
@ 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
size_t hash_value(AtomicMemoryOrder order)
std::ostream & operator<<(std::ostream &os, AtomicMemoryOrder order)