1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=8 sts=2 et sw=2 tw=80:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef jit_InlinableNatives_h
8 #define jit_InlinableNatives_h
10 #include <stdint.h> // For uint16_t
12 #ifdef FUZZING_JS_FUZZILLI
13 # define INLINABLE_NATIVE_FUZZILLI_LIST(_) _(FuzzilliHash)
15 # define INLINABLE_NATIVE_FUZZILLI_LIST(_)
18 #define INLINABLE_NATIVE_LIST(_) \
27 _(AtomicsCompareExchange) \
36 _(AtomicsIsLockFree) \
46 _(DataViewGetUint16) \
48 _(DataViewGetUint32) \
49 _(DataViewGetFloat32) \
50 _(DataViewGetFloat64) \
51 _(DataViewGetBigInt64) \
52 _(DataViewGetBigUint64) \
56 _(DataViewSetUint16) \
58 _(DataViewSetUint32) \
59 _(DataViewSetFloat32) \
60 _(DataViewSetFloat64) \
61 _(DataViewSetBigInt64) \
62 _(DataViewSetBigUint64) \
66 _(IntlGuardToCollator) \
67 _(IntlGuardToDateTimeFormat) \
68 _(IntlGuardToDisplayNames) \
69 _(IntlGuardToListFormat) \
70 _(IntlGuardToNumberFormat) \
71 _(IntlGuardToPluralRules) \
72 _(IntlGuardToRelativeTimeFormat) \
73 _(IntlGuardToSegmenter) \
74 _(IntlGuardToSegments) \
75 _(IntlGuardToSegmentIterator) \
120 _(ReflectGetPrototypeOf) \
124 _(RegExpSearcherLastLimit) \
125 _(RegExpHasCaptureGroups) \
127 _(IsPossiblyWrappedRegExpObject) \
128 _(RegExpPrototypeOptimizable) \
129 _(RegExpInstanceOptimizable) \
130 _(GetFirstDollarIndex) \
138 _(StringCharCodeAt) \
139 _(StringCodePointAt) \
140 _(StringFromCharCode) \
141 _(StringFromCodePoint) \
146 _(StringLastIndexOf) \
147 _(StringStartsWith) \
149 _(StringToLowerCase) \
150 _(StringToUpperCase) \
155 _(IntrinsicStringReplaceString) \
156 _(IntrinsicStringSplitString) \
161 _(ObjectIsPrototypeOf) \
166 _(TestAssertFloat32) \
167 _(TestAssertRecoveredOnBailout) \
169 _(IntrinsicUnsafeSetReservedSlot) \
170 _(IntrinsicUnsafeGetReservedSlot) \
171 _(IntrinsicUnsafeGetObjectFromReservedSlot) \
172 _(IntrinsicUnsafeGetInt32FromReservedSlot) \
173 _(IntrinsicUnsafeGetStringFromReservedSlot) \
175 _(IntrinsicIsCallable) \
176 _(IntrinsicIsConstructor) \
177 _(IntrinsicToObject) \
178 _(IntrinsicIsObject) \
179 _(IntrinsicIsCrossRealmArrayConstructor) \
180 _(IntrinsicToInteger) \
181 _(IntrinsicToLength) \
182 _(IntrinsicIsConstructing) \
183 _(IntrinsicSubstringKernel) \
184 _(IntrinsicObjectHasPrototype) \
185 _(IntrinsicIsPackedArray) \
187 _(IntrinsicIsSuspendedGenerator) \
189 _(IntrinsicGuardToArrayIterator) \
190 _(IntrinsicGuardToMapIterator) \
191 _(IntrinsicGuardToSetIterator) \
192 _(IntrinsicGuardToStringIterator) \
193 _(IntrinsicGuardToRegExpStringIterator) \
194 _(IntrinsicGuardToWrapForValidIterator) \
195 _(IntrinsicGuardToIteratorHelper) \
196 _(IntrinsicGuardToAsyncIteratorHelper) \
198 _(IntrinsicGuardToMapObject) \
199 _(IntrinsicGetNextMapEntryForIterator) \
201 _(IntrinsicGuardToSetObject) \
202 _(IntrinsicGetNextSetEntryForIterator) \
204 _(IntrinsicNewArrayIterator) \
205 _(IntrinsicNewStringIterator) \
206 _(IntrinsicNewRegExpStringIterator) \
207 _(IntrinsicArrayIteratorPrototypeOptimizable) \
209 _(IntrinsicGuardToArrayBuffer) \
210 _(IntrinsicArrayBufferByteLength) \
211 _(IntrinsicPossiblyWrappedArrayBufferByteLength) \
213 _(IntrinsicGuardToSharedArrayBuffer) \
215 _(TypedArrayConstructor) \
216 _(IntrinsicIsTypedArrayConstructor) \
217 _(IntrinsicIsTypedArray) \
218 _(IntrinsicIsPossiblyWrappedTypedArray) \
219 _(IntrinsicTypedArrayLength) \
220 _(IntrinsicTypedArrayLengthZeroOnOutOfBounds) \
221 _(IntrinsicPossiblyWrappedTypedArrayLength) \
222 _(IntrinsicRegExpBuiltinExec) \
223 _(IntrinsicRegExpBuiltinExecForTest) \
224 _(IntrinsicRegExpExec) \
225 _(IntrinsicRegExpExecForTest) \
226 _(IntrinsicTypedArrayByteOffset) \
227 _(IntrinsicTypedArrayElementSize) \
229 INLINABLE_NATIVE_FUZZILLI_LIST(_)
237 enum class InlinableNative
: uint16_t {
238 #define ADD_NATIVE(native) native,
239 INLINABLE_NATIVE_LIST(ADD_NATIVE
)
244 #define ADD_NATIVE(native) extern const JSJitInfo JitInfo_##native;
245 INLINABLE_NATIVE_LIST(ADD_NATIVE
)
248 const JSClass
* InlinableNativeGuardToClass(InlinableNative native
);
250 bool CanInlineNativeCrossRealm(InlinableNative native
);
255 #endif /* jit_InlinableNatives_h */