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#ifdef V8_INTL_SUPPORT
9#define INTERNALIZED_STRING_LIST_GENERATOR_INTL(V, _) \
10 V(_, adoptText_string, "adoptText") \
11 V(_, baseName_string, "baseName") \
12 V(_, breakType_string, "breakType") \
13 V(_, calendar_string, "calendar") \
14 V(_, cardinal_string, "cardinal") \
15 V(_, caseFirst_string, "caseFirst") \
16 V(_, compare_string, "compare") \
17 V(_, current_string, "current") \
18 V(_, dateStyle_string, "dateStyle") \
19 V(_, day_string, "day") \
20 V(_, dayPeriod_string, "dayPeriod") \
21 V(_, decimal_string, "decimal") \
22 V(_, era_string, "era") \
23 V(_, first_string, "first") \
24 V(_, format_string, "format") \
25 V(_, fraction_string, "fraction") \
26 V(_, full_string, "full") \
27 V(_, granularity_string, "granularity") \
28 V(_, grapheme_string, "grapheme") \
29 V(_, group_string, "group") \
30 V(_, h11_string, "h11") \
31 V(_, h12_string, "h12") \
32 V(_, h23_string, "h23") \
33 V(_, h24_string, "h24") \
34 V(_, hour_string, "hour") \
35 V(_, hour12_string, "hour12") \
36 V(_, hourCycle_string, "hourCycle") \
37 V(_, collation_string, "collation") \
38 V(_, currency_string, "currency") \
39 V(_, currencyDisplay_string, "currencyDisplay") \
40 V(_, ideo_string, "ideo") \
41 V(_, ignorePunctuation_string, "ignorePunctuation") \
42 V(_, Invalid_Date_string, "Invalid Date") \
43 V(_, integer_string, "integer") \
44 V(_, kana_string, "kana") \
45 V(_, language_string, "language") \
46 V(_, letter_string, "letter") \
47 V(_, list_string, "list") \
48 V(_, literal_string, "literal") \
49 V(_, locale_string, "locale") \
50 V(_, loose_string, "loose") \
51 V(_, lower_string, "lower") \
52 V(_, maximumFractionDigits_string, "maximumFractionDigits") \
53 V(_, maximumSignificantDigits_string, "maximumSignificantDigits") \
54 V(_, minimumFractionDigits_string, "minimumFractionDigits") \
55 V(_, minimumIntegerDigits_string, "minimumIntegerDigits") \
56 V(_, minimumSignificantDigits_string, "minimumSignificantDigits") \
57 V(_, minusSign_string, "minusSign") \
58 V(_, minute_string, "minute") \
59 V(_, month_string, "month") \
60 V(_, nan_string, "nan") \
61 V(_, none_string, "none") \
62 V(_, normal_string, "normal") \
63 V(_, numberingSystem_string, "numberingSystem") \
64 V(_, numeric_string, "numeric") \
65 V(_, ordinal_string, "ordinal") \
66 V(_, percentSign_string, "percentSign") \
67 V(_, plusSign_string, "plusSign") \
68 V(_, quarter_string, "quarter") \
69 V(_, region_string, "region") \
70 V(_, second_string, "second") \
71 V(_, segment_string, "segment") \
72 V(_, SegmentIterator_string, "Segment Iterator") \
73 V(_, sensitivity_string, "sensitivity") \
74 V(_, sep_string, "sep") \
75 V(_, strict_string, "strict") \
76 V(_, style_string, "style") \
77 V(_, term_string, "term") \
78 V(_, timeStyle_string, "timeStyle") \
79 V(_, timeZone_string, "timeZone") \
80 V(_, timeZoneName_string, "timeZoneName") \
81 V(_, type_string, "type") \
82 V(_, unknown_string, "unknown") \
83 V(_, upper_string, "upper") \
84 V(_, usage_string, "usage") \
85 V(_, useGrouping_string, "useGrouping") \
86 V(_, UTC_string, "UTC") \
87 V(_, unit_string, "unit") \
88 V(_, weekday_string, "weekday") \
89 V(_, year_string, "year")
90#else // V8_INTL_SUPPORT
91#define INTERNALIZED_STRING_LIST_GENERATOR_INTL(V, _)
92#endif // V8_INTL_SUPPORT
93
94#define INTERNALIZED_STRING_LIST_GENERATOR(V, _) \
95 INTERNALIZED_STRING_LIST_GENERATOR_INTL(V, _) \
96 V(_, add_string, "add") \
97 V(_, always_string, "always") \
98 V(_, anonymous_function_string, "(anonymous function)") \
99 V(_, anonymous_string, "anonymous") \
100 V(_, apply_string, "apply") \
101 V(_, Arguments_string, "Arguments") \
102 V(_, arguments_string, "arguments") \
103 V(_, arguments_to_string, "[object Arguments]") \
104 V(_, Array_string, "Array") \
105 V(_, array_to_string, "[object Array]") \
106 V(_, ArrayBuffer_string, "ArrayBuffer") \
107 V(_, ArrayIterator_string, "Array Iterator") \
108 V(_, as_string, "as") \
109 V(_, assign_string, "assign") \
110 V(_, async_string, "async") \
111 V(_, auto_string, "auto") \
112 V(_, await_string, "await") \
113 V(_, BigInt_string, "BigInt") \
114 V(_, bigint_string, "bigint") \
115 V(_, BigInt64Array_string, "BigInt64Array") \
116 V(_, BigUint64Array_string, "BigUint64Array") \
117 V(_, bind_string, "bind") \
118 V(_, Boolean_string, "Boolean") \
119 V(_, boolean_string, "boolean") \
120 V(_, boolean_to_string, "[object Boolean]") \
121 V(_, bound__string, "bound ") \
122 V(_, buffer_string, "buffer") \
123 V(_, byte_length_string, "byteLength") \
124 V(_, byte_offset_string, "byteOffset") \
125 V(_, CompileError_string, "CompileError") \
126 V(_, call_string, "call") \
127 V(_, callee_string, "callee") \
128 V(_, caller_string, "caller") \
129 V(_, character_string, "character") \
130 V(_, closure_string, "(closure)") \
131 V(_, code_string, "code") \
132 V(_, column_string, "column") \
133 V(_, computed_string, "<computed>") \
134 V(_, configurable_string, "configurable") \
135 V(_, conjunction_string, "conjunction") \
136 V(_, construct_string, "construct") \
137 V(_, constructor_string, "constructor") \
138 V(_, create_string, "create") \
139 V(_, Date_string, "Date") \
140 V(_, date_to_string, "[object Date]") \
141 V(_, default_string, "default") \
142 V(_, defineProperty_string, "defineProperty") \
143 V(_, deleteProperty_string, "deleteProperty") \
144 V(_, disjunction_string, "disjunction") \
145 V(_, display_name_string, "displayName") \
146 V(_, done_string, "done") \
147 V(_, dot_catch_string, ".catch") \
148 V(_, dot_default_string, ".default") \
149 V(_, dot_for_string, ".for") \
150 V(_, dot_generator_object_string, ".generator_object") \
151 V(_, dot_iterator_string, ".iterator") \
152 V(_, dot_promise_string, ".promise") \
153 V(_, dot_result_string, ".result") \
154 V(_, dot_string, ".") \
155 V(_, dot_switch_tag_string, ".switch_tag") \
156 V(_, dotAll_string, "dotAll") \
157 V(_, entries_string, "entries") \
158 V(_, enumerable_string, "enumerable") \
159 V(_, element_string, "element") \
160 V(_, Error_string, "Error") \
161 V(_, error_to_string, "[object Error]") \
162 V(_, eval_string, "eval") \
163 V(_, EvalError_string, "EvalError") \
164 V(_, exec_string, "exec") \
165 V(_, false_string, "false") \
166 V(_, flags_string, "flags") \
167 V(_, Float32Array_string, "Float32Array") \
168 V(_, Float64Array_string, "Float64Array") \
169 V(_, from_string, "from") \
170 V(_, Function_string, "Function") \
171 V(_, function_native_code_string, "function () { [native code] }") \
172 V(_, function_string, "function") \
173 V(_, function_to_string, "[object Function]") \
174 V(_, Generator_string, "Generator") \
175 V(_, get_space_string, "get ") \
176 V(_, get_string, "get") \
177 V(_, getOwnPropertyDescriptor_string, "getOwnPropertyDescriptor") \
178 V(_, getOwnPropertyDescriptors_string, "getOwnPropertyDescriptors") \
179 V(_, getPrototypeOf_string, "getPrototypeOf") \
180 V(_, global_string, "global") \
181 V(_, globalThis_string, "globalThis") \
182 V(_, groups_string, "groups") \
183 V(_, has_string, "has") \
184 V(_, ignoreCase_string, "ignoreCase") \
185 V(_, illegal_access_string, "illegal access") \
186 V(_, illegal_argument_string, "illegal argument") \
187 V(_, index_string, "index") \
188 V(_, Infinity_string, "Infinity") \
189 V(_, infinity_string, "infinity") \
190 V(_, input_string, "input") \
191 V(_, Int16Array_string, "Int16Array") \
192 V(_, Int32Array_string, "Int32Array") \
193 V(_, Int8Array_string, "Int8Array") \
194 V(_, isExtensible_string, "isExtensible") \
195 V(_, isView_string, "isView") \
196 V(_, keys_string, "keys") \
197 V(_, lastIndex_string, "lastIndex") \
198 V(_, length_string, "length") \
199 V(_, let_string, "let") \
200 V(_, line_string, "line") \
201 V(_, LinkError_string, "LinkError") \
202 V(_, long_string, "long") \
203 V(_, Map_string, "Map") \
204 V(_, MapIterator_string, "Map Iterator") \
205 V(_, medium_string, "medium") \
206 V(_, message_string, "message") \
207 V(_, meta_string, "meta") \
208 V(_, minus_Infinity_string, "-Infinity") \
209 V(_, Module_string, "Module") \
210 V(_, multiline_string, "multiline") \
211 V(_, name_string, "name") \
212 V(_, NaN_string, "NaN") \
213 V(_, narrow_string, "narrow") \
214 V(_, native_string, "native") \
215 V(_, new_target_string, ".new.target") \
216 V(_, next_string, "next") \
217 V(_, NFC_string, "NFC") \
218 V(_, NFD_string, "NFD") \
219 V(_, NFKC_string, "NFKC") \
220 V(_, NFKD_string, "NFKD") \
221 V(_, not_equal, "not-equal") \
222 V(_, null_string, "null") \
223 V(_, null_to_string, "[object Null]") \
224 V(_, Number_string, "Number") \
225 V(_, number_string, "number") \
226 V(_, number_to_string, "[object Number]") \
227 V(_, Object_string, "Object") \
228 V(_, object_string, "object") \
229 V(_, object_to_string, "[object Object]") \
230 V(_, of_string, "of") \
231 V(_, ok, "ok") \
232 V(_, one_string, "1") \
233 V(_, ownKeys_string, "ownKeys") \
234 V(_, percent_string, "percent") \
235 V(_, position_string, "position") \
236 V(_, preventExtensions_string, "preventExtensions") \
237 V(_, private_constructor_string, "#constructor") \
238 V(_, Promise_string, "Promise") \
239 V(_, promise_string, "promise") \
240 V(_, proto_string, "__proto__") \
241 V(_, prototype_string, "prototype") \
242 V(_, proxy_string, "proxy") \
243 V(_, Proxy_string, "Proxy") \
244 V(_, query_colon_string, "(?:)") \
245 V(_, RangeError_string, "RangeError") \
246 V(_, raw_string, "raw") \
247 V(_, ReferenceError_string, "ReferenceError") \
248 V(_, ReflectGet_string, "Reflect.get") \
249 V(_, ReflectHas_string, "Reflect.has") \
250 V(_, RegExp_string, "RegExp") \
251 V(_, regexp_to_string, "[object RegExp]") \
252 V(_, resolve_string, "resolve") \
253 V(_, return_string, "return") \
254 V(_, revoke_string, "revoke") \
255 V(_, RuntimeError_string, "RuntimeError") \
256 V(_, Script_string, "Script") \
257 V(_, script_string, "script") \
258 V(_, short_string, "short") \
259 V(_, Set_string, "Set") \
260 V(_, sentence_string, "sentence") \
261 V(_, set_space_string, "set ") \
262 V(_, set_string, "set") \
263 V(_, SetIterator_string, "Set Iterator") \
264 V(_, setPrototypeOf_string, "setPrototypeOf") \
265 V(_, SharedArrayBuffer_string, "SharedArrayBuffer") \
266 V(_, source_string, "source") \
267 V(_, sourceText_string, "sourceText") \
268 V(_, stack_string, "stack") \
269 V(_, stackTraceLimit_string, "stackTraceLimit") \
270 V(_, sticky_string, "sticky") \
271 V(_, String_string, "String") \
272 V(_, string_string, "string") \
273 V(_, string_to_string, "[object String]") \
274 V(_, symbol_species_string, "[Symbol.species]") \
275 V(_, Symbol_string, "Symbol") \
276 V(_, symbol_string, "symbol") \
277 V(_, SyntaxError_string, "SyntaxError") \
278 V(_, target_string, "target") \
279 V(_, then_string, "then") \
280 V(_, this_function_string, ".this_function") \
281 V(_, this_string, "this") \
282 V(_, throw_string, "throw") \
283 V(_, timed_out, "timed-out") \
284 V(_, toJSON_string, "toJSON") \
285 V(_, toString_string, "toString") \
286 V(_, true_string, "true") \
287 V(_, TypeError_string, "TypeError") \
288 V(_, Uint16Array_string, "Uint16Array") \
289 V(_, Uint32Array_string, "Uint32Array") \
290 V(_, Uint8Array_string, "Uint8Array") \
291 V(_, Uint8ClampedArray_string, "Uint8ClampedArray") \
292 V(_, undefined_string, "undefined") \
293 V(_, undefined_to_string, "[object Undefined]") \
294 V(_, unicode_string, "unicode") \
295 V(_, URIError_string, "URIError") \
296 V(_, value_string, "value") \
297 V(_, valueOf_string, "valueOf") \
298 V(_, values_string, "values") \
299 V(_, WeakMap_string, "WeakMap") \
300 V(_, WeakRef_string, "WeakRef") \
301 V(_, WeakSet_string, "WeakSet") \
302 V(_, week_string, "week") \
303 V(_, word_string, "word") \
304 V(_, writable_string, "writable") \
305 V(_, zero_string, "0")
306
307#define PRIVATE_SYMBOL_LIST_GENERATOR(V, _) \
308 V(_, call_site_frame_array_symbol) \
309 V(_, call_site_frame_index_symbol) \
310 V(_, console_context_id_symbol) \
311 V(_, console_context_name_symbol) \
312 V(_, class_fields_symbol) \
313 V(_, class_positions_symbol) \
314 V(_, detailed_stack_trace_symbol) \
315 V(_, elements_transition_symbol) \
316 V(_, error_end_pos_symbol) \
317 V(_, error_script_symbol) \
318 V(_, error_start_pos_symbol) \
319 V(_, frozen_symbol) \
320 V(_, generic_symbol) \
321 V(_, home_object_symbol) \
322 V(_, interpreter_trampoline_symbol) \
323 V(_, megamorphic_symbol) \
324 V(_, native_context_index_symbol) \
325 V(_, nonextensible_symbol) \
326 V(_, not_mapped_symbol) \
327 V(_, premonomorphic_symbol) \
328 V(_, promise_debug_marker_symbol) \
329 V(_, promise_forwarding_handler_symbol) \
330 V(_, promise_handled_by_symbol) \
331 V(_, sealed_symbol) \
332 V(_, stack_trace_symbol) \
333 V(_, strict_function_transition_symbol) \
334 V(_, wasm_exception_tag_symbol) \
335 V(_, wasm_exception_values_symbol) \
336 V(_, uninitialized_symbol)
337
338#define PUBLIC_SYMBOL_LIST_GENERATOR(V, _) \
339 V(_, async_iterator_symbol, Symbol.asyncIterator) \
340 V(_, iterator_symbol, Symbol.iterator) \
341 V(_, intl_fallback_symbol, IntlFallback) \
342 V(_, match_all_symbol, Symbol.matchAll) \
343 V(_, match_symbol, Symbol.match) \
344 V(_, replace_symbol, Symbol.replace) \
345 V(_, search_symbol, Symbol.search) \
346 V(_, species_symbol, Symbol.species) \
347 V(_, split_symbol, Symbol.split) \
348 V(_, to_primitive_symbol, Symbol.toPrimitive) \
349 V(_, unscopables_symbol, Symbol.unscopables)
350
351// Well-Known Symbols are "Public" symbols, which have a bit set which causes
352// them to produce an undefined value when a load results in a failed access
353// check. Because this behaviour is not specified properly as of yet, it only
354// applies to a subset of spec-defined Well-Known Symbols.
355#define WELL_KNOWN_SYMBOL_LIST_GENERATOR(V, _) \
356 V(_, has_instance_symbol, Symbol.hasInstance) \
357 V(_, is_concat_spreadable_symbol, Symbol.isConcatSpreadable) \
358 V(_, to_string_tag_symbol, Symbol.toStringTag)
359
360#define INCREMENTAL_SCOPES(F) \
361 /* MC_INCREMENTAL is the top-level incremental marking scope. */ \
362 F(MC_INCREMENTAL) \
363 F(MC_INCREMENTAL_EMBEDDER_PROLOGUE) \
364 F(MC_INCREMENTAL_EMBEDDER_TRACING) \
365 F(MC_INCREMENTAL_EXTERNAL_EPILOGUE) \
366 F(MC_INCREMENTAL_EXTERNAL_PROLOGUE) \
367 F(MC_INCREMENTAL_FINALIZE) \
368 F(MC_INCREMENTAL_FINALIZE_BODY) \
369 F(MC_INCREMENTAL_LAYOUT_CHANGE) \
370 F(MC_INCREMENTAL_START) \
371 F(MC_INCREMENTAL_SWEEPING)
372
373#define TOP_MC_SCOPES(F) \
374 F(MC_CLEAR) \
375 F(MC_EPILOGUE) \
376 F(MC_EVACUATE) \
377 F(MC_FINISH) \
378 F(MC_MARK) \
379 F(MC_PROLOGUE) \
380 F(MC_SWEEP)
381
382#define TRACER_SCOPES(F) \
383 INCREMENTAL_SCOPES(F) \
384 F(HEAP_EMBEDDER_TRACING_EPILOGUE) \
385 F(HEAP_EPILOGUE) \
386 F(HEAP_EPILOGUE_REDUCE_NEW_SPACE) \
387 F(HEAP_EXTERNAL_EPILOGUE) \
388 F(HEAP_EXTERNAL_PROLOGUE) \
389 F(HEAP_EXTERNAL_WEAK_GLOBAL_HANDLES) \
390 F(HEAP_PROLOGUE) \
391 TOP_MC_SCOPES(F) \
392 F(MC_CLEAR_DEPENDENT_CODE) \
393 F(MC_CLEAR_FLUSHABLE_BYTECODE) \
394 F(MC_CLEAR_FLUSHED_JS_FUNCTIONS) \
395 F(MC_CLEAR_MAPS) \
396 F(MC_CLEAR_SLOTS_BUFFER) \
397 F(MC_CLEAR_STORE_BUFFER) \
398 F(MC_CLEAR_STRING_TABLE) \
399 F(MC_CLEAR_WEAK_COLLECTIONS) \
400 F(MC_CLEAR_WEAK_LISTS) \
401 F(MC_CLEAR_WEAK_REFERENCES) \
402 F(MC_EVACUATE_CANDIDATES) \
403 F(MC_EVACUATE_CLEAN_UP) \
404 F(MC_EVACUATE_COPY) \
405 F(MC_EVACUATE_EPILOGUE) \
406 F(MC_EVACUATE_PROLOGUE) \
407 F(MC_EVACUATE_REBALANCE) \
408 F(MC_EVACUATE_UPDATE_POINTERS) \
409 F(MC_EVACUATE_UPDATE_POINTERS_SLOTS_MAIN) \
410 F(MC_EVACUATE_UPDATE_POINTERS_SLOTS_MAP_SPACE) \
411 F(MC_EVACUATE_UPDATE_POINTERS_TO_NEW_ROOTS) \
412 F(MC_EVACUATE_UPDATE_POINTERS_WEAK) \
413 F(MC_MARK_EMBEDDER_PROLOGUE) \
414 F(MC_MARK_EMBEDDER_TRACING) \
415 F(MC_MARK_EMBEDDER_TRACING_CLOSURE) \
416 F(MC_MARK_FINISH_INCREMENTAL) \
417 F(MC_MARK_MAIN) \
418 F(MC_MARK_ROOTS) \
419 F(MC_MARK_WEAK_CLOSURE) \
420 F(MC_MARK_WEAK_CLOSURE_EPHEMERON) \
421 F(MC_MARK_WEAK_CLOSURE_EPHEMERON_MARKING) \
422 F(MC_MARK_WEAK_CLOSURE_EPHEMERON_LINEAR) \
423 F(MC_MARK_WEAK_CLOSURE_WEAK_HANDLES) \
424 F(MC_MARK_WEAK_CLOSURE_WEAK_ROOTS) \
425 F(MC_MARK_WEAK_CLOSURE_HARMONY) \
426 F(MC_SWEEP_CODE) \
427 F(MC_SWEEP_MAP) \
428 F(MC_SWEEP_OLD) \
429 F(MINOR_MC) \
430 F(MINOR_MC_CLEAR) \
431 F(MINOR_MC_CLEAR_STRING_TABLE) \
432 F(MINOR_MC_CLEAR_WEAK_LISTS) \
433 F(MINOR_MC_EVACUATE) \
434 F(MINOR_MC_EVACUATE_CLEAN_UP) \
435 F(MINOR_MC_EVACUATE_COPY) \
436 F(MINOR_MC_EVACUATE_EPILOGUE) \
437 F(MINOR_MC_EVACUATE_PROLOGUE) \
438 F(MINOR_MC_EVACUATE_REBALANCE) \
439 F(MINOR_MC_EVACUATE_UPDATE_POINTERS) \
440 F(MINOR_MC_EVACUATE_UPDATE_POINTERS_SLOTS) \
441 F(MINOR_MC_EVACUATE_UPDATE_POINTERS_TO_NEW_ROOTS) \
442 F(MINOR_MC_EVACUATE_UPDATE_POINTERS_WEAK) \
443 F(MINOR_MC_MARK) \
444 F(MINOR_MC_MARK_GLOBAL_HANDLES) \
445 F(MINOR_MC_MARK_SEED) \
446 F(MINOR_MC_MARK_ROOTS) \
447 F(MINOR_MC_MARK_WEAK) \
448 F(MINOR_MC_MARKING_DEQUE) \
449 F(MINOR_MC_RESET_LIVENESS) \
450 F(MINOR_MC_SWEEPING) \
451 F(SCAVENGER_FAST_PROMOTE) \
452 F(SCAVENGER_SCAVENGE) \
453 F(SCAVENGER_PROCESS_ARRAY_BUFFERS) \
454 F(SCAVENGER_SCAVENGE_WEAK_GLOBAL_HANDLES_IDENTIFY) \
455 F(SCAVENGER_SCAVENGE_WEAK_GLOBAL_HANDLES_PROCESS) \
456 F(SCAVENGER_SCAVENGE_PARALLEL) \
457 F(SCAVENGER_SCAVENGE_ROOTS) \
458 F(SCAVENGER_SCAVENGE_UPDATE_REFS) \
459 F(SCAVENGER_SCAVENGE_WEAK) \
460 F(SCAVENGER_SCAVENGE_FINALIZE)
461
462#define TRACER_BACKGROUND_SCOPES(F) \
463 F(BACKGROUND_ARRAY_BUFFER_FREE) \
464 F(BACKGROUND_STORE_BUFFER) \
465 F(BACKGROUND_UNMAPPER) \
466 F(MC_BACKGROUND_EVACUATE_COPY) \
467 F(MC_BACKGROUND_EVACUATE_UPDATE_POINTERS) \
468 F(MC_BACKGROUND_MARKING) \
469 F(MC_BACKGROUND_SWEEPING) \
470 F(MINOR_MC_BACKGROUND_EVACUATE_COPY) \
471 F(MINOR_MC_BACKGROUND_EVACUATE_UPDATE_POINTERS) \
472 F(MINOR_MC_BACKGROUND_MARKING) \
473 F(SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL)
474
475#endif // V8_HEAP_SYMBOLS_H_
476