2012-02-29 02:14:18 +00:00
|
|
|
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
2011-10-05 05:20:07 +00:00
|
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
2016-10-26 07:26:03 +00:00
|
|
|
#ifndef RUNTIME_VM_BOOTSTRAP_NATIVES_H_
|
|
|
|
#define RUNTIME_VM_BOOTSTRAP_NATIVES_H_
|
2011-10-05 05:20:07 +00:00
|
|
|
|
|
|
|
#include "vm/native_entry.h"
|
|
|
|
|
|
|
|
// bootstrap dart natives used in the core dart library.
|
|
|
|
|
|
|
|
namespace dart {
|
|
|
|
|
|
|
|
// List of bootstrap native entry points used in the core dart library.
|
2019-08-28 23:11:21 +00:00
|
|
|
// V(function_name, argument_count)
|
2011-10-05 05:20:07 +00:00
|
|
|
#define BOOTSTRAP_NATIVE_LIST(V) \
|
2017-03-24 14:56:50 +00:00
|
|
|
V(AsyncStarMoveNext_debuggerStepCheck, 1) \
|
2017-02-20 10:52:52 +00:00
|
|
|
V(DartAsync_fatal, 1) \
|
2013-11-04 11:32:52 +00:00
|
|
|
V(Object_equals, 2) \
|
2013-07-08 21:41:05 +00:00
|
|
|
V(Object_getHash, 1) \
|
|
|
|
V(Object_setHash, 2) \
|
2011-10-05 05:20:07 +00:00
|
|
|
V(Object_toString, 1) \
|
2012-09-27 21:19:00 +00:00
|
|
|
V(Object_runtimeType, 1) \
|
2016-11-01 15:49:02 +00:00
|
|
|
V(Object_haveSameRuntimeType, 2) \
|
2020-03-03 20:30:32 +00:00
|
|
|
V(Object_instanceOf, 4) \
|
2016-07-14 18:11:17 +00:00
|
|
|
V(Object_simpleInstanceOf, 2) \
|
2012-12-14 19:04:01 +00:00
|
|
|
V(Function_apply, 2) \
|
2016-01-20 00:32:59 +00:00
|
|
|
V(Closure_equals, 2) \
|
2017-07-20 22:22:15 +00:00
|
|
|
V(Closure_computeHash, 1) \
|
2016-01-20 00:32:59 +00:00
|
|
|
V(Closure_clone, 1) \
|
2012-09-27 21:19:00 +00:00
|
|
|
V(AbstractType_toString, 1) \
|
2017-10-10 23:46:09 +00:00
|
|
|
V(Type_getHashCode, 1) \
|
2019-12-09 18:18:59 +00:00
|
|
|
V(Type_equality, 2) \
|
2012-12-22 00:12:35 +00:00
|
|
|
V(Identical_comparison, 2) \
|
2011-10-05 05:20:07 +00:00
|
|
|
V(Integer_bitAndFromInteger, 2) \
|
|
|
|
V(Integer_bitOrFromInteger, 2) \
|
|
|
|
V(Integer_bitXorFromInteger, 2) \
|
|
|
|
V(Integer_addFromInteger, 2) \
|
|
|
|
V(Integer_subFromInteger, 2) \
|
|
|
|
V(Integer_mulFromInteger, 2) \
|
|
|
|
V(Integer_truncDivFromInteger, 2) \
|
|
|
|
V(Integer_moduloFromInteger, 2) \
|
|
|
|
V(Integer_greaterThanFromInteger, 2) \
|
|
|
|
V(Integer_equalToInteger, 2) \
|
2013-10-31 05:46:57 +00:00
|
|
|
V(Integer_fromEnvironment, 3) \
|
2012-11-16 19:42:02 +00:00
|
|
|
V(Integer_parse, 1) \
|
2018-06-18 18:16:51 +00:00
|
|
|
V(Integer_shlFromInteger, 2) \
|
|
|
|
V(Integer_shrFromInteger, 2) \
|
2013-10-31 05:46:57 +00:00
|
|
|
V(Bool_fromEnvironment, 3) \
|
2020-03-16 11:17:58 +00:00
|
|
|
V(Bool_hasEnvironment, 2) \
|
2014-04-23 19:44:03 +00:00
|
|
|
V(CapabilityImpl_factory, 1) \
|
2014-12-04 12:17:48 +00:00
|
|
|
V(CapabilityImpl_equals, 2) \
|
|
|
|
V(CapabilityImpl_get_hashcode, 1) \
|
2013-10-25 19:23:00 +00:00
|
|
|
V(RawReceivePortImpl_factory, 1) \
|
2014-04-23 19:44:03 +00:00
|
|
|
V(RawReceivePortImpl_get_id, 1) \
|
|
|
|
V(RawReceivePortImpl_get_sendport, 1) \
|
2013-10-25 19:23:00 +00:00
|
|
|
V(RawReceivePortImpl_closeInternal, 1) \
|
2014-04-23 19:44:03 +00:00
|
|
|
V(SendPortImpl_get_id, 1) \
|
|
|
|
V(SendPortImpl_get_hashcode, 1) \
|
2013-11-15 11:28:23 +00:00
|
|
|
V(SendPortImpl_sendInternal_, 2) \
|
[vm/isolates] Introduce sendAndExit.
sendAndExit allows for fast data passing from worker isolate back to
parent.
```
| linux x64 | spawnIsolate | sendAndExit |
|us per iter | over sync | over send |
+------------+--------------+-------------+
IsolateJson.Decode50KBx1(RunTime): 43,175.000 339.83%
IsolateJson.SendAndExit_Decode50KBx1(RunTime): 22,070.000 124.83% -48.88%
IsolateJson.SyncDecode50KBx1(RunTime): 9,816.284
IsolateJson.Decode50KBx4(RunTime): 77,630.000 104.56%
IsolateJson.SendAndExit_Decode50KBx4(RunTime): 46,307.000 22.02% -40.35%
IsolateJson.SyncDecode50KBx4(RunTime): 37,949.528
IsolateJson.Decode100KBx1(RunTime): 71,035.000 270.42%
IsolateJson.SendAndExit_Decode100KBx1(RunTime): 43,056.000 124.52% -39.39%
IsolateJson.SyncDecode100KBx1(RunTime): 19,176.733
IsolateJson.Decode100KBx4(RunTime): 120,915.000 54.66%
IsolateJson.SendAndExit_Decode100KBx4(RunTime): 67,101.000 -14.17% -44.51%
IsolateJson.SyncDecode100KBx4(RunTime): 78,179.731
IsolateJson.Decode250KBx1(RunTime): 173,574.000 202.52%
IsolateJson.SendAndExit_Decode250KBx1(RunTime): 103,334.000 80.10% -40.47%
IsolateJson.SyncDecode250KBx1(RunTime): 57,375.314
IsolateJson.Decode250KBx4(RunTime): 292,118.000 20.30%
IsolateJson.SendAndExit_Decode250KBx4(RunTime): 168,444.000 -30.63% -42.34%
IsolateJson.SyncDecode250KBx4(RunTime): 242,831.000
IsolateJson.Decode1MBx1(RunTime): 631,578.000 166.34%
IsolateJson.SendAndExit_Decode1MBx1(RunTime): 371,127.000 56.50% -41.24%
IsolateJson.SyncDecode1MBx1(RunTime): 237,135.778
IsolateJson.Decode1MBx4(RunTime): 1,322,789.000 36.16%
IsolateJson.SendAndExit_Decode1MBx4(RunTime): 657,179.000 -32.35% -50.32%
IsolateJson.SyncDecode1MBx4(RunTime): 971,473.333
```
Bug: https://github.com/dart-lang/sdk/issues/37835
Bug: https://github.com/dart-lang/sdk/issues/36097
Change-Id: I386641e1431ed9f2e34fac36f562607a666ee4a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142823
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-04-22 17:34:09 +00:00
|
|
|
V(SendPortImpl_sendAndExitInternal_, 2) \
|
2016-07-04 23:27:57 +00:00
|
|
|
V(Smi_bitAndFromSmi, 2) \
|
2011-10-05 05:20:07 +00:00
|
|
|
V(Smi_bitNegate, 1) \
|
2013-09-06 22:22:26 +00:00
|
|
|
V(Smi_bitLength, 1) \
|
2011-10-05 05:20:07 +00:00
|
|
|
V(Mint_bitNegate, 1) \
|
2013-09-06 22:22:26 +00:00
|
|
|
V(Mint_bitLength, 1) \
|
2015-05-08 22:18:43 +00:00
|
|
|
V(Developer_debugger, 2) \
|
2016-12-01 20:48:49 +00:00
|
|
|
V(Developer_getIsolateIDFromSendPort, 1) \
|
2016-10-31 19:32:23 +00:00
|
|
|
V(Developer_getServerInfo, 1) \
|
|
|
|
V(Developer_getServiceMajorVersion, 0) \
|
|
|
|
V(Developer_getServiceMinorVersion, 0) \
|
2015-05-08 22:18:43 +00:00
|
|
|
V(Developer_inspect, 1) \
|
2015-08-27 18:23:39 +00:00
|
|
|
V(Developer_lookupExtension, 1) \
|
|
|
|
V(Developer_registerExtension, 2) \
|
2015-07-21 14:54:46 +00:00
|
|
|
V(Developer_log, 8) \
|
2015-12-17 17:34:52 +00:00
|
|
|
V(Developer_postEvent, 2) \
|
2016-10-31 19:32:23 +00:00
|
|
|
V(Developer_webServerControl, 2) \
|
2017-10-23 06:47:20 +00:00
|
|
|
V(Double_hashCode, 1) \
|
2012-10-23 16:15:36 +00:00
|
|
|
V(Double_getIsNegative, 1) \
|
|
|
|
V(Double_getIsInfinite, 1) \
|
|
|
|
V(Double_getIsNaN, 1) \
|
2011-10-05 05:20:07 +00:00
|
|
|
V(Double_add, 2) \
|
|
|
|
V(Double_sub, 2) \
|
|
|
|
V(Double_mul, 2) \
|
|
|
|
V(Double_div, 2) \
|
|
|
|
V(Double_trunc_div, 2) \
|
|
|
|
V(Double_remainder, 2) \
|
|
|
|
V(Double_modulo, 2) \
|
|
|
|
V(Double_greaterThanFromInteger, 2) \
|
|
|
|
V(Double_equalToInteger, 2) \
|
|
|
|
V(Double_greaterThan, 2) \
|
|
|
|
V(Double_equal, 2) \
|
|
|
|
V(Double_doubleFromInteger, 2) \
|
|
|
|
V(Double_round, 1) \
|
|
|
|
V(Double_floor, 1) \
|
|
|
|
V(Double_ceil, 1) \
|
|
|
|
V(Double_truncate, 1) \
|
|
|
|
V(Double_toInt, 1) \
|
2014-07-01 11:59:31 +00:00
|
|
|
V(Double_parse, 3) \
|
2016-04-08 23:25:52 +00:00
|
|
|
V(Double_toString, 1) \
|
2011-12-22 22:03:35 +00:00
|
|
|
V(Double_toStringAsFixed, 2) \
|
|
|
|
V(Double_toStringAsExponential, 2) \
|
|
|
|
V(Double_toStringAsPrecision, 2) \
|
2015-06-03 18:00:28 +00:00
|
|
|
V(Double_flipSignBit, 1) \
|
2019-04-29 09:11:48 +00:00
|
|
|
V(RegExp_factory, 6) \
|
2016-03-22 00:21:05 +00:00
|
|
|
V(RegExp_getPattern, 1) \
|
|
|
|
V(RegExp_getIsMultiLine, 1) \
|
|
|
|
V(RegExp_getIsCaseSensitive, 1) \
|
2019-04-29 09:11:48 +00:00
|
|
|
V(RegExp_getIsUnicode, 1) \
|
|
|
|
V(RegExp_getIsDotAll, 1) \
|
2016-03-22 00:21:05 +00:00
|
|
|
V(RegExp_getGroupCount, 1) \
|
2019-03-19 10:40:15 +00:00
|
|
|
V(RegExp_getGroupNameMap, 1) \
|
2016-03-22 00:21:05 +00:00
|
|
|
V(RegExp_ExecuteMatch, 3) \
|
2016-11-17 16:46:21 +00:00
|
|
|
V(RegExp_ExecuteMatchSticky, 3) \
|
2018-05-30 13:44:43 +00:00
|
|
|
V(List_new, 2) \
|
2013-10-03 00:15:14 +00:00
|
|
|
V(List_allocate, 2) \
|
|
|
|
V(List_getIndexed, 2) \
|
|
|
|
V(List_setIndexed, 3) \
|
|
|
|
V(List_getLength, 1) \
|
2014-09-03 20:36:01 +00:00
|
|
|
V(List_slice, 4) \
|
2014-01-15 19:14:45 +00:00
|
|
|
V(ImmutableList_from, 4) \
|
2014-09-25 10:45:24 +00:00
|
|
|
V(StringBase_createFromCodePoints, 3) \
|
2012-08-23 21:48:40 +00:00
|
|
|
V(StringBase_substringUnchecked, 3) \
|
2015-01-22 08:27:42 +00:00
|
|
|
V(StringBase_joinReplaceAllResult, 4) \
|
2013-03-08 10:21:52 +00:00
|
|
|
V(StringBuffer_createStringFromUint16Array, 3) \
|
2012-11-29 22:55:09 +00:00
|
|
|
V(OneByteString_substringUnchecked, 3) \
|
2012-12-01 00:22:18 +00:00
|
|
|
V(OneByteString_splitWithCharCode, 2) \
|
2013-05-03 23:48:10 +00:00
|
|
|
V(OneByteString_allocate, 1) \
|
2014-09-25 10:45:24 +00:00
|
|
|
V(OneByteString_allocateFromOneByteList, 3) \
|
2013-05-03 23:48:10 +00:00
|
|
|
V(OneByteString_setAt, 3) \
|
2015-01-28 12:44:44 +00:00
|
|
|
V(TwoByteString_allocateFromTwoByteList, 3) \
|
2012-10-22 12:41:04 +00:00
|
|
|
V(String_getHashCode, 1) \
|
2011-10-05 05:20:07 +00:00
|
|
|
V(String_getLength, 1) \
|
|
|
|
V(String_charAt, 2) \
|
2013-02-25 10:48:09 +00:00
|
|
|
V(String_codeUnitAt, 2) \
|
2011-10-05 05:20:07 +00:00
|
|
|
V(String_concat, 2) \
|
2013-10-31 05:46:57 +00:00
|
|
|
V(String_fromEnvironment, 3) \
|
2011-10-21 20:33:29 +00:00
|
|
|
V(String_toLowerCase, 1) \
|
|
|
|
V(String_toUpperCase, 1) \
|
2013-10-29 18:18:40 +00:00
|
|
|
V(String_concatRange, 3) \
|
2012-11-16 19:42:02 +00:00
|
|
|
V(Math_sqrt, 1) \
|
|
|
|
V(Math_sin, 1) \
|
|
|
|
V(Math_cos, 1) \
|
|
|
|
V(Math_tan, 1) \
|
|
|
|
V(Math_asin, 1) \
|
|
|
|
V(Math_acos, 1) \
|
|
|
|
V(Math_atan, 1) \
|
|
|
|
V(Math_atan2, 2) \
|
|
|
|
V(Math_exp, 1) \
|
|
|
|
V(Math_log, 1) \
|
2013-08-20 08:13:13 +00:00
|
|
|
V(Math_doublePow, 2) \
|
2013-08-02 23:07:55 +00:00
|
|
|
V(Random_nextState, 1) \
|
2014-03-17 21:27:24 +00:00
|
|
|
V(Random_setupSeed, 1) \
|
2014-03-14 17:30:05 +00:00
|
|
|
V(Random_initialSeed, 0) \
|
2015-10-15 17:16:03 +00:00
|
|
|
V(SecureRandom_getBytes, 1) \
|
2015-12-08 23:46:46 +00:00
|
|
|
V(DateTime_currentTimeMicros, 0) \
|
|
|
|
V(DateTime_timeZoneName, 1) \
|
|
|
|
V(DateTime_timeZoneOffsetInSeconds, 1) \
|
|
|
|
V(DateTime_localTimeZoneAdjustmentInSeconds, 0) \
|
2016-12-14 19:05:19 +00:00
|
|
|
V(AssertionError_throwNew, 3) \
|
2015-10-05 06:16:52 +00:00
|
|
|
V(Async_rethrow, 2) \
|
2017-03-24 14:56:50 +00:00
|
|
|
V(StackTrace_asyncStackTraceHelper, 1) \
|
2017-02-09 23:39:44 +00:00
|
|
|
V(StackTrace_clearAsyncThreadStackTrace, 0) \
|
|
|
|
V(StackTrace_setAsyncThreadStackTrace, 1) \
|
2015-11-24 07:26:03 +00:00
|
|
|
V(StackTrace_current, 0) \
|
2018-12-10 23:15:27 +00:00
|
|
|
V(TypeError_throwNew, 4) \
|
2011-10-05 05:20:07 +00:00
|
|
|
V(FallThroughError_throwNew, 1) \
|
2012-08-31 18:06:42 +00:00
|
|
|
V(AbstractClassInstantiationError_throwNew, 2) \
|
2012-08-15 12:06:17 +00:00
|
|
|
V(Stopwatch_now, 0) \
|
|
|
|
V(Stopwatch_frequency, 0) \
|
2015-10-09 17:21:02 +00:00
|
|
|
V(Timeline_getNextAsyncId, 0) \
|
2015-10-01 16:30:47 +00:00
|
|
|
V(Timeline_getTraceClock, 0) \
|
2016-05-17 16:45:28 +00:00
|
|
|
V(Timeline_isDartStreamEnabled, 0) \
|
2020-01-02 23:13:06 +00:00
|
|
|
V(Timeline_reportFlowEvent, 5) \
|
|
|
|
V(Timeline_reportInstantEvent, 3) \
|
|
|
|
V(Timeline_reportTaskEvent, 5) \
|
2016-03-10 08:38:08 +00:00
|
|
|
V(TypedData_Int8Array_new, 2) \
|
|
|
|
V(TypedData_Uint8Array_new, 2) \
|
|
|
|
V(TypedData_Uint8ClampedArray_new, 2) \
|
|
|
|
V(TypedData_Int16Array_new, 2) \
|
|
|
|
V(TypedData_Uint16Array_new, 2) \
|
|
|
|
V(TypedData_Int32Array_new, 2) \
|
|
|
|
V(TypedData_Uint32Array_new, 2) \
|
|
|
|
V(TypedData_Int64Array_new, 2) \
|
|
|
|
V(TypedData_Uint64Array_new, 2) \
|
|
|
|
V(TypedData_Float32Array_new, 2) \
|
|
|
|
V(TypedData_Float64Array_new, 2) \
|
|
|
|
V(TypedData_Float32x4Array_new, 2) \
|
|
|
|
V(TypedData_Int32x4Array_new, 2) \
|
|
|
|
V(TypedData_Float64x2Array_new, 2) \
|
2013-03-07 21:50:33 +00:00
|
|
|
V(TypedData_length, 1) \
|
2014-03-11 16:56:55 +00:00
|
|
|
V(TypedData_setRange, 7) \
|
2013-03-07 21:50:33 +00:00
|
|
|
V(TypedData_GetInt8, 2) \
|
|
|
|
V(TypedData_SetInt8, 3) \
|
|
|
|
V(TypedData_GetUint8, 2) \
|
|
|
|
V(TypedData_SetUint8, 3) \
|
|
|
|
V(TypedData_GetInt16, 2) \
|
|
|
|
V(TypedData_SetInt16, 3) \
|
|
|
|
V(TypedData_GetUint16, 2) \
|
|
|
|
V(TypedData_SetUint16, 3) \
|
|
|
|
V(TypedData_GetInt32, 2) \
|
|
|
|
V(TypedData_SetInt32, 3) \
|
|
|
|
V(TypedData_GetUint32, 2) \
|
|
|
|
V(TypedData_SetUint32, 3) \
|
|
|
|
V(TypedData_GetInt64, 2) \
|
|
|
|
V(TypedData_SetInt64, 3) \
|
|
|
|
V(TypedData_GetUint64, 2) \
|
|
|
|
V(TypedData_SetUint64, 3) \
|
|
|
|
V(TypedData_GetFloat32, 2) \
|
|
|
|
V(TypedData_SetFloat32, 3) \
|
|
|
|
V(TypedData_GetFloat64, 2) \
|
|
|
|
V(TypedData_SetFloat64, 3) \
|
2013-03-27 14:44:15 +00:00
|
|
|
V(TypedData_GetFloat32x4, 2) \
|
|
|
|
V(TypedData_SetFloat32x4, 3) \
|
2014-01-07 00:48:46 +00:00
|
|
|
V(TypedData_GetInt32x4, 2) \
|
|
|
|
V(TypedData_SetInt32x4, 3) \
|
2014-01-31 15:28:05 +00:00
|
|
|
V(TypedData_GetFloat64x2, 2) \
|
|
|
|
V(TypedData_SetFloat64x2, 3) \
|
2019-03-15 21:24:15 +00:00
|
|
|
V(TypedDataView_ByteDataView_new, 4) \
|
|
|
|
V(TypedDataView_Int8ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Uint8ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Uint8ClampedArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Int16ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Uint16ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Int32ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Uint32ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Int64ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Uint64ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Float32ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Float64ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Float32x4ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Int32x4ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_Float64x2ArrayView_new, 4) \
|
|
|
|
V(TypedDataView_length, 1) \
|
|
|
|
V(TypedDataView_offsetInBytes, 1) \
|
|
|
|
V(TypedDataView_typedData, 1) \
|
2019-12-09 15:29:27 +00:00
|
|
|
V(Float32x4_fromDoubles, 4) \
|
|
|
|
V(Float32x4_splat, 1) \
|
2014-01-07 00:48:46 +00:00
|
|
|
V(Float32x4_fromInt32x4Bits, 2) \
|
2014-01-31 15:28:05 +00:00
|
|
|
V(Float32x4_fromFloat64x2, 2) \
|
2013-03-27 14:44:15 +00:00
|
|
|
V(Float32x4_zero, 1) \
|
|
|
|
V(Float32x4_add, 2) \
|
|
|
|
V(Float32x4_negate, 1) \
|
|
|
|
V(Float32x4_sub, 2) \
|
|
|
|
V(Float32x4_mul, 2) \
|
|
|
|
V(Float32x4_div, 2) \
|
|
|
|
V(Float32x4_cmplt, 2) \
|
|
|
|
V(Float32x4_cmplte, 2) \
|
|
|
|
V(Float32x4_cmpgt, 2) \
|
|
|
|
V(Float32x4_cmpgte, 2) \
|
|
|
|
V(Float32x4_cmpequal, 2) \
|
|
|
|
V(Float32x4_cmpnequal, 2) \
|
|
|
|
V(Float32x4_scale, 2) \
|
|
|
|
V(Float32x4_abs, 1) \
|
|
|
|
V(Float32x4_clamp, 3) \
|
|
|
|
V(Float32x4_getX, 1) \
|
|
|
|
V(Float32x4_getY, 1) \
|
|
|
|
V(Float32x4_getZ, 1) \
|
|
|
|
V(Float32x4_getW, 1) \
|
2013-08-20 21:35:53 +00:00
|
|
|
V(Float32x4_getSignMask, 1) \
|
2013-07-19 17:03:09 +00:00
|
|
|
V(Float32x4_shuffle, 2) \
|
2013-11-01 07:09:54 +00:00
|
|
|
V(Float32x4_shuffleMix, 3) \
|
2013-03-27 14:44:15 +00:00
|
|
|
V(Float32x4_setX, 2) \
|
|
|
|
V(Float32x4_setY, 2) \
|
|
|
|
V(Float32x4_setZ, 2) \
|
|
|
|
V(Float32x4_setW, 2) \
|
|
|
|
V(Float32x4_min, 2) \
|
|
|
|
V(Float32x4_max, 2) \
|
|
|
|
V(Float32x4_sqrt, 1) \
|
|
|
|
V(Float32x4_reciprocal, 1) \
|
|
|
|
V(Float32x4_reciprocalSqrt, 1) \
|
2019-12-09 15:29:27 +00:00
|
|
|
V(Float64x2_fromDoubles, 2) \
|
|
|
|
V(Float64x2_splat, 1) \
|
2014-01-31 15:28:05 +00:00
|
|
|
V(Float64x2_zero, 1) \
|
|
|
|
V(Float64x2_fromFloat32x4, 2) \
|
|
|
|
V(Float64x2_add, 2) \
|
|
|
|
V(Float64x2_negate, 1) \
|
|
|
|
V(Float64x2_sub, 2) \
|
|
|
|
V(Float64x2_mul, 2) \
|
|
|
|
V(Float64x2_div, 2) \
|
|
|
|
V(Float64x2_scale, 2) \
|
|
|
|
V(Float64x2_abs, 1) \
|
|
|
|
V(Float64x2_clamp, 3) \
|
|
|
|
V(Float64x2_getX, 1) \
|
|
|
|
V(Float64x2_getY, 1) \
|
|
|
|
V(Float64x2_getSignMask, 1) \
|
|
|
|
V(Float64x2_setX, 2) \
|
|
|
|
V(Float64x2_setY, 2) \
|
|
|
|
V(Float64x2_min, 2) \
|
|
|
|
V(Float64x2_max, 2) \
|
|
|
|
V(Float64x2_sqrt, 1) \
|
2019-12-09 15:29:27 +00:00
|
|
|
V(Int32x4_fromInts, 4) \
|
|
|
|
V(Int32x4_fromBools, 4) \
|
2014-01-07 00:48:46 +00:00
|
|
|
V(Int32x4_fromFloat32x4Bits, 2) \
|
|
|
|
V(Int32x4_or, 2) \
|
|
|
|
V(Int32x4_and, 2) \
|
|
|
|
V(Int32x4_xor, 2) \
|
|
|
|
V(Int32x4_add, 2) \
|
|
|
|
V(Int32x4_sub, 2) \
|
|
|
|
V(Int32x4_getX, 1) \
|
|
|
|
V(Int32x4_getY, 1) \
|
|
|
|
V(Int32x4_getZ, 1) \
|
|
|
|
V(Int32x4_getW, 1) \
|
|
|
|
V(Int32x4_setX, 2) \
|
|
|
|
V(Int32x4_setY, 2) \
|
|
|
|
V(Int32x4_setZ, 2) \
|
|
|
|
V(Int32x4_setW, 2) \
|
|
|
|
V(Int32x4_getSignMask, 1) \
|
|
|
|
V(Int32x4_shuffle, 2) \
|
|
|
|
V(Int32x4_shuffleMix, 3) \
|
|
|
|
V(Int32x4_getFlagX, 1) \
|
|
|
|
V(Int32x4_getFlagY, 1) \
|
|
|
|
V(Int32x4_getFlagZ, 1) \
|
|
|
|
V(Int32x4_getFlagW, 1) \
|
|
|
|
V(Int32x4_setFlagX, 2) \
|
|
|
|
V(Int32x4_setFlagY, 2) \
|
|
|
|
V(Int32x4_setFlagZ, 2) \
|
|
|
|
V(Int32x4_setFlagW, 2) \
|
|
|
|
V(Int32x4_select, 3) \
|
2020-05-06 12:37:52 +00:00
|
|
|
V(Isolate_spawnFunction, 11) \
|
2020-05-04 14:51:14 +00:00
|
|
|
V(Isolate_spawnUri, 12) \
|
2014-12-19 07:04:29 +00:00
|
|
|
V(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0) \
|
2016-01-13 02:19:04 +00:00
|
|
|
V(Isolate_getCurrentRootUriStr, 0) \
|
2014-08-20 19:57:09 +00:00
|
|
|
V(Isolate_sendOOB, 2) \
|
2019-03-28 16:39:50 +00:00
|
|
|
V(Isolate_getDebugName, 1) \
|
2016-02-22 17:55:20 +00:00
|
|
|
V(GrowableList_allocate, 2) \
|
|
|
|
V(GrowableList_getIndexed, 2) \
|
|
|
|
V(GrowableList_setIndexed, 3) \
|
|
|
|
V(GrowableList_getLength, 1) \
|
|
|
|
V(GrowableList_getCapacity, 1) \
|
|
|
|
V(GrowableList_setLength, 2) \
|
|
|
|
V(GrowableList_setData, 2) \
|
2018-08-20 13:25:10 +00:00
|
|
|
V(Internal_unsafeCast, 1) \
|
[vm] Add Reachability Fence Instruction
The reachability fence keeps a value alive and reachable.
Required for finalizers: https://github.com/dart-lang/sdk/issues/35770
Design: go/dart-ffi-finalizers (See "Premature Cleanup (Single Object)".)
Change-Id: I9742889f0f8d8b15bbcb5dca47f2a4231899dd59
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136188
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-03-26 18:30:44 +00:00
|
|
|
V(Internal_reachabilityFence, 1) \
|
2016-02-22 17:55:20 +00:00
|
|
|
V(Internal_makeListFixedLength, 1) \
|
|
|
|
V(Internal_makeFixedListUnmodifiable, 1) \
|
|
|
|
V(Internal_inquireIs64Bit, 0) \
|
2018-01-12 21:32:20 +00:00
|
|
|
V(Internal_extractTypeArguments, 2) \
|
2018-05-03 23:51:36 +00:00
|
|
|
V(Internal_prependTypeArguments, 4) \
|
2018-08-31 10:13:51 +00:00
|
|
|
V(Internal_boundsCheckForPartialInstantiation, 2) \
|
2018-05-10 17:06:42 +00:00
|
|
|
V(InvocationMirror_unpackTypeArguments, 2) \
|
2017-09-28 00:27:24 +00:00
|
|
|
V(NoSuchMethodError_existingMethodSignature, 3) \
|
2016-02-22 17:55:20 +00:00
|
|
|
V(LinkedHashMap_getIndex, 1) \
|
|
|
|
V(LinkedHashMap_setIndex, 2) \
|
|
|
|
V(LinkedHashMap_getData, 1) \
|
|
|
|
V(LinkedHashMap_setData, 2) \
|
|
|
|
V(LinkedHashMap_getHashMask, 1) \
|
|
|
|
V(LinkedHashMap_setHashMask, 2) \
|
|
|
|
V(LinkedHashMap_getUsedData, 1) \
|
|
|
|
V(LinkedHashMap_setUsedData, 2) \
|
|
|
|
V(LinkedHashMap_getDeletedKeys, 1) \
|
|
|
|
V(LinkedHashMap_setDeletedKeys, 2) \
|
|
|
|
V(WeakProperty_new, 2) \
|
|
|
|
V(WeakProperty_getKey, 1) \
|
|
|
|
V(WeakProperty_getValue, 1) \
|
|
|
|
V(WeakProperty_setValue, 2) \
|
|
|
|
V(Uri_isWindowsPlatform, 0) \
|
|
|
|
V(UserTag_new, 2) \
|
|
|
|
V(UserTag_label, 1) \
|
|
|
|
V(UserTag_defaultTag, 0) \
|
|
|
|
V(UserTag_makeCurrent, 1) \
|
|
|
|
V(Profiler_getCurrentTag, 0) \
|
|
|
|
V(ClassID_getID, 1) \
|
|
|
|
V(VMService_SendIsolateServiceMessage, 2) \
|
|
|
|
V(VMService_SendRootServiceMessage, 1) \
|
2016-06-10 19:33:50 +00:00
|
|
|
V(VMService_SendObjectRootServiceMessage, 1) \
|
2016-02-22 17:55:20 +00:00
|
|
|
V(VMService_OnStart, 0) \
|
|
|
|
V(VMService_OnExit, 0) \
|
|
|
|
V(VMService_OnServerAddressChange, 1) \
|
|
|
|
V(VMService_ListenStream, 1) \
|
|
|
|
V(VMService_CancelStream, 1) \
|
|
|
|
V(VMService_RequestAssets, 0) \
|
|
|
|
V(VMService_DecodeAssets, 1) \
|
[vm/ffi] Pointer optimize indexed load and store
Follow up of https://dart-review.googlesource.com/c/sdk/+/117547
This gets rid of unnecessary allocations in hot loops with indexed loads and stores.
Issue: https://github.com/dart-lang/sdk/issues/38172
Change-Id: I37a4b1aba00084e465d47cce79bb9963e1afc104
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119645
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-11 15:54:01 +00:00
|
|
|
V(Ffi_loadInt8, 2) \
|
|
|
|
V(Ffi_loadInt16, 2) \
|
|
|
|
V(Ffi_loadInt32, 2) \
|
|
|
|
V(Ffi_loadInt64, 2) \
|
|
|
|
V(Ffi_loadUint8, 2) \
|
|
|
|
V(Ffi_loadUint16, 2) \
|
|
|
|
V(Ffi_loadUint32, 2) \
|
|
|
|
V(Ffi_loadUint64, 2) \
|
|
|
|
V(Ffi_loadIntPtr, 2) \
|
|
|
|
V(Ffi_loadFloat, 2) \
|
|
|
|
V(Ffi_loadDouble, 2) \
|
|
|
|
V(Ffi_loadPointer, 2) \
|
|
|
|
V(Ffi_loadStruct, 2) \
|
|
|
|
V(Ffi_storeInt8, 3) \
|
|
|
|
V(Ffi_storeInt16, 3) \
|
|
|
|
V(Ffi_storeInt32, 3) \
|
|
|
|
V(Ffi_storeInt64, 3) \
|
|
|
|
V(Ffi_storeUint8, 3) \
|
|
|
|
V(Ffi_storeUint16, 3) \
|
|
|
|
V(Ffi_storeUint32, 3) \
|
|
|
|
V(Ffi_storeUint64, 3) \
|
|
|
|
V(Ffi_storeIntPtr, 3) \
|
|
|
|
V(Ffi_storeFloat, 3) \
|
|
|
|
V(Ffi_storeDouble, 3) \
|
|
|
|
V(Ffi_storePointer, 3) \
|
2019-02-13 12:42:47 +00:00
|
|
|
V(Ffi_address, 1) \
|
|
|
|
V(Ffi_fromAddress, 1) \
|
|
|
|
V(Ffi_sizeOf, 0) \
|
2019-07-05 21:59:27 +00:00
|
|
|
V(Ffi_asFunctionInternal, 1) \
|
2019-09-18 14:56:27 +00:00
|
|
|
V(Ffi_nativeCallbackFunction, 2) \
|
|
|
|
V(Ffi_pointerFromFunction, 1) \
|
2019-02-13 12:42:47 +00:00
|
|
|
V(Ffi_dl_open, 1) \
|
|
|
|
V(Ffi_dl_lookup, 2) \
|
2019-06-06 19:49:07 +00:00
|
|
|
V(Ffi_dl_getHandle, 1) \
|
2019-08-07 13:10:30 +00:00
|
|
|
V(Ffi_asExternalTypedData, 2) \
|
2019-08-19 14:24:01 +00:00
|
|
|
V(Ffi_dl_processLibrary, 0) \
|
|
|
|
V(Ffi_dl_executableLibrary, 0) \
|
[vm/ffi] Expose dart_native_api.h symbols via dart:ffi
This enables dynamic linking of the symbols in dart_native_api.h to work around the Windows linking issue and Dart embedders not exposing symbols.
Issue: https://github.com/dart-lang/sdk/issues/40607
Closes: https://github.com/dart-lang/sdk/issues/40564
Change-Id: I6f797cc915b53ec63fa5953529f17c40e52a2aed
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136962
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-28 18:44:45 +00:00
|
|
|
V(NativeApiFunctionPointer, 1) \
|
2019-06-06 19:49:07 +00:00
|
|
|
V(TransferableTypedData_factory, 2) \
|
2019-08-28 23:11:21 +00:00
|
|
|
V(TransferableTypedData_materialize, 1) \
|
2019-09-13 18:25:16 +00:00
|
|
|
V(Wasm_initModule, 2) \
|
2019-09-24 21:24:57 +00:00
|
|
|
V(Wasm_describeModule, 1) \
|
2019-09-27 23:36:11 +00:00
|
|
|
V(Wasm_initImports, 1) \
|
|
|
|
V(Wasm_addMemoryImport, 4) \
|
|
|
|
V(Wasm_addGlobalImport, 6) \
|
|
|
|
V(Wasm_addFunctionImport, 5) \
|
2019-09-13 18:25:16 +00:00
|
|
|
V(Wasm_initMemory, 3) \
|
|
|
|
V(Wasm_growMemory, 2) \
|
|
|
|
V(Wasm_initInstance, 3) \
|
2019-10-01 18:19:56 +00:00
|
|
|
V(Wasm_initMemoryFromInstance, 2) \
|
|
|
|
V(Wasm_getMemoryPages, 1) \
|
2019-09-13 18:25:16 +00:00
|
|
|
V(Wasm_initFunction, 4) \
|
2019-08-28 23:11:21 +00:00
|
|
|
V(Wasm_callFunction, 2)
|
2016-02-22 17:55:20 +00:00
|
|
|
|
|
|
|
// List of bootstrap native entry points used in the dart:mirror library.
|
|
|
|
#define MIRRORS_BOOTSTRAP_NATIVE_LIST(V) \
|
2013-06-14 21:12:58 +00:00
|
|
|
V(Mirrors_makeLocalClassMirror, 1) \
|
2013-08-08 20:06:56 +00:00
|
|
|
V(Mirrors_makeLocalTypeMirror, 1) \
|
2017-01-10 14:53:21 +00:00
|
|
|
V(Mirrors_instantiateGenericType, 2) \
|
2013-10-11 20:56:14 +00:00
|
|
|
V(Mirrors_mangleName, 2) \
|
2013-08-01 16:40:10 +00:00
|
|
|
V(MirrorReference_equals, 2) \
|
2015-04-28 23:47:45 +00:00
|
|
|
V(MirrorSystem_libraries, 0) \
|
|
|
|
V(MirrorSystem_isolate, 0) \
|
2018-05-29 22:01:01 +00:00
|
|
|
V(IsolateMirror_loadUri, 1) \
|
2013-09-04 17:12:28 +00:00
|
|
|
V(InstanceMirror_invoke, 5) \
|
2013-07-15 21:14:43 +00:00
|
|
|
V(InstanceMirror_invokeGetter, 3) \
|
|
|
|
V(InstanceMirror_invokeSetter, 4) \
|
2013-10-04 22:08:55 +00:00
|
|
|
V(InstanceMirror_computeType, 1) \
|
2013-07-29 23:57:31 +00:00
|
|
|
V(ClosureMirror_function, 1) \
|
2014-02-11 20:41:32 +00:00
|
|
|
V(TypeMirror_subtypeTest, 2) \
|
2015-04-22 17:51:49 +00:00
|
|
|
V(ClassMirror_libraryUri, 1) \
|
2013-07-25 22:45:07 +00:00
|
|
|
V(ClassMirror_supertype, 1) \
|
2013-10-11 01:51:11 +00:00
|
|
|
V(ClassMirror_supertype_instantiated, 1) \
|
2013-07-30 00:29:52 +00:00
|
|
|
V(ClassMirror_interfaces, 1) \
|
2013-10-17 00:16:34 +00:00
|
|
|
V(ClassMirror_interfaces_instantiated, 1) \
|
2013-08-28 22:55:53 +00:00
|
|
|
V(ClassMirror_mixin, 1) \
|
2013-10-17 00:16:34 +00:00
|
|
|
V(ClassMirror_mixin_instantiated, 2) \
|
2015-04-08 21:40:51 +00:00
|
|
|
V(ClassMirror_members, 3) \
|
|
|
|
V(ClassMirror_constructors, 3) \
|
2013-07-24 23:51:15 +00:00
|
|
|
V(LibraryMirror_members, 2) \
|
2014-03-07 19:00:20 +00:00
|
|
|
V(LibraryMirror_libraryDependencies, 2) \
|
2013-09-04 17:12:28 +00:00
|
|
|
V(ClassMirror_invoke, 5) \
|
2013-07-15 21:14:43 +00:00
|
|
|
V(ClassMirror_invokeGetter, 3) \
|
|
|
|
V(ClassMirror_invokeSetter, 4) \
|
2013-09-12 00:48:16 +00:00
|
|
|
V(ClassMirror_invokeConstructor, 5) \
|
2013-07-30 22:57:59 +00:00
|
|
|
V(ClassMirror_type_variables, 1) \
|
2013-08-08 20:06:56 +00:00
|
|
|
V(ClassMirror_type_arguments, 1) \
|
2015-04-28 23:47:45 +00:00
|
|
|
V(LibraryMirror_fromPrefix, 1) \
|
2013-09-04 17:12:28 +00:00
|
|
|
V(LibraryMirror_invoke, 5) \
|
2013-07-15 21:14:43 +00:00
|
|
|
V(LibraryMirror_invokeGetter, 3) \
|
|
|
|
V(LibraryMirror_invokeSetter, 4) \
|
2013-08-08 20:06:56 +00:00
|
|
|
V(TypeVariableMirror_owner, 1) \
|
|
|
|
V(TypeVariableMirror_upper_bound, 1) \
|
2015-02-13 23:32:20 +00:00
|
|
|
V(DeclarationMirror_location, 1) \
|
2013-07-17 21:50:54 +00:00
|
|
|
V(DeclarationMirror_metadata, 1) \
|
2013-08-08 20:25:46 +00:00
|
|
|
V(FunctionTypeMirror_call_method, 2) \
|
2013-08-13 21:38:36 +00:00
|
|
|
V(FunctionTypeMirror_parameters, 2) \
|
2017-04-06 19:28:48 +00:00
|
|
|
V(FunctionTypeMirror_return_type, 1) \
|
2015-04-08 21:40:51 +00:00
|
|
|
V(MethodMirror_owner, 2) \
|
2013-08-13 21:38:36 +00:00
|
|
|
V(MethodMirror_parameters, 2) \
|
2013-11-08 17:54:59 +00:00
|
|
|
V(MethodMirror_return_type, 2) \
|
2013-08-26 17:14:07 +00:00
|
|
|
V(MethodMirror_source, 1) \
|
2013-11-08 17:54:59 +00:00
|
|
|
V(ParameterMirror_type, 3) \
|
2013-07-31 23:31:14 +00:00
|
|
|
V(TypedefMirror_referent, 1) \
|
2013-10-22 00:00:08 +00:00
|
|
|
V(TypedefMirror_declaration, 1) \
|
2016-11-08 21:54:47 +00:00
|
|
|
V(VariableMirror_type, 2)
|
2011-10-05 05:20:07 +00:00
|
|
|
|
2012-08-30 17:41:19 +00:00
|
|
|
class BootstrapNatives : public AllStatic {
|
|
|
|
public:
|
2013-12-19 17:47:56 +00:00
|
|
|
static Dart_NativeFunction Lookup(Dart_Handle name,
|
|
|
|
int argument_count,
|
|
|
|
bool* auto_setup_scope);
|
2012-08-30 17:41:19 +00:00
|
|
|
|
2020-05-07 16:16:08 +00:00
|
|
|
static const uint8_t* Symbol(Dart_NativeFunction nf);
|
2014-04-10 20:26:45 +00:00
|
|
|
|
2012-08-31 18:06:42 +00:00
|
|
|
#define DECLARE_BOOTSTRAP_NATIVE(name, ignored) \
|
2020-04-25 05:21:27 +00:00
|
|
|
static ObjectPtr DN_##name(Thread* thread, Zone* zone, \
|
|
|
|
NativeArguments* arguments);
|
2012-08-30 17:41:19 +00:00
|
|
|
|
|
|
|
BOOTSTRAP_NATIVE_LIST(DECLARE_BOOTSTRAP_NATIVE)
|
2017-07-12 19:55:55 +00:00
|
|
|
#if !defined(DART_PRECOMPILED_RUNTIME)
|
2016-02-22 17:55:20 +00:00
|
|
|
MIRRORS_BOOTSTRAP_NATIVE_LIST(DECLARE_BOOTSTRAP_NATIVE)
|
|
|
|
#endif
|
2012-08-30 17:41:19 +00:00
|
|
|
|
|
|
|
#undef DECLARE_BOOTSTRAP_NATIVE
|
|
|
|
};
|
2011-10-05 05:20:07 +00:00
|
|
|
|
|
|
|
} // namespace dart
|
|
|
|
|
2016-10-26 07:26:03 +00:00
|
|
|
#endif // RUNTIME_VM_BOOTSTRAP_NATIVES_H_
|