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_HEAP_SYMBOLS_H_
6#define V8_HEAP_SYMBOLS_H_
7
8#define INTERNALIZED_STRING_LIST(V)                                \
9  V(anonymous_string, "anonymous")                                 \
10  V(apply_string, "apply")                                         \
11  V(assign_string, "assign")                                       \
12  V(arguments_string, "arguments")                                 \
13  V(Arguments_string, "Arguments")                                 \
14  V(Array_string, "Array")                                         \
15  V(arguments_to_string, "[object Arguments]")                     \
16  V(array_to_string, "[object Array]")                             \
17  V(boolean_to_string, "[object Boolean]")                         \
18  V(date_to_string, "[object Date]")                               \
19  V(error_to_string, "[object Error]")                             \
20  V(function_to_string, "[object Function]")                       \
21  V(number_to_string, "[object Number]")                           \
22  V(object_to_string, "[object Object]")                           \
23  V(regexp_to_string, "[object RegExp]")                           \
24  V(string_to_string, "[object String]")                           \
25  V(bind_string, "bind")                                           \
26  V(bool16x8_string, "bool16x8")                                   \
27  V(Bool16x8_string, "Bool16x8")                                   \
28  V(bool32x4_string, "bool32x4")                                   \
29  V(Bool32x4_string, "Bool32x4")                                   \
30  V(bool8x16_string, "bool8x16")                                   \
31  V(Bool8x16_string, "Bool8x16")                                   \
32  V(boolean_string, "boolean")                                     \
33  V(Boolean_string, "Boolean")                                     \
34  V(bound__string, "bound ")                                       \
35  V(buffer_string, "buffer")                                       \
36  V(byte_length_string, "byteLength")                              \
37  V(byte_offset_string, "byteOffset")                              \
38  V(call_string, "call")                                           \
39  V(callee_string, "callee")                                       \
40  V(caller_string, "caller")                                       \
41  V(cell_value_string, "%cell_value")                              \
42  V(char_at_string, "CharAt")                                      \
43  V(closure_string, "(closure)")                                   \
44  V(column_string, "column")                                       \
45  V(compare_ic_string, "==")                                       \
46  V(configurable_string, "configurable")                           \
47  V(constructor_string, "constructor")                             \
48  V(construct_string, "construct")                                 \
49  V(create_string, "create")                                       \
50  V(Date_string, "Date")                                           \
51  V(default_string, "default")                                     \
52  V(defineProperty_string, "defineProperty")                       \
53  V(deleteProperty_string, "deleteProperty")                       \
54  V(display_name_string, "displayName")                            \
55  V(done_string, "done")                                           \
56  V(dot_result_string, ".result")                                  \
57  V(dot_string, ".")                                               \
58  V(entries_string, "entries")                                     \
59  V(enumerable_string, "enumerable")                               \
60  V(Error_string, "Error")                                         \
61  V(eval_string, "eval")                                           \
62  V(false_string, "false")                                         \
63  V(float32x4_string, "float32x4")                                 \
64  V(Float32x4_string, "Float32x4")                                 \
65  V(for_api_string, "for_api")                                     \
66  V(for_string, "for")                                             \
67  V(function_string, "function")                                   \
68  V(Function_string, "Function")                                   \
69  V(Generator_string, "Generator")                                 \
70  V(getOwnPropertyDescriptor_string, "getOwnPropertyDescriptor")   \
71  V(getOwnPropertyDescriptors_string, "getOwnPropertyDescriptors") \
72  V(getPrototypeOf_string, "getPrototypeOf")                       \
73  V(get_string, "get")                                             \
74  V(global_string, "global")                                       \
75  V(has_string, "has")                                             \
76  V(illegal_access_string, "illegal access")                       \
77  V(illegal_argument_string, "illegal argument")                   \
78  V(index_string, "index")                                         \
79  V(infinity_string, "Infinity")                                   \
80  V(input_string, "input")                                         \
81  V(int16x8_string, "int16x8")                                     \
82  V(Int16x8_string, "Int16x8")                                     \
83  V(int32x4_string, "int32x4")                                     \
84  V(Int32x4_string, "Int32x4")                                     \
85  V(int8x16_string, "int8x16")                                     \
86  V(Int8x16_string, "Int8x16")                                     \
87  V(isExtensible_string, "isExtensible")                           \
88  V(isView_string, "isView")                                       \
89  V(KeyedLoadMonomorphic_string, "KeyedLoadMonomorphic")           \
90  V(KeyedStoreMonomorphic_string, "KeyedStoreMonomorphic")         \
91  V(last_index_string, "lastIndex")                                \
92  V(length_string, "length")                                       \
93  V(line_string, "line")                                           \
94  V(Map_string, "Map")                                             \
95  V(minus_infinity_string, "-Infinity")                            \
96  V(minus_zero_string, "-0")                                       \
97  V(name_string, "name")                                           \
98  V(nan_string, "NaN")                                             \
99  V(next_string, "next")                                           \
100  V(null_string, "null")                                           \
101  V(null_to_string, "[object Null]")                               \
102  V(number_string, "number")                                       \
103  V(Number_string, "Number")                                       \
104  V(object_string, "object")                                       \
105  V(Object_string, "Object")                                       \
106  V(ownKeys_string, "ownKeys")                                     \
107  V(position_string, "position")                                   \
108  V(preventExtensions_string, "preventExtensions")                 \
109  V(private_api_string, "private_api")                             \
110  V(Promise_string, "Promise")                                     \
111  V(proto_string, "__proto__")                                     \
112  V(prototype_string, "prototype")                                 \
113  V(Proxy_string, "Proxy")                                         \
114  V(query_colon_string, "(?:)")                                    \
115  V(RegExp_string, "RegExp")                                       \
116  V(script_string, "script")                                       \
117  V(setPrototypeOf_string, "setPrototypeOf")                       \
118  V(set_string, "set")                                             \
119  V(Set_string, "Set")                                             \
120  V(source_mapping_url_string, "source_mapping_url")               \
121  V(source_string, "source")                                       \
122  V(sourceText_string, "sourceText")                               \
123  V(source_url_string, "source_url")                               \
124  V(stack_string, "stack")                                         \
125  V(strict_compare_ic_string, "===")                               \
126  V(string_string, "string")                                       \
127  V(String_string, "String")                                       \
128  V(symbol_string, "symbol")                                       \
129  V(Symbol_string, "Symbol")                                       \
130  V(this_string, "this")                                           \
131  V(throw_string, "throw")                                         \
132  V(toJSON_string, "toJSON")                                       \
133  V(toString_string, "toString")                                   \
134  V(true_string, "true")                                           \
135  V(uint16x8_string, "uint16x8")                                   \
136  V(Uint16x8_string, "Uint16x8")                                   \
137  V(uint32x4_string, "uint32x4")                                   \
138  V(Uint32x4_string, "Uint32x4")                                   \
139  V(uint8x16_string, "uint8x16")                                   \
140  V(Uint8x16_string, "Uint8x16")                                   \
141  V(undefined_string, "undefined")                                 \
142  V(undefined_to_string, "[object Undefined]")                     \
143  V(valueOf_string, "valueOf")                                     \
144  V(values_string, "values")                                       \
145  V(value_string, "value")                                         \
146  V(WeakMap_string, "WeakMap")                                     \
147  V(WeakSet_string, "WeakSet")                                     \
148  V(writable_string, "writable")
149
150#define PRIVATE_SYMBOL_LIST(V)              \
151  V(array_iteration_kind_symbol)            \
152  V(array_iterator_next_symbol)             \
153  V(array_iterator_object_symbol)           \
154  V(call_site_function_symbol)              \
155  V(call_site_position_symbol)              \
156  V(call_site_receiver_symbol)              \
157  V(call_site_strict_symbol)                \
158  V(call_site_wasm_obj_symbol)              \
159  V(call_site_wasm_func_index_symbol)       \
160  V(class_end_position_symbol)              \
161  V(class_start_position_symbol)            \
162  V(detailed_stack_trace_symbol)            \
163  V(elements_transition_symbol)             \
164  V(error_end_pos_symbol)                   \
165  V(error_script_symbol)                    \
166  V(error_start_pos_symbol)                 \
167  V(formatted_stack_trace_symbol)           \
168  V(frozen_symbol)                          \
169  V(hash_code_symbol)                       \
170  V(home_object_symbol)                     \
171  V(internal_error_symbol)                  \
172  V(intl_impl_object_symbol)                \
173  V(intl_initialized_marker_symbol)         \
174  V(intl_pattern_symbol)                    \
175  V(intl_resolved_symbol)                   \
176  V(megamorphic_symbol)                     \
177  V(native_context_index_symbol)            \
178  V(nonexistent_symbol)                     \
179  V(nonextensible_symbol)                   \
180  V(normal_ic_symbol)                       \
181  V(not_mapped_symbol)                      \
182  V(premonomorphic_symbol)                  \
183  V(promise_combined_deferred_symbol)       \
184  V(promise_debug_marker_symbol)            \
185  V(promise_deferred_reactions_symbol)      \
186  V(promise_fulfill_reactions_symbol)       \
187  V(promise_has_handler_symbol)             \
188  V(promise_raw_symbol)                     \
189  V(promise_reject_reactions_symbol)        \
190  V(promise_result_symbol)                  \
191  V(promise_state_symbol)                   \
192  V(sealed_symbol)                          \
193  V(stack_trace_symbol)                     \
194  V(strict_function_transition_symbol)      \
195  V(string_iterator_iterated_string_symbol) \
196  V(string_iterator_next_index_symbol)      \
197  V(uninitialized_symbol)
198
199#define PUBLIC_SYMBOL_LIST(V)                \
200  V(iterator_symbol, Symbol.iterator)        \
201  V(match_symbol, Symbol.match)              \
202  V(replace_symbol, Symbol.replace)          \
203  V(search_symbol, Symbol.search)            \
204  V(species_symbol, Symbol.species)          \
205  V(split_symbol, Symbol.split)              \
206  V(to_primitive_symbol, Symbol.toPrimitive) \
207  V(unscopables_symbol, Symbol.unscopables)
208
209// Well-Known Symbols are "Public" symbols, which have a bit set which causes
210// them to produce an undefined value when a load results in a failed access
211// check. Because this behaviour is not specified properly as of yet, it only
212// applies to a subset of spec-defined Well-Known Symbols.
213#define WELL_KNOWN_SYMBOL_LIST(V)                           \
214  V(has_instance_symbol, Symbol.hasInstance)                \
215  V(is_concat_spreadable_symbol, Symbol.isConcatSpreadable) \
216  V(to_string_tag_symbol, Symbol.toStringTag)
217
218#endif  // V8_HEAP_SYMBOLS_H_
219