| 1 | // Copyright (c) 2012, 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_BOOTSTRAP_NATIVES_H_ |
| 6 | #define RUNTIME_VM_BOOTSTRAP_NATIVES_H_ |
| 7 | |
| 8 | #include "vm/native_entry.h" |
| 9 | |
| 10 | // bootstrap dart natives used in the core dart library. |
| 11 | |
| 12 | namespace dart { |
| 13 | |
| 14 | // List of bootstrap native entry points used in the core dart library. |
| 15 | // V(function_name, argument_count) |
| 16 | #define BOOTSTRAP_NATIVE_LIST(V) \ |
| 17 | V(AsyncStarMoveNext_debuggerStepCheck, 1) \ |
| 18 | V(DartAsync_fatal, 1) \ |
| 19 | V(Object_equals, 2) \ |
| 20 | V(Object_getHash, 1) \ |
| 21 | V(Object_setHash, 2) \ |
| 22 | V(Object_toString, 1) \ |
| 23 | V(Object_runtimeType, 1) \ |
| 24 | V(Object_haveSameRuntimeType, 2) \ |
| 25 | V(Object_instanceOf, 4) \ |
| 26 | V(Object_simpleInstanceOf, 2) \ |
| 27 | V(Function_apply, 2) \ |
| 28 | V(Closure_equals, 2) \ |
| 29 | V(Closure_computeHash, 1) \ |
| 30 | V(Closure_clone, 1) \ |
| 31 | V(AbstractType_toString, 1) \ |
| 32 | V(Type_getHashCode, 1) \ |
| 33 | V(Type_equality, 2) \ |
| 34 | V(LibraryPrefix_isLoaded, 1) \ |
| 35 | V(LibraryPrefix_setLoaded, 1) \ |
| 36 | V(LibraryPrefix_loadingUnit, 1) \ |
| 37 | V(LibraryPrefix_issueLoad, 1) \ |
| 38 | V(Identical_comparison, 2) \ |
| 39 | V(Integer_bitAndFromInteger, 2) \ |
| 40 | V(Integer_bitOrFromInteger, 2) \ |
| 41 | V(Integer_bitXorFromInteger, 2) \ |
| 42 | V(Integer_addFromInteger, 2) \ |
| 43 | V(Integer_subFromInteger, 2) \ |
| 44 | V(Integer_mulFromInteger, 2) \ |
| 45 | V(Integer_truncDivFromInteger, 2) \ |
| 46 | V(Integer_moduloFromInteger, 2) \ |
| 47 | V(Integer_greaterThanFromInteger, 2) \ |
| 48 | V(Integer_equalToInteger, 2) \ |
| 49 | V(Integer_fromEnvironment, 3) \ |
| 50 | V(Integer_parse, 1) \ |
| 51 | V(Integer_shlFromInteger, 2) \ |
| 52 | V(Integer_shrFromInteger, 2) \ |
| 53 | V(Bool_fromEnvironment, 3) \ |
| 54 | V(Bool_hasEnvironment, 2) \ |
| 55 | V(CapabilityImpl_factory, 1) \ |
| 56 | V(CapabilityImpl_equals, 2) \ |
| 57 | V(CapabilityImpl_get_hashcode, 1) \ |
| 58 | V(RawReceivePortImpl_factory, 1) \ |
| 59 | V(RawReceivePortImpl_get_id, 1) \ |
| 60 | V(RawReceivePortImpl_get_sendport, 1) \ |
| 61 | V(RawReceivePortImpl_closeInternal, 1) \ |
| 62 | V(SendPortImpl_get_id, 1) \ |
| 63 | V(SendPortImpl_get_hashcode, 1) \ |
| 64 | V(SendPortImpl_sendInternal_, 2) \ |
| 65 | V(SendPortImpl_sendAndExitInternal_, 2) \ |
| 66 | V(Smi_bitAndFromSmi, 2) \ |
| 67 | V(Smi_bitNegate, 1) \ |
| 68 | V(Smi_bitLength, 1) \ |
| 69 | V(Mint_bitNegate, 1) \ |
| 70 | V(Mint_bitLength, 1) \ |
| 71 | V(Developer_debugger, 2) \ |
| 72 | V(Developer_getIsolateIDFromSendPort, 1) \ |
| 73 | V(Developer_getServerInfo, 1) \ |
| 74 | V(Developer_getServiceMajorVersion, 0) \ |
| 75 | V(Developer_getServiceMinorVersion, 0) \ |
| 76 | V(Developer_inspect, 1) \ |
| 77 | V(Developer_lookupExtension, 1) \ |
| 78 | V(Developer_registerExtension, 2) \ |
| 79 | V(Developer_log, 8) \ |
| 80 | V(Developer_postEvent, 2) \ |
| 81 | V(Developer_webServerControl, 2) \ |
| 82 | V(Double_hashCode, 1) \ |
| 83 | V(Double_getIsNegative, 1) \ |
| 84 | V(Double_getIsInfinite, 1) \ |
| 85 | V(Double_getIsNaN, 1) \ |
| 86 | V(Double_add, 2) \ |
| 87 | V(Double_sub, 2) \ |
| 88 | V(Double_mul, 2) \ |
| 89 | V(Double_div, 2) \ |
| 90 | V(Double_trunc_div, 2) \ |
| 91 | V(Double_remainder, 2) \ |
| 92 | V(Double_modulo, 2) \ |
| 93 | V(Double_greaterThanFromInteger, 2) \ |
| 94 | V(Double_equalToInteger, 2) \ |
| 95 | V(Double_greaterThan, 2) \ |
| 96 | V(Double_equal, 2) \ |
| 97 | V(Double_doubleFromInteger, 2) \ |
| 98 | V(Double_round, 1) \ |
| 99 | V(Double_floor, 1) \ |
| 100 | V(Double_ceil, 1) \ |
| 101 | V(Double_truncate, 1) \ |
| 102 | V(Double_toInt, 1) \ |
| 103 | V(Double_parse, 3) \ |
| 104 | V(Double_toString, 1) \ |
| 105 | V(Double_toStringAsFixed, 2) \ |
| 106 | V(Double_toStringAsExponential, 2) \ |
| 107 | V(Double_toStringAsPrecision, 2) \ |
| 108 | V(Double_flipSignBit, 1) \ |
| 109 | V(RegExp_factory, 6) \ |
| 110 | V(RegExp_getPattern, 1) \ |
| 111 | V(RegExp_getIsMultiLine, 1) \ |
| 112 | V(RegExp_getIsCaseSensitive, 1) \ |
| 113 | V(RegExp_getIsUnicode, 1) \ |
| 114 | V(RegExp_getIsDotAll, 1) \ |
| 115 | V(RegExp_getGroupCount, 1) \ |
| 116 | V(RegExp_getGroupNameMap, 1) \ |
| 117 | V(RegExp_ExecuteMatch, 3) \ |
| 118 | V(RegExp_ExecuteMatchSticky, 3) \ |
| 119 | V(List_new, 2) \ |
| 120 | V(List_allocate, 2) \ |
| 121 | V(List_getIndexed, 2) \ |
| 122 | V(List_setIndexed, 3) \ |
| 123 | V(List_getLength, 1) \ |
| 124 | V(List_slice, 4) \ |
| 125 | V(ImmutableList_from, 4) \ |
| 126 | V(StringBase_createFromCodePoints, 3) \ |
| 127 | V(StringBase_substringUnchecked, 3) \ |
| 128 | V(StringBase_joinReplaceAllResult, 4) \ |
| 129 | V(StringBuffer_createStringFromUint16Array, 3) \ |
| 130 | V(OneByteString_substringUnchecked, 3) \ |
| 131 | V(OneByteString_splitWithCharCode, 2) \ |
| 132 | V(OneByteString_allocateFromOneByteList, 3) \ |
| 133 | V(TwoByteString_allocateFromTwoByteList, 3) \ |
| 134 | V(String_getHashCode, 1) \ |
| 135 | V(String_getLength, 1) \ |
| 136 | V(String_charAt, 2) \ |
| 137 | V(String_codeUnitAt, 2) \ |
| 138 | V(String_concat, 2) \ |
| 139 | V(String_fromEnvironment, 3) \ |
| 140 | V(String_toLowerCase, 1) \ |
| 141 | V(String_toUpperCase, 1) \ |
| 142 | V(String_concatRange, 3) \ |
| 143 | V(Math_sqrt, 1) \ |
| 144 | V(Math_sin, 1) \ |
| 145 | V(Math_cos, 1) \ |
| 146 | V(Math_tan, 1) \ |
| 147 | V(Math_asin, 1) \ |
| 148 | V(Math_acos, 1) \ |
| 149 | V(Math_atan, 1) \ |
| 150 | V(Math_atan2, 2) \ |
| 151 | V(Math_exp, 1) \ |
| 152 | V(Math_log, 1) \ |
| 153 | V(Math_doublePow, 2) \ |
| 154 | V(Random_nextState, 1) \ |
| 155 | V(Random_setupSeed, 1) \ |
| 156 | V(Random_initialSeed, 0) \ |
| 157 | V(SecureRandom_getBytes, 1) \ |
| 158 | V(DateTime_currentTimeMicros, 0) \ |
| 159 | V(DateTime_timeZoneName, 1) \ |
| 160 | V(DateTime_timeZoneOffsetInSeconds, 1) \ |
| 161 | V(DateTime_localTimeZoneAdjustmentInSeconds, 0) \ |
| 162 | V(AssertionError_throwNew, 3) \ |
| 163 | V(AssertionError_throwNewSource, 4) \ |
| 164 | V(Async_rethrow, 2) \ |
| 165 | V(StackTrace_asyncStackTraceHelper, 1) \ |
| 166 | V(StackTrace_clearAsyncThreadStackTrace, 0) \ |
| 167 | V(StackTrace_setAsyncThreadStackTrace, 1) \ |
| 168 | V(StackTrace_current, 0) \ |
| 169 | V(TypeError_throwNew, 4) \ |
| 170 | V(FallThroughError_throwNew, 1) \ |
| 171 | V(AbstractClassInstantiationError_throwNew, 2) \ |
| 172 | V(Stopwatch_now, 0) \ |
| 173 | V(Stopwatch_frequency, 0) \ |
| 174 | V(Timeline_getNextAsyncId, 0) \ |
| 175 | V(Timeline_getTraceClock, 0) \ |
| 176 | V(Timeline_isDartStreamEnabled, 0) \ |
| 177 | V(Timeline_reportFlowEvent, 5) \ |
| 178 | V(Timeline_reportInstantEvent, 3) \ |
| 179 | V(Timeline_reportTaskEvent, 5) \ |
| 180 | V(TypedData_Int8Array_new, 2) \ |
| 181 | V(TypedData_Uint8Array_new, 2) \ |
| 182 | V(TypedData_Uint8ClampedArray_new, 2) \ |
| 183 | V(TypedData_Int16Array_new, 2) \ |
| 184 | V(TypedData_Uint16Array_new, 2) \ |
| 185 | V(TypedData_Int32Array_new, 2) \ |
| 186 | V(TypedData_Uint32Array_new, 2) \ |
| 187 | V(TypedData_Int64Array_new, 2) \ |
| 188 | V(TypedData_Uint64Array_new, 2) \ |
| 189 | V(TypedData_Float32Array_new, 2) \ |
| 190 | V(TypedData_Float64Array_new, 2) \ |
| 191 | V(TypedData_Float32x4Array_new, 2) \ |
| 192 | V(TypedData_Int32x4Array_new, 2) \ |
| 193 | V(TypedData_Float64x2Array_new, 2) \ |
| 194 | V(TypedData_length, 1) \ |
| 195 | V(TypedData_setRange, 7) \ |
| 196 | V(TypedData_GetInt8, 2) \ |
| 197 | V(TypedData_SetInt8, 3) \ |
| 198 | V(TypedData_GetUint8, 2) \ |
| 199 | V(TypedData_SetUint8, 3) \ |
| 200 | V(TypedData_GetInt16, 2) \ |
| 201 | V(TypedData_SetInt16, 3) \ |
| 202 | V(TypedData_GetUint16, 2) \ |
| 203 | V(TypedData_SetUint16, 3) \ |
| 204 | V(TypedData_GetInt32, 2) \ |
| 205 | V(TypedData_SetInt32, 3) \ |
| 206 | V(TypedData_GetUint32, 2) \ |
| 207 | V(TypedData_SetUint32, 3) \ |
| 208 | V(TypedData_GetInt64, 2) \ |
| 209 | V(TypedData_SetInt64, 3) \ |
| 210 | V(TypedData_GetUint64, 2) \ |
| 211 | V(TypedData_SetUint64, 3) \ |
| 212 | V(TypedData_GetFloat32, 2) \ |
| 213 | V(TypedData_SetFloat32, 3) \ |
| 214 | V(TypedData_GetFloat64, 2) \ |
| 215 | V(TypedData_SetFloat64, 3) \ |
| 216 | V(TypedData_GetFloat32x4, 2) \ |
| 217 | V(TypedData_SetFloat32x4, 3) \ |
| 218 | V(TypedData_GetInt32x4, 2) \ |
| 219 | V(TypedData_SetInt32x4, 3) \ |
| 220 | V(TypedData_GetFloat64x2, 2) \ |
| 221 | V(TypedData_SetFloat64x2, 3) \ |
| 222 | V(TypedDataView_ByteDataView_new, 4) \ |
| 223 | V(TypedDataView_Int8ArrayView_new, 4) \ |
| 224 | V(TypedDataView_Uint8ArrayView_new, 4) \ |
| 225 | V(TypedDataView_Uint8ClampedArrayView_new, 4) \ |
| 226 | V(TypedDataView_Int16ArrayView_new, 4) \ |
| 227 | V(TypedDataView_Uint16ArrayView_new, 4) \ |
| 228 | V(TypedDataView_Int32ArrayView_new, 4) \ |
| 229 | V(TypedDataView_Uint32ArrayView_new, 4) \ |
| 230 | V(TypedDataView_Int64ArrayView_new, 4) \ |
| 231 | V(TypedDataView_Uint64ArrayView_new, 4) \ |
| 232 | V(TypedDataView_Float32ArrayView_new, 4) \ |
| 233 | V(TypedDataView_Float64ArrayView_new, 4) \ |
| 234 | V(TypedDataView_Float32x4ArrayView_new, 4) \ |
| 235 | V(TypedDataView_Int32x4ArrayView_new, 4) \ |
| 236 | V(TypedDataView_Float64x2ArrayView_new, 4) \ |
| 237 | V(TypedDataView_length, 1) \ |
| 238 | V(TypedDataView_offsetInBytes, 1) \ |
| 239 | V(TypedDataView_typedData, 1) \ |
| 240 | V(Float32x4_fromDoubles, 4) \ |
| 241 | V(Float32x4_splat, 1) \ |
| 242 | V(Float32x4_fromInt32x4Bits, 2) \ |
| 243 | V(Float32x4_fromFloat64x2, 2) \ |
| 244 | V(Float32x4_zero, 1) \ |
| 245 | V(Float32x4_add, 2) \ |
| 246 | V(Float32x4_negate, 1) \ |
| 247 | V(Float32x4_sub, 2) \ |
| 248 | V(Float32x4_mul, 2) \ |
| 249 | V(Float32x4_div, 2) \ |
| 250 | V(Float32x4_cmplt, 2) \ |
| 251 | V(Float32x4_cmplte, 2) \ |
| 252 | V(Float32x4_cmpgt, 2) \ |
| 253 | V(Float32x4_cmpgte, 2) \ |
| 254 | V(Float32x4_cmpequal, 2) \ |
| 255 | V(Float32x4_cmpnequal, 2) \ |
| 256 | V(Float32x4_scale, 2) \ |
| 257 | V(Float32x4_abs, 1) \ |
| 258 | V(Float32x4_clamp, 3) \ |
| 259 | V(Float32x4_getX, 1) \ |
| 260 | V(Float32x4_getY, 1) \ |
| 261 | V(Float32x4_getZ, 1) \ |
| 262 | V(Float32x4_getW, 1) \ |
| 263 | V(Float32x4_getSignMask, 1) \ |
| 264 | V(Float32x4_shuffle, 2) \ |
| 265 | V(Float32x4_shuffleMix, 3) \ |
| 266 | V(Float32x4_setX, 2) \ |
| 267 | V(Float32x4_setY, 2) \ |
| 268 | V(Float32x4_setZ, 2) \ |
| 269 | V(Float32x4_setW, 2) \ |
| 270 | V(Float32x4_min, 2) \ |
| 271 | V(Float32x4_max, 2) \ |
| 272 | V(Float32x4_sqrt, 1) \ |
| 273 | V(Float32x4_reciprocal, 1) \ |
| 274 | V(Float32x4_reciprocalSqrt, 1) \ |
| 275 | V(Float64x2_fromDoubles, 2) \ |
| 276 | V(Float64x2_splat, 1) \ |
| 277 | V(Float64x2_zero, 1) \ |
| 278 | V(Float64x2_fromFloat32x4, 2) \ |
| 279 | V(Float64x2_add, 2) \ |
| 280 | V(Float64x2_negate, 1) \ |
| 281 | V(Float64x2_sub, 2) \ |
| 282 | V(Float64x2_mul, 2) \ |
| 283 | V(Float64x2_div, 2) \ |
| 284 | V(Float64x2_scale, 2) \ |
| 285 | V(Float64x2_abs, 1) \ |
| 286 | V(Float64x2_clamp, 3) \ |
| 287 | V(Float64x2_getX, 1) \ |
| 288 | V(Float64x2_getY, 1) \ |
| 289 | V(Float64x2_getSignMask, 1) \ |
| 290 | V(Float64x2_setX, 2) \ |
| 291 | V(Float64x2_setY, 2) \ |
| 292 | V(Float64x2_min, 2) \ |
| 293 | V(Float64x2_max, 2) \ |
| 294 | V(Float64x2_sqrt, 1) \ |
| 295 | V(Int32x4_fromInts, 4) \ |
| 296 | V(Int32x4_fromBools, 4) \ |
| 297 | V(Int32x4_fromFloat32x4Bits, 2) \ |
| 298 | V(Int32x4_or, 2) \ |
| 299 | V(Int32x4_and, 2) \ |
| 300 | V(Int32x4_xor, 2) \ |
| 301 | V(Int32x4_add, 2) \ |
| 302 | V(Int32x4_sub, 2) \ |
| 303 | V(Int32x4_getX, 1) \ |
| 304 | V(Int32x4_getY, 1) \ |
| 305 | V(Int32x4_getZ, 1) \ |
| 306 | V(Int32x4_getW, 1) \ |
| 307 | V(Int32x4_setX, 2) \ |
| 308 | V(Int32x4_setY, 2) \ |
| 309 | V(Int32x4_setZ, 2) \ |
| 310 | V(Int32x4_setW, 2) \ |
| 311 | V(Int32x4_getSignMask, 1) \ |
| 312 | V(Int32x4_shuffle, 2) \ |
| 313 | V(Int32x4_shuffleMix, 3) \ |
| 314 | V(Int32x4_getFlagX, 1) \ |
| 315 | V(Int32x4_getFlagY, 1) \ |
| 316 | V(Int32x4_getFlagZ, 1) \ |
| 317 | V(Int32x4_getFlagW, 1) \ |
| 318 | V(Int32x4_setFlagX, 2) \ |
| 319 | V(Int32x4_setFlagY, 2) \ |
| 320 | V(Int32x4_setFlagZ, 2) \ |
| 321 | V(Int32x4_setFlagW, 2) \ |
| 322 | V(Int32x4_select, 3) \ |
| 323 | V(Isolate_spawnFunction, 11) \ |
| 324 | V(Isolate_spawnUri, 12) \ |
| 325 | V(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0) \ |
| 326 | V(Isolate_getCurrentRootUriStr, 0) \ |
| 327 | V(Isolate_sendOOB, 2) \ |
| 328 | V(Isolate_getDebugName, 1) \ |
| 329 | V(GrowableList_allocate, 2) \ |
| 330 | V(GrowableList_getIndexed, 2) \ |
| 331 | V(GrowableList_setIndexed, 3) \ |
| 332 | V(GrowableList_getLength, 1) \ |
| 333 | V(GrowableList_getCapacity, 1) \ |
| 334 | V(GrowableList_setLength, 2) \ |
| 335 | V(GrowableList_setData, 2) \ |
| 336 | V(Internal_unsafeCast, 1) \ |
| 337 | V(Internal_reachabilityFence, 1) \ |
| 338 | V(Internal_collectAllGarbage, 0) \ |
| 339 | V(Internal_makeListFixedLength, 1) \ |
| 340 | V(Internal_makeFixedListUnmodifiable, 1) \ |
| 341 | V(Internal_inquireIs64Bit, 0) \ |
| 342 | V(Internal_extractTypeArguments, 2) \ |
| 343 | V(Internal_prependTypeArguments, 4) \ |
| 344 | V(Internal_boundsCheckForPartialInstantiation, 2) \ |
| 345 | V(Internal_allocateOneByteString, 1) \ |
| 346 | V(Internal_allocateTwoByteString, 1) \ |
| 347 | V(Internal_writeIntoOneByteString, 3) \ |
| 348 | V(Internal_writeIntoTwoByteString, 3) \ |
| 349 | V(InvocationMirror_unpackTypeArguments, 2) \ |
| 350 | V(NoSuchMethodError_existingMethodSignature, 3) \ |
| 351 | V(LinkedHashMap_getIndex, 1) \ |
| 352 | V(LinkedHashMap_setIndex, 2) \ |
| 353 | V(LinkedHashMap_getData, 1) \ |
| 354 | V(LinkedHashMap_setData, 2) \ |
| 355 | V(LinkedHashMap_getHashMask, 1) \ |
| 356 | V(LinkedHashMap_setHashMask, 2) \ |
| 357 | V(LinkedHashMap_getUsedData, 1) \ |
| 358 | V(LinkedHashMap_setUsedData, 2) \ |
| 359 | V(LinkedHashMap_getDeletedKeys, 1) \ |
| 360 | V(LinkedHashMap_setDeletedKeys, 2) \ |
| 361 | V(WeakProperty_new, 2) \ |
| 362 | V(WeakProperty_getKey, 1) \ |
| 363 | V(WeakProperty_getValue, 1) \ |
| 364 | V(WeakProperty_setValue, 2) \ |
| 365 | V(Uri_isWindowsPlatform, 0) \ |
| 366 | V(UserTag_new, 2) \ |
| 367 | V(UserTag_label, 1) \ |
| 368 | V(UserTag_defaultTag, 0) \ |
| 369 | V(UserTag_makeCurrent, 1) \ |
| 370 | V(Profiler_getCurrentTag, 0) \ |
| 371 | V(ClassID_getID, 1) \ |
| 372 | V(VMService_SendIsolateServiceMessage, 2) \ |
| 373 | V(VMService_SendRootServiceMessage, 1) \ |
| 374 | V(VMService_SendObjectRootServiceMessage, 1) \ |
| 375 | V(VMService_OnStart, 0) \ |
| 376 | V(VMService_OnExit, 0) \ |
| 377 | V(VMService_OnServerAddressChange, 1) \ |
| 378 | V(VMService_ListenStream, 1) \ |
| 379 | V(VMService_CancelStream, 1) \ |
| 380 | V(VMService_RequestAssets, 0) \ |
| 381 | V(VMService_DecodeAssets, 1) \ |
| 382 | V(Ffi_loadInt8, 2) \ |
| 383 | V(Ffi_loadInt16, 2) \ |
| 384 | V(Ffi_loadInt32, 2) \ |
| 385 | V(Ffi_loadInt64, 2) \ |
| 386 | V(Ffi_loadUint8, 2) \ |
| 387 | V(Ffi_loadUint16, 2) \ |
| 388 | V(Ffi_loadUint32, 2) \ |
| 389 | V(Ffi_loadUint64, 2) \ |
| 390 | V(Ffi_loadIntPtr, 2) \ |
| 391 | V(Ffi_loadFloat, 2) \ |
| 392 | V(Ffi_loadDouble, 2) \ |
| 393 | V(Ffi_loadPointer, 2) \ |
| 394 | V(Ffi_loadStruct, 2) \ |
| 395 | V(Ffi_storeInt8, 3) \ |
| 396 | V(Ffi_storeInt16, 3) \ |
| 397 | V(Ffi_storeInt32, 3) \ |
| 398 | V(Ffi_storeInt64, 3) \ |
| 399 | V(Ffi_storeUint8, 3) \ |
| 400 | V(Ffi_storeUint16, 3) \ |
| 401 | V(Ffi_storeUint32, 3) \ |
| 402 | V(Ffi_storeUint64, 3) \ |
| 403 | V(Ffi_storeIntPtr, 3) \ |
| 404 | V(Ffi_storeFloat, 3) \ |
| 405 | V(Ffi_storeDouble, 3) \ |
| 406 | V(Ffi_storePointer, 3) \ |
| 407 | V(Ffi_address, 1) \ |
| 408 | V(Ffi_fromAddress, 1) \ |
| 409 | V(Ffi_sizeOf, 0) \ |
| 410 | V(Ffi_asFunctionInternal, 1) \ |
| 411 | V(Ffi_nativeCallbackFunction, 2) \ |
| 412 | V(Ffi_pointerFromFunction, 1) \ |
| 413 | V(Ffi_dl_open, 1) \ |
| 414 | V(Ffi_dl_lookup, 2) \ |
| 415 | V(Ffi_dl_getHandle, 1) \ |
| 416 | V(Ffi_asExternalTypedData, 2) \ |
| 417 | V(Ffi_dl_processLibrary, 0) \ |
| 418 | V(Ffi_dl_executableLibrary, 0) \ |
| 419 | V(DartApiDLInitializeData, 0) \ |
| 420 | V(DartApiDLMajorVersion, 0) \ |
| 421 | V(DartApiDLMinorVersion, 0) \ |
| 422 | V(DartNativeApiFunctionPointer, 1) \ |
| 423 | V(TransferableTypedData_factory, 2) \ |
| 424 | V(TransferableTypedData_materialize, 1) \ |
| 425 | V(Wasm_initModule, 2) \ |
| 426 | V(Wasm_describeModule, 1) \ |
| 427 | V(Wasm_initImports, 1) \ |
| 428 | V(Wasm_addMemoryImport, 4) \ |
| 429 | V(Wasm_addGlobalImport, 6) \ |
| 430 | V(Wasm_addFunctionImport, 5) \ |
| 431 | V(Wasm_initMemory, 3) \ |
| 432 | V(Wasm_growMemory, 2) \ |
| 433 | V(Wasm_initInstance, 3) \ |
| 434 | V(Wasm_initMemoryFromInstance, 2) \ |
| 435 | V(Wasm_getMemoryPages, 1) \ |
| 436 | V(Wasm_initFunction, 4) \ |
| 437 | V(Wasm_callFunction, 2) |
| 438 | |
| 439 | // List of bootstrap native entry points used in the dart:mirror library. |
| 440 | #define MIRRORS_BOOTSTRAP_NATIVE_LIST(V) \ |
| 441 | V(Mirrors_makeLocalClassMirror, 1) \ |
| 442 | V(Mirrors_makeLocalTypeMirror, 1) \ |
| 443 | V(Mirrors_instantiateGenericType, 2) \ |
| 444 | V(Mirrors_mangleName, 2) \ |
| 445 | V(MirrorReference_equals, 2) \ |
| 446 | V(MirrorSystem_libraries, 0) \ |
| 447 | V(MirrorSystem_isolate, 0) \ |
| 448 | V(IsolateMirror_loadUri, 1) \ |
| 449 | V(InstanceMirror_invoke, 5) \ |
| 450 | V(InstanceMirror_invokeGetter, 3) \ |
| 451 | V(InstanceMirror_invokeSetter, 4) \ |
| 452 | V(InstanceMirror_computeType, 1) \ |
| 453 | V(ClosureMirror_function, 1) \ |
| 454 | V(TypeMirror_subtypeTest, 2) \ |
| 455 | V(ClassMirror_libraryUri, 1) \ |
| 456 | V(ClassMirror_supertype, 1) \ |
| 457 | V(ClassMirror_supertype_instantiated, 1) \ |
| 458 | V(ClassMirror_interfaces, 1) \ |
| 459 | V(ClassMirror_interfaces_instantiated, 1) \ |
| 460 | V(ClassMirror_mixin, 1) \ |
| 461 | V(ClassMirror_mixin_instantiated, 2) \ |
| 462 | V(ClassMirror_members, 3) \ |
| 463 | V(ClassMirror_constructors, 3) \ |
| 464 | V(LibraryMirror_members, 2) \ |
| 465 | V(LibraryMirror_libraryDependencies, 2) \ |
| 466 | V(ClassMirror_invoke, 5) \ |
| 467 | V(ClassMirror_invokeGetter, 3) \ |
| 468 | V(ClassMirror_invokeSetter, 4) \ |
| 469 | V(ClassMirror_invokeConstructor, 5) \ |
| 470 | V(ClassMirror_type_variables, 1) \ |
| 471 | V(ClassMirror_type_arguments, 1) \ |
| 472 | V(LibraryMirror_fromPrefix, 1) \ |
| 473 | V(LibraryMirror_invoke, 5) \ |
| 474 | V(LibraryMirror_invokeGetter, 3) \ |
| 475 | V(LibraryMirror_invokeSetter, 4) \ |
| 476 | V(TypeVariableMirror_owner, 1) \ |
| 477 | V(TypeVariableMirror_upper_bound, 1) \ |
| 478 | V(DeclarationMirror_location, 1) \ |
| 479 | V(DeclarationMirror_metadata, 1) \ |
| 480 | V(FunctionTypeMirror_call_method, 2) \ |
| 481 | V(FunctionTypeMirror_parameters, 2) \ |
| 482 | V(FunctionTypeMirror_return_type, 1) \ |
| 483 | V(MethodMirror_owner, 2) \ |
| 484 | V(MethodMirror_parameters, 2) \ |
| 485 | V(MethodMirror_return_type, 2) \ |
| 486 | V(MethodMirror_source, 1) \ |
| 487 | V(ParameterMirror_type, 3) \ |
| 488 | V(TypedefMirror_referent, 1) \ |
| 489 | V(TypedefMirror_declaration, 1) \ |
| 490 | V(VariableMirror_type, 2) |
| 491 | |
| 492 | class BootstrapNatives : public AllStatic { |
| 493 | public: |
| 494 | static Dart_NativeFunction Lookup(Dart_Handle name, |
| 495 | int argument_count, |
| 496 | bool* auto_setup_scope); |
| 497 | |
| 498 | static const uint8_t* Symbol(Dart_NativeFunction nf); |
| 499 | |
| 500 | #define DECLARE_BOOTSTRAP_NATIVE(name, ignored) \ |
| 501 | static ObjectPtr DN_##name(Thread* |
|---|