• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef ECMASCRIPT_RUNTIME_CALL_ID_H
17 #define ECMASCRIPT_RUNTIME_CALL_ID_H
18 
19 #include "ecmascript/base/config.h"
20 #include "ecmascript/dfx/vmstat/runtime_stat.h"
21 #include "ecmascript/stubs/runtime_stubs.h"
22 
23 namespace panda::ecmascript {
24 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
25 #define INTERPRETER_CALLER_LIST(V)   \
26     V(RunInternal)                   \
27     V(Ldnan)                         \
28     V(Ldinfinity)                    \
29     V(Ldundefined)                   \
30     V(Ldboolean)                     \
31     V(Ldnumber)                      \
32     V(Ldstring)                      \
33     V(Ldnull)                        \
34     V(Ldsymbol)                      \
35     V(Ldfunction)                    \
36     V(Ldglobal)                      \
37     V(Ldtrue)                        \
38     V(Ldfalse)                       \
39     V(Tonumber)                      \
40     V(Toboolean)                     \
41     V(Add2)                          \
42     V(Sub2)                          \
43     V(Mul2)                          \
44     V(Div2)                          \
45     V(Mod2)                          \
46     V(Eq)                            \
47     V(NotEq)                         \
48     V(Less)                          \
49     V(LessEq)                        \
50     V(Greater)                       \
51     V(GreaterEq)                     \
52     V(StrictNotEq)                   \
53     V(StrictEq)                      \
54     V(Shl2)                          \
55     V(Shr2)                          \
56     V(Ashr2)                         \
57     V(And2)                          \
58     V(Or2)                           \
59     V(Xor2)                          \
60     V(Neg)                           \
61     V(Not)                           \
62     V(Inc)                           \
63     V(Dec)                           \
64     V(Exp)                           \
65     V(Throw)                         \
66     V(LdObjByIndex)                  \
67     V(StObjByIndex)                  \
68     V(LdObjByName)                   \
69     V(StObjByName)                   \
70     V(LdObjByValue)                  \
71     V(StObjByValue)                  \
72     V(StOwnByName)                   \
73     V(StOwnById)                     \
74     V(StOwnByValue)                  \
75     V(Trygetobjprop)                 \
76     V(Delobjprop)                    \
77     V(Defineglobalvar)               \
78     V(Definelocalvar)                \
79     V(Definefuncexpr)                \
80     V(DefineFunc)                    \
81     V(NewobjRange)                   \
82     V(Refeq)                         \
83     V(Typeof)                        \
84     V(Ldnewobjrange)                 \
85     V(IsIn)                          \
86     V(Instanceof)                    \
87     V(InstanceofByHandler)           \
88     V(NewObjApply)                   \
89     V(CallArg0)                      \
90     V(CallArg1)                      \
91     V(CallArg2)                      \
92     V(CallArg3)                      \
93     V(CallThisRange)                 \
94     V(CallRange)                     \
95     V(CallSpread)                    \
96     V(Newlexenv)                     \
97     V(NewlexenvwithName)             \
98     V(Stlexvar)                      \
99     V(Ldlexvar)                      \
100     V(Ldlexenv)                      \
101     V(GetPropIterator)               \
102     V(GetPropIteratorSlowpath)       \
103     V(PrimitiveStringCreate)         \
104     V(CreateIterResultObj)           \
105     V(SuspendGenerator)              \
106     V(ResumeGenerator)               \
107     V(GetResumeMode)                 \
108     V(CreateGeneratorObj)            \
109     V(DefineGetterSetterByValue)     \
110     V(AsyncFunctionEnter)            \
111     V(AsyncFunctionAwaitUncaught)    \
112     V(AsyncFunctionResolveOrReject ) \
113     V(ThrowUndefined)                \
114     V(ThrowConstAssignment)          \
115     V(ThrowUndefinedIfHole)          \
116     V(Copyrestargs)                  \
117     V(Trystobjprop)                  \
118     V(GetTemplateObject)             \
119     V(CreateStringIterator)          \
120     V(NewJSArrayIterator)            \
121     V(NewJSTypedArrayIterator)       \
122     V(MapIteratorNext)               \
123     V(SetIteratorNext)               \
124     V(StringIteratorNext)            \
125     V(ArrayIteratorNext)             \
126     V(GetIterator)                   \
127     V(GetAsyncIterator)              \
128     V(ThrowIfNotObject)              \
129     V(ThrowThrowNotExists)           \
130     V(CreateObjectWithExcludedKeys ) \
131     V(ThrowPatternNonCoercible)      \
132     V(IterNext)                      \
133     V(CloseIterator)                 \
134     V(StArraySpread)                 \
135     V(GetCallSpreadArgs)             \
136     V(TryLoadICByName)               \
137     V(LoadICByName)                  \
138     V(GetPropertyByName)             \
139     V(TryLoadICByValue)              \
140     V(LoadICByValue)                 \
141     V(TryStoreICByName)              \
142     V(StoreOwnICByValue)             \
143     V(StoreICByName)                 \
144     V(TryStoreICByValue)             \
145     V(StoreICByValue)                \
146     V(NotifyInlineCache)             \
147     V(LoadGlobalICByName)            \
148     V(StoreGlobalICByName)           \
149     V(StoreICWithHandler)            \
150     V(StorePrototype)                \
151     V(StoreWithTransition)           \
152     V(StoreTransWithProto)           \
153     V(StoreWithAOT)                  \
154     V(StoreField)                    \
155     V(StoreGlobal)                   \
156     V(LoadPrototype)                 \
157     V(LoadICWithHandler)             \
158     V(StoreElement)                  \
159     V(CallGetter)                    \
160     V(CallSetter)                    \
161     V(AddPropertyByName)             \
162     V(AddPropertyByIndex)            \
163     V(GetPropertyByIndex)            \
164     V(GetPropertyByValue)            \
165     V(SetPropertyByIndex)            \
166     V(SetPropertyByValue)            \
167     V(FastTypeOf)                    \
168     V(FastSetPropertyByIndex)        \
169     V(FastSetPropertyByValue)        \
170     V(FastGetPropertyByName)         \
171     V(FastGetPropertyByValue)        \
172     V(FastGetPropertyByIndex)        \
173     V(NewLexicalEnv)                 \
174     V(ExecuteNative)                 \
175     V(Execute)                       \
176     V(AsmExecute)                    \
177     V(ExecuteAot)                    \
178     V(ToJSTaggedValueWithInt32)      \
179     V(ToJSTaggedValueWithUint32)     \
180     V(ThrowIfSuperNotCorrectCall)    \
181     V(CreateEmptyArray)              \
182     V(CreateEmptyObject)             \
183     V(CreateObjectWithBuffer)        \
184     V(CreateObjectHavingMethod)      \
185     V(SetObjectWithProto)            \
186     V(getmodulenamespace)            \
187     V(StModuleVar)                   \
188     V(LdModuleVar)                   \
189     V(CreateRegExpWithLiteral)       \
190     V(CreateArrayWithBuffer)         \
191     V(GetNextPropName)               \
192     V(GetNextPropNameSlowpath)       \
193     V(CopyDataProperties)            \
194     V(GetUnmapedArgs)                \
195     V(TryStGlobalByName)             \
196     V(LdGlobalVar)                   \
197     V(StGlobalVar)                   \
198     V(TryUpdateGlobalRecord)         \
199     V(LdGlobalRecord)                \
200     V(StGlobalRecord)                \
201     V(ThrowReferenceError)           \
202     V(ThrowTypeError)                \
203     V(ThrowSyntaxError)              \
204     V(NewClassFunc)                  \
205     V(DefineClass)                   \
206     V(SuperCall)                     \
207     V(SuperCallSpread)               \
208     V(DefineMethod)                  \
209     V(LdSuperByValue)                \
210     V(StSuperByValue)                \
211     V(ThrowDeleteSuperProperty)      \
212     V(ModWithTSType)                 \
213     V(MulWithTSType)                 \
214     V(SubWithTSType)                 \
215     V(DivWithTSType)                 \
216     V(AddWithTSType)                 \
217     V(GetBitOPDate)                  \
218     V(ShlWithTSType)                 \
219     V(ShrWithTSType)                 \
220     V(AshrWithTSType)                \
221     V(AndWithTSType)                 \
222     V(OrWithTSType)                  \
223     V(XorWithTSType)                 \
224     V(EqualWithIC)                   \
225     V(NotEqualWithIC)                \
226     V(Compare)                       \
227     V(LessWithIC)                    \
228     V(LessEqWithIC)                  \
229     V(GreaterWithIC)                 \
230     V(SetPropertyByName)             \
231     V(GreaterEqWithIC)               \
232     V(LdBigInt)                      \
233     V(Tonumeric)                     \
234     V(CreateAsyncGeneratorObj)       \
235     V(AsyncGeneratorResolve)         \
236     V(GetSuperConstructor)           \
237     V(DynamicImport)                 \
238     V(LdPatchVar)                    \
239     V(StPatchVar)                    \
240     V(AsyncGeneratorReject)          \
241     V(LdPrivateProperty)             \
242     V(StPrivateProperty)             \
243     V(TestIn)                        \
244     V(NotifyConcurrentResult)        \
245     V(DefineField)                   \
246     V(ToPropertyKey)                 \
247     V(CreatePrivateProperty)         \
248     V(DefinePrivateProperty)         \
249     V(CreateSharedClass)             \
250     V(LdSendableClass)               \
251     V(UpdateAOTHClass)               \
252     V(SetGeneratorState)
253 
254 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
255 #define BUILTINS_API_LIST(V)                   \
256     V(Array, Constructor)                     \
257     V(Array, From)                            \
258     V(Array, Of)                              \
259     V(Array, IsArray)                         \
260     V(Array, Entries)                         \
261     V(Array, Species)                         \
262     V(Array, Concat)                          \
263     V(Array, CopyWithin)                      \
264     V(Array, Every)                           \
265     V(Array, Fill)                            \
266     V(Array, Filter)                          \
267     V(Array, Find)                            \
268     V(Array, FindIndex)                       \
269     V(Array, FindLast)                        \
270     V(Array, FindLastIndex)                   \
271     V(Array, ForEach)                         \
272     V(Array, IndexOf)                         \
273     V(Array, Join)                            \
274     V(Array, Keys)                            \
275     V(Array, LastIndexOf)                     \
276     V(Array, Map)                             \
277     V(Array, Pop)                             \
278     V(Array, Push)                            \
279     V(Array, Reduce)                          \
280     V(Array, ReduceRight)                     \
281     V(Array, Reverse)                         \
282     V(Array, Shift)                           \
283     V(Array, Slice)                           \
284     V(Array, Some)                            \
285     V(Array, Sort)                            \
286     V(Array, Splice)                          \
287     V(Array, ToLocaleString)                  \
288     V(Array, ToString)                        \
289     V(Array, Unscopables)                     \
290     V(Array, Unshift)                         \
291     V(Array, Values)                          \
292     V(Array, Includes)                        \
293     V(Array, Flat)                            \
294     V(Array, FlatMap)                         \
295     V(Array, At)                              \
296     V(Array, ToReversed)                      \
297     V(Array, With)                            \
298     V(Array, ToSorted)                        \
299     V(Array, ToSpliced)                       \
300     V(ArrayBuffer, Constructor)               \
301     V(ArrayBuffer, Slice)                     \
302     V(ArrayBuffer, Species)                   \
303     V(ArrayBuffer, GetByteLength)             \
304     V(ArrayBuffer, GetValueFromBuffer)        \
305     V(ArrayBuffer, SetValueInBuffer)          \
306     V(ArrayBuffer, CloneArrayBuffer)          \
307     V(ArrayBuffer, AllocateArrayBuffer)       \
308     V(ArrayBuffer, IsView)                    \
309     V(SharedArrayBuffer, Constructor)         \
310     V(SharedArrayBuffer, Slice)               \
311     V(SharedArrayBuffer, AllocateSharedArrayBuffer) \
312     V(SharedArrayBuffer, IsSharedArrayBuffer) \
313     V(SharedArrayBuffer, IsView)              \
314     V(SharedArrayBuffer, Species)             \
315     V(SharedArrayBuffer, GetByteLength)       \
316     V(AsyncFromSyncIterator, Next)            \
317     V(AsyncFromSyncIterator, Throw)           \
318     V(AsyncFromSyncIterator, Return)          \
319     V(AsyncFunction, Constructor)             \
320     V(Boolean, BooleanPrototypeToString)      \
321     V(Boolean, BooleanPrototypeValueOf)       \
322     V(Boolean, Constructor)                   \
323     V(Boolean, ThisBooleanValue)              \
324     V(CjsExports, CjsExportsConstructor)      \
325     V(CjsModule, CjsModuleConstructor)        \
326     V(CjsModule, Compiler)                    \
327     V(CjsModule, Load)                        \
328     V(CjsModule, ResolveFilename)             \
329     V(CjsModule, Require)                     \
330     V(CjsModule, GetExportsForCircularRequire) \
331     V(CjsModule, UpdateChildren)              \
332     V(CjsRequire, CjsRequireConstructor)      \
333     V(CjsRequire, Main)                       \
334     V(CjsRequire, Resolve)                    \
335     V(Collator, CollatorConstructor)          \
336     V(Collator, SupportedLocalesOf)           \
337     V(Collator, Compare)                      \
338     V(Collator, AnonymousCollator)            \
339     V(Collator, ResolvedOptions)              \
340     V(DataView, Constructor)                  \
341     V(DataView, GetBuffer)                    \
342     V(DataView, GetByteLength)                \
343     V(DataView, GetOffset)                    \
344     V(DataView, GetViewValue)                 \
345     V(DataView, SetViewValue)                 \
346     V(DataView, GetFloat32)                   \
347     V(DataView, GetFloat64)                   \
348     V(DataView, GetInt8)                      \
349     V(DataView, GetInt16)                     \
350     V(DataView, GetInt32)                     \
351     V(DataView, GetUint8)                     \
352     V(DataView, GetUint16)                    \
353     V(DataView, GetUint32)                    \
354     V(DataView, GetBigInt64)                  \
355     V(DataView, GetBigUint64)                 \
356     V(DataView, SetFloat32)                   \
357     V(DataView, SetFloat64)                   \
358     V(DataView, SetInt8)                      \
359     V(DataView, SetInt16)                     \
360     V(DataView, SetInt32)                     \
361     V(DataView, SetUint8)                     \
362     V(DataView, SetUint16)                    \
363     V(DataView, SetUint32)                    \
364     V(DataView, SetBigInt64)                  \
365     V(DataView, SetBigUint64)                 \
366     V(DataView, GetTypedValue)                \
367     V(DataView, SetTypedValue)                \
368     V(Date, Constructor)                      \
369     V(Date, Now)                              \
370     V(Date, UTC)                              \
371     V(Date, Parse)                            \
372     V(Date, GetDateField)                     \
373     V(Date, GetTime)                          \
374     V(Date, SetTime)                          \
375     V(Date, ToJSON)                           \
376     V(Date, ValueOf)                          \
377     V(Date, ToPrimitive)                      \
378     V(Date, ToLocaleString)                   \
379     V(Date, ToLocaleDateString)               \
380     V(Date, ToLocaleTimeString)               \
381     V(DateTimeFormat, Constructor)            \
382     V(DateTimeFormat, SupportedLocalesOf)     \
383     V(DateTimeFormat, Format)                 \
384     V(DateTimeFormat, AnonymousDateTimeFormat) \
385     V(DateTimeFormat, FormatToParts)          \
386     V(DateTimeFormat, ResolvedOptions)        \
387     V(DateTimeFormat, FormatRange)            \
388     V(DateTimeFormat, FormatRangeToParts)     \
389     V(DisplayNames, Constructor)              \
390     V(DisplayNames, SupportedLocalesOf)       \
391     V(DisplayNames, Of)                       \
392     V(DisplayNames, ResolvedOptions)          \
393     V(Error, ErrorConstructor)                \
394     V(Error, ErrorToString)                   \
395     V(Error, RangeErrorConstructor)           \
396     V(Error, RangeErrorToString)              \
397     V(Error, ReferenceErrorConstructor)       \
398     V(Error, ReferenceErrorToString)          \
399     V(Error, TypeErrorConstructor)            \
400     V(Error, TypeErrorToString)               \
401     V(Error, ThrowTypeError)                  \
402     V(Error, URIErrorConstructor)             \
403     V(Error, URIErrorToString)                \
404     V(Error, SyntaxErrorConstructor)          \
405     V(Error, SyntaxErrorToString)             \
406     V(Error, EvalErrorConstructor)            \
407     V(Error, EvalErrorToString)               \
408     V(Error, AggregateErrorConstructor)       \
409     V(Error, AggregateErrorToString)          \
410     V(Error, OOMErrorConstructor)             \
411     V(Error, OOMErrorToString)                \
412     V(Error, TerminationErrorConstructor)     \
413     V(Error, TerminationErrorToString)        \
414     V(Function, Constructor)                  \
415     V(Function, PrototypeApply)               \
416     V(Function, PrototypeBind)                \
417     V(Function, PrototypeCall)                \
418     V(Function, PrototypeToString)            \
419     V(Function, PrototypeHasInstance)         \
420     V(Function, PrototypeInvokeSelf)          \
421     V(Generator, Constructor)                 \
422     V(Generator, PrototypeNext)               \
423     V(Generator, PrototypeReturn)             \
424     V(Generator, PrototypeThrow)              \
425     V(Global, IsFinite)                       \
426     V(Global, NotSupportEval)                 \
427     V(Global, Encode)                         \
428     V(Global, IsNaN)                          \
429     V(Global, PrintEntryPoint)                \
430     V(Global, NewobjRange)                    \
431     V(Global, Decode)                         \
432     V(Global, PrintString)                    \
433     V(Global, StartRuntimeStat)               \
434     V(Global, StopRuntimeStat)                \
435     V(Global, PrintOptStat)                   \
436     V(Global, PrintFunctionCallStat)          \
437     V(Global, CallJsBoundFunction)            \
438     V(Global, CallJsProxy)                    \
439     V(Global, DecodeURI)                      \
440     V(Global, EncodeURI)                      \
441     V(Global, DecodeURIComponent)             \
442     V(Global, EncodeURIComponent)             \
443     V(Global, Escape)                         \
444     V(Global, Unescape)                       \
445     V(Intl, GetCanonicalLocales)              \
446     V(Iterator, Constructor)                  \
447     V(Iterator, Next)                         \
448     V(Iterator, Throw)                        \
449     V(Iterator, Return)                       \
450     V(Iterator, GetObj)                       \
451     V(Locale, Constructor)                    \
452     V(Locale, Maximize)                       \
453     V(Locale, Minimize)                       \
454     V(Locale, ToString)                       \
455     V(Locale, GetBaseName)                    \
456     V(Locale, GetCalendar)                    \
457     V(Locale, GetCaseFirst)                   \
458     V(Locale, GetCollation)                   \
459     V(Locale, GetHourCycle)                   \
460     V(Locale, GetNumeric)                     \
461     V(Locale, GetNumberingSystem)             \
462     V(Locale, GetLanguage)                    \
463     V(Locale, GetScript)                      \
464     V(Locale, GetRegion)                      \
465     V(AsyncIterator, Constructor)             \
466     V(AsyncIterator, Next)                    \
467     V(AsyncIterator, Throw)                   \
468     V(AsyncIterator, Return)                  \
469     V(AsyncIterator, GetObj)                  \
470     V(Json, Parse)                            \
471     V(Json, Stringify)                        \
472     V(Map, Constructor)                       \
473     V(Map, Species)                           \
474     V(Map, Clear)                             \
475     V(Map, Delete)                            \
476     V(Map, Entries)                           \
477     V(Map, Get)                               \
478     V(Map, Has)                               \
479     V(Map, Keys)                              \
480     V(Map, Set)                               \
481     V(Map, GetSize)                           \
482     V(Map, Values)                            \
483     V(Map, ForEach)                           \
484     V(Map, AddEntriesFromIterable)            \
485     V(Math, Abs)                              \
486     V(Math, Acos)                             \
487     V(Math, Acosh)                            \
488     V(Math, Asin)                             \
489     V(Math, Asinh)                            \
490     V(Math, Atan)                             \
491     V(Math, Atanh)                            \
492     V(Math, Atan2)                            \
493     V(Math, Cbrt)                             \
494     V(Math, Ceil)                             \
495     V(Math, Clz32)                            \
496     V(Math, Cos)                              \
497     V(Math, Cosh)                             \
498     V(Math, Exp)                              \
499     V(Math, Expm1)                            \
500     V(Math, Floor)                            \
501     V(Math, Fround)                           \
502     V(Math, Hypot)                            \
503     V(Math, Imul)                             \
504     V(Math, Log)                              \
505     V(Math, Log1p)                            \
506     V(Math, Log10)                            \
507     V(Math, Log2)                             \
508     V(Math, Max)                              \
509     V(Math, Min)                              \
510     V(Math, Pow)                              \
511     V(Math, Random)                           \
512     V(Math, Round)                            \
513     V(Math, Sign)                             \
514     V(Math, Sin)                              \
515     V(Math, Sinh)                             \
516     V(Math, Sqrt)                             \
517     V(Math, Tan)                              \
518     V(Math, Tanh)                             \
519     V(Math, Trunc)                            \
520     V(NumberFormat, Constructor)              \
521     V(NumberFormat, SupportedLocalesOf)       \
522     V(NumberFormat, Format)                   \
523     V(NumberFormat, FormatToParts)            \
524     V(NumberFormat, ResolvedOptions)          \
525     V(Atomics, AtomicReadModifyWrite)         \
526     V(Atomics, AtomicReadModifyWriteCase)     \
527     V(Atomics, Add)                           \
528     V(Atomics, And)                           \
529     V(Atomics, DoWait)                        \
530     V(Atomics, HandleWithUint8)               \
531     V(Atomics, HandleWithInt8)                \
532     V(Atomics, HandleWithUint16)              \
533     V(Atomics, HandleWithInt16)               \
534     V(Atomics, HandleWithUint32)              \
535     V(Atomics, HandleWithInt32)               \
536     V(Atomics, HandleWithBigInt64)            \
537     V(Atomics, HandleWithBigUint64)           \
538     V(Atomics, Or)                            \
539     V(Atomics, Xor)                           \
540     V(Atomics, Sub)                           \
541     V(Atomics, Exchange)                      \
542     V(Atomics, CompareExchange)               \
543     V(Atomics, Store)                         \
544     V(Atomics, Load)                          \
545     V(Atomics, IsLockFree)                    \
546     V(Atomics, Wait)                          \
547     V(Atomics, Notify)                        \
548     V(Number, Constructor)                    \
549     V(Number, IsFinite)                       \
550     V(Number, IsInteger)                      \
551     V(Number, IsNaN)                          \
552     V(Number, IsSafeInteger)                  \
553     V(Number, ParseFloat)                     \
554     V(Number, ParseInt)                       \
555     V(Number, ToExponential)                  \
556     V(Number, ToFixed)                        \
557     V(Number, ToLocaleString)                 \
558     V(Number, ToPrecision)                    \
559     V(Number, ToString)                       \
560     V(Number, ValueOf)                        \
561     V(Number, ThisNumberValue)                \
562     V(BigInt, Constructor)                    \
563     V(BigInt, AsUintN)                        \
564     V(BigInt, AsIntN)                         \
565     V(BigInt, ToLocaleString)                 \
566     V(BigInt, ToString)                       \
567     V(BigInt, ValueOf)                        \
568     V(BigInt, ThisBigIntValue)                \
569     V(AsyncGenerator, Constructor)            \
570     V(AsyncGenerator, PrototypeNext)          \
571     V(AsyncGenerator, PrototypeReturn)        \
572     V(AsyncGenerator, PrototypeThrow)         \
573     V(Object, Constructor)                    \
574     V(Object, Assign)                         \
575     V(Object, Create)                         \
576     V(Object, CreateDataPropertyOnObjectFunctions) \
577     V(Object, DefineProperties)               \
578     V(Object, DefineProperty)                 \
579     V(Object, Freeze)                         \
580     V(Object, FromEntries)                    \
581     V(Object, GetOwnPropertyDescriptor)       \
582     V(Object, GetOwnPropertyDescriptors)      \
583     V(Object, GetOwnPropertyKeys)             \
584     V(Object, GetOwnPropertyNames)            \
585     V(Object, GetOwnPropertySymbols)          \
586     V(Object, GetPrototypeOf)                 \
587     V(Object, Is)                             \
588     V(Object, IsExtensible)                   \
589     V(Object, IsFrozen)                       \
590     V(Object, IsSealed)                       \
591     V(Object, PropertyIsEnumerable)           \
592     V(Object, CreateRealm)                    \
593     V(Object, Keys)                           \
594     V(Object, Values)                         \
595     V(Object, PreventExtensions)              \
596     V(Object, Seal)                           \
597     V(Object, SetPrototypeOf)                 \
598     V(Object, HasOwnProperty)                 \
599     V(Object, HasOwn)                         \
600     V(Object, IsPrototypeOf)                  \
601     V(Object, ToLocaleString)                 \
602     V(Object, GetBuiltinObjectToString)       \
603     V(Object, ToString)                       \
604     V(Object, ValueOf)                        \
605     V(Object, ProtoGetter)                    \
606     V(Object, ProtoSetter)                    \
607     V(PluralRules, Constructor)               \
608     V(PluralRules, SupportedLocalesOf)        \
609     V(PluralRules, Select)                    \
610     V(PluralRules, ResolvedOptions)           \
611     V(PromiseHandler, Resolve)                \
612     V(PromiseHandler, Reject)                 \
613     V(PromiseHandler, Executor)               \
614     V(PromiseHandler, ResolveElementFunction) \
615     V(PromiseHandler, AllSettledResolveElementFunction) \
616     V(PromiseHandler, AllSettledRejectElementFunction) \
617     V(PromiseHandler, AnyRejectElementFunction) \
618     V(PromiseHandler, AsyncAwaitRejected)     \
619     V(PromiseHandler, AsyncAwaitFulfilled)    \
620     V(PromiseHandler, valueThunkFunction)     \
621     V(PromiseHandler, throwerFunction)        \
622     V(PromiseHandler, ThenFinally)            \
623     V(PromiseHandler, CatchFinally)           \
624     V(PromiseHandler, PromiseResolve)         \
625     V(PromiseJob, Reaction)                   \
626     V(PromiseJob, ResolveThenableJob)         \
627     V(PromiseJob, DynamicImportJob)           \
628     V(PromiseJob, CatchException)             \
629     V(Promise, Constructor)                   \
630     V(Promise, All)                           \
631     V(Promise, Race)                          \
632     V(Promise, Reject)                        \
633     V(Promise, Resolve)                       \
634     V(Promise, GetSpecies)                    \
635     V(Promise, GetPromiseResolve)             \
636     V(Promise, Catch)                         \
637     V(Promise, Then)                          \
638     V(Promise, PerformPromiseThen)            \
639     V(Promise, Finally)                       \
640     V(Promise, Any)                           \
641     V(Promise, PerformPromiseAny)             \
642     V(Promise, AllSettled)                    \
643     V(Promise, PerformPromiseRace)            \
644     V(Promise, PerformPromiseAll)             \
645     V(Promise, PerformPromiseAllSettled)      \
646     V(Proxy, Constructor)                     \
647     V(Proxy, Revocable)                       \
648     V(Proxy, InvalidateProxyFunction)         \
649     V(Reflect, Apply)                         \
650     V(Reflect, Constructor)                   \
651     V(Reflect, DefineProperty)                \
652     V(Reflect, DeleteProperty)                \
653     V(Reflect, Get)                           \
654     V(Reflect, GetOwnPropertyDescriptor)      \
655     V(Reflect, GetPrototypeOf)                \
656     V(Reflect, Has)                           \
657     V(Reflect, OwnKeys)                       \
658     V(Reflect, PreventExtensions)             \
659     V(Reflect, Set)                           \
660     V(Reflect, SetPrototypeOf)                \
661     V(RegExp, Constructor)                    \
662     V(RegExp, Exec)                           \
663     V(RegExp, Test)                           \
664     V(RegExp, ToString)                       \
665     V(RegExp, GetFlags)                       \
666     V(RegExp, GetSpecies)                     \
667     V(RegExp, Match)                          \
668     V(RegExp, MatchAll)                       \
669     V(RegExp, Replace)                        \
670     V(RegExp, Search)                         \
671     V(RegExp, Split)                          \
672     V(RegExp, Create)                         \
673     V(RegExp, GetGlobal)                      \
674     V(RegExp, GetHasIndices)                  \
675     V(RegExp, GetIgnoreCase)                  \
676     V(RegExp, GetMultiline)                   \
677     V(RegExp, GetDotAll)                      \
678     V(RegExp, GetSource)                      \
679     V(RegExp, GetSticky)                      \
680     V(RegExp, GetUnicode)                     \
681     V(RegExp, RegExpReplaceFast)              \
682     V(RegExp, Matcher)                        \
683     V(RegExp, GetFlagsInternal)               \
684     V(RegExp, RegExpBuiltinExec)              \
685     V(RegExp, RegExpExec)                     \
686     V(RegExp, UpdateExpressionFlags)          \
687     V(RegExp, RegExpAlloc)                    \
688     V(RegExp, GetDollarString)                \
689     V(RegExp, RegExpInitialize)               \
690     V(RegExp, EscapeRegExpPattern)            \
691     V(RegExp, FlagsBitsToString)              \
692     V(RelativeTimeFormat, Constructor)        \
693     V(RelativeTimeFormat, SupportedLocalesOf) \
694     V(RelativeTimeFormat, Format)             \
695     V(RelativeTimeFormat, FormatToParts)      \
696     V(RelativeTimeFormat, ResolvedOptions)    \
697     V(Set, Constructor)                       \
698     V(Set, Species)                           \
699     V(Set, Add)                               \
700     V(Set, Clear)                             \
701     V(Set, Delete)                            \
702     V(Set, Entries)                           \
703     V(Set, Has)                               \
704     V(Set, GetSize)                           \
705     V(Set, Values)                            \
706     V(Set, ForEach)                           \
707     V(StringIterator, Next)                   \
708     V(String, Constructor)                    \
709     V(String, FromCharCode)                   \
710     V(String, FromCodePoint)                  \
711     V(String, Raw)                            \
712     V(String, GetSubstitution)                \
713     V(String, At)                             \
714     V(String, CharAt)                         \
715     V(String, CharCodeAt)                     \
716     V(String, CodePointAt)                    \
717     V(String, Concat)                         \
718     V(String, EndsWith)                       \
719     V(String, Includes)                       \
720     V(String, IndexOf)                        \
721     V(String, LastIndexOf)                    \
722     V(String, LocaleCompare)                  \
723     V(String, Match)                          \
724     V(String, MatchAll)                       \
725     V(String, Normalize)                      \
726     V(String, PadStart)                       \
727     V(String, PadEnd)                         \
728     V(String, Repeat)                         \
729     V(String, Replace)                        \
730     V(String, ReplaceAll)                     \
731     V(String, Search)                         \
732     V(String, Slice)                          \
733     V(String, Split)                          \
734     V(String, StartsWith)                     \
735     V(String, Substring)                      \
736     V(String, ToLocaleLowerCase)              \
737     V(String, ToLocaleUpperCase)              \
738     V(String, ToLowerCase)                    \
739     V(String, ToString)                       \
740     V(String, ToUpperCase)                    \
741     V(String, Trim)                           \
742     V(String, TrimStart)                      \
743     V(String, TrimEnd)                        \
744     V(String, TrimLeft)                       \
745     V(String, TrimRight)                      \
746     V(String, GetStringIterator)              \
747     V(String, SubStr)                         \
748     V(String, GetLength)                      \
749     V(String, ThisStringValue)                \
750     V(String, Pad)                            \
751     V(Symbol, Constructor)                    \
752     V(Symbol, ToString)                       \
753     V(Symbol, ValueOf)                        \
754     V(Symbol, For)                            \
755     V(Symbol, KeyFor)                         \
756     V(Symbol, DescriptionGetter)              \
757     V(Symbol, ThisSymbolValue)                \
758     V(Symbol, ToPrimitive)                    \
759     V(Symbol, SymbolDescriptiveString)        \
760     V(TypedArray, BaseConstructor)            \
761     V(TypedArray, Int8ArrayConstructor)       \
762     V(TypedArray, Uint8ArrayConstructor)      \
763     V(TypedArray, Uint8ClampedArrayConstructor) \
764     V(TypedArray, Int16ArrayConstructor)      \
765     V(TypedArray, Uint16ArrayConstructor)     \
766     V(TypedArray, Int32ArrayConstructor)      \
767     V(TypedArray, Uint32ArrayConstructor)     \
768     V(TypedArray, Float32ArrayConstructor)    \
769     V(TypedArray, Float64ArrayConstructor)    \
770     V(TypedArray, BigInt64ArrayConstructor)   \
771     V(TypedArray, BigUint64ArrayConstructor)  \
772     V(TypedArray, Fill)                       \
773     V(TypedArray, Find)                       \
774     V(TypedArray, FindIndex)                  \
775     V(TypedArray, FindLast)                   \
776     V(TypedArray, FindLastIndex)              \
777     V(TypedArray, IndexOf)                    \
778     V(TypedArray, LastIndexOf)                \
779     V(TypedArray, Reduce)                     \
780     V(TypedArray, ReduceRight)                \
781     V(TypedArray, Reverse)                    \
782     V(TypedArray, Some)                       \
783     V(TypedArray, ToLocaleString)             \
784     V(TypedArray, ToString)                   \
785     V(TypedArray, Includes)                   \
786     V(TypedArray, From)                       \
787     V(TypedArray, Of)                         \
788     V(TypedArray, Species)                    \
789     V(TypedArray, GetBuffer)                  \
790     V(TypedArray, GetByteLength)              \
791     V(TypedArray, GetByteOffset)              \
792     V(TypedArray, CopyWithin)                 \
793     V(TypedArray, Entries)                    \
794     V(TypedArray, Every)                      \
795     V(TypedArray, Filter)                     \
796     V(TypedArray, ForEach)                    \
797     V(TypedArray, Join)                       \
798     V(TypedArray, Keys)                       \
799     V(TypedArray, GetLength)                  \
800     V(TypedArray, Map)                        \
801     V(TypedArray, Set)                        \
802     V(TypedArray, Slice)                      \
803     V(TypedArray, Sort)                       \
804     V(TypedArray, ToSorted)                   \
805     V(TypedArray, Subarray)                   \
806     V(TypedArray, Values)                     \
807     V(TypedArray, With)                       \
808     V(TypedArray, ToStringTag)                \
809     V(TypedArray, At)                         \
810     V(TypedArray, ToReversed)                 \
811     V(WeakMap, Constructor)                   \
812     V(WeakMap, Delete)                        \
813     V(WeakMap, Get)                           \
814     V(WeakMap, Has)                           \
815     V(WeakMap, Set)                           \
816     V(WeakSet, Constructor)                   \
817     V(WeakSet, Delete)                        \
818     V(WeakSet, Add)                           \
819     V(WeakSet, Has)                           \
820     V(WeakRef, Constructor)                   \
821     V(WeakRef, Deref)                         \
822     V(FinalizationRegistry, Constructor)      \
823     V(FinalizationRegistry, Register)         \
824     V(FinalizationRegistry, Unregister)       \
825     V(ArrayList, Constructor)                 \
826     V(ArrayList, Add)                         \
827     V(ArrayList, Insert)                      \
828     V(ArrayList, Clear)                       \
829     V(ArrayList, Clone)                       \
830     V(ArrayList, Has)                         \
831     V(ArrayList, GetCapacity)                 \
832     V(ArrayList, IncreaseCapacityTo)          \
833     V(ArrayList, TrimToCurrentLength)         \
834     V(ArrayList, GetIndexOf)                  \
835     V(ArrayList, IsEmpty)                     \
836     V(ArrayList, GetLastIndexOf)              \
837     V(ArrayList, RemoveByIndex)               \
838     V(ArrayList, Remove)                      \
839     V(ArrayList, RemoveByRange)               \
840     V(ArrayList, ReplaceAllElements)          \
841     V(ArrayList, Sort)                        \
842     V(ArrayList, SubArrayList)                \
843     V(ArrayList, ConvertToArray)              \
844     V(ArrayList, ForEach)                     \
845     V(ArrayList, GetIteratorObj)              \
846     V(ArrayList, Get)                         \
847     V(ArrayList, Set)                         \
848     V(ArrayList, GetSize)                     \
849     V(ListFormat, Constructor)                \
850     V(ListFormat, SupportedLocalesOf)         \
851     V(ListFormat, Format)                     \
852     V(ListFormat, FormatToParts)              \
853     V(ListFormat, ResolvedOptions)            \
854     V(LightWeightMap, Constructor)            \
855     V(LightWeightMap, HasAll)                 \
856     V(LightWeightMap, HasKey)                 \
857     V(LightWeightMap, HasValue)               \
858     V(LightWeightMap, IncreaseCapacityTo)     \
859     V(LightWeightMap, Entries)                \
860     V(LightWeightMap, Get)                    \
861     V(LightWeightMap, GetIndexOfKey)          \
862     V(LightWeightMap, GetIndexOfValue)        \
863     V(LightWeightMap, IsEmpty)                \
864     V(LightWeightMap, GetKeyAt)               \
865     V(LightWeightMap, Keys)                   \
866     V(LightWeightMap, SetAll)                 \
867     V(LightWeightMap, Set)                    \
868     V(LightWeightMap, Remove)                 \
869     V(LightWeightMap, RemoveAt)               \
870     V(LightWeightMap, Clear)                  \
871     V(LightWeightMap, SetValueAt)             \
872     V(LightWeightMap, ForEach)                \
873     V(LightWeightMap, ToString)               \
874     V(LightWeightMap, GetValueAt)             \
875     V(LightWeightMap, Length)                 \
876     V(LightWeightSet, Constructor)            \
877     V(LightWeightSet, Add)                    \
878     V(LightWeightSet, AddAll)                 \
879     V(LightWeightSet, IsEmpty)                \
880     V(LightWeightSet, GetValueAt)             \
881     V(LightWeightSet, HasAll)                 \
882     V(LightWeightSet, Has)                    \
883     V(LightWeightSet, HasHash)                \
884     V(LightWeightSet, Equal)                  \
885     V(LightWeightSet, IncreaseCapacityTo)     \
886     V(LightWeightSet, GetIteratorObj)         \
887     V(LightWeightSet, Values)                 \
888     V(LightWeightSet, Entries)                \
889     V(LightWeightSet, ForEach)                \
890     V(LightWeightSet, GetIndexOf)             \
891     V(LightWeightSet, Remove)                 \
892     V(LightWeightSet, RemoveAt)               \
893     V(LightWeightSet, Clear)                  \
894     V(LightWeightSet, ToString)               \
895     V(LightWeightSet, ToArray)                \
896     V(LightWeightSet, GetSize)                \
897     V(PlainArray, Constructor)                \
898     V(PlainArray, Add)                        \
899     V(PlainArray, Clear)                      \
900     V(PlainArray, Clone)                      \
901     V(PlainArray, Has)                        \
902     V(PlainArray, Get)                        \
903     V(PlainArray, GetIteratorObj)             \
904     V(PlainArray, ForEach)                    \
905     V(PlainArray, ToString)                   \
906     V(PlainArray, GetIndexOfKey)              \
907     V(PlainArray, GetIndexOfValue)            \
908     V(PlainArray, IsEmpty)                    \
909     V(PlainArray, GetKeyAt)                   \
910     V(PlainArray, Remove)                     \
911     V(PlainArray, RemoveAt)                   \
912     V(PlainArray, RemoveRangeFrom)            \
913     V(PlainArray, SetValueAt)                 \
914     V(PlainArray, GetValueAt)                 \
915     V(PlainArray, GetSize)                    \
916     V(HashMap, Constructor)                   \
917     V(HashMap, HasKey)                        \
918     V(HashMap, HasValue)                      \
919     V(HashMap, Replace)                       \
920     V(HashMap, Keys)                          \
921     V(HashMap, Values)                        \
922     V(HashMap, Entries)                       \
923     V(HashMap, ForEach)                       \
924     V(HashMap, Set)                           \
925     V(HashMap, SetAll)                        \
926     V(HashMap, Remove)                        \
927     V(HashMap, Get)                           \
928     V(HashMap, Clear)                         \
929     V(HashMap, GetLength)                     \
930     V(HashMap, IsEmpty)                       \
931     V(HashSet, Constructor)                   \
932     V(HashSet, IsEmpty)                       \
933     V(HashSet, Has)                           \
934     V(HashSet, Add)                           \
935     V(HashSet, Remove)                        \
936     V(HashSet, Clear)                         \
937     V(HashSet, GetLength)                     \
938     V(HashSet, Values)                        \
939     V(HashSet, Entries)                       \
940     V(HashSet, ForEach)                       \
941     V(TreeMap, Constructor)                   \
942     V(TreeMap, HasKey)                        \
943     V(TreeMap, HasValue)                      \
944     V(TreeMap, GetFirstKey)                   \
945     V(TreeMap, GetLastKey)                    \
946     V(TreeMap, Set)                           \
947     V(TreeMap, Get)                           \
948     V(TreeMap, SetAll)                        \
949     V(TreeMap, Remove)                        \
950     V(TreeMap, Clear)                         \
951     V(TreeMap, GetLowerKey)                   \
952     V(TreeMap, GetHigherKey)                  \
953     V(TreeMap, Replace)                       \
954     V(TreeMap, IsEmpty)                       \
955     V(TreeMap, GetLength)                     \
956     V(TreeMap, Keys)                          \
957     V(TreeMap, Values)                        \
958     V(TreeMap, Entries)                       \
959     V(TreeMap, ForEach)                       \
960     V(TreeSet, Constructor)                   \
961     V(TreeSet, Add)                           \
962     V(TreeSet, Remove)                        \
963     V(TreeSet, Clear)                         \
964     V(TreeSet, Has)                           \
965     V(TreeSet, GetFirstValue)                 \
966     V(TreeSet, GetLastValue)                  \
967     V(TreeSet, GetLowerValue)                 \
968     V(TreeSet, GetHigherValue)                \
969     V(TreeSet, PopFirst)                      \
970     V(TreeSet, PopLast)                       \
971     V(TreeSet, IsEmpty)                       \
972     V(TreeSet, GetLength)                     \
973     V(TreeSet, Values)                        \
974     V(TreeSet, ForEach)                       \
975     V(TreeSet, Entries)                       \
976     V(Deque, Constructor)                     \
977     V(Deque, InsertFront)                     \
978     V(Deque, InsertEnd)                       \
979     V(Deque, GetFirst)                        \
980     V(Deque, GetLast)                         \
981     V(Deque, GetFront)                        \
982     V(Deque, GetTail)                         \
983     V(Deque, Has)                             \
984     V(Deque, PopFirst)                        \
985     V(Deque, PopLast)                         \
986     V(Deque, ForEach)                         \
987     V(Deque, GetIteratorObj)                  \
988     V(Deque, GetSize)                         \
989     V(Stack, Constructor)                     \
990     V(Stack, Iterator)                        \
991     V(Stack, IsEmpty)                         \
992     V(Stack, Push)                            \
993     V(Stack, Peek)                            \
994     V(Stack, Pop)                             \
995     V(Stack, Locate)                          \
996     V(Stack, ForEach)                         \
997     V(Stack, GetLength)                       \
998     V(Vector, Constructor)                    \
999     V(Vector, Add)                            \
1000     V(Vector, Insert)                         \
1001     V(Vector, SetLength)                      \
1002     V(Vector, GetCapacity)                    \
1003     V(Vector, IncreaseCapacityTo)             \
1004     V(Vector, Get)                            \
1005     V(Vector, GetIndexOf)                     \
1006     V(Vector, GetIndexFrom)                   \
1007     V(Vector, IsEmpty)                        \
1008     V(Vector, GetLastElement)                 \
1009     V(Vector, GetLastIndexOf)                 \
1010     V(Vector, GetLastIndexFrom)               \
1011     V(Vector, Remove)                         \
1012     V(Vector, RemoveByIndex)                  \
1013     V(Vector, RemoveByRange)                  \
1014     V(Vector, Set)                            \
1015     V(Vector, SubVector)                      \
1016     V(Vector, ToString)                       \
1017     V(Vector, GetSize)                        \
1018     V(Vector, ForEach)                        \
1019     V(Vector, ReplaceAllElements)             \
1020     V(Vector, Has)                            \
1021     V(Vector, Sort)                           \
1022     V(Vector, Clear)                          \
1023     V(Vector, Clone)                          \
1024     V(Vector, CopyToArray)                    \
1025     V(Vector, ConvertToArray)                 \
1026     V(Vector, GetFirstElement)                \
1027     V(Vector, TrimToCurrentLength)            \
1028     V(Vector, GetIteratorObj)                 \
1029     V(Queue, Constructor)                     \
1030     V(Queue, Add)                             \
1031     V(Queue, GetFirst)                        \
1032     V(Queue, Pop)                             \
1033     V(Queue, ForEach)                         \
1034     V(Queue, GetIteratorObj)                  \
1035     V(Queue, GetSize)                         \
1036     V(List, Constructor)                      \
1037     V(List, Add)                              \
1038     V(List, GetFirst)                         \
1039     V(List, GetLast)                          \
1040     V(List, Insert)                           \
1041     V(List, Clear)                            \
1042     V(List, RemoveByIndex)                    \
1043     V(List, Remove)                           \
1044     V(List, Has)                              \
1045     V(List, IsEmpty)                          \
1046     V(List, Get)                              \
1047     V(List, GetIndexOf)                       \
1048     V(List, GetLastIndexOf)                   \
1049     V(List, Set)                              \
1050     V(List, ForEach)                          \
1051     V(List, ReplaceAllElements)               \
1052     V(List, GetIteratorObj)                   \
1053     V(List, Equal)                            \
1054     V(List, Sort)                             \
1055     V(List, ConvertToArray)                   \
1056     V(List, GetSubList)                       \
1057     V(List, Length)                           \
1058     V(LinkedList, Constructor)                \
1059     V(LinkedList, Length)                     \
1060     V(LinkedList, Add)                        \
1061     V(LinkedList, GetFirst)                   \
1062     V(LinkedList, GetLast)                    \
1063     V(LinkedList, Insert)                     \
1064     V(LinkedList, AddFirst)                   \
1065     V(LinkedList, Clear)                      \
1066     V(LinkedList, Clone)                      \
1067     V(LinkedList, Has)                        \
1068     V(LinkedList, Get)                        \
1069     V(LinkedList, GetIndexOf)                 \
1070     V(LinkedList, GetLastIndexOf)             \
1071     V(LinkedList, RemoveByIndex)              \
1072     V(LinkedList, Remove)                     \
1073     V(LinkedList, RemoveFirst)                \
1074     V(LinkedList, RemoveLast)                 \
1075     V(LinkedList, RemoveFirstFound)           \
1076     V(LinkedList, RemoveLastFound)            \
1077     V(LinkedList, Set)                        \
1078     V(LinkedList, ConvertToArray)             \
1079     V(LinkedList, ForEach)                    \
1080     V(LinkedList, GetIteratorObj)
1081 
1082 #define ABSTRACT_OPERATION_LIST(V) \
1083     V(JSTaggedValue, ToString)     \
1084 
1085 #define MEM_ALLOCATE_AND_GC_LIST(V)  \
1086     V(FullGC_RunPhases)              \
1087     V(PartialGC_RunPhases)           \
1088     V(STWYoungGC_RunPhases)          \
1089     V(ConcurrentMarking)             \
1090     V(ConcurrentMarkingInitialize)   \
1091     V(IncrementalMarking)            \
1092     V(IncrementalMarkingInitialize)  \
1093     V(WaitConcurrentMarkingFinished) \
1094     V(ReMarking)                     \
1095     V(ConcurrentSweepingInitialize)  \
1096     V(ConcurrentSweepingWait)        \
1097     V(ParallelEvacuationInitialize)  \
1098     V(ParallelEvacuation)            \
1099     V(ParallelUpdateReference)       \
1100     V(WaitUpdateFinished)            \
1101     V(UpdateRoot)                    \
1102     V(UpdateWeakReference)           \
1103     V(ParallelEvacuator)             \
1104     V(ParallelEvacuatorInitialize)   \
1105     V(ParallelEvacuatorFinalize)     \
1106     V(HugeSpaceExpand)               \
1107     V(NonMovableSpaceExpand)         \
1108     V(HeapPrepare)                   \
1109 
1110 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
1111 #define INTERPRETER_CALLER_ID(name) INTERPRETER_ID_##name,
1112 #define RUNTIME_CALLER_ID(name) RUNTIME_ID_##name,
1113 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
1114 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
1115 #define BUILTINS_API_ID(class, name) BUILTINS_ID_##class##_##name,
1116 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
1117 #define ABSTRACT_OPERATION_ID(class, name) ABSTRACT_ID_##class##_##name,
1118 
1119 #define MEM_ALLOCATE_AND_GC_ID(name) MEM_ID##name,
1120 
1121 enum EcmaRuntimeCallerId {
1122     INTERPRETER_CALLER_LIST(INTERPRETER_CALLER_ID) BUILTINS_API_LIST(BUILTINS_API_ID)
1123     ABSTRACT_OPERATION_LIST(ABSTRACT_OPERATION_ID)
1124     MEM_ALLOCATE_AND_GC_LIST(MEM_ALLOCATE_AND_GC_ID)
1125 #define DEF_RUNTIME_ID(name) RUNTIME_ID_##name,
1126     RUNTIME_STUB_WITH_GC_LIST(DEF_RUNTIME_ID)
1127 #undef DEF_RUNTIME_ID
1128     RUNTIME_CALLER_NUMBER,
1129 };
1130 
1131 #if ECMASCRIPT_ENABLE_INTERPRETER_RUNTIME_STAT
1132 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
1133 #define INTERPRETER_TRACE(thread, name)                                                                    \
1134     [[maybe_unused]] JSThread *_js_thread_ = thread;                                                       \
1135     [[maybe_unused]] EcmaRuntimeStat *_run_stat_ = _js_thread_->GetCurrentEcmaContext()->GetRuntimeStat(); \
1136     RuntimeTimerScope interpret_##name##_scope_(INTERPRETER_CALLER_ID(name) _run_stat_)
1137 #if defined(ECMASCRIPT_SUPPORT_CPUPROFILER)
1138 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
1139 #define RUNTIME_TRACE(thread, name)                                                                        \
1140     [[maybe_unused]] JSThread *_js_thread_ = thread;                                                       \
1141     [[maybe_unused]] EcmaRuntimeStat *_run_stat_ = _js_thread_->GetCurrentEcmaContext()->GetRuntimeStat(); \
1142     RuntimeTimerScope interpret_##name##_scope_(RUNTIME_CALLER_ID(name) _run_stat_);                       \
1143     [[maybe_unused]] RuntimeStateScope _runtime_state_##name##_scope_(_js_thread_)
1144 #else
1145 #define RUNTIME_TRACE(thread, name)                                                                        \
1146     [[maybe_unused]] JSThread *_js_thread_ = thread;                                                       \
1147     [[maybe_unused]] EcmaRuntimeStat *_run_stat_ = _js_thread_->GetCurrentEcmaContext()->GetRuntimeStat(); \
1148     RuntimeTimerScope interpret_##name##_scope_(RUNTIME_CALLER_ID(name) _run_stat_);
1149 #endif
1150 #else
1151 #define INTERPRETER_TRACE(thread, name) static_cast<void>(0) // NOLINT(cppcoreguidelines-macro-usage)
1152 #if defined(ECMASCRIPT_SUPPORT_CPUPROFILER)
1153 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
1154 #define RUNTIME_TRACE(thread, name)                                                            \
1155     [[maybe_unused]] JSThread *_js_thread_ = thread;                                           \
1156     [[maybe_unused]] RuntimeStateScope _runtime_state_##name##_scope_(_js_thread_)
1157 #else
1158 #define RUNTIME_TRACE(thread, name) static_cast<void>(0) // NOLINT(cppcoreguidelines-macro-usage)
1159 #endif // defined(ECMASCRIPT_SUPPORT_CPUPROFILER)
1160 #endif // ECMASCRIPT_ENABLE_INTERPRETER_RUNTIME_STAT
1161 
1162 #if ECMASCRIPT_ENABLE_BUILTINS_RUNTIME_STAT
1163 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
1164 #define BUILTINS_API_TRACE(thread, class, name)                                                            \
1165     [[maybe_unused]] JSThread *_js_thread_ = thread;                                                       \
1166     [[maybe_unused]] EcmaRuntimeStat *_run_stat_ = _js_thread_->GetCurrentEcmaContext()->GetRuntimeStat(); \
1167     RuntimeTimerScope builtins_##class##name##_scope_(BUILTINS_API_ID(class, name) _run_stat_)
1168 
1169 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
1170 #define ABSTRACT_OPERATION_TRACE(thread, class, name)                                                      \
1171     [[maybe_unused]] JSThread *_js_thread_ = thread;                                                       \
1172     [[maybe_unused]] EcmaRuntimeStat *_run_stat_ = _js_thread_->GetCurrentEcmaContext()->GetRuntimeStat(); \
1173     RuntimeTimerScope abstract_##class##name##_scope_(ABSTRACT_OPERATION_ID(class, name) _run_stat_)
1174 #else
1175 #define BUILTINS_API_TRACE(thread, class, name) static_cast<void>(0) // NOLINT(cppcoreguidelines-macro-usage)
1176 #define ABSTRACT_OPERATION_TRACE(class, name) static_cast<void>(0) // NOLINT(cppcoreguidelines-macro-usage)
1177 #endif // ECMASCRIPT_ENABLE_BUILTINS_RUNTIME_STAT
1178 
1179 #if ECMASCRIPT_ENABLE_ALLOCATE_AND_GC_RUNTIME_STAT
1180 #define MEM_ALLOCATE_AND_GC_TRACE(vm, name)                                                     \
1181     CHECK_JS_THREAD(vm);                                                                        \
1182     EcmaRuntimeStat *_run_stat_ = vm->GetJSThread()->GetCurrentEcmaContext()->GetRuntimeStat(); \
1183     RuntimeTimerScope mem_##name##_scope_(MEM_ALLOCATE_AND_GC_ID(name) _run_stat_)
1184 #else
1185 #define MEM_ALLOCATE_AND_GC_TRACE(vm, name) static_cast<void>(0) // NOLINT(cppcoreguidelines-macro-usage)
1186 #endif // ECMASCRIPT_ENABLE_ALLOCATE_AND_GC_RUNTIME_STAT
1187 }  // namespace panda::ecmascript
1188 #endif
1189