1// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_VM_COMPILER_RECOGNIZED_METHODS_LIST_H_
6#define RUNTIME_VM_COMPILER_RECOGNIZED_METHODS_LIST_H_
7
8namespace dart {
9
10// clang-format off
11// (class-name, function-name, recognized enum, fingerprint).
12// When adding a new function, add a 0 as the fingerprint and run the build in
13// debug mode to get the correct fingerprint from the mismatch error.
14#define OTHER_RECOGNIZED_LIST(V) \
15 V(::, identical, ObjectIdentical, 0x8fd6ea58) \
16 V(ClassID, getID, ClassIDgetID, 0x0401ffad) \
17 V(Object, Object., ObjectConstructor, 0x256e7170) \
18 V(List, ., ListFactory, 0xbec87d33) \
19 V(_List, ., ObjectArrayAllocate, 0x6de199a1) \
20 V(_List, []=, ObjectArraySetIndexed, 0xba15978f) \
21 V(_GrowableList, []=, GrowableArraySetIndexed, 0xba15978f) \
22 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0xc28aff37) \
23 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0xc3e7212d) \
24 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0xdaa7b952) \
25 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0xdc2919bc) \
26 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0xc57f53af) \
27 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0xc5c49520) \
28 V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0xa2c7e6a4) \
29 V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0xd8c29ffe) \
30 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xaf15f28a) \
31 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0xbe4987b7) \
32 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0x76c82c28) \
33 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0x29abed4e) \
34 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0xfc13ad87) \
35 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 0xc9e4212d) \
36 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0xd570aa0c) \
37 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 0xe8acb234) \
38 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0xd8651525) \
39 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0xd3f10d97) \
40 V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0xe357b95f) \
41 V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0xf4d19bea) \
42 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0xd6272645) \
43 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0xca4af137) \
44 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x71767f7f) \
45 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xf0483280) \
46 V(ByteData, ., ByteDataFactory, 0x63fefa4b) \
47 V(_ByteDataView, get:offsetInBytes, ByteDataViewOffsetInBytes, 0xe51b926b) \
48 V(_ByteDataView, get:_typedData, ByteDataViewTypedData, 0x3c781fb9) \
49 V(_TypedListView, get:offsetInBytes, TypedDataViewOffsetInBytes, 0xe51b926b) \
50 V(_TypedListView, get:_typedData, TypedDataViewTypedData, 0x3c781fb9) \
51 V(_ByteDataView, ._, TypedData_ByteDataView_factory, 0xe9e9dad9) \
52 V(_Int8ArrayView, ._, TypedData_Int8ArrayView_factory, 0x016014a7) \
53 V(_Uint8ArrayView, ._, TypedData_Uint8ArrayView_factory, 0x8c3fc232) \
54 V(_Uint8ClampedArrayView, ._, TypedData_Uint8ClampedArrayView_factory, \
55 0x36da9706) \
56 V(_Int16ArrayView, ._, TypedData_Int16ArrayView_factory, 0x09a366f8) \
57 V(_Uint16ArrayView, ._, TypedData_Uint16ArrayView_factory, 0x8f74c30f) \
58 V(_Int32ArrayView, ._, TypedData_Int32ArrayView_factory, 0x8c100d16) \
59 V(_Uint32ArrayView, ._, TypedData_Uint32ArrayView_factory, 0x4f7f073e) \
60 V(_Int64ArrayView, ._, TypedData_Int64ArrayView_factory, 0xb85546cc) \
61 V(_Uint64ArrayView, ._, TypedData_Uint64ArrayView_factory, 0x019c229a) \
62 V(_Float32ArrayView, ._, TypedData_Float32ArrayView_factory, 0x2290e5a1) \
63 V(_Float64ArrayView, ._, TypedData_Float64ArrayView_factory, 0xbe62c734) \
64 V(_Float32x4ArrayView, ._, TypedData_Float32x4ArrayView_factory, 0x5bb7771d) \
65 V(_Int32x4ArrayView, ._, TypedData_Int32x4ArrayView_factory, 0x30b9f2a2) \
66 V(_Float64x2ArrayView, ._, TypedData_Float64x2ArrayView_factory, 0x96490d01) \
67 V(::, _toClampedUint8, ConvertIntToClampedUint8, 0x143ed675) \
68 V(::, copyRangeFromUint8ListToOneByteString, \
69 CopyRangeFromUint8ListToOneByteString, 0x89d6a60a) \
70 V(_StringBase, _interpolate, StringBaseInterpolate, 0xbf682f1c) \
71 V(_IntegerImplementation, toDouble, IntegerToDouble, 0x5f8db5f5) \
72 V(_Double, _add, DoubleAdd, 0x4326962a) \
73 V(_Double, _sub, DoubleSub, 0x81077f31) \
74 V(_Double, _mul, DoubleMul, 0x7858fa6f) \
75 V(_Double, _div, DoubleDiv, 0x813d6a94) \
76 V(::, min, MathMin, 0xe6a2f504) \
77 V(::, max, MathMax, 0x4cfa6f6b) \
78 V(::, _doublePow, MathDoublePow, 0x973546e3) \
79 V(::, _intPow, MathIntPow, 0x5449a6fb) \
80 V(Float32x4, _Float32x4FromDoubles, Float32x4FromDoubles, 0x4ddbf1d0) \
81 V(Float32x4, Float32x4.zero, Float32x4Zero, 0x730d827d) \
82 V(Float32x4, _Float32x4Splat, Float32x4Splat, 0x36ae87e8) \
83 V(Float32x4, Float32x4.fromInt32x4Bits, Int32x4ToFloat32x4, 0x8704457d) \
84 V(Float32x4, Float32x4.fromFloat64x2, Float64x2ToFloat32x4, 0x71ab7a48) \
85 V(_Float32x4, shuffle, Float32x4Shuffle, 0x6f8cd72e) \
86 V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 0xd9fe42cf) \
87 V(_Float32x4, get:signMask, Float32x4GetSignMask, 0x00b7b96d) \
88 V(_Float32x4, equal, Float32x4Equal, 0x77b31279) \
89 V(_Float32x4, greaterThan, Float32x4GreaterThan, 0x85a5a282) \
90 V(_Float32x4, greaterThanOrEqual, Float32x4GreaterThanOrEqual, 0x81c686ba) \
91 V(_Float32x4, lessThan, Float32x4LessThan, 0x7d709620) \
92 V(_Float32x4, lessThanOrEqual, Float32x4LessThanOrEqual, 0x79cf7843) \
93 V(_Float32x4, notEqual, Float32x4NotEqual, 0x97a75a46) \
94 V(_Float32x4, min, Float32x4Min, 0x0ad96995) \
95 V(_Float32x4, max, Float32x4Max, 0xed08eb66) \
96 V(_Float32x4, scale, Float32x4Scale, 0xfdf348c5) \
97 V(_Float32x4, sqrt, Float32x4Sqrt, 0x84853df5) \
98 V(_Float32x4, reciprocalSqrt, Float32x4ReciprocalSqrt, 0x7d66357b) \
99 V(_Float32x4, reciprocal, Float32x4Reciprocal, 0x73e065b5) \
100 V(_Float32x4, unary-, Float32x4Negate, 0x86111def) \
101 V(_Float32x4, abs, Float32x4Abs, 0x8ad4c18b) \
102 V(_Float32x4, clamp, Float32x4Clamp, 0x374a9da0) \
103 V(_Float32x4, _withX, Float32x4WithX, 0xfd53a072) \
104 V(_Float32x4, _withY, Float32x4WithY, 0xf5f5b506) \
105 V(_Float32x4, _withZ, Float32x4WithZ, 0xf2122f63) \
106 V(_Float32x4, _withW, Float32x4WithW, 0xef6f231e) \
107 V(Float64x2, _Float64x2FromDoubles, Float64x2FromDoubles, 0x9688f476) \
108 V(Float64x2, Float64x2.zero, Float64x2Zero, 0x35f71913) \
109 V(Float64x2, _Float64x2Splat, Float64x2Splat, 0xf2e6bce9) \
110 V(Float64x2, Float64x2.fromFloat32x4, Float32x4ToFloat64x2, 0xa936b421) \
111 V(_Float64x2, get:x, Float64x2GetX, 0xd83e5791) \
112 V(_Float64x2, get:y, Float64x2GetY, 0xc5cfb2b4) \
113 V(_Float64x2, unary-, Float64x2Negate, 0x48fab485) \
114 V(_Float64x2, abs, Float64x2Abs, 0x4dbe5821) \
115 V(_Float64x2, sqrt, Float64x2Sqrt, 0x476ed48b) \
116 V(_Float64x2, get:signMask, Float64x2GetSignMask, 0x00b7b96d) \
117 V(_Float64x2, scale, Float64x2Scale, 0xc0dcdf5b) \
118 V(_Float64x2, _withX, Float64x2WithX, 0xc03d3708) \
119 V(_Float64x2, _withY, Float64x2WithY, 0xb8df4b9c) \
120 V(_Float64x2, min, Float64x2Min, 0x6b5e1755) \
121 V(_Float64x2, max, Float64x2Max, 0x4d8d9926) \
122 V(Int32x4, _Int32x4FromInts, Int32x4FromInts, 0xa646ec55) \
123 V(Int32x4, _Int32x4FromBools, Int32x4FromBools, 0x5e05beed) \
124 V(Int32x4, Int32x4.fromFloat32x4Bits, Float32x4ToInt32x4, 0x7893999c) \
125 V(_Int32x4, get:flagX, Int32x4GetFlagX, 0x7713cbb9) \
126 V(_Int32x4, get:flagY, Int32x4GetFlagY, 0x92840299) \
127 V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 0xa02d9dec) \
128 V(_Int32x4, get:flagW, Int32x4GetFlagW, 0xa94db02d) \
129 V(_Int32x4, get:signMask, Int32x4GetSignMask, 0x00b7b96d) \
130 V(_Int32x4, shuffle, Int32x4Shuffle, 0x149a8b16) \
131 V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 0xd017e89f) \
132 V(_Int32x4, select, Int32x4Select, 0x2847cb63) \
133 V(_Int32x4, _withFlagX, Int32x4WithFlagX, 0xa365d5a6) \
134 V(_Int32x4, _withFlagY, Int32x4WithFlagY, 0x945670e9) \
135 V(_Int32x4, _withFlagZ, Int32x4WithFlagZ, 0x938c5d97) \
136 V(_Int32x4, _withFlagW, Int32x4WithFlagW, 0x9ebace9b) \
137 V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 0xe161439b) \
138 V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 0x8c899997) \
139 V(_HashVMBase, get:_data, LinkedHashMap_getData, 0xb1d039ec) \
140 V(_HashVMBase, set:_data, LinkedHashMap_setData, 0x7c713c68) \
141 V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 0xcb55342c) \
142 V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 0x4b6bbba8) \
143 V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 0xd35b67db) \
144 V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, 0x5371ef57) \
145 V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, 0xd55a64df) \
146 V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, 0x5570ec5b) \
147 V(::, _classRangeCheck, ClassRangeCheck, 0x44ba948a) \
148 V(::, _asyncStackTraceHelper, AsyncStackTraceHelper, 0x92cea920) \
149 V(::, _abi, FfiAbi, 0x00a48dda) \
150 V(::, _asFunctionInternal, FfiAsFunctionInternal, 0x4ea3f661) \
151 V(::, _nativeCallbackFunction, FfiNativeCallbackFunction, 0xe7a60ce3) \
152 V(::, _loadInt8, FfiLoadInt8, 0x7b779ed3) \
153 V(::, _loadInt16, FfiLoadInt16, 0x58b6f02a) \
154 V(::, _loadInt32, FfiLoadInt32, 0x5a94fec0) \
155 V(::, _loadInt64, FfiLoadInt64, 0x4b627ea0) \
156 V(::, _loadUint8, FfiLoadUint8, 0x4dc0dbce) \
157 V(::, _loadUint16, FfiLoadUint16, 0x79491be7) \
158 V(::, _loadUint32, FfiLoadUint32, 0x62e14f52) \
159 V(::, _loadUint64, FfiLoadUint64, 0x7178bcc9) \
160 V(::, _loadIntPtr, FfiLoadIntPtr, 0x584c733b) \
161 V(::, _loadFloat, FfiLoadFloat, 0x7f0471da) \
162 V(::, _loadDouble, FfiLoadDouble, 0x7d37b396) \
163 V(::, _loadPointer, FfiLoadPointer, 0x3691c04d) \
164 V(::, _storeInt8, FfiStoreInt8, 0x118e5bc9) \
165 V(::, _storeInt16, FfiStoreInt16, 0x0a8b9fef) \
166 V(::, _storeInt32, FfiStoreInt32, 0x2e23d91a) \
167 V(::, _storeInt64, FfiStoreInt64, 0x2411ba37) \
168 V(::, _storeUint8, FfiStoreUint8, 0x37ab7fb3) \
169 V(::, _storeUint16, FfiStoreUint16, 0x153b579b) \
170 V(::, _storeUint32, FfiStoreUint32, 0x18159582) \
171 V(::, _storeUint64, FfiStoreUint64, 0x1516def6) \
172 V(::, _storeIntPtr, FfiStoreIntPtr, 0x3a401365) \
173 V(::, _storeFloat, FfiStoreFloat, 0x23292bbb) \
174 V(::, _storeDouble, FfiStoreDouble, 0x013dc7a1) \
175 V(::, _storePointer, FfiStorePointer, 0x43c38f62) \
176 V(::, _fromAddress, FfiFromAddress, 0xab4ae553) \
177 V(Pointer, get:address, FfiGetAddress, 0x012b2b9f) \
178 V(::, reachabilityFence, ReachabilityFence, 0xad39d0a6) \
179 V(_Utf8Decoder, _scan, Utf8DecoderScan, 0x78f44c3c) \
180 V(_Future, timeout, FutureTimeout, 0x010f8ad4) \
181 V(Future, wait, FutureWait, 0x486414a9) \
182
183// List of intrinsics:
184// (class-name, function-name, intrinsification method, fingerprint).
185#define CORE_LIB_INTRINSIC_LIST(V) \
186 V(_Smi, ~, Smi_bitNegate, 0x068652b8) \
187 V(_Smi, get:bitLength, Smi_bitLength, 0xff01b0cc) \
188 V(_Smi, _bitAndFromSmi, Smi_bitAndFromSmi, 0xa483e093) \
189 V(_BigIntImpl, _lsh, Bigint_lsh, 0x772fb5fd) \
190 V(_BigIntImpl, _rsh, Bigint_rsh, 0xb52a24b8) \
191 V(_BigIntImpl, _absAdd, Bigint_absAdd, 0x90dc61a8) \
192 V(_BigIntImpl, _absSub, Bigint_absSub, 0x76887330) \
193 V(_BigIntImpl, _mulAdd, Bigint_mulAdd, 0xb2741296) \
194 V(_BigIntImpl, _sqrAdd, Bigint_sqrAdd, 0xcee0facc) \
195 V(_BigIntImpl, _estimateQuotientDigit, Bigint_estimateQuotientDigit, \
196 0x14527ed9) \
197 V(_BigIntMontgomeryReduction, _mulMod, Montgomery_mulMod, 0x08df2795) \
198 V(_Double, >, Double_greaterThan, 0xe88b6ffc) \
199 V(_Double, >=, Double_greaterEqualThan, 0x1fb70bae) \
200 V(_Double, <, Double_lessThan, 0xae875025) \
201 V(_Double, <=, Double_lessEqualThan, 0xc87a5050) \
202 V(_Double, ==, Double_equal, 0x5299f1d2) \
203 V(_Double, +, Double_add, 0x783a47d4) \
204 V(_Double, -, Double_sub, 0x493f1465) \
205 V(_Double, *, Double_mul, 0xae0df2e2) \
206 V(_Double, /, Double_div, 0xed535dde) \
207 V(_Double, get:hashCode, Double_hashCode, 0xfa2d7816) \
208 V(_Double, get:_identityHashCode, Double_identityHash, 0xcbf20cd4) \
209 V(_Double, get:isNaN, Double_getIsNaN, 0x88fdcef4) \
210 V(_Double, get:isInfinite, Double_getIsInfinite, 0x796f93b3) \
211 V(_Double, get:isNegative, Double_getIsNegative, 0x88e61872) \
212 V(_Double, _mulFromInteger, Double_mulFromInteger, 0xc5afaa28) \
213 V(_Double, .fromInteger, DoubleFromInteger, 0x9d1ad7f6) \
214 V(_GrowableList, ._withData, GrowableArray_Allocate, 0x00be5928) \
215 V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, 0x6817556e) \
216 V(_RegExp, _ExecuteMatchSticky, RegExp_ExecuteMatchSticky, 0x60e30834) \
217 V(Object, ==, ObjectEquals, 0xbc3cad49) \
218 V(Object, get:runtimeType, ObjectRuntimeType, 0x6461c691) \
219 V(Object, _haveSameRuntimeType, ObjectHaveSameRuntimeType, 0xa66bfc58) \
220 V(_StringBase, get:hashCode, String_getHashCode, 0xfa2d7835) \
221 V(_StringBase, get:_identityHashCode, String_identityHash, 0xcbf20cf3) \
222 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 0xbdfe9c92) \
223 V(_StringBase, _substringMatches, StringBaseSubstringMatches, 0xf5c3c873) \
224 V(_StringBase, [], StringBaseCharAt, 0xfa3bf7be) \
225 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 0xfa2d7835) \
226 V(_OneByteString, _substringUncheckedNative, \
227 OneByteString_substringUnchecked, 0x0d39e4a1) \
228 V(_OneByteString, ==, OneByteString_equality, 0x3399ded1) \
229 V(_TwoByteString, ==, TwoByteString_equality, 0x3399ded1) \
230 V(_Type, get:hashCode, Type_getHashCode, 0xfa2d7835) \
231 V(_Type, ==, Type_equality, 0xbc3cad0b) \
232 V(::, _getHash, Object_getHash, 0x87e0c73d) \
233 V(::, _setHash, Object_setHash, 0xcb4f51d2) \
234
235#define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \
236 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \
237 0xdb88076e) \
238 V(_IntegerImplementation, +, Integer_add, 0x9b2718c0) \
239 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, \
240 0xa1d87562) \
241 V(_IntegerImplementation, -, Integer_sub, 0x6c350eb1) \
242 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \
243 0xa93fad01) \
244 V(_IntegerImplementation, *, Integer_mul, 0x4197ce8e) \
245 V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger, \
246 0xd040918e) \
247 V(_IntegerImplementation, ~/, Integer_truncDivide, 0x79adb402) \
248 V(_IntegerImplementation, unary-, Integer_negate, 0xf07a7709) \
249 V(_IntegerImplementation, _bitAndFromInteger, Integer_bitAndFromInteger, \
250 0xcbb1b792) \
251 V(_IntegerImplementation, &, Integer_bitAnd, 0x2b385f64) \
252 V(_IntegerImplementation, _bitOrFromInteger, Integer_bitOrFromInteger, \
253 0xbd3f946a) \
254 V(_IntegerImplementation, |, Integer_bitOr, 0x19dc9b1c) \
255 V(_IntegerImplementation, _bitXorFromInteger, Integer_bitXorFromInteger, \
256 0xae7f642e) \
257 V(_IntegerImplementation, ^, Integer_bitXor, 0x139d6723) \
258 V(_IntegerImplementation, _greaterThanFromInteger, \
259 Integer_greaterThanFromInt, 0x47319226) \
260 V(_IntegerImplementation, >, Integer_greaterThan, 0xc9d374cc) \
261 V(_IntegerImplementation, ==, Integer_equal, 0xca4e7087) \
262 V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, \
263 0x4d9e5fc5) \
264 V(_IntegerImplementation, <, Integer_lessThan, 0xae875025) \
265 V(_IntegerImplementation, <=, Integer_lessEqualThan, 0xc87a5050) \
266 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 0x1fb70bae) \
267 V(_IntegerImplementation, <<, Integer_shl, 0xe8da5296) \
268 V(_IntegerImplementation, >>, Integer_sar, 0x4fb2013b) \
269 V(_Double, toInt, DoubleToInteger, 0xebc963eb) \
270
271#define MATH_LIB_INTRINSIC_LIST(V) \
272 V(::, sqrt, MathSqrt, 0x98d7cb39) \
273 V(_Random, _nextState, Random_nextState, 0x3077323d) \
274
275#define GRAPH_MATH_LIB_INTRINSIC_LIST(V) \
276 V(::, sin, MathSin, 0x859e6680) \
277 V(::, cos, MathCos, 0xd2dae38e) \
278 V(::, tan, MathTan, 0xa23c1122) \
279 V(::, asin, MathAsin, 0x1cdb139f) \
280 V(::, acos, MathAcos, 0x830d84ba) \
281 V(::, atan, MathAtan, 0x35d5ecd7) \
282 V(::, atan2, MathAtan2, 0xb4e03ae8) \
283
284#define TYPED_DATA_LIB_INTRINSIC_LIST(V) \
285 V(Int8List, ., TypedData_Int8Array_factory, 0x80ad83c2) \
286 V(Uint8List, ., TypedData_Uint8Array_factory, 0x252e6749) \
287 V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 0x1ed931cf) \
288 V(Int16List, ., TypedData_Int16Array_factory, 0x7ea862ed) \
289 V(Uint16List, ., TypedData_Uint16Array_factory, 0x2764f724) \
290 V(Int32List, ., TypedData_Int32Array_factory, 0x54a5645a) \
291 V(Uint32List, ., TypedData_Uint32Array_factory, 0xac4dea85) \
292 V(Int64List, ., TypedData_Int64Array_factory, 0x02d4c729) \
293 V(Uint64List, ., TypedData_Uint64Array_factory, 0x08669732) \
294 V(Float32List, ., TypedData_Float32Array_factory, 0x8b65b9b8) \
295 V(Float64List, ., TypedData_Float64Array_factory, 0x09ede80b) \
296 V(Float32x4List, ., TypedData_Float32x4Array_factory, 0xb2a9e6c2) \
297 V(Int32x4List, ., TypedData_Int32x4Array_factory, 0xa5292128) \
298 V(Float64x2List, ., TypedData_Float64x2Array_factory, 0x20eafb24) \
299
300#define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \
301 V(_Int8List, [], Int8ArrayGetIndexed, 0xd61e79bd) \
302 V(_Int8List, []=, Int8ArraySetIndexed, 0x6e0b2e72) \
303 V(_Uint8List, [], Uint8ArrayGetIndexed, 0xe1a67dfd) \
304 V(_Uint8List, []=, Uint8ArraySetIndexed, 0x89499a2e) \
305 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 0xe1a67dfd) \
306 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 0x89499a2e) \
307 V(_Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 0xe1a67dfd) \
308 V(_Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 0x5facb08e) \
309 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
310 0xe1a67dfd) \
311 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \
312 0x5facb08e) \
313 V(_Int16List, [], Int16ArrayGetIndexed, 0x1726ae5d) \
314 V(_Int16List, []=, Int16ArraySetIndexed, 0xde0f4d87) \
315 V(_Uint16List, [], Uint16ArrayGetIndexed, 0x26c2525d) \
316 V(_Uint16List, []=, Uint16ArraySetIndexed, 0x69ae5b30) \
317 V(_Int32List, [], Int32ArrayGetIndexed, 0x407e58de) \
318 V(_Int32List, []=, Int32ArraySetIndexed, 0x61194108) \
319 V(_Uint32List, [], Uint32ArrayGetIndexed, 0xf078bf3e) \
320 V(_Uint32List, []=, Uint32ArraySetIndexed, 0x70f53c88) \
321 V(_Int64List, [], Int64ArrayGetIndexed, 0x7c21b69e) \
322 V(_Int64List, []=, Int64ArraySetIndexed, 0xcaa7c6ca) \
323 V(_Uint64List, [], Uint64ArrayGetIndexed, 0x0a7aa11e) \
324 V(_Uint64List, []=, Uint64ArraySetIndexed, 0xd1374e92) \
325 V(_Float64List, [], Float64ArrayGetIndexed, 0x9e4b2403) \
326 V(_Float64List, []=, Float64ArraySetIndexed, 0x0a43d538) \
327 V(_Float32List, [], Float32ArrayGetIndexed, 0xbdf87ee3) \
328 V(_Float32List, []=, Float32ArraySetIndexed, 0x2e3e1a4a) \
329 V(_Float32x4List, [], Float32x4ArrayGetIndexed, 0xa90520bc) \
330 V(_Float32x4List, []=, Float32x4ArraySetIndexed, 0xb9c7400f) \
331 V(_Int32x4List, [], Int32x4ArrayGetIndexed, 0xfbcc0e74) \
332 V(_Int32x4List, []=, Int32x4ArraySetIndexed, 0x79152aaf) \
333 V(_Float64x2List, [], Float64x2ArrayGetIndexed, 0xd90a31e6) \
334 V(_Float64x2List, []=, Float64x2ArraySetIndexed, 0x4fd191fb) \
335 V(_TypedList, get:length, TypedListLength, 0xdc9d90aa) \
336 V(_TypedListView, get:length, TypedListViewLength, 0xdc9d90aa) \
337 V(_ByteDataView, get:length, ByteDataViewLength, 0xdc9d90aa) \
338 V(_Float32x4, get:x, Float32x4ShuffleX, 0xd83e5791) \
339 V(_Float32x4, get:y, Float32x4ShuffleY, 0xc5cfb2b4) \
340 V(_Float32x4, get:z, Float32x4ShuffleZ, 0xfb9b1e4a) \
341 V(_Float32x4, get:w, Float32x4ShuffleW, 0xdddb62cc) \
342 V(_Float32x4, *, Float32x4Mul, 0x0be25e24) \
343 V(_Float32x4, /, Float32x4Div, 0xe73114a1) \
344 V(_Float32x4, -, Float32x4Sub, 0x03c44de7) \
345 V(_Float32x4, +, Float32x4Add, 0xde8b8376) \
346 V(_Float64x2, *, Float64x2Mul, 0x6c670bc5) \
347 V(_Float64x2, /, Float64x2Div, 0x47b5c261) \
348 V(_Float64x2, -, Float64x2Sub, 0x6448fb88) \
349 V(_Float64x2, +, Float64x2Add, 0x3f103117) \
350
351#define GRAPH_CORE_INTRINSICS_LIST(V) \
352 V(_List, get:length, ObjectArrayLength, 0xdc9d90aa) \
353 V(_List, [], ObjectArrayGetIndexed, 0xd159dece) \
354 V(_List, _setIndexed, ObjectArraySetIndexedUnchecked, 0xf5780f43) \
355 V(_ImmutableList, get:length, ImmutableArrayLength, 0xdc9d90aa) \
356 V(_ImmutableList, [], ImmutableArrayGetIndexed, 0xd159dece) \
357 V(_GrowableList, get:length, GrowableArrayLength, 0xdc9d90aa) \
358 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 0x01ec3c31) \
359 V(_GrowableList, _setData, GrowableArraySetData, 0x8ecf0a40) \
360 V(_GrowableList, _setLength, GrowableArraySetLength, 0x63da779b) \
361 V(_GrowableList, [], GrowableArrayGetIndexed, 0xd159dece) \
362 V(_GrowableList, _setIndexed, GrowableArraySetIndexedUnchecked, 0x012e9e24) \
363 V(_StringBase, get:length, StringBaseLength, 0xdc9d90aa) \
364 V(_OneByteString, codeUnitAt, OneByteStringCodeUnitAt, 0xc4602c13) \
365 V(_TwoByteString, codeUnitAt, TwoByteStringCodeUnitAt, 0xc4602c13) \
366 V(_ExternalOneByteString, codeUnitAt, ExternalOneByteStringCodeUnitAt, \
367 0xc4602c13) \
368 V(_ExternalTwoByteString, codeUnitAt, ExternalTwoByteStringCodeUnitAt, \
369 0xc4602c13) \
370 V(_Double, unary-, DoubleFlipSignBit, 0xdb229448) \
371 V(_Double, truncateToDouble, DoubleTruncate, 0x00e6f81b) \
372 V(_Double, roundToDouble, DoubleRound, 0xf45c3bc2) \
373 V(_Double, floorToDouble, DoubleFloor, 0xf2c73d0a) \
374 V(_Double, ceilToDouble, DoubleCeil, 0xfd2e409b) \
375 V(_Double, _modulo, DoubleMod, 0x5673c731)
376
377#define GRAPH_INTRINSICS_LIST(V) \
378 GRAPH_CORE_INTRINSICS_LIST(V) \
379 GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \
380 GRAPH_MATH_LIB_INTRINSIC_LIST(V) \
381
382#define DEVELOPER_LIB_INTRINSIC_LIST(V) \
383 V(_UserTag, makeCurrent, UserTag_makeCurrent, 0x1eb344b3) \
384 V(::, _getDefaultTag, UserTag_defaultTag, 0x2ef2e42c) \
385 V(::, _getCurrentTag, Profiler_getCurrentTag, 0x33c3ec15) \
386 V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, 0x7dfcaa18) \
387
388#define ASYNC_LIB_INTRINSIC_LIST(V) \
389 V(::, _clearAsyncThreadStackTrace, ClearAsyncThreadStackTrace, 0x20fecac6) \
390 V(::, _setAsyncThreadStackTrace, SetAsyncThreadStackTrace, 0x39346953) \
391
392#define INTERNAL_LIB_INTRINSIC_LIST(V) \
393 V(::, allocateOneByteString, AllocateOneByteString, 0xc86bebfa) \
394 V(::, allocateTwoByteString, AllocateTwoByteString, 0xd0312797) \
395 V(::, writeIntoOneByteString, WriteIntoOneByteString, 0xe0d28307) \
396 V(::, writeIntoTwoByteString, WriteIntoTwoByteString, 0xd82789d0) \
397
398#define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \
399 ASYNC_LIB_INTRINSIC_LIST(V) \
400 CORE_LIB_INTRINSIC_LIST(V) \
401 DEVELOPER_LIB_INTRINSIC_LIST(V) \
402 INTERNAL_LIB_INTRINSIC_LIST(V) \
403 MATH_LIB_INTRINSIC_LIST(V) \
404 TYPED_DATA_LIB_INTRINSIC_LIST(V) \
405
406#define ALL_INTRINSICS_LIST(V) \
407 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \
408 CORE_INTEGER_LIB_INTRINSIC_LIST(V)
409
410#define RECOGNIZED_LIST(V) \
411 OTHER_RECOGNIZED_LIST(V) \
412 ALL_INTRINSICS_LIST(V) \
413 GRAPH_INTRINSICS_LIST(V)
414
415// A list of core functions that internally dispatch based on received id.
416#define POLYMORPHIC_TARGET_LIST(V) \
417 V(_StringBase, [], StringBaseCharAt, 0xfa3bf7be) \
418 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0xc28aff37) \
419 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0xc3e7212d) \
420 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0xdaa7b952) \
421 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0xdc2919bc) \
422 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0xc57f53af) \
423 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0xc5c49520) \
424 V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0xa2c7e6a4) \
425 V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0xd8c29ffe) \
426 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xaf15f28a) \
427 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0xbe4987b7) \
428 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0x76c82c28) \
429 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0x29abed4e) \
430 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0xfc13ad87) \
431 V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 0xc9e4212d) \
432 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0xd570aa0c) \
433 V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 0xe8acb234) \
434 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0xd8651525) \
435 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0xd3f10d97) \
436 V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0xe357b95f) \
437 V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0xf4d19bea) \
438 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0xd6272645) \
439 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0xca4af137) \
440 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x71767f7f) \
441 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xf0483280) \
442 V(Object, get:runtimeType, ObjectRuntimeType, 0x6461c691)
443
444// List of recognized list factories:
445// (factory-name-symbol, class-name-string, constructor-name-string,
446// result-cid, fingerprint).
447#define RECOGNIZED_LIST_FACTORY_LIST(V) \
448 V(_ListFactory, _List, ., kArrayCid, 0x6de199a1) \
449 V(_ListFilledFactory, _List, .filled, kArrayCid, 0x871c7eb6) \
450 V(_ListGenerateFactory, _List, .generate, kArrayCid, 0x045b9063) \
451 V(_GrowableListFactory, _GrowableList, ., kGrowableObjectArrayCid, \
452 0xdc1f9e09) \
453 V(_GrowableListFilledFactory, _GrowableList, .filled, \
454 kGrowableObjectArrayCid, 0xbc894d36) \
455 V(_GrowableListGenerateFactory, _GrowableList, .generate, \
456 kGrowableObjectArrayCid, 0xf6fbbee3) \
457 V(_GrowableListWithData, _GrowableList, ._withData, kGrowableObjectArrayCid, \
458 0x00be5928) \
459 V(_Int8ArrayFactory, Int8List, ., kTypedDataInt8ArrayCid, 0x80ad83c2) \
460 V(_Uint8ArrayFactory, Uint8List, ., kTypedDataUint8ArrayCid, 0x252e6749) \
461 V(_Uint8ClampedArrayFactory, Uint8ClampedList, ., \
462 kTypedDataUint8ClampedArrayCid, 0x1ed931cf) \
463 V(_Int16ArrayFactory, Int16List, ., kTypedDataInt16ArrayCid, 0x7ea862ed) \
464 V(_Uint16ArrayFactory, Uint16List, ., kTypedDataUint16ArrayCid, 0x2764f724) \
465 V(_Int32ArrayFactory, Int32List, ., kTypedDataInt32ArrayCid, 0x54a5645a) \
466 V(_Uint32ArrayFactory, Uint32List, ., kTypedDataUint32ArrayCid, 0xac4dea85) \
467 V(_Int64ArrayFactory, Int64List, ., kTypedDataInt64ArrayCid, 0x02d4c729) \
468 V(_Uint64ArrayFactory, Uint64List, ., kTypedDataUint64ArrayCid, 0x08669732) \
469 V(_Float64ArrayFactory, Float64List, ., kTypedDataFloat64ArrayCid, \
470 0x09ede80b) \
471 V(_Float32ArrayFactory, Float32List, ., kTypedDataFloat32ArrayCid, \
472 0x8b65b9b8) \
473 V(_Float32x4ArrayFactory, Float32x4List, ., kTypedDataFloat32x4ArrayCid, \
474 0xb2a9e6c2)
475
476// clang-format on
477
478} // namespace dart
479
480#endif // RUNTIME_VM_COMPILER_RECOGNIZED_METHODS_LIST_H_
481