• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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(add_string, "add")                                             \
10   V(always_string, "always")                                       \
11   V(anonymous_function_string, "(anonymous function)")             \
12   V(anonymous_string, "anonymous")                                 \
13   V(apply_string, "apply")                                         \
14   V(Arguments_string, "Arguments")                                 \
15   V(arguments_string, "arguments")                                 \
16   V(arguments_to_string, "[object Arguments]")                     \
17   V(Array_string, "Array")                                         \
18   V(array_to_string, "[object Array]")                             \
19   V(ArrayBuffer_string, "ArrayBuffer")                             \
20   V(ArrayIterator_string, "Array Iterator")                        \
21   V(assign_string, "assign")                                       \
22   V(async_string, "async")                                         \
23   V(auto_string, "auto")                                           \
24   V(await_string, "await")                                         \
25   V(BigInt_string, "BigInt")                                       \
26   V(bigint_string, "bigint")                                       \
27   V(BigInt64Array_string, "BigInt64Array")                         \
28   V(BigUint64Array_string, "BigUint64Array")                       \
29   V(bind_string, "bind")                                           \
30   V(Boolean_string, "Boolean")                                     \
31   V(boolean_string, "boolean")                                     \
32   V(boolean_to_string, "[object Boolean]")                         \
33   V(bound__string, "bound ")                                       \
34   V(buffer_string, "buffer")                                       \
35   V(byte_length_string, "byteLength")                              \
36   V(byte_offset_string, "byteOffset")                              \
37   V(call_string, "call")                                           \
38   V(callee_string, "callee")                                       \
39   V(caller_string, "caller")                                       \
40   V(caseFirst_string, "caseFirst")                                 \
41   V(cell_value_string, "%cell_value")                              \
42   V(char_at_string, "CharAt")                                      \
43   V(closure_string, "(closure)")                                   \
44   V(collation_string, "collation")                                 \
45   V(column_string, "column")                                       \
46   V(CompileError_string, "CompileError")                           \
47   V(configurable_string, "configurable")                           \
48   V(construct_string, "construct")                                 \
49   V(constructor_string, "constructor")                             \
50   V(conjunction_string, "conjunction")                             \
51   V(create_string, "create")                                       \
52   V(currency_string, "currency")                                   \
53   V(Date_string, "Date")                                           \
54   V(date_to_string, "[object Date]")                               \
55   V(day_string, "day")                                             \
56   V(dayperiod_string, "dayperiod")                                 \
57   V(decimal_string, "decimal")                                     \
58   V(default_string, "default")                                     \
59   V(defineProperty_string, "defineProperty")                       \
60   V(deleteProperty_string, "deleteProperty")                       \
61   V(did_handle_string, "didHandle")                                \
62   V(disjunction_string, "disjunction")                             \
63   V(display_name_string, "displayName")                            \
64   V(done_string, "done")                                           \
65   V(dot_catch_string, ".catch")                                    \
66   V(dot_for_string, ".for")                                        \
67   V(dot_generator_object_string, ".generator_object")              \
68   V(dot_iterator_string, ".iterator")                              \
69   V(dot_result_string, ".result")                                  \
70   V(dot_string, ".")                                               \
71   V(dot_switch_tag_string, ".switch_tag")                          \
72   V(dotAll_string, "dotAll")                                       \
73   V(enqueue_string, "enqueue")                                     \
74   V(entries_string, "entries")                                     \
75   V(enumerable_string, "enumerable")                               \
76   V(element_string, "element")                                     \
77   V(era_string, "era")                                             \
78   V(Error_string, "Error")                                         \
79   V(error_to_string, "[object Error]")                             \
80   V(eval_string, "eval")                                           \
81   V(EvalError_string, "EvalError")                                 \
82   V(exec_string, "exec")                                           \
83   V(false_string, "false")                                         \
84   V(flags_string, "flags")                                         \
85   V(Float32Array_string, "Float32Array")                           \
86   V(Float64Array_string, "Float64Array")                           \
87   V(fraction_string, "fraction")                                   \
88   V(Function_string, "Function")                                   \
89   V(function_native_code_string, "function () { [native code] }")  \
90   V(function_string, "function")                                   \
91   V(function_to_string, "[object Function]")                       \
92   V(Generator_string, "Generator")                                 \
93   V(get_space_string, "get ")                                      \
94   V(get_string, "get")                                             \
95   V(getOwnPropertyDescriptor_string, "getOwnPropertyDescriptor")   \
96   V(getOwnPropertyDescriptors_string, "getOwnPropertyDescriptors") \
97   V(getPrototypeOf_string, "getPrototypeOf")                       \
98   V(global_string, "global")                                       \
99   V(globalThis_string, "globalThis")                               \
100   V(group_string, "group")                                         \
101   V(groups_string, "groups")                                       \
102   V(has_string, "has")                                             \
103   V(hour_string, "hour")                                           \
104   V(ignoreCase_string, "ignoreCase")                               \
105   V(ignorePunctuation_string, "ignorePunctuation")                 \
106   V(illegal_access_string, "illegal access")                       \
107   V(illegal_argument_string, "illegal argument")                   \
108   V(index_string, "index")                                         \
109   V(Infinity_string, "Infinity")                                   \
110   V(infinity_string, "infinity")                                   \
111   V(input_string, "input")                                         \
112   V(Int16Array_string, "Int16Array")                               \
113   V(Int32Array_string, "Int32Array")                               \
114   V(Int8Array_string, "Int8Array")                                 \
115   V(integer_string, "integer")                                     \
116   V(isExtensible_string, "isExtensible")                           \
117   V(isView_string, "isView")                                       \
118   V(KeyedLoadMonomorphic_string, "KeyedLoadMonomorphic")           \
119   V(KeyedStoreMonomorphic_string, "KeyedStoreMonomorphic")         \
120   V(keys_string, "keys")                                           \
121   V(lastIndex_string, "lastIndex")                                 \
122   V(length_string, "length")                                       \
123   V(let_string, "let")                                             \
124   V(line_string, "line")                                           \
125   V(LinkError_string, "LinkError")                                 \
126   V(literal_string, "literal")                                     \
127   V(locale_string, "locale")                                       \
128   V(long_string, "long")                                           \
129   V(Map_string, "Map")                                             \
130   V(MapIterator_string, "Map Iterator")                            \
131   V(message_string, "message")                                     \
132   V(minus_Infinity_string, "-Infinity")                            \
133   V(minus_zero_string, "-0")                                       \
134   V(minusSign_string, "minusSign")                                 \
135   V(minute_string, "minute")                                       \
136   V(Module_string, "Module")                                       \
137   V(month_string, "month")                                         \
138   V(multiline_string, "multiline")                                 \
139   V(name_string, "name")                                           \
140   V(NaN_string, "NaN")                                             \
141   V(nan_string, "nan")                                             \
142   V(narrow_string, "narrow")                                       \
143   V(native_string, "native")                                       \
144   V(new_target_string, ".new.target")                              \
145   V(next_string, "next")                                           \
146   V(NFC_string, "NFC")                                             \
147   V(NFD_string, "NFD")                                             \
148   V(NFKC_string, "NFKC")                                           \
149   V(NFKD_string, "NFKD")                                           \
150   V(not_equal, "not-equal")                                        \
151   V(null_string, "null")                                           \
152   V(null_to_string, "[object Null]")                               \
153   V(Number_string, "Number")                                       \
154   V(number_string, "number")                                       \
155   V(number_to_string, "[object Number]")                           \
156   V(numeric_string, "numeric")                                     \
157   V(Object_string, "Object")                                       \
158   V(object_string, "object")                                       \
159   V(object_to_string, "[object Object]")                           \
160   V(ok, "ok")                                                      \
161   V(one_string, "1")                                               \
162   V(ownKeys_string, "ownKeys")                                     \
163   V(percentSign_string, "percentSign")                             \
164   V(plusSign_string, "plusSign")                                   \
165   V(position_string, "position")                                   \
166   V(preventExtensions_string, "preventExtensions")                 \
167   V(Promise_string, "Promise")                                     \
168   V(promise_string, "promise")                                     \
169   V(PromiseResolveThenableJob_string, "PromiseResolveThenableJob") \
170   V(proto_string, "__proto__")                                     \
171   V(prototype_string, "prototype")                                 \
172   V(proxy_string, "proxy")                                         \
173   V(Proxy_string, "Proxy")                                         \
174   V(query_colon_string, "(?:)")                                    \
175   V(RangeError_string, "RangeError")                               \
176   V(raw_string, "raw")                                             \
177   V(ReconfigureToDataProperty_string, "ReconfigureToDataProperty") \
178   V(ReferenceError_string, "ReferenceError")                       \
179   V(RegExp_string, "RegExp")                                       \
180   V(regexp_to_string, "[object RegExp]")                           \
181   V(reject_string, "reject")                                       \
182   V(resolve_string, "resolve")                                     \
183   V(return_string, "return")                                       \
184   V(revoke_string, "revoke")                                       \
185   V(RuntimeError_string, "RuntimeError")                           \
186   V(Script_string, "Script")                                       \
187   V(script_string, "script")                                       \
188   V(short_string, "short")                                         \
189   V(second_string, "second")                                       \
190   V(Set_string, "Set")                                             \
191   V(sensitivity_string, "sensitivity")                             \
192   V(set_space_string, "set ")                                      \
193   V(set_string, "set")                                             \
194   V(SetIterator_string, "Set Iterator")                            \
195   V(setPrototypeOf_string, "setPrototypeOf")                       \
196   V(SharedArrayBuffer_string, "SharedArrayBuffer")                 \
197   V(source_string, "source")                                       \
198   V(sourceText_string, "sourceText")                               \
199   V(stack_string, "stack")                                         \
200   V(stackTraceLimit_string, "stackTraceLimit")                     \
201   V(star_default_star_string, "*default*")                         \
202   V(sticky_string, "sticky")                                       \
203   V(String_string, "String")                                       \
204   V(string_string, "string")                                       \
205   V(string_to_string, "[object String]")                           \
206   V(style_string, "style")                                         \
207   V(symbol_species_string, "[Symbol.species]")                     \
208   V(Symbol_string, "Symbol")                                       \
209   V(symbol_string, "symbol")                                       \
210   V(SyntaxError_string, "SyntaxError")                             \
211   V(then_string, "then")                                           \
212   V(this_function_string, ".this_function")                        \
213   V(this_string, "this")                                           \
214   V(throw_string, "throw")                                         \
215   V(timed_out, "timed-out")                                        \
216   V(timeZoneName_string, "timeZoneName")                           \
217   V(toJSON_string, "toJSON")                                       \
218   V(toString_string, "toString")                                   \
219   V(true_string, "true")                                           \
220   V(TypeError_string, "TypeError")                                 \
221   V(type_string, "type")                                           \
222   V(Uint16Array_string, "Uint16Array")                             \
223   V(Uint32Array_string, "Uint32Array")                             \
224   V(Uint8Array_string, "Uint8Array")                               \
225   V(Uint8ClampedArray_string, "Uint8ClampedArray")                 \
226   V(undefined_string, "undefined")                                 \
227   V(undefined_to_string, "[object Undefined]")                     \
228   V(unicode_string, "unicode")                                     \
229   V(unit_string, "unit")                                           \
230   V(URIError_string, "URIError")                                   \
231   V(usage_string, "usage")                                         \
232   V(use_asm_string, "use asm")                                     \
233   V(use_strict_string, "use strict")                               \
234   V(value_string, "value")                                         \
235   V(valueOf_string, "valueOf")                                     \
236   V(values_string, "values")                                       \
237   V(WeakMap_string, "WeakMap")                                     \
238   V(WeakSet_string, "WeakSet")                                     \
239   V(weekday_string, "weekday")                                     \
240   V(will_handle_string, "willHandle")                              \
241   V(writable_string, "writable")                                   \
242   V(year_string, "year")                                           \
243   V(zero_string, "0")
244 
245 #define PRIVATE_SYMBOL_LIST(V)         \
246   V(call_site_frame_array_symbol)      \
247   V(call_site_frame_index_symbol)      \
248   V(console_context_id_symbol)         \
249   V(console_context_name_symbol)       \
250   V(class_fields_symbol)               \
251   V(class_positions_symbol)            \
252   V(detailed_stack_trace_symbol)       \
253   V(elements_transition_symbol)        \
254   V(error_end_pos_symbol)              \
255   V(error_script_symbol)               \
256   V(error_start_pos_symbol)            \
257   V(frozen_symbol)                     \
258   V(generic_symbol)                    \
259   V(home_object_symbol)                \
260   V(intl_initialized_marker_symbol)    \
261   V(intl_pattern_symbol)               \
262   V(intl_resolved_symbol)              \
263   V(interpreter_trampoline_symbol)     \
264   V(megamorphic_symbol)                \
265   V(native_context_index_symbol)       \
266   V(nonextensible_symbol)              \
267   V(not_mapped_symbol)                 \
268   V(premonomorphic_symbol)             \
269   V(promise_async_stack_id_symbol)     \
270   V(promise_debug_marker_symbol)       \
271   V(promise_forwarding_handler_symbol) \
272   V(promise_handled_by_symbol)         \
273   V(promise_async_id_symbol)           \
274   V(sealed_symbol)                     \
275   V(stack_trace_symbol)                \
276   V(strict_function_transition_symbol) \
277   V(uninitialized_symbol)
278 
279 #define PUBLIC_SYMBOL_LIST(V)                    \
280   V(async_iterator_symbol, Symbol.asyncIterator) \
281   V(iterator_symbol, Symbol.iterator)            \
282   V(intl_fallback_symbol, IntlFallback)          \
283   V(match_all_symbol, Symbol.matchAll)           \
284   V(match_symbol, Symbol.match)                  \
285   V(replace_symbol, Symbol.replace)              \
286   V(search_symbol, Symbol.search)                \
287   V(species_symbol, Symbol.species)              \
288   V(split_symbol, Symbol.split)                  \
289   V(to_primitive_symbol, Symbol.toPrimitive)     \
290   V(unscopables_symbol, Symbol.unscopables)
291 
292 // Well-Known Symbols are "Public" symbols, which have a bit set which causes
293 // them to produce an undefined value when a load results in a failed access
294 // check. Because this behaviour is not specified properly as of yet, it only
295 // applies to a subset of spec-defined Well-Known Symbols.
296 #define WELL_KNOWN_SYMBOL_LIST(V)                           \
297   V(has_instance_symbol, Symbol.hasInstance)                \
298   V(is_concat_spreadable_symbol, Symbol.isConcatSpreadable) \
299   V(to_string_tag_symbol, Symbol.toStringTag)
300 
301 #define INCREMENTAL_SCOPES(F)                                      \
302   /* MC_INCREMENTAL is the top-level incremental marking scope. */ \
303   F(MC_INCREMENTAL)                                                \
304   F(MC_INCREMENTAL_START)                                          \
305   F(MC_INCREMENTAL_SWEEPING)                                       \
306   F(MC_INCREMENTAL_WRAPPER_PROLOGUE)                               \
307   F(MC_INCREMENTAL_WRAPPER_TRACING)                                \
308   F(MC_INCREMENTAL_FINALIZE)                                       \
309   F(MC_INCREMENTAL_FINALIZE_BODY)                                  \
310   F(MC_INCREMENTAL_EXTERNAL_EPILOGUE)                              \
311   F(MC_INCREMENTAL_EXTERNAL_PROLOGUE)
312 
313 #define TOP_MC_SCOPES(F) \
314   F(MC_CLEAR)            \
315   F(MC_EPILOGUE)         \
316   F(MC_EVACUATE)         \
317   F(MC_FINISH)           \
318   F(MC_MARK)             \
319   F(MC_PROLOGUE)         \
320   F(MC_SWEEP)
321 
322 #define TRACER_SCOPES(F)                             \
323   INCREMENTAL_SCOPES(F)                              \
324   F(HEAP_EPILOGUE)                                   \
325   F(HEAP_EPILOGUE_REDUCE_NEW_SPACE)                  \
326   F(HEAP_EXTERNAL_EPILOGUE)                          \
327   F(HEAP_EXTERNAL_PROLOGUE)                          \
328   F(HEAP_EXTERNAL_WEAK_GLOBAL_HANDLES)               \
329   F(HEAP_PROLOGUE)                                   \
330   TOP_MC_SCOPES(F)                                   \
331   F(MC_CLEAR_DEPENDENT_CODE)                         \
332   F(MC_CLEAR_MAPS)                                   \
333   F(MC_CLEAR_SLOTS_BUFFER)                           \
334   F(MC_CLEAR_STORE_BUFFER)                           \
335   F(MC_CLEAR_STRING_TABLE)                           \
336   F(MC_CLEAR_WEAK_COLLECTIONS)                       \
337   F(MC_CLEAR_WEAK_LISTS)                             \
338   F(MC_CLEAR_WEAK_REFERENCES)                        \
339   F(MC_EVACUATE_CANDIDATES)                          \
340   F(MC_EVACUATE_CLEAN_UP)                            \
341   F(MC_EVACUATE_COPY)                                \
342   F(MC_EVACUATE_EPILOGUE)                            \
343   F(MC_EVACUATE_PROLOGUE)                            \
344   F(MC_EVACUATE_REBALANCE)                           \
345   F(MC_EVACUATE_UPDATE_POINTERS)                     \
346   F(MC_EVACUATE_UPDATE_POINTERS_SLOTS_MAIN)          \
347   F(MC_EVACUATE_UPDATE_POINTERS_SLOTS_MAP_SPACE)     \
348   F(MC_EVACUATE_UPDATE_POINTERS_TO_NEW_ROOTS)        \
349   F(MC_EVACUATE_UPDATE_POINTERS_WEAK)                \
350   F(MC_MARK_FINISH_INCREMENTAL)                      \
351   F(MC_MARK_MAIN)                                    \
352   F(MC_MARK_ROOTS)                                   \
353   F(MC_MARK_WEAK_CLOSURE)                            \
354   F(MC_MARK_WEAK_CLOSURE_EPHEMERON)                  \
355   F(MC_MARK_WEAK_CLOSURE_EPHEMERON_MARKING)          \
356   F(MC_MARK_WEAK_CLOSURE_EPHEMERON_LINEAR)           \
357   F(MC_MARK_WEAK_CLOSURE_WEAK_HANDLES)               \
358   F(MC_MARK_WEAK_CLOSURE_WEAK_ROOTS)                 \
359   F(MC_MARK_WEAK_CLOSURE_HARMONY)                    \
360   F(MC_MARK_WRAPPERS)                                \
361   F(MC_MARK_WRAPPER_EPILOGUE)                        \
362   F(MC_MARK_WRAPPER_PROLOGUE)                        \
363   F(MC_MARK_WRAPPER_TRACING)                         \
364   F(MC_SWEEP_CODE)                                   \
365   F(MC_SWEEP_MAP)                                    \
366   F(MC_SWEEP_OLD)                                    \
367   F(MINOR_MC)                                        \
368   F(MINOR_MC_CLEAR)                                  \
369   F(MINOR_MC_CLEAR_STRING_TABLE)                     \
370   F(MINOR_MC_CLEAR_WEAK_LISTS)                       \
371   F(MINOR_MC_EVACUATE)                               \
372   F(MINOR_MC_EVACUATE_CLEAN_UP)                      \
373   F(MINOR_MC_EVACUATE_COPY)                          \
374   F(MINOR_MC_EVACUATE_EPILOGUE)                      \
375   F(MINOR_MC_EVACUATE_PROLOGUE)                      \
376   F(MINOR_MC_EVACUATE_REBALANCE)                     \
377   F(MINOR_MC_EVACUATE_UPDATE_POINTERS)               \
378   F(MINOR_MC_EVACUATE_UPDATE_POINTERS_SLOTS)         \
379   F(MINOR_MC_EVACUATE_UPDATE_POINTERS_TO_NEW_ROOTS)  \
380   F(MINOR_MC_EVACUATE_UPDATE_POINTERS_WEAK)          \
381   F(MINOR_MC_MARK)                                   \
382   F(MINOR_MC_MARK_GLOBAL_HANDLES)                    \
383   F(MINOR_MC_MARK_SEED)                              \
384   F(MINOR_MC_MARK_ROOTS)                             \
385   F(MINOR_MC_MARK_WEAK)                              \
386   F(MINOR_MC_MARKING_DEQUE)                          \
387   F(MINOR_MC_RESET_LIVENESS)                         \
388   F(MINOR_MC_SWEEPING)                               \
389   F(SCAVENGER_FAST_PROMOTE)                          \
390   F(SCAVENGER_SCAVENGE)                              \
391   F(SCAVENGER_PROCESS_ARRAY_BUFFERS)                 \
392   F(SCAVENGER_SCAVENGE_WEAK_GLOBAL_HANDLES_IDENTIFY) \
393   F(SCAVENGER_SCAVENGE_WEAK_GLOBAL_HANDLES_PROCESS)  \
394   F(SCAVENGER_SCAVENGE_PARALLEL)                     \
395   F(SCAVENGER_SCAVENGE_ROOTS)                        \
396   F(SCAVENGER_SCAVENGE_UPDATE_REFS)                  \
397   F(SCAVENGER_SCAVENGE_WEAK)
398 
399 #define TRACER_BACKGROUND_SCOPES(F)               \
400   F(BACKGROUND_ARRAY_BUFFER_FREE)                 \
401   F(BACKGROUND_STORE_BUFFER)                      \
402   F(BACKGROUND_UNMAPPER)                          \
403   F(MC_BACKGROUND_EVACUATE_COPY)                  \
404   F(MC_BACKGROUND_EVACUATE_UPDATE_POINTERS)       \
405   F(MC_BACKGROUND_MARKING)                        \
406   F(MC_BACKGROUND_SWEEPING)                       \
407   F(MINOR_MC_BACKGROUND_EVACUATE_COPY)            \
408   F(MINOR_MC_BACKGROUND_EVACUATE_UPDATE_POINTERS) \
409   F(MINOR_MC_BACKGROUND_MARKING)                  \
410   F(SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL)
411 
412 #endif  // V8_HEAP_SYMBOLS_H_
413