|
9 | 9 | #error "RUNTIME_HV_FIELD must be defined" |
10 | 10 | #endif |
11 | 11 |
|
12 | | -RUNTIME_HV_FIELD(objectPrototype) |
13 | | -RUNTIME_HV_FIELD(errorConstructor) |
| 12 | +RUNTIME_HV_FIELD(objectPrototype, JSObject) |
| 13 | +RUNTIME_HV_FIELD(errorConstructor, NativeConstructor) |
14 | 14 |
|
15 | 15 | /// JSError.prototype, and prototype of all native error types. |
16 | | -#define ALL_ERROR_TYPE(name) RUNTIME_HV_FIELD(name##Prototype) |
| 16 | +#define ALL_ERROR_TYPE(name) RUNTIME_HV_FIELD(name##Prototype, JSObject) |
17 | 17 | #include "hermes/VM/NativeErrorTypes.def" |
18 | 18 | #undef ALL_ERROR_TYPE |
19 | | -RUNTIME_HV_FIELD(functionPrototype) |
20 | | -RUNTIME_HV_FIELD(functionConstructor) |
| 19 | +RUNTIME_HV_FIELD(functionPrototype, NativeFunction) |
| 20 | +RUNTIME_HV_FIELD(functionConstructor, NativeConstructor) |
21 | 21 |
|
22 | | -RUNTIME_HV_FIELD(stringPrototype) |
23 | | -RUNTIME_HV_FIELD(bigintPrototype) |
24 | | -RUNTIME_HV_FIELD(numberPrototype) |
25 | | -RUNTIME_HV_FIELD(booleanPrototype) |
26 | | -RUNTIME_HV_FIELD(symbolPrototype) |
27 | | -RUNTIME_HV_FIELD(datePrototype) |
28 | | -RUNTIME_HV_FIELD(arrayPrototype) |
29 | | -RUNTIME_HV_FIELD(fastArrayPrototype) |
| 22 | +RUNTIME_HV_FIELD(stringPrototype, JSString) |
| 23 | +RUNTIME_HV_FIELD(bigintPrototype, JSObject) |
| 24 | +RUNTIME_HV_FIELD(numberPrototype, JSNumber) |
| 25 | +RUNTIME_HV_FIELD(booleanPrototype, JSBoolean) |
| 26 | +RUNTIME_HV_FIELD(symbolPrototype, JSObject) |
| 27 | +RUNTIME_HV_FIELD(datePrototype, JSObject) |
| 28 | +RUNTIME_HV_FIELD(arrayPrototype, JSArray) |
| 29 | +RUNTIME_HV_FIELD(fastArrayPrototype, JSObject) |
30 | 30 |
|
31 | | -RUNTIME_HV_FIELD(arrayBufferPrototype) |
32 | | -RUNTIME_HV_FIELD(dataViewPrototype) |
33 | | -RUNTIME_HV_FIELD(typedArrayBasePrototype) |
| 31 | +RUNTIME_HV_FIELD(arrayBufferPrototype, JSObject) |
| 32 | +RUNTIME_HV_FIELD(dataViewPrototype, JSObject) |
| 33 | +RUNTIME_HV_FIELD(typedArrayBasePrototype, JSObject) |
34 | 34 |
|
35 | 35 | /// %TypedArray%.prototype and constructor for each typed array. |
36 | | -#define TYPED_ARRAY(name, type) \ |
37 | | - RUNTIME_HV_FIELD(name##ArrayPrototype) \ |
38 | | - RUNTIME_HV_FIELD(name##ArrayConstructor) |
| 36 | +#define TYPED_ARRAY(name, type) \ |
| 37 | + RUNTIME_HV_FIELD(name##ArrayPrototype, JSObject) \ |
| 38 | + RUNTIME_HV_FIELD(name##ArrayConstructor, NativeConstructor) |
39 | 39 | #include "hermes/VM/TypedArrays.def" |
40 | 40 | #undef TYPED_ARRAY |
41 | 41 |
|
42 | | -RUNTIME_HV_FIELD(setPrototype) |
43 | | -RUNTIME_HV_FIELD(setPrototypeAdd) |
44 | | -RUNTIME_HV_FIELD(setPrototypeValues) |
45 | | -RUNTIME_HV_FIELD(setIteratorPrototype) |
46 | | -RUNTIME_HV_FIELD(mapPrototype) |
47 | | -RUNTIME_HV_FIELD(mapPrototypeSet) |
48 | | -RUNTIME_HV_FIELD(mapPrototypeEntries) |
49 | | -RUNTIME_HV_FIELD(mapIteratorPrototype) |
50 | | -RUNTIME_HV_FIELD(weakMapPrototype) |
51 | | -RUNTIME_HV_FIELD(weakSetPrototype) |
52 | | -RUNTIME_HV_FIELD(weakRefPrototype) |
53 | | -RUNTIME_HV_FIELD(regExpPrototype) |
54 | | -RUNTIME_HV_FIELD(typedArrayBaseConstructor) |
| 42 | +RUNTIME_HV_FIELD(setPrototype, JSObject) |
| 43 | +RUNTIME_HV_FIELD(setPrototypeAdd, NativeFunction) |
| 44 | +RUNTIME_HV_FIELD(setPrototypeValues, NativeFunction) |
| 45 | +RUNTIME_HV_FIELD(setIteratorPrototype, JSObject) |
| 46 | +RUNTIME_HV_FIELD(mapPrototype, JSObject) |
| 47 | +RUNTIME_HV_FIELD(mapPrototypeSet, NativeFunction) |
| 48 | +RUNTIME_HV_FIELD(mapPrototypeEntries, NativeFunction) |
| 49 | +RUNTIME_HV_FIELD(mapIteratorPrototype, JSObject) |
| 50 | +RUNTIME_HV_FIELD(weakMapPrototype, JSObject) |
| 51 | +RUNTIME_HV_FIELD(weakSetPrototype, JSObject) |
| 52 | +RUNTIME_HV_FIELD(weakRefPrototype, JSObject) |
| 53 | +RUNTIME_HV_FIELD(regExpPrototype, JSObject) |
| 54 | +RUNTIME_HV_FIELD(typedArrayBaseConstructor, NativeConstructor) |
55 | 55 |
|
56 | | -RUNTIME_HV_FIELD(regExpLastInput) |
57 | | -RUNTIME_HV_FIELD(regExpLastRegExp) |
| 56 | +RUNTIME_HV_FIELD(regExpLastInput, StringPrimitive) |
| 57 | +RUNTIME_HV_FIELD(regExpLastRegExp, JSRegExp) |
58 | 58 |
|
59 | | -RUNTIME_HV_FIELD(throwTypeErrorAccessor) |
60 | | -RUNTIME_HV_FIELD(arrayClass) |
61 | | -RUNTIME_HV_FIELD(fastArrayClass) |
62 | | -RUNTIME_HV_FIELD(regExpMatchClass) |
| 59 | +RUNTIME_HV_FIELD(throwTypeErrorAccessor, PropertyAccessor) |
| 60 | +RUNTIME_HV_FIELD(arrayClass, HiddenClass) |
| 61 | +RUNTIME_HV_FIELD(fastArrayClass, HiddenClass) |
| 62 | +RUNTIME_HV_FIELD(regExpMatchClass, HiddenClass) |
63 | 63 |
|
64 | | -RUNTIME_HV_FIELD(iteratorPrototype) |
65 | | -RUNTIME_HV_FIELD(arrayIteratorPrototype) |
66 | | -RUNTIME_HV_FIELD(arrayPrototypeValues) |
67 | | -RUNTIME_HV_FIELD(asyncFunctionPrototype) |
68 | | -RUNTIME_HV_FIELD(stringIteratorPrototype) |
69 | | -RUNTIME_HV_FIELD(regExpStringIteratorPrototype) |
70 | | -RUNTIME_HV_FIELD(generatorPrototype) |
71 | | -RUNTIME_HV_FIELD(generatorFunctionPrototype) |
72 | | -RUNTIME_HV_FIELD(parseIntFunction) |
73 | | -RUNTIME_HV_FIELD(parseFloatFunction) |
74 | | -RUNTIME_HV_FIELD(requireFunction) |
75 | | -RUNTIME_HV_FIELD(jsErrorStackAccessor) |
76 | | -RUNTIME_HV_FIELD(callSitePrototype) |
77 | | -RUNTIME_HV_FIELD(textEncoderPrototype) |
| 64 | +RUNTIME_HV_FIELD(iteratorPrototype, JSObject) |
| 65 | +RUNTIME_HV_FIELD(arrayIteratorPrototype, JSObject) |
| 66 | +RUNTIME_HV_FIELD(arrayPrototypeValues, NativeFunction) |
| 67 | +RUNTIME_HV_FIELD(asyncFunctionPrototype, JSObject) |
| 68 | +RUNTIME_HV_FIELD(stringIteratorPrototype, JSObject) |
| 69 | +RUNTIME_HV_FIELD(regExpStringIteratorPrototype, JSObject) |
| 70 | +RUNTIME_HV_FIELD(generatorPrototype, JSObject) |
| 71 | +RUNTIME_HV_FIELD(generatorFunctionPrototype, JSObject) |
| 72 | +RUNTIME_HV_FIELD(parseIntFunction, NativeFunction) |
| 73 | +RUNTIME_HV_FIELD(parseFloatFunction, NativeFunction) |
| 74 | +RUNTIME_HV_FIELD(requireFunction, NativeFunction) |
| 75 | +RUNTIME_HV_FIELD(jsErrorStackAccessor, PropertyAccessor) |
| 76 | +RUNTIME_HV_FIELD(callSitePrototype, JSObject) |
| 77 | +RUNTIME_HV_FIELD(textEncoderPrototype, JSObject) |
78 | 78 |
|
79 | 79 | // TODO: for Serialization/Deserialization after global object initialization |
80 | 80 | // we record specialCodeBlockDomain_ and create runtimemodule later need to |
81 | 81 | // revisit this in stage 2 |
82 | | -RUNTIME_HV_FIELD(specialCodeBlockDomain_) |
| 82 | +RUNTIME_HV_FIELD(specialCodeBlockDomain_, Domain) |
83 | 83 |
|
84 | | -RUNTIME_HV_FIELD(global_) |
85 | | -RUNTIME_HV_FIELD(thrownValue_) |
86 | | -RUNTIME_HV_FIELD(keptObjects_) |
| 84 | +RUNTIME_HV_FIELD(global_, JSObject) |
| 85 | +RUNTIME_HV_FIELD(thrownValue_, HermesValue) |
| 86 | +// TODO(T194880545) change to OrderedHashMap |
| 87 | +RUNTIME_HV_FIELD(keptObjects_, HermesValue) |
87 | 88 | #ifdef HERMES_ENABLE_DEBUGGER |
88 | | -RUNTIME_HV_FIELD(debuggerInternalObject_) |
| 89 | +RUNTIME_HV_FIELD(debuggerInternalObject_, JSObject) |
89 | 90 | #endif // HERMES_ENABLE_DEBUGGER |
90 | 91 |
|
91 | 92 | #ifdef HERMES_ENABLE_INTL |
92 | 93 | // TODO T65916424: move these out of Runtime |
93 | | -RUNTIME_HV_FIELD(intlCollator) |
94 | | -RUNTIME_HV_FIELD(intlCollatorPrototype) |
95 | | -RUNTIME_HV_FIELD(intlDateTimeFormat) |
96 | | -RUNTIME_HV_FIELD(intlDateTimeFormatPrototype) |
97 | | -RUNTIME_HV_FIELD(intlNumberFormat) |
98 | | -RUNTIME_HV_FIELD(intlNumberFormatPrototype) |
| 94 | +RUNTIME_HV_FIELD(intlCollator, NativeConstructor) |
| 95 | +RUNTIME_HV_FIELD(intlCollatorPrototype, JSObject) |
| 96 | +RUNTIME_HV_FIELD(intlDateTimeFormat, NativeConstructor) |
| 97 | +RUNTIME_HV_FIELD(intlDateTimeFormatPrototype, JSObject) |
| 98 | +RUNTIME_HV_FIELD(intlNumberFormat, NativeConstructor) |
| 99 | +RUNTIME_HV_FIELD(intlNumberFormatPrototype, JSObject) |
99 | 100 | #endif |
100 | 101 |
|
101 | | -RUNTIME_HV_FIELD(promiseRejectionTrackingHook_) |
| 102 | +RUNTIME_HV_FIELD(promiseRejectionTrackingHook_, HermesValue) |
102 | 103 |
|
103 | 104 | #undef RUNTIME_HV_FIELD |
0 commit comments