[vm/precomp] Take 4 for procedure- and class-entrypoints.
This reverts commit 08f59e5de360f53e370f4899144fe58f3bce5275.
There are no changes to take 3 except fixing merge conflicts.
Change-Id: I45d5a16274c80f469827c19f4e4f4ca724e85a67
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/68363
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
diff --git a/pkg/vm/bin/gen_kernel.dart b/pkg/vm/bin/gen_kernel.dart
index 7d91811..b5e949a 100644
--- a/pkg/vm/bin/gen_kernel.dart
+++ b/pkg/vm/bin/gen_kernel.dart
@@ -102,7 +102,6 @@
entryPoints.addAll([
'pkg/vm/lib/transformations/type_flow/entry_points.json',
'pkg/vm/lib/transformations/type_flow/entry_points_extra.json',
- 'pkg/vm/lib/transformations/type_flow/entry_points_extra_standalone.json',
]);
}
diff --git a/pkg/vm/lib/transformations/type_flow/analysis.dart b/pkg/vm/lib/transformations/type_flow/analysis.dart
index 1f4a615..82210b7 100644
--- a/pkg/vm/lib/transformations/type_flow/analysis.dart
+++ b/pkg/vm/lib/transformations/type_flow/analysis.dart
@@ -1180,7 +1180,7 @@
TypeFlowAnalysis(Component component, CoreTypes coreTypes,
ClosedWorldClassHierarchy hierarchy, this.environment, this.libraryIndex,
- {List<String> entryPointsJSONFiles})
+ {List<String> entryPointsJSONFiles, EntryPointsAnnotationMatcher matcher})
: nativeCodeOracle = new NativeCodeOracle(libraryIndex) {
hierarchyCache = new _ClassHierarchyCache(this, hierarchy);
summaryCollector =
@@ -1192,7 +1192,10 @@
nativeCodeOracle.processEntryPointsJSONFiles(entryPointsJSONFiles, this);
}
- component.accept(new PragmaEntryPointsVisitor(coreTypes, this));
+ matcher ??= new ConstantEntryPointsAnnotationMatcher(coreTypes);
+
+ component
+ .accept(new PragmaEntryPointsVisitor(this, nativeCodeOracle, matcher));
}
_Invocation get currentInvocation => workList.callStack.last;
diff --git a/pkg/vm/lib/transformations/type_flow/entry_points.json b/pkg/vm/lib/transformations/type_flow/entry_points.json
index 49ac98a..9ca4d78 100644
--- a/pkg/vm/lib/transformations/type_flow/entry_points.json
+++ b/pkg/vm/lib/transformations/type_flow/entry_points.json
@@ -1,2130 +1,1628 @@
{
- "roots": [
- {
- "library": "dart:core",
- "class": "Object",
- "action": "create-instance"
+ "native-methods": {
+ "ClassID_getID": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_add": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_ceil": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_div": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_doubleFromInteger": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_flipSignBit": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_floor": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_getIsInfinite": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_getIsNaN": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_getIsNegative": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_modulo": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_mul": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_round": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_sub": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Double_truncate": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Float32x4_abs": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_add": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_clamp": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_cmpequal": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_cmpgt": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_cmpgte": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_cmplt": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_cmplte": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_cmpnequal": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_fromDoubles": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_fromFloat64x2": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_fromInt32x4Bits": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_getW": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Float32x4_getX": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Float32x4_getY": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Float32x4_getZ": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Float32x4_max": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_min": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_mul": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_negate": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_reciprocal": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_reciprocalSqrt": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_scale": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_setW": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_setX": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_setY": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_setZ": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_shuffle": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_shuffleMix": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_splat": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_sqrt": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_sub": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float32x4_zero": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_abs": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_fromDoubles": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_fromFloat32x4": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_getX": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Float64x2_getY": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Float64x2_max": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_min": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_negate": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_scale": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_setX": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_setY": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_splat": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_sqrt": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Float64x2_zero": [
+ {
+ "action": "return",
+ "class": "_Float64x2",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "GrowableList_allocate": [
+ {
+ "action": "return",
+ "class": "_GrowableList",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "GrowableList_getCapacity": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "GrowableList_getLength": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Identical_comparison": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Int32x4_fromBools": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Int32x4_fromFloat32x4Bits": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Int32x4_fromInts": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Int32x4_getFlagW": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Int32x4_getFlagX": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Int32x4_getFlagY": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Int32x4_getFlagZ": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Int32x4_select": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Int32x4_setFlagW": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Int32x4_setFlagX": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Int32x4_setFlagY": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Int32x4_setFlagZ": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Int32x4_shuffle": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Int32x4_shuffleMix": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "Integer_equalToInteger": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Integer_greaterThanFromInteger": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "LinkedHashMap_getData": [
+ {
+ "action": "return",
+ "class": "_List",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "LinkedHashMap_getDeletedKeys": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "LinkedHashMap_getHashMask": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "LinkedHashMap_getIndex": [
+ {
+ "action": "return",
+ "class": "_Uint32List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "LinkedHashMap_getUsedData": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "List_allocate": [
+ {
+ "action": "return",
+ "class": "_List",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "List_getLength": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Object_equals": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Object_getHash": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Object_haveSameRuntimeType": [
+ {
+ "action": "return",
+ "class": "bool",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Object_runtimeType": [
+ {
+ "action": "return",
+ "class": "_Type",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "OneByteString_allocate": [
+ {
+ "action": "return",
+ "class": "_OneByteString",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "OneByteString_substringUnchecked": [
+ {
+ "action": "return",
+ "class": "_OneByteString",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Smi_bitAndFromSmi": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Smi_bitLength": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Smi_bitNegate": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "String_codeUnitAt": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "String_getHashCode": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "String_getLength": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "Type_getHashCode": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "TypedData_Float32Array_new": [
+ {
+ "action": "return",
+ "class": "_Float32List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Float32x4Array_new": [
+ {
+ "action": "return",
+ "class": "_Float32x4List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Float64Array_new": [
+ {
+ "action": "return",
+ "class": "_Float64List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Float64x2Array_new": [
+ {
+ "action": "return",
+ "class": "_Float64x2List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_GetFloat32": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "TypedData_GetFloat32x4": [
+ {
+ "action": "return",
+ "class": "_Float32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_GetFloat64": [
+ {
+ "action": "return",
+ "class": "_Double",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "TypedData_GetInt16": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "TypedData_GetInt32x4": [
+ {
+ "action": "return",
+ "class": "_Int32x4",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_GetInt8": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "TypedData_GetUint16": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "TypedData_GetUint8": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ],
+ "TypedData_Int16Array_new": [
+ {
+ "action": "return",
+ "class": "_Int16List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Int32Array_new": [
+ {
+ "action": "return",
+ "class": "_Int32List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Int32x4Array_new": [
+ {
+ "action": "return",
+ "class": "_Int32x4List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Int64Array_new": [
+ {
+ "action": "return",
+ "class": "_Int64List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Int8Array_new": [
+ {
+ "action": "return",
+ "class": "_Int8List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Uint16Array_new": [
+ {
+ "action": "return",
+ "class": "_Uint16List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Uint32Array_new": [
+ {
+ "action": "return",
+ "class": "_Uint32List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Uint64Array_new": [
+ {
+ "action": "return",
+ "class": "_Uint64List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Uint8Array_new": [
+ {
+ "action": "return",
+ "class": "_Uint8List",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_Uint8ClampedArray_new": [
+ {
+ "action": "return",
+ "class": "_Uint8ClampedList",
+ "library": "dart:typed_data",
+ "nullable": false
+ }
+ ],
+ "TypedData_length": [
+ {
+ "action": "return",
+ "class": "_Smi",
+ "library": "dart:core",
+ "nullable": false
+ }
+ ]
},
- {
- "library": "dart:core",
- "class": "_LibraryPrefix",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_Type",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_TypeRef",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_TypeParameter",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_BoundedType",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_MixinAppType",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_Closure",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_Smi",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_Mint",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_Double",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "bool",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_GrowableList",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "action": "create-instance"
- },
- {
- "library": "dart:isolate",
- "class": "_CapabilityImpl",
- "action": "create-instance"
- },
- {
- "library": "dart:isolate",
- "class": "_RawReceivePortImpl",
- "action": "create-instance"
- },
- {
- "library": "dart:isolate",
- "class": "_SendPortImpl",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_StackTrace",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_RegExp",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_WeakProperty",
- "action": "create-instance"
- },
- {
- "library": "dart:mirrors",
- "class": "_MirrorReference",
- "action": "create-instance"
- },
- {
- "library": "dart:collection",
- "class": "_InternalLinkedHashMap",
- "action": "create-instance"
- },
- {
- "library": "dart:developer",
- "class": "_UserTag",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_List",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_ImmutableList",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_OneByteString",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_TwoByteString",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_ExternalOneByteString",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_ExternalTwoByteString",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int8List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint8List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint8ClampedList",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int16List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint16List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int32List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint32List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int64List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint64List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float32List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float64List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float32x4List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int32x4List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float64x2List",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int8ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint8ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint8ClampedArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int16ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint16ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int32ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint32ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int64ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Uint64ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float32ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float64ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float32x4ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Int32x4ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_Float64x2ArrayView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ByteDataView",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalInt8Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalUint8Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalUint8ClampedArray",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalInt16Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalUint16Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalInt32Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalUint32Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalInt64Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalUint64Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalFloat32Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalFloat64Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalFloat32x4Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalInt32x4Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ExternalFloat64x2Array",
- "action": "create-instance"
- },
- {
- "library": "dart:typed_data",
- "class": "_ByteBuffer",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "Null",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "AbstractClassInstantiationError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "ArgumentError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "ArgumentError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "CyclicInitializationError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "FallThroughError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "FormatException",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "NoSuchMethodError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "NullThrownError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "OutOfMemoryError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "RangeError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "RangeError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "StackOverflowError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "UnsupportedError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_AssertionError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_CastError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_InternalError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_TypeError",
- "action": "create-instance"
- },
- {
- "library": "dart:isolate",
- "class": "IsolateSpawnException",
- "action": "create-instance"
- },
- {
- "library": "dart:io",
- "class": "CertificateException",
- "action": "create-instance"
- },
- {
- "library": "dart:io",
- "class": "FileSystemException",
- "action": "create-instance"
- },
- {
- "library": "dart:io",
- "class": "HandshakeException",
- "action": "create-instance"
- },
- {
- "library": "dart:io",
- "class": "OSError",
- "action": "create-instance"
- },
- {
- "library": "dart:io",
- "class": "TlsException",
- "action": "create-instance"
- },
- {
- "library": "dart:async",
- "name": "_ensureScheduleImmediate",
- "action": "call"
- },
- {
- "library": "dart:core",
- "name": "_completeDeferredLoads",
- "action": "call"
- },
- {
- "library": "dart:core",
- "name": "identityHashCode",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "AbstractClassInstantiationError",
- "name": "AbstractClassInstantiationError._create",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "ArgumentError",
- "name": "ArgumentError",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "ArgumentError",
- "name": "ArgumentError.value",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "CyclicInitializationError",
- "name": "CyclicInitializationError",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "FallThroughError",
- "name": "FallThroughError._create",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "FormatException",
- "name": "FormatException",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "NoSuchMethodError",
- "name": "NoSuchMethodError._withType",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "NullThrownError",
- "name": "NullThrownError",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "OutOfMemoryError",
- "name": "OutOfMemoryError",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "RangeError",
- "name": "RangeError",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "RangeError",
- "name": "RangeError.range",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "StackOverflowError",
- "name": "StackOverflowError",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "UnsupportedError",
- "name": "UnsupportedError",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_AssertionError",
- "name": "_AssertionError._create",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_CastError",
- "name": "_CastError._create",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_InternalError",
- "name": "_InternalError",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_InvocationMirror",
- "name": "_allocateInvocationMirror",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_InvocationMirror",
- "name": "_allocateInvocationMirrorForClosure",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_TypeError",
- "name": "_TypeError._create",
- "action": "call"
- },
- {
- "library": "dart:collection",
- "name": "_rehashObjects",
- "action": "call"
- },
- {
- "library": "dart:isolate",
- "class": "IsolateSpawnException",
- "name": "IsolateSpawnException",
- "action": "call"
- },
- {
- "library": "dart:isolate",
- "name": "_runPendingImmediateCallback",
- "action": "call"
- },
- {
- "library": "dart:isolate",
- "name": "_startIsolate",
- "action": "call"
- },
- {
- "library": "dart:isolate",
- "class": "_RawReceivePortImpl",
- "name": "_handleMessage",
- "action": "call"
- },
- {
- "library": "dart:isolate",
- "class": "_RawReceivePortImpl",
- "name": "_lookupHandler",
- "action": "call"
- },
- {
- "library": "dart:isolate",
- "class": "_SendPortImpl",
- "name": "send",
- "action": "call"
- },
- {
- "library": "dart:typed_data",
- "class": "ByteData",
- "name": "ByteData",
- "action": "call"
- },
- {
- "library": "dart:typed_data",
- "class": "ByteData",
- "name": "ByteData._view",
- "action": "call"
- },
- {
- "library": "dart:typed_data",
- "class": "_ByteBuffer",
- "name": "_ByteBuffer._New",
- "action": "call"
- },
- {
- "library": "dart:_vmservice",
- "name": "boot",
- "action": "call"
- },
- {
- "library": "dart:_vmservice",
- "name": "_registerIsolate",
- "action": "call"
- },
- {
- "library": "dart:developer",
- "class": "Metrics",
- "name": "_printMetrics",
- "action": "call"
- },
- {
- "library": "dart:developer",
- "name": "_runExtension",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "Error",
- "name": "_stackTrace",
- "action": "get"
- },
- {
- "library": "dart:core",
- "class": "Error",
- "name": "_stackTrace",
- "action": "set"
- },
- {
- "library": "dart:core",
- "name": "_uriBaseClosure",
- "action": "get"
- },
- {
- "library": "dart:core",
- "name": "_uriBaseClosure",
- "action": "set"
- },
- {
- "library": "dart:math",
- "class": "_Random",
- "name": "_state",
- "action": "get"
- },
- {
- "library": "dart:math",
- "class": "_Random",
- "name": "_state",
- "action": "set"
- },
- {
- "library": "dart:_builtin",
- "name": "_getPrintClosure",
- "action": "call"
- },
- {
- "library": "dart:_builtin",
- "name": "_libraryFilePath",
- "action": "call"
- },
- {
- "library": "dart:_builtin",
- "name": "_resolveInWorkingDirectory",
- "action": "call"
- },
- {
- "library": "dart:_builtin",
- "name": "_setPackageRoot",
- "action": "call"
- },
- {
- "library": "dart:_builtin",
- "name": "_setPackagesMap",
- "action": "call"
- },
- {
- "library": "dart:_builtin",
- "name": "_setWorkingDirectory",
- "action": "call"
- },
- {
- "library": "dart:async",
- "name": "_setScheduleImmediateClosure",
- "action": "call"
- },
- {
- "library": "dart:cli",
- "name": "_getWaitForEvent",
- "action": "call"
- },
- {
- "library": "dart:cli",
- "name": "_waitForEventClosure",
- "action": "get"
- },
- {
- "library": "dart:cli",
- "name": "_waitForEventClosure",
- "action": "set"
- },
- {
- "library": "dart:io",
- "name": "_getUriBaseClosure",
- "action": "call"
- },
- {
- "library": "dart:io",
- "name": "_getWatchSignalInternal",
- "action": "call"
- },
- {
- "library": "dart:io",
- "name": "_makeDatagram",
- "action": "call"
- },
- {
- "library": "dart:io",
- "name": "_makeUint8ListView",
- "action": "call"
- },
- {
- "library": "dart:io",
- "name": "_setupHooks",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "_EmbedderConfig",
- "name": "_mayExit",
- "action": "get"
- },
- {
- "library": "dart:io",
- "class": "_EmbedderConfig",
- "name": "_mayExit",
- "action": "set"
- },
- {
- "library": "dart:io",
- "class": "_ExternalBuffer",
- "name": "end",
- "action": "get"
- },
- {
- "library": "dart:io",
- "class": "_ExternalBuffer",
- "name": "start",
- "action": "get"
- },
- {
- "library": "dart:io",
- "class": "_ExternalBuffer",
- "name": "data",
- "action": "set"
- },
- {
- "library": "dart:io",
- "class": "_ExternalBuffer",
- "name": "end",
- "action": "set"
- },
- {
- "library": "dart:io",
- "class": "_ExternalBuffer",
- "name": "start",
- "action": "set"
- },
- {
- "library": "dart:io",
- "class": "_Namespace",
- "name": "_setupNamespace",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "_Platform",
- "name": "_nativeScript",
- "action": "set"
- },
- {
- "library": "dart:io",
- "class": "_ProcessStartStatus",
- "name": "_errorCode",
- "action": "set"
- },
- {
- "library": "dart:io",
- "class": "_ProcessStartStatus",
- "name": "_errorMessage",
- "action": "set"
- },
- {
- "library": "dart:io",
- "class": "_SecureFilterImpl",
- "name": "buffers",
- "action": "get"
- },
- {
- "library": "dart:io",
- "class": "_SecureFilterImpl",
- "name": "ENCRYPTED_SIZE",
- "action": "get"
- },
- {
- "library": "dart:io",
- "class": "_SecureFilterImpl",
- "name": "SIZE",
- "action": "get"
- },
- {
- "library": "dart:io",
- "class": "CertificateException",
- "name": "CertificateException",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "Directory",
- "name": "Directory",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "File",
- "name": "File",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "FileSystemException",
- "name": "FileSystemException",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "HandshakeException",
- "name": "HandshakeException",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "Link",
- "name": "Link",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "OSError",
- "name": "OSError",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "TlsException",
- "name": "TlsException",
- "action": "call"
- },
- {
- "library": "dart:io",
- "class": "X509Certificate",
- "name": "X509Certificate._",
- "action": "call"
- },
- {
- "library": "dart:isolate",
- "name": "_getIsolateScheduleImmediateClosure",
- "action": "call"
- },
- {
- "library": "dart:isolate",
- "name": "_setupHooks",
- "action": "call"
- },
- {
- "library": "dart:isolate",
- "name": "_startMainIsolate",
- "action": "call"
- },
- {
- "library": "dart:_builtin",
- "name": "_isolateId",
- "action": "get"
- },
- {
- "library": "dart:_builtin",
- "name": "_isolateId",
- "action": "set"
- },
- {
- "library": "dart:_builtin",
- "name": "_loadPort",
- "action": "get"
- },
- {
- "library": "dart:_builtin",
- "name": "_loadPort",
- "action": "set"
- },
- {
- "library": "dart:_internal",
- "name": "_printClosure",
- "action": "get"
- },
- {
- "library": "dart:_internal",
- "name": "_printClosure",
- "action": "set"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_autoStart",
- "action": "get"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_autoStart",
- "action": "set"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_deterministic",
- "action": "get"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_deterministic",
- "action": "set"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_ip",
- "action": "get"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_ip",
- "action": "set"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_isFuchsia",
- "action": "get"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_isFuchsia",
- "action": "set"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_isWindows",
- "action": "get"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_isWindows",
- "action": "set"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_originCheckDisabled",
- "action": "get"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_originCheckDisabled",
- "action": "set"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_port",
- "action": "get"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_port",
- "action": "set"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_signalWatch",
- "action": "get"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_signalWatch",
- "action": "set"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_traceLoading",
- "action": "get"
- },
- {
- "library": "dart:vmservice_io",
- "name": "_traceLoading",
- "action": "set"
- }
- ],
- "native-methods": {
- "Identical_comparison": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "ClassID_getID": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "List_allocate": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_List",
- "nullable": false
- }
- ],
- "TypedData_GetInt8": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "TypedData_GetUint8": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "TypedData_GetInt16": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "TypedData_GetUint16": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "TypedData_GetFloat32": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "TypedData_GetFloat64": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "TypedData_GetFloat32x4": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "TypedData_GetInt32x4": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Double_add": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Double_sub": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Double_mul": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Double_div": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Float32x4_fromDoubles": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_zero": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_splat": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_fromInt32x4Bits": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_fromFloat64x2": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_shuffle": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_shuffleMix": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_cmpequal": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Float32x4_cmpgt": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Float32x4_cmpgte": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Float32x4_cmplt": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Float32x4_cmplte": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Float32x4_cmpnequal": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Float32x4_min": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_max": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_scale": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_sqrt": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_reciprocalSqrt": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_reciprocal": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_negate": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_abs": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_clamp": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_setX": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_setY": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_setZ": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_setW": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float64x2_fromDoubles": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_zero": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_splat": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_fromFloat32x4": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_getX": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Float64x2_getY": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Float64x2_negate": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_abs": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_sqrt": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_scale": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_setX": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_setY": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_min": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Float64x2_max": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2",
- "nullable": false
- }
- ],
- "Int32x4_fromInts": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Int32x4_fromBools": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Int32x4_fromFloat32x4Bits": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Int32x4_getFlagX": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "Int32x4_getFlagY": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "Int32x4_getFlagZ": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "Int32x4_getFlagW": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "Int32x4_shuffle": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Int32x4_shuffleMix": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Int32x4_select": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Int32x4_setFlagX": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Int32x4_setFlagY": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Int32x4_setFlagZ": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "Int32x4_setFlagW": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4",
- "nullable": false
- }
- ],
- "LinkedHashMap_getIndex": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Uint32List",
- "nullable": false
- }
- ],
- "LinkedHashMap_getData": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_List",
- "nullable": false
- }
- ],
- "LinkedHashMap_getUsedData": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "LinkedHashMap_getHashMask": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "LinkedHashMap_getDeletedKeys": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "Smi_bitNegate": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "Smi_bitLength": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "Smi_bitAndFromSmi": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "Double_getIsNaN": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "Double_getIsInfinite": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "Double_getIsNegative": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "Double_doubleFromInteger": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "GrowableList_allocate": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_GrowableList",
- "nullable": false
- }
- ],
- "Object_equals": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "Object_runtimeType": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Type",
- "nullable": false
- }
- ],
- "Object_haveSameRuntimeType": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "String_getHashCode": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "String_getHashCode": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "OneByteString_substringUnchecked": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_OneByteString",
- "nullable": false
- }
- ],
- "OneByteString_allocate": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_OneByteString",
- "nullable": false
- }
- ],
- "Type_getHashCode": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "Object_getHash": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "TypedData_Int8Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int8List",
- "nullable": false
- }
- ],
- "TypedData_Uint8Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Uint8List",
- "nullable": false
- }
- ],
- "TypedData_Uint8ClampedArray_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Uint8ClampedList",
- "nullable": false
- }
- ],
- "TypedData_Int16Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int16List",
- "nullable": false
- }
- ],
- "TypedData_Uint16Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Uint16List",
- "nullable": false
- }
- ],
- "TypedData_Int32Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32List",
- "nullable": false
- }
- ],
- "TypedData_Uint32Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Uint32List",
- "nullable": false
- }
- ],
- "TypedData_Int64Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int64List",
- "nullable": false
- }
- ],
- "TypedData_Uint64Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Uint64List",
- "nullable": false
- }
- ],
- "TypedData_Float32Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32List",
- "nullable": false
- }
- ],
- "TypedData_Float64Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64List",
- "nullable": false
- }
- ],
- "TypedData_Float32x4Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4List",
- "nullable": false
- }
- ],
- "TypedData_Int32x4Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Int32x4List",
- "nullable": false
- }
- ],
- "TypedData_Float64x2Array_new": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float64x2List",
- "nullable": false
- }
- ],
- "Integer_greaterThanFromInteger": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "Integer_equalToInteger": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "bool",
- "nullable": false
- }
- ],
- "List_getLength": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "List_getLength": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "GrowableList_getLength": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "GrowableList_getCapacity": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "String_getLength": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "String_codeUnitAt": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "String_codeUnitAt": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "String_codeUnitAt": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "String_codeUnitAt": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "Double_flipSignBit": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Double_truncate": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Double_round": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Double_floor": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Double_ceil": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Double_modulo": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "TypedData_length": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Smi",
- "nullable": false
- }
- ],
- "Float32x4_getX": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Float32x4_getY": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Float32x4_getZ": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Float32x4_getW": [
- {
- "action": "return",
- "library": "dart:core",
- "class": "_Double",
- "nullable": false
- }
- ],
- "Float32x4_mul": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_sub": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
- ],
- "Float32x4_add": [
- {
- "action": "return",
- "library": "dart:typed_data",
- "class": "_Float32x4",
- "nullable": false
- }
+ "roots": [
+ {
+ "action": "create-instance",
+ "class": "Object",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_LibraryPrefix",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Type",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_TypeRef",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_TypeParameter",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_BoundedType",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_MixinAppType",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Closure",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Smi",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Mint",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Double",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "bool",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_GrowableList",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float32x4",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int32x4",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float64x2",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_CapabilityImpl",
+ "library": "dart:isolate"
+ },
+ {
+ "action": "create-instance",
+ "class": "_RawReceivePortImpl",
+ "library": "dart:isolate"
+ },
+ {
+ "action": "create-instance",
+ "class": "_SendPortImpl",
+ "library": "dart:isolate"
+ },
+ {
+ "action": "create-instance",
+ "class": "_StackTrace",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_RegExp",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_WeakProperty",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_MirrorReference",
+ "library": "dart:mirrors"
+ },
+ {
+ "action": "create-instance",
+ "class": "_InternalLinkedHashMap",
+ "library": "dart:collection"
+ },
+ {
+ "action": "create-instance",
+ "class": "_UserTag",
+ "library": "dart:developer"
+ },
+ {
+ "action": "create-instance",
+ "class": "_List",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ImmutableList",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_OneByteString",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_TwoByteString",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalOneByteString",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalTwoByteString",
+ "library": "dart:core"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int8List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint8List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint8ClampedList",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int16List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint16List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int32List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint32List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int64List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint64List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float32List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float64List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float32x4List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int32x4List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float64x2List",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int8ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint8ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint8ClampedArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int16ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint16ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int32ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint32ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int64ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Uint64ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float32ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float64ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float32x4ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Int32x4ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_Float64x2ArrayView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ByteDataView",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalInt8Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalUint8Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalUint8ClampedArray",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalInt16Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalUint16Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalInt32Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalUint32Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalInt64Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalUint64Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalFloat32Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalFloat64Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalFloat32x4Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalInt32x4Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ExternalFloat64x2Array",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "_ByteBuffer",
+ "library": "dart:typed_data"
+ },
+ {
+ "action": "create-instance",
+ "class": "Null",
+ "library": "dart:core"
+ },
+ {
+ "action": "get",
+ "class": "Error",
+ "library": "dart:core",
+ "name": "_stackTrace"
+ },
+ {
+ "action": "set",
+ "class": "Error",
+ "library": "dart:core",
+ "name": "_stackTrace"
+ },
+ {
+ "action": "get",
+ "library": "dart:core",
+ "name": "_uriBaseClosure"
+ },
+ {
+ "action": "set",
+ "library": "dart:core",
+ "name": "_uriBaseClosure"
+ },
+ {
+ "action": "get",
+ "class": "_Random",
+ "library": "dart:math",
+ "name": "_state"
+ },
+ {
+ "action": "set",
+ "class": "_Random",
+ "library": "dart:math",
+ "name": "_state"
+ },
+ {
+ "action": "get",
+ "class": "_ExternalBuffer",
+ "library": "dart:io",
+ "name": "end"
+ },
+ {
+ "action": "get",
+ "class": "_ExternalBuffer",
+ "library": "dart:io",
+ "name": "start"
+ },
+ {
+ "action": "set",
+ "class": "_ExternalBuffer",
+ "library": "dart:io",
+ "name": "data"
+ },
+ {
+ "action": "set",
+ "class": "_ExternalBuffer",
+ "library": "dart:io",
+ "name": "end"
+ },
+ {
+ "action": "set",
+ "class": "_ExternalBuffer",
+ "library": "dart:io",
+ "name": "start"
+ },
+ {
+ "action": "set",
+ "class": "_Platform",
+ "library": "dart:io",
+ "name": "_nativeScript"
+ },
+ {
+ "action": "set",
+ "class": "_ProcessStartStatus",
+ "library": "dart:io",
+ "name": "_errorCode"
+ },
+ {
+ "action": "set",
+ "class": "_ProcessStartStatus",
+ "library": "dart:io",
+ "name": "_errorMessage"
+ },
+ {
+ "action": "get",
+ "class": "_SecureFilterImpl",
+ "library": "dart:io",
+ "name": "buffers"
+ },
+ {
+ "action": "get",
+ "class": "_SecureFilterImpl",
+ "library": "dart:io",
+ "name": "ENCRYPTED_SIZE"
+ },
+ {
+ "action": "get",
+ "class": "_SecureFilterImpl",
+ "library": "dart:io",
+ "name": "SIZE"
+ },
+ {
+ "action": "get",
+ "class": "_EmbedderConfig",
+ "library": "dart:io",
+ "name": "_mayExit"
+ },
+ {
+ "action": "set",
+ "class": "_EmbedderConfig",
+ "library": "dart:io",
+ "name": "_mayExit"
+ },
+ {
+ "action": "get",
+ "library": "dart:cli",
+ "name": "_waitForEventClosure"
+ },
+ {
+ "action": "set",
+ "library": "dart:cli",
+ "name": "_waitForEventClosure"
+ },
+ {
+ "action": "get",
+ "library": "dart:_builtin",
+ "name": "_isolateId"
+ },
+ {
+ "action": "set",
+ "library": "dart:_builtin",
+ "name": "_isolateId"
+ },
+ {
+ "action": "get",
+ "library": "dart:_builtin",
+ "name": "_loadPort"
+ },
+ {
+ "action": "set",
+ "library": "dart:_builtin",
+ "name": "_loadPort"
+ },
+ {
+ "action": "get",
+ "library": "dart:_internal",
+ "name": "_printClosure"
+ },
+ {
+ "action": "set",
+ "library": "dart:_internal",
+ "name": "_printClosure"
+ },
+ {
+ "action": "get",
+ "library": "dart:vmservice_io",
+ "name": "_autoStart"
+ },
+ {
+ "action": "set",
+ "library": "dart:vmservice_io",
+ "name": "_autoStart"
+ },
+ {
+ "action": "get",
+ "library": "dart:vmservice_io",
+ "name": "_deterministic"
+ },
+ {
+ "action": "set",
+ "library": "dart:vmservice_io",
+ "name": "_deterministic"
+ },
+ {
+ "action": "get",
+ "library": "dart:vmservice_io",
+ "name": "_ip"
+ },
+ {
+ "action": "set",
+ "library": "dart:vmservice_io",
+ "name": "_ip"
+ },
+ {
+ "action": "get",
+ "library": "dart:vmservice_io",
+ "name": "_isFuchsia"
+ },
+ {
+ "action": "set",
+ "library": "dart:vmservice_io",
+ "name": "_isFuchsia"
+ },
+ {
+ "action": "get",
+ "library": "dart:vmservice_io",
+ "name": "_isWindows"
+ },
+ {
+ "action": "set",
+ "library": "dart:vmservice_io",
+ "name": "_isWindows"
+ },
+ {
+ "action": "get",
+ "library": "dart:vmservice_io",
+ "name": "_originCheckDisabled"
+ },
+ {
+ "action": "set",
+ "library": "dart:vmservice_io",
+ "name": "_originCheckDisabled"
+ },
+ {
+ "action": "get",
+ "library": "dart:vmservice_io",
+ "name": "_port"
+ },
+ {
+ "action": "set",
+ "library": "dart:vmservice_io",
+ "name": "_port"
+ },
+ {
+ "action": "get",
+ "library": "dart:vmservice_io",
+ "name": "_signalWatch"
+ },
+ {
+ "action": "set",
+ "library": "dart:vmservice_io",
+ "name": "_signalWatch"
+ },
+ {
+ "action": "get",
+ "library": "dart:vmservice_io",
+ "name": "_traceLoading"
+ },
+ {
+ "action": "set",
+ "library": "dart:vmservice_io",
+ "name": "_traceLoading"
+ }
]
- }
}
diff --git a/pkg/vm/lib/transformations/type_flow/entry_points_extra.json b/pkg/vm/lib/transformations/type_flow/entry_points_extra.json
index e739bb9..9d146c5 100644
--- a/pkg/vm/lib/transformations/type_flow/entry_points_extra.json
+++ b/pkg/vm/lib/transformations/type_flow/entry_points_extra.json
@@ -2,86 +2,6 @@
"roots": [
{
"library": "dart:core",
- "class": "Object",
- "name": "noSuchMethod",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "Object",
- "name": "_haveSameRuntimeType",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "Object",
- "name": "_instanceOf",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "List",
- "name": "_fromLiteral",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "Map",
- "name": "_fromLiteral",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_ImmutableList",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_ImmutableMap",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "_ImmutableMap",
- "name": "_create",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_StringBase",
- "name": "_interpolate",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_StringBase",
- "name": "_interpolateSingle",
- "action": "call"
- },
- {
- "library": "dart:core",
- "name": "_classRangeAssert",
- "action": "call"
- },
- {
- "library": "dart:core",
- "name": "_classIdEqualsAssert",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_AssertionError",
- "name": "_evaluateAssertion",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "_AssertionError",
- "name": "_throwNew",
- "action": "call"
- },
- {
- "library": "dart:core",
"class": "_Closure",
"name": "_instantiator_type_arguments",
"action": "get"
@@ -115,64 +35,6 @@
"class": "_Closure",
"name": "_hash",
"action": "get"
- },
- {
- "library": "dart:core",
- "class": "_CompileTimeError",
- "action": "create-instance"
- },
- {
- "library": "dart:core",
- "class": "Object",
- "name": "_simpleInstanceOf",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "Object",
- "name": "_simpleInstanceOfTrue",
- "action": "call"
- },
- {
- "library": "dart:core",
- "class": "Object",
- "name": "_simpleInstanceOfFalse",
- "action": "call"
- },
- {
- "library": "dart:_internal",
- "name": "_classRangeCheck",
- "action": "call"
- },
- {
- "library": "dart:_internal",
- "name": "_prependTypeArguments",
- "action": "call"
- },
- {
- "library": "dart:async",
- "name": "_setAsyncThreadStackTrace",
- "action": "call"
- },
- {
- "library": "dart:async",
- "name": "_clearAsyncThreadStackTrace",
- "action": "call"
- },
- {
- "library": "dart:async",
- "name": "_asyncStarMoveNextHelper",
- "action": "call"
- },
- {
- "library": "dart:async",
- "name": "_completeOnAsyncReturn",
- "action": "call"
- },
- {
- "library": "dart:async",
- "class": "_AsyncStarStreamController",
- "action": "create-instance"
}
]
}
diff --git a/pkg/vm/lib/transformations/type_flow/entry_points_extra_standalone.json b/pkg/vm/lib/transformations/type_flow/entry_points_extra_standalone.json
deleted file mode 100644
index 8979143..0000000
--- a/pkg/vm/lib/transformations/type_flow/entry_points_extra_standalone.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "roots": [
- {
- "library": "dart:_builtin",
- "name": "_resolveScriptUri",
- "action": "call"
- }
- ]
-}
diff --git a/pkg/vm/lib/transformations/type_flow/native_code.dart b/pkg/vm/lib/transformations/type_flow/native_code.dart
index cc078c6..39c558d 100644
--- a/pkg/vm/lib/transformations/type_flow/native_code.dart
+++ b/pkg/vm/lib/transformations/type_flow/native_code.dart
@@ -29,25 +29,23 @@
ConcreteType addAllocatedClass(Class c);
}
-/// Some entry points are not listed in any JSON file but are marked with the
-/// `@pragma('vm.entry_point', ...)` annotation instead.
-///
-/// Currently Procedure`s (action "call") can be annotated in this way.
-//
-// TODO(sjindel): Support all types of entry points.
-class PragmaEntryPointsVisitor extends RecursiveVisitor {
- final EntryPointsListener entryPoints;
+abstract class EntryPointsAnnotationMatcher {
+ bool annotationsDefineRoot(List<Expression> annotations);
+}
+
+class ConstantEntryPointsAnnotationMatcher
+ implements EntryPointsAnnotationMatcher {
final CoreTypes coreTypes;
- PragmaEntryPointsVisitor(this.coreTypes, this.entryPoints);
+ ConstantEntryPointsAnnotationMatcher(this.coreTypes);
- bool _definesRoot(InstanceConstant constant) {
+ bool definesRoot(InstanceConstant constant) {
if (constant.classReference.node != coreTypes.pragmaClass) return false;
Constant name = constant.fieldValues[coreTypes.pragmaName.reference];
assertx(name != null);
if (name is! StringConstant ||
- (name as StringConstant).value != "vm.entry_point") {
+ (name as StringConstant).value != "vm.entry-point") {
return false;
}
@@ -57,34 +55,66 @@
return options is BoolConstant && options.value;
}
- bool _annotationsDefineRoot(List<Expression> annotations) {
+ @override
+ bool annotationsDefineRoot(List<Expression> annotations) {
for (var annotation in annotations) {
if (annotation is ConstantExpression) {
Constant constant = annotation.constant;
if (constant is InstanceConstant) {
- if (_definesRoot(constant)) {
+ if (definesRoot(constant)) {
return true;
}
}
+ } else {
+ throw "All annotations must be constants!";
}
}
return false;
}
+}
+
+/// Some entry points are not listed in any JSON file but are marked with the
+/// `@pragma('vm.entry-point', ...)` annotation instead.
+///
+/// Currently Procedure`s (action "call") can be annotated in this way.
+//
+// TODO(sjindel): Support all types of entry points.
+class PragmaEntryPointsVisitor extends RecursiveVisitor {
+ final EntryPointsListener entryPoints;
+ final NativeCodeOracle nativeCodeOracle;
+ final EntryPointsAnnotationMatcher matcher;
+ Class currentClass = null;
+
+ PragmaEntryPointsVisitor(
+ this.entryPoints, this.nativeCodeOracle, this.matcher);
@override
visitClass(Class klass) {
- if (_annotationsDefineRoot(klass.annotations)) {
+ if (matcher.annotationsDefineRoot(klass.annotations)) {
entryPoints.addAllocatedClass(klass);
}
+ currentClass = klass;
klass.visitChildren(this);
}
@override
visitProcedure(Procedure proc) {
- if (_annotationsDefineRoot(proc.annotations)) {
+ if (matcher.annotationsDefineRoot(proc.annotations)) {
+ assertx(!proc.isGetter && !proc.isSetter);
entryPoints.addRawCall(proc.isInstanceMember
? new InterfaceSelector(proc, callKind: CallKind.Method)
: new DirectSelector(proc, callKind: CallKind.Method));
+ nativeCodeOracle.setMemberReferencedFromNativeCode(proc);
+ }
+ }
+
+ @override
+ visitConstructor(Constructor ctor) {
+ if (matcher.annotationsDefineRoot(ctor.annotations)) {
+ entryPoints
+ .addRawCall(new DirectSelector(ctor, callKind: CallKind.Method));
+ entryPoints.addAllocatedClass(currentClass);
+ nativeCodeOracle.setMemberReferencedFromNativeCode(ctor);
}
}
}
@@ -101,6 +131,9 @@
bool isMemberReferencedFromNativeCode(Member member) =>
_membersReferencedFromNativeCode.contains(member);
+ void setMemberReferencedFromNativeCode(Member member) =>
+ _membersReferencedFromNativeCode.add(member);
+
/// Simulate the execution of a native method by adding its entry points
/// using [entryPointsListener]. Returns result type of the native method.
Type handleNativeProcedure(
diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart
index cfcbec7..eb2f7d1 100644
--- a/pkg/vm/lib/transformations/type_flow/transformer.dart
+++ b/pkg/vm/lib/transformations/type_flow/transformer.dart
@@ -14,6 +14,7 @@
import 'package:kernel/type_environment.dart';
import 'analysis.dart';
+import 'native_code.dart';
import 'calls.dart';
import 'summary_collector.dart';
import 'types.dart';
@@ -31,7 +32,8 @@
/// Whole-program type flow analysis and transformation.
/// Assumes strong mode and closed world.
Component transformComponent(
- CoreTypes coreTypes, Component component, List<String> entryPoints) {
+ CoreTypes coreTypes, Component component, List<String> entryPoints,
+ [EntryPointsAnnotationMatcher matcher]) {
if ((entryPoints == null) || entryPoints.isEmpty) {
throw 'Error: unable to perform global type flow analysis without entry points.';
}
@@ -53,7 +55,7 @@
final typeFlowAnalysis = new TypeFlowAnalysis(
component, coreTypes, hierarchy, types, libraryIndex,
- entryPointsJSONFiles: entryPoints);
+ entryPointsJSONFiles: entryPoints, matcher: matcher);
Procedure main = component.mainMethod;
final Selector mainSelector = new DirectSelector(main);
diff --git a/pkg/vm/test/transformations/type_flow/transformer_test.dart b/pkg/vm/test/transformations/type_flow/transformer_test.dart
index 009110a..d0a2e8c 100644
--- a/pkg/vm/test/transformations/type_flow/transformer_test.dart
+++ b/pkg/vm/test/transformations/type_flow/transformer_test.dart
@@ -8,13 +8,52 @@
import 'package:kernel/core_types.dart';
import 'package:kernel/kernel.dart';
import 'package:test/test.dart';
+import 'package:vm/transformations/type_flow/native_code.dart';
import 'package:vm/transformations/type_flow/transformer.dart'
show transformComponent;
+import 'package:vm/transformations/type_flow/utils.dart';
import '../../common_test_utils.dart';
final String pkgVmDir = Platform.script.resolve('../../..').toFilePath();
+// Since we don't run the constants transformation in this test, we can't
+// recognize all pragma annotations precisely. Instead, we pattern match on
+// annotations which look like a pragma and assume that their options field
+// evaluates to true.
+class ExpressionEntryPointsAnnotationMatcher
+ extends EntryPointsAnnotationMatcher {
+ final CoreTypes coreTypes;
+
+ ExpressionEntryPointsAnnotationMatcher(this.coreTypes);
+
+ bool _looksLikePragma(ConstructorInvocation annotation) {
+ if (annotation.constructedType.classNode != coreTypes.pragmaClass) {
+ return false;
+ }
+
+ if (annotation.arguments.types.length != 0 ||
+ annotation.arguments.positional.length < 1 ||
+ annotation.arguments.named.length != 0) {
+ throw "Cannot evaluate pragma annotation $annotation";
+ }
+
+ var argument = annotation.arguments.positional[0];
+ return argument is StringLiteral && argument.value == "vm.entry-point";
+ }
+
+ @override
+ bool annotationsDefineRoot(List<Expression> annotations) {
+ for (var annotation in annotations) {
+ assertx(annotation is! ConstantExpression);
+ if (annotation is ConstructorInvocation && _looksLikePragma(annotation)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
runTestCase(Uri source) async {
Component component = await compileTestCaseToKernelProgram(source);
@@ -25,7 +64,8 @@
pkgVmDir + '/lib/transformations/type_flow/entry_points_extra.json',
];
- component = transformComponent(coreTypes, component, entryPoints);
+ component = transformComponent(coreTypes, component, entryPoints,
+ new ExpressionEntryPointsAnnotationMatcher(coreTypes));
final actual = kernelLibraryToString(component.mainMethod.enclosingLibrary);
diff --git a/pkg/vm/tool/precompiler2 b/pkg/vm/tool/precompiler2
index 5689819..9dae451 100755
--- a/pkg/vm/tool/precompiler2
+++ b/pkg/vm/tool/precompiler2
@@ -90,8 +90,7 @@
BIN_DIR="$OUT_DIR/$DART_CONFIGURATION"
ENTRY_POINTS="--entry-points ${BIN_DIR}/gen/runtime/bin/precompiler_entry_points.json \
- --entry-points ${SDK_DIR}/pkg/vm/lib/transformations/type_flow/entry_points_extra.json \
- --entry-points ${SDK_DIR}/pkg/vm/lib/transformations/type_flow/entry_points_extra_standalone.json"
+ --entry-points ${SDK_DIR}/pkg/vm/lib/transformations/type_flow/entry_points_extra.json"
# Step 1: Generate Kernel binary from the input Dart source.
"$BIN_DIR"/dart \
@@ -116,4 +115,4 @@
# Step 3: Assemble the assembly file into an ELF object.
if [ $BUILD_ELF -eq 1 ]; then
gcc -shared -o "$SNAPSHOT_FILE" "$DART_BOOTSTRAP_OUT"
-fi
\ No newline at end of file
+fi
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index b562e34..f31cc5f 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -28,6 +28,7 @@
_printString(arg.toString());
}
+@pragma("vm.entry-point")
_getPrintClosure() => _print;
// Asynchronous loading of resources.
@@ -137,6 +138,7 @@
// Embedder Entrypoint:
// The embedder calls this method with the current working directory.
+@pragma("vm.entry-point")
void _setWorkingDirectory(String cwd) {
if (!_setupCompleted) {
_setupHooks();
@@ -152,6 +154,7 @@
// Embedder Entrypoint:
// The embedder calls this method with a custom package root.
+@pragma("vm.entry-point")
String _setPackageRoot(String packageRoot) {
if (!_setupCompleted) {
_setupHooks();
@@ -182,6 +185,7 @@
}
// Embedder Entrypoint:
+@pragma("vm.entry-point")
String _setPackagesMap(String packagesParam) {
if (!_setupCompleted) {
_setupHooks();
@@ -213,6 +217,7 @@
// Resolves the script uri in the current working directory iff the given uri
// did not specify a scheme (e.g. a path to a script file on the command line).
+@pragma("vm.entry-point")
String _resolveScriptUri(String scriptName) {
if (_traceLoading) {
_log("Resolving script: $scriptName");
@@ -241,6 +246,7 @@
// Embedder Entrypoint (gen_snapshot):
// Resolve relative paths relative to working directory.
+@pragma("vm.entry-point")
String _resolveInWorkingDirectory(String fileName) {
if (!_setupCompleted) {
_setupHooks();
@@ -297,6 +303,7 @@
}
// Embedder Entrypoint.
+@pragma("vm.entry-point")
_libraryFilePath(String libraryUri) {
if (!_setupCompleted) {
_setupHooks();
@@ -312,6 +319,7 @@
}
// Register callbacks and hooks with the rest of the core libraries.
+@pragma("vm.entry-point")
_setupHooks() {
_setupCompleted = true;
VMLibraryHooks.resourceReadAsBytes = _resourceReadAsBytes;
diff --git a/runtime/bin/common_patch.dart b/runtime/bin/common_patch.dart
index d5db154..2f83baf 100644
--- a/runtime/bin/common_patch.dart
+++ b/runtime/bin/common_patch.dart
@@ -55,6 +55,7 @@
static Uint8List getRandomBytes(int count) native "Crypto_GetRandomBytes";
}
+@pragma("vm.entry-point")
_setupHooks() {
VMLibraryHooks.eventHandlerSendData = _EventHandler._sendData;
VMLibraryHooks.timerMillisecondClock = _EventHandler._timerMillisecondClock;
diff --git a/runtime/bin/directory_patch.dart b/runtime/bin/directory_patch.dart
index ca15f32..c65356f 100644
--- a/runtime/bin/directory_patch.dart
+++ b/runtime/bin/directory_patch.dart
@@ -67,4 +67,5 @@
return new Uri.directory(result);
}
+@pragma("vm.entry-point")
_getUriBaseClosure() => _uriBaseClosure;
diff --git a/runtime/bin/file_patch.dart b/runtime/bin/file_patch.dart
index 99ee6ac..534e221 100644
--- a/runtime/bin/file_patch.dart
+++ b/runtime/bin/file_patch.dart
@@ -414,6 +414,7 @@
}
}
+@pragma("vm.entry-point")
Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) {
return new Uint8List.view(source.buffer, offsetInBytes, length);
}
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 10d5268..2e40590 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -895,46 +895,20 @@
static Dart_QualifiedFunctionName standalone_entry_points[] = {
// Functions.
- {"dart:_builtin", "::", "_getPrintClosure"},
- {"dart:_builtin", "::", "_libraryFilePath"},
- {"dart:_builtin", "::", "_resolveInWorkingDirectory"},
- {"dart:_builtin", "::", "_setPackageRoot"},
- {"dart:_builtin", "::", "_setPackagesMap"},
- {"dart:_builtin", "::", "_setWorkingDirectory"},
- {"dart:async", "::", "_setScheduleImmediateClosure"},
- {"dart:cli", "::", "_getWaitForEvent"},
- {"dart:cli", "::", "_waitForEventClosure"},
- {"dart:io", "::", "_getUriBaseClosure"},
- {"dart:io", "::", "_getWatchSignalInternal"},
- {"dart:io", "::", "_makeDatagram"},
- {"dart:io", "::", "_makeUint8ListView"},
- {"dart:io", "::", "_setupHooks"},
- {"dart:io", "_EmbedderConfig", "_mayExit"},
{"dart:io", "_ExternalBuffer", "get:end"},
{"dart:io", "_ExternalBuffer", "get:start"},
{"dart:io", "_ExternalBuffer", "set:data"},
{"dart:io", "_ExternalBuffer", "set:end"},
{"dart:io", "_ExternalBuffer", "set:start"},
- {"dart:io", "_Namespace", "_setupNamespace"},
{"dart:io", "_Platform", "set:_nativeScript"},
{"dart:io", "_ProcessStartStatus", "set:_errorCode"},
{"dart:io", "_ProcessStartStatus", "set:_errorMessage"},
{"dart:io", "_SecureFilterImpl", "get:buffers"},
{"dart:io", "_SecureFilterImpl", "get:ENCRYPTED_SIZE"},
{"dart:io", "_SecureFilterImpl", "get:SIZE"},
- {"dart:io", "CertificateException", "CertificateException."},
- {"dart:io", "Directory", "Directory."},
- {"dart:io", "File", "File."},
- {"dart:io", "FileSystemException", "FileSystemException."},
- {"dart:io", "HandshakeException", "HandshakeException."},
- {"dart:io", "Link", "Link."},
- {"dart:io", "OSError", "OSError."},
- {"dart:io", "TlsException", "TlsException."},
- {"dart:io", "X509Certificate", "X509Certificate._"},
- {"dart:isolate", "::", "_getIsolateScheduleImmediateClosure"},
- {"dart:isolate", "::", "_setupHooks"},
- {"dart:isolate", "::", "_startMainIsolate"},
// Fields
+ {"dart:io", "_EmbedderConfig", "_mayExit"},
+ {"dart:cli", "::", "_waitForEventClosure"},
{"dart:_builtin", "::", "_isolateId"},
{"dart:_builtin", "::", "_loadPort"},
{"dart:_internal", "::", "_printClosure"},
diff --git a/runtime/bin/namespace_patch.dart b/runtime/bin/namespace_patch.dart
index 8fc6463..5e486c2 100644
--- a/runtime/bin/namespace_patch.dart
+++ b/runtime/bin/namespace_patch.dart
@@ -33,6 +33,7 @@
@patch
class _Namespace {
@patch
+ @pragma("vm.entry-point")
static void _setupNamespace(var namespace) {
_NamespaceImpl._setupNamespace(namespace);
}
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index 80cf710..a20ec96 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -129,6 +129,7 @@
native "Process_ClearSignalHandler";
}
+@pragma("vm.entry-point")
Function _getWatchSignalInternal() => _ProcessUtils._watchSignalInternal;
@patch
diff --git a/runtime/bin/secure_socket_patch.dart b/runtime/bin/secure_socket_patch.dart
index 3bb9e53..5752837 100644
--- a/runtime/bin/secure_socket_patch.dart
+++ b/runtime/bin/secure_socket_patch.dart
@@ -20,6 +20,7 @@
@patch
class X509Certificate {
@patch
+ @pragma("vm.entry-point")
factory X509Certificate._() => new _X509CertificateImpl();
}
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 0d66baf..737a355 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -1905,6 +1905,7 @@
}
}
+@pragma("vm.entry-point")
Datagram _makeDatagram(
List<int> data, String address, List<int> in_addr, int port) {
return new Datagram(data, new _InternetAddress(address, null, in_addr), port);
diff --git a/runtime/bin/vmservice/vmservice_io.dart b/runtime/bin/vmservice/vmservice_io.dart
index 3747f4e..b5a6e85 100644
--- a/runtime/bin/vmservice/vmservice_io.dart
+++ b/runtime/bin/vmservice/vmservice_io.dart
@@ -220,7 +220,7 @@
_signalSubscription = _signalWatch(ProcessSignal.SIGQUIT).listen(_onSignal);
}
-@pragma("vm.entry_point", !const bool.fromEnvironment("dart.vm.product"))
+@pragma("vm.entry-point", !const bool.fromEnvironment("dart.vm.product"))
main() {
// Set embedder hooks.
VMServiceEmbedderHooks.cleanup = cleanupCallback;
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index 4800c82..b6b5508 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -121,6 +121,7 @@
// classes (and inline cache misses) versus a field in the native
// implementation (checks when modifying). We should keep watching
// the inline cache misses.
+@pragma("vm.entry-point")
class _ImmutableList<E> extends UnmodifiableListBase<E> {
factory _ImmutableList._uninstantiable() {
throw new UnsupportedError(
diff --git a/runtime/lib/array_patch.dart b/runtime/lib/array_patch.dart
index 3ff5fda..a072598 100644
--- a/runtime/lib/array_patch.dart
+++ b/runtime/lib/array_patch.dart
@@ -52,6 +52,7 @@
// Factory constructing a mutable List from a parser generated List literal.
// [elements] contains elements that are already type checked.
+ @pragma("vm.entry-point")
factory List._fromLiteral(List elements) {
if (elements.isEmpty) {
return new _GrowableList<E>(0);
diff --git a/runtime/lib/async_patch.dart b/runtime/lib/async_patch.dart
index 19d5b6a..ec67765 100644
--- a/runtime/lib/async_patch.dart
+++ b/runtime/lib/async_patch.dart
@@ -120,6 +120,7 @@
object._awaiter = awaiter;
}
+@pragma("vm.entry-point")
void _asyncStarMoveNextHelper(var stream) {
if (stream is! _StreamImpl) {
return;
@@ -134,6 +135,7 @@
// _AsyncStarStreamController is used by the compiler to implement
// async* generator functions.
+@pragma("vm.entry-point")
class _AsyncStarStreamController<T> {
StreamController<T> controller;
Function asyncStarBody;
@@ -288,6 +290,7 @@
Function _generator;
}
+@pragma("vm.entry-point")
void _completeOnAsyncReturn(Completer completer, Object value) {
completer.complete(value);
}
@@ -297,9 +300,11 @@
Object _asyncStackTraceHelper(Function async_op)
native "StackTrace_asyncStackTraceHelper";
+@pragma("vm.entry-point")
void _clearAsyncThreadStackTrace()
native "StackTrace_clearAsyncThreadStackTrace";
+@pragma("vm.entry-point")
void _setAsyncThreadStackTrace(StackTrace stackTrace)
native "StackTrace_setAsyncThreadStackTrace";
diff --git a/runtime/lib/compact_hash.dart b/runtime/lib/compact_hash.dart
index e9df2c8..6f7737e 100644
--- a/runtime/lib/compact_hash.dart
+++ b/runtime/lib/compact_hash.dart
@@ -8,6 +8,7 @@
// This function takes care of rehashing of the linked hashmaps in [objects]. We
// do this eagerly after snapshot deserialization.
+@pragma("vm.entry-point")
void _rehashObjects(List objects) {
final int length = objects.length;
for (int i = 0; i < length; ++i) {
diff --git a/runtime/lib/developer.dart b/runtime/lib/developer.dart
index f9ef541..9a3030a 100644
--- a/runtime/lib/developer.dart
+++ b/runtime/lib/developer.dart
@@ -68,6 +68,7 @@
native "Developer_registerExtension";
// This code is only invoked when there is no other Dart code on the stack.
+@pragma("vm.entry-point", !const bool.fromEnvironment("dart.vm.product"))
_runExtension(
ServiceExtensionHandler handler,
String method,
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index e7c2a2f..81c4675 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -23,12 +23,14 @@
}
class _AssertionError extends Error implements AssertionError {
+ @pragma("vm.entry-point")
_AssertionError._create(
this._failedAssertion, this._url, this._line, this._column, this.message);
// AssertionError_throwNew in errors.cc fishes the assertion source code
// out of the script. It expects a Dart stack frame from class
// _AssertionError. Thus we need a Dart stub that calls the native code.
+ @pragma("vm.entry-point")
static _throwNew(int assertionStart, int assertionEnd, Object message) {
_doThrowNew(assertionStart, assertionEnd, message);
}
@@ -36,6 +38,7 @@
static _doThrowNew(int assertionStart, int assertionEnd, Object message)
native "AssertionError_throwNew";
+ @pragma("vm.entry-point")
static _evaluateAssertion(condition) {
if (identical(condition, true) || identical(condition, false)) {
return condition;
@@ -77,6 +80,7 @@
}
class _TypeError extends _AssertionError implements TypeError {
+ @pragma("vm.entry-point")
_TypeError._create(String url, int line, int column, String errorMsg)
: super._create("is assignable", url, line, column, errorMsg);
@@ -99,6 +103,7 @@
}
class _CastError extends Error implements CastError {
+ @pragma("vm.entry-point")
_CastError._create(this._url, this._line, this._column, this._errorMsg);
// A CastError is allocated by TypeError._throwNew() when dst_name equals
@@ -116,6 +121,7 @@
@patch
class FallThroughError {
@patch
+ @pragma("vm.entry-point")
FallThroughError._create(String url, int line)
: _url = url,
_line = line;
@@ -134,6 +140,7 @@
}
class _InternalError {
+ @pragma("vm.entry-point")
const _InternalError(this._msg);
String toString() => "InternalError: '${_msg}'";
final String _msg;
@@ -155,6 +162,7 @@
@patch
class AbstractClassInstantiationError {
+ @pragma("vm.entry-point")
AbstractClassInstantiationError._create(
this._className, this._url, this._line);
@@ -252,6 +260,7 @@
// _throwNew above, taking a TypeArguments object rather than an unpacked list
// of types, as well as a list of all arguments and a list of names, rather
// than a separate list of positional arguments and a map of named arguments.
+ @pragma("vm.entry-point")
NoSuchMethodError._withType(
this._receiver,
String memberName,
@@ -570,12 +579,14 @@
}
}
+@pragma("vm.entry-point")
class _CompileTimeError extends Error {
final String _errorMsg;
_CompileTimeError(this._errorMsg);
String toString() => _errorMsg;
}
+@pragma("vm.entry-point")
dynamic _classRangeAssert(int position, dynamic instance, _Type type, int cid,
int lowerLimit, int upperLimit) {
if ((cid < lowerLimit || cid > upperLimit) && instance != null) {
@@ -585,6 +596,7 @@
return instance;
}
+@pragma("vm.entry-point")
dynamic _classIdEqualsAssert(
int position, dynamic instance, _Type type, int cid, int otherCid) {
if (cid != otherCid && instance != null) {
diff --git a/runtime/lib/identical_patch.dart b/runtime/lib/identical_patch.dart
index 3ac63a1..c414789 100644
--- a/runtime/lib/identical_patch.dart
+++ b/runtime/lib/identical_patch.dart
@@ -8,4 +8,5 @@
bool identical(Object a, Object b) native "Identical_comparison";
@patch
+@pragma("vm.entry-point")
int identityHashCode(Object object) => object._identityHashCode;
diff --git a/runtime/lib/immutable_map.dart b/runtime/lib/immutable_map.dart
index c9d51a8..8917dd1 100644
--- a/runtime/lib/immutable_map.dart
+++ b/runtime/lib/immutable_map.dart
@@ -7,9 +7,11 @@
/// Immutable map class for compiler generated map literals.
// TODO(lrn): Extend MapBase with UnmodifiableMapMixin when mixins
// support forwarding const constructors.
+@pragma("vm.entry-point")
class _ImmutableMap<K, V> implements Map<K, V> {
final _ImmutableList _kvPairs;
+ @pragma("vm.entry-point")
const _ImmutableMap._create(_ImmutableList keyValuePairs)
: _kvPairs = keyValuePairs;
diff --git a/runtime/lib/internal_patch.dart b/runtime/lib/internal_patch.dart
index fb640c3..af8b089 100644
--- a/runtime/lib/internal_patch.dart
+++ b/runtime/lib/internal_patch.dart
@@ -68,6 +68,7 @@
bool _inquireIs64Bit() native "Internal_inquireIs64Bit";
+@pragma("vm.entry-point")
bool _classRangeCheck(int cid, int lowerLimit, int upperLimit) {
return cid >= lowerLimit && cid <= upperLimit;
}
@@ -97,6 +98,7 @@
// function type arguments (may be null). The result is null if both input
// vectors are null or is a newly allocated and canonicalized vector of length
// 'totalLen'.
+@pragma("vm.entry-point")
_prependTypeArguments(functionTypeArguments, parentTypeArguments, parentLen,
totalLen) native "Internal_prependTypeArguments";
diff --git a/runtime/lib/invocation_mirror_patch.dart b/runtime/lib/invocation_mirror_patch.dart
index 2d9b9c4..00ceea2 100644
--- a/runtime/lib/invocation_mirror_patch.dart
+++ b/runtime/lib/invocation_mirror_patch.dart
@@ -176,6 +176,7 @@
this._positionalArguments, this._namedArguments, this._isSuperInvocation,
[this._delayedTypeArgumentsLen = 0]);
+ @pragma("vm.entry-point")
static _allocateInvocationMirror(String functionName,
List argumentsDescriptor, List arguments, bool isSuperInvocation,
[int type = null]) {
@@ -188,6 +189,7 @@
// indicate 0 type arguments, but the actual number of type arguments are
// passed in `delayedTypeArgumentsLen`. If any type arguments are available,
// the type arguments vector will be the first entry in `arguments`.
+ @pragma("vm.entry-point")
static _allocateInvocationMirrorForClosure(
String functionName,
List argumentsDescriptor,
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index 67be54a..7569397 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -106,6 +106,7 @@
_pendingImmediateCallback = callback;
}
+@pragma("vm.entry-point")
void _runPendingImmediateCallback() {
if (_pendingImmediateCallback != null) {
var callback = _pendingImmediateCallback;
@@ -122,6 +123,7 @@
/// The embedder can execute this function to get hold of
/// [_isolateScheduleImmediate] above.
+@pragma("vm.entry-point")
Function _getIsolateScheduleImmediateClosure() {
return _isolateScheduleImmediate;
}
@@ -152,12 +154,14 @@
_get_sendport() native "RawReceivePortImpl_get_sendport";
// Called from the VM to retrieve the handler for a message.
+ @pragma("vm.entry-point")
static _lookupHandler(int id) {
var result = _handlerMap[id];
return result;
}
// Called from the VM to dispatch to the handler.
+ @pragma("vm.entry-point")
static void _handleMessage(Function handler, var message) {
// TODO(floitsch): this relies on the fact that any exception aborts the
// VM. Once we have non-fatal global exceptions we need to catch errors
@@ -190,6 +194,7 @@
class _SendPortImpl implements SendPort {
/*--- public interface ---*/
+ @pragma("vm.entry-point")
void send(var message) {
_sendInternal(message);
}
@@ -219,6 +224,7 @@
* initial message. Defers execution of the entry point until the
* isolate is in the message loop.
*/
+@pragma("vm.entry-point")
void _startMainIsolate(Function entryPoint, List<String> args) {
_startIsolate(
null, // no parent port
@@ -234,6 +240,7 @@
* Takes the real entry point as argument and invokes it with the initial
* message.
*/
+@pragma("vm.entry-point")
void _startIsolate(
SendPort parentPort,
Function entryPoint,
diff --git a/runtime/lib/lib_prefix.dart b/runtime/lib/lib_prefix.dart
index d537858..aae8c85 100644
--- a/runtime/lib/lib_prefix.dart
+++ b/runtime/lib/lib_prefix.dart
@@ -46,6 +46,7 @@
var _outstandingLoadRequests = new List<List>();
// Called from the VM when an outstanding load request has finished.
+@pragma("vm.entry-point")
_completeDeferredLoads() {
// Determine which outstanding load requests have completed and complete
// their completer (with an error or true). For outstanding load requests
diff --git a/runtime/lib/map_patch.dart b/runtime/lib/map_patch.dart
index 0e41c85..f1a03a0 100644
--- a/runtime/lib/map_patch.dart
+++ b/runtime/lib/map_patch.dart
@@ -11,6 +11,7 @@
// The keys are at position 2*n and are already type checked by the parser
// in checked mode.
// The values are at position 2*n+1 and are not yet type checked.
+ @pragma("vm.entry-point")
factory Map._fromLiteral(List elements) {
var map = new LinkedHashMap<K, V>();
var len = elements.length;
diff --git a/runtime/lib/object_patch.dart b/runtime/lib/object_patch.dart
index a31639f..50f279a 100644
--- a/runtime/lib/object_patch.dart
+++ b/runtime/lib/object_patch.dart
@@ -41,6 +41,7 @@
static String _toString(obj) native "Object_toString";
@patch
+ @pragma("vm.entry-point")
dynamic noSuchMethod(Invocation invocation) {
// TODO(regis): Remove temp constructor identifier 'withInvocation'.
throw new NoSuchMethodError.withInvocation(this, invocation);
@@ -49,16 +50,21 @@
@patch
Type get runtimeType native "Object_runtimeType";
+ @pragma("vm.entry-point")
static bool _haveSameRuntimeType(a, b) native "Object_haveSameRuntimeType";
// Call this function instead of inlining instanceof, thus collecting
// type feedback and reducing code size of unoptimized code.
+ @pragma("vm.entry-point")
bool _instanceOf(instantiatorTypeArguments, functionTypeArguments, type)
native "Object_instanceOf";
// Group of functions for implementing fast simple instance of.
+ @pragma("vm.entry-point")
bool _simpleInstanceOf(type) native "Object_simpleInstanceOf";
+ @pragma("vm.entry-point")
bool _simpleInstanceOfTrue(type) => true;
+ @pragma("vm.entry-point")
bool _simpleInstanceOfFalse(type) => false;
// Call this function instead of inlining 'as', thus collecting type
diff --git a/runtime/lib/schedule_microtask_patch.dart b/runtime/lib/schedule_microtask_patch.dart
index 4dc837d..4efde2d 100644
--- a/runtime/lib/schedule_microtask_patch.dart
+++ b/runtime/lib/schedule_microtask_patch.dart
@@ -21,10 +21,12 @@
static _ScheduleImmediateClosure _closure;
}
+@pragma("vm.entry-point")
void _setScheduleImmediateClosure(_ScheduleImmediateClosure closure) {
_ScheduleImmediate._closure = closure;
}
+@pragma("vm.entry-point")
void _ensureScheduleImmediate() {
_AsyncRun._scheduleImmediate(_startMicrotaskLoop);
}
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index 3ec4e69..cc503ff 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -795,6 +795,7 @@
}
// Convert single object to string.
+ @pragma("vm.entry-point")
static String _interpolateSingle(Object o) {
if (o is String) return o;
final s = o.toString();
@@ -809,6 +810,7 @@
* into a result string.
* Modifies the input list if it contains non-`String` values.
*/
+ @pragma("vm.entry-point")
static String _interpolate(final List values) {
final numValues = values.length;
int totalLength = 0;
diff --git a/runtime/lib/timer_impl.dart b/runtime/lib/timer_impl.dart
index 250d86c..1f85aa2 100644
--- a/runtime/lib/timer_impl.dart
+++ b/runtime/lib/timer_impl.dart
@@ -462,6 +462,7 @@
}
}
+@pragma("vm.entry-point")
_setupHooks() {
VMLibraryHooks.timerFactory = _Timer._factory;
}
diff --git a/runtime/lib/typed_data_patch.dart b/runtime/lib/typed_data_patch.dart
index c8aea53..ddabaf5 100644
--- a/runtime/lib/typed_data_patch.dart
+++ b/runtime/lib/typed_data_patch.dart
@@ -1,4 +1,5 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+@pragma("vm.entry-point")
// 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.
@@ -36,12 +37,14 @@
@patch
class ByteData implements TypedData {
@patch
+ @pragma("vm.entry-point")
factory ByteData(int length) {
final list = new Uint8List(length) as _TypedList;
return new _ByteDataView(list, 0, length);
}
// Called directly from C code.
+ @pragma("vm.entry-point")
factory ByteData._view(_TypedList typedData, int offsetInBytes, int length) {
return new _ByteDataView(typedData, offsetInBytes, length);
}
@@ -1900,6 +1903,7 @@
_ByteBuffer(this._data);
+ @pragma("vm.entry-point")
factory _ByteBuffer._New(data) => new _ByteBuffer(data);
// Forward calls to _data.
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 41d2016..8d7065d 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -156,7 +156,7 @@
s->Write<int32_t>(cls->ptr()->next_field_offset_in_words_);
s->Write<int32_t>(cls->ptr()->type_arguments_field_offset_in_words_);
s->Write<uint16_t>(cls->ptr()->num_type_arguments_);
- s->Write<uint16_t>(cls->ptr()->num_own_type_arguments_);
+ s->Write<uint16_t>(cls->ptr()->has_pragma_and_num_own_type_arguments_);
s->Write<uint16_t>(cls->ptr()->num_native_fields_);
s->WriteTokenPosition(cls->ptr()->token_pos_);
s->Write<uint16_t>(cls->ptr()->state_bits_);
@@ -224,7 +224,7 @@
}
cls->ptr()->type_arguments_field_offset_in_words_ = d->Read<int32_t>();
cls->ptr()->num_type_arguments_ = d->Read<uint16_t>();
- cls->ptr()->num_own_type_arguments_ = d->Read<uint16_t>();
+ cls->ptr()->has_pragma_and_num_own_type_arguments_ = d->Read<uint16_t>();
cls->ptr()->num_native_fields_ = d->Read<uint16_t>();
cls->ptr()->token_pos_ = d->ReadTokenPosition();
cls->ptr()->state_bits_ = d->Read<uint16_t>();
@@ -260,7 +260,7 @@
cls->ptr()->next_field_offset_in_words_ = d->Read<int32_t>();
cls->ptr()->type_arguments_field_offset_in_words_ = d->Read<int32_t>();
cls->ptr()->num_type_arguments_ = d->Read<uint16_t>();
- cls->ptr()->num_own_type_arguments_ = d->Read<uint16_t>();
+ cls->ptr()->has_pragma_and_num_own_type_arguments_ = d->Read<uint16_t>();
cls->ptr()->num_native_fields_ = d->Read<uint16_t>();
cls->ptr()->token_pos_ = d->ReadTokenPosition();
cls->ptr()->state_bits_ = d->Read<uint16_t>();
diff --git a/runtime/vm/compiler/aot/entry_points_pragma.md b/runtime/vm/compiler/aot/entry_points_pragma.md
new file mode 100644
index 0000000..64d0d1b
--- /dev/null
+++ b/runtime/vm/compiler/aot/entry_points_pragma.md
@@ -0,0 +1,53 @@
+# Entry points @pragma annotations
+
+Dart VM precompiler (AOT compiler) performs whole-program optimizations such as
+tree shaking in order to decrease size of the resulting compiled apps and
+improve their performance. Such optimizations assume that compiler can see the
+whole Dart program, and is able to discover and analyze all Dart functions and
+members which can be potentially executed at run time. While the Dart code is
+fully available for precompiler, native code of the embedder and native methods
+are out of reach of the compiler. Such native code can call back to Dart via
+native Dart API.
+
+In order to aid precompiler, programmer can explicitly list entry points
+(roots) - Dart classes and members which are accessed from native code. Note
+that listing entry points is not optional: as long as program defines native
+methods which call into Dart, the entry points are required for the correctness
+of compilation.
+
+# Pragma annotation
+
+The annotation `@pragma("vm.entry-point", ...)` can be placed on a class or
+member to indicate that it may be allocated or invoked directly from native or
+VM code. The allowed uses of the annotation are as follows.
+
+## Classes
+
+Any one of the following forms may be attached to a class:
+
+```dart
+@pragma("vm.entry-point")
+@pragma("vm.entry-point", true/false)
+@pragma("vm.entry-point", !const bool.formEnvironment("dart.vm.product"))
+class C { ... }
+```
+
+If the second parameter is missing, `null` or `true`, the class will be
+available for allocation directly from native or VM code.
+
+## Procedures
+
+Any one of the following forms may be attached to a procedure (including
+getters, setters and constructors):
+
+```dart
+@pragma("vm.entry-point")
+@pragma("vm.entry-point", true/false)
+@pragma("vm.entry-point", !const bool.formEnvironment("dart.vm.product"))
+void foo() { ... }
+```
+
+If the second parameter is missing, `null` or `true`, the procedure will
+available for lookup and invocation directly from native or VM code. If the
+procedure is a *generative* constructor, the enclosing class will also be marked
+for allocation from native or VM code.
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index d961a99..4977385 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -491,48 +491,6 @@
}
static Dart_QualifiedFunctionName vm_entry_points[] = {
- // Functions
- {"dart:async", "::", "_ensureScheduleImmediate"},
- {"dart:core", "::", "_completeDeferredLoads"},
- {"dart:core", "::", "identityHashCode"},
- {"dart:core", "AbstractClassInstantiationError",
- "AbstractClassInstantiationError._create"},
- {"dart:core", "ArgumentError", "ArgumentError."},
- {"dart:core", "ArgumentError", "ArgumentError.value"},
- {"dart:core", "CyclicInitializationError", "CyclicInitializationError."},
- {"dart:core", "FallThroughError", "FallThroughError._create"},
- {"dart:core", "FormatException", "FormatException."},
- {"dart:core", "IntegerDivisionByZeroException",
- "IntegerDivisionByZeroException."},
- {"dart:core", "NoSuchMethodError", "NoSuchMethodError._withType"},
- {"dart:core", "NullThrownError", "NullThrownError."},
- {"dart:core", "OutOfMemoryError", "OutOfMemoryError."},
- {"dart:core", "RangeError", "RangeError."},
- {"dart:core", "RangeError", "RangeError.range"},
- {"dart:core", "StackOverflowError", "StackOverflowError."},
- {"dart:core", "UnsupportedError", "UnsupportedError."},
- {"dart:core", "_AssertionError", "_AssertionError._create"},
- {"dart:core", "_CastError", "_CastError._create"},
- {"dart:core", "_InternalError", "_InternalError."},
- {"dart:core", "_InvocationMirror", "_allocateInvocationMirror"},
- {"dart:core", "_InvocationMirror", "_allocateInvocationMirrorForClosure"},
- {"dart:core", "_TypeError", "_TypeError._create"},
- {"dart:collection", "::", "_rehashObjects"},
- {"dart:isolate", "IsolateSpawnException", "IsolateSpawnException."},
- {"dart:isolate", "::", "_runPendingImmediateCallback"},
- {"dart:isolate", "::", "_startIsolate"},
- {"dart:isolate", "_RawReceivePortImpl", "_handleMessage"},
- {"dart:isolate", "_RawReceivePortImpl", "_lookupHandler"},
- {"dart:isolate", "_SendPortImpl", "send"},
- {"dart:typed_data", "ByteData", "ByteData."},
- {"dart:typed_data", "ByteData", "ByteData._view"},
- {"dart:typed_data", "_ByteBuffer", "_ByteBuffer._New"},
- {"dart:_vmservice", "::", "boot"},
-#if !defined(PRODUCT)
- {"dart:_vmservice", "::", "_registerIsolate"},
- {"dart:developer", "Metrics", "_printMetrics"},
- {"dart:developer", "::", "_runExtension"},
-#endif // !PRODUCT
// Fields
{"dart:core", "Error", "_stackTrace"},
{"dart:core", "::", "_uriBaseClosure"},
@@ -1510,7 +1468,7 @@
}
}
-// Adds all values annotated with @pragma('vm.entry_point') as roots.
+// Adds all values annotated with @pragma('vm.entry-point') as roots.
void Precompiler::AddAnnotatedRoots() {
auto& lib = Library::Handle(Z);
auto& cls = Class::Handle(isolate()->object_store()->pragma_class());
@@ -1523,38 +1481,48 @@
auto& pragma_options_field =
Field::Handle(Z, cls.LookupField(Symbols::options()));
+ // Local function allows easy reuse of handles above.
+ auto metadata_defines_entrypoint = [&]() {
+ bool is_entry_point = false;
+ for (intptr_t i = 0; i < metadata.Length(); i++) {
+ pragma = metadata.At(i);
+ if (pragma.clazz() != isolate()->object_store()->pragma_class()) {
+ continue;
+ }
+ if (Instance::Cast(pragma).GetField(pragma_name_field) !=
+ Symbols::vm_entry_point().raw()) {
+ continue;
+ }
+ pragma_options = Instance::Cast(pragma).GetField(pragma_options_field);
+ if (pragma_options.raw() == Bool::null() ||
+ pragma_options.raw() == Bool::True().raw()) {
+ is_entry_point = true;
+ break;
+ }
+ }
+ return is_entry_point;
+ };
+
for (intptr_t i = 0; i < libraries_.Length(); i++) {
lib ^= libraries_.At(i);
ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate);
while (it.HasNext()) {
cls = it.GetNextClass();
+
+ if (cls.has_pragma()) {
+ metadata ^= lib.GetMetadata(cls);
+ if (metadata_defines_entrypoint()) {
+ AddInstantiatedClass(cls);
+ }
+ }
+
functions = cls.functions();
for (intptr_t k = 0; k < functions.Length(); k++) {
function ^= functions.At(k);
if (!function.has_pragma()) continue;
metadata ^= lib.GetMetadata(function);
if (metadata.IsNull()) continue;
-
- bool is_entry_point = false;
- for (intptr_t i = 0; i < metadata.Length(); i++) {
- pragma = metadata.At(i);
- if (pragma.clazz() != isolate()->object_store()->pragma_class()) {
- continue;
- }
- if (Instance::Cast(pragma).GetField(pragma_name_field) !=
- Symbols::vm_entry_point().raw()) {
- continue;
- }
- pragma_options =
- Instance::Cast(pragma).GetField(pragma_options_field);
- if (pragma_options.raw() == Bool::null() ||
- pragma_options.raw() == Bool::True().raw()) {
- is_entry_point = true;
- break;
- }
- }
-
- if (!is_entry_point) continue;
+ if (!metadata_defines_entrypoint()) continue;
AddFunction(function);
if (function.IsGenerativeConstructor()) {
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc
index fc88fec..0873b0e 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -1633,7 +1633,7 @@
"Tried calling: C.foo()\n"
"Found: C.foo(dynamic) => dynamic\n"
"#0 Object.noSuchMethod "
- "(dart:core/runtime/libobject_patch.dart:46:5)\n"
+ "(dart:core/runtime/libobject_patch.dart:47:5)\n"
"#1 main (file:///test-lib:8:12)";
} else {
error =
@@ -1643,7 +1643,7 @@
"Tried calling: C.foo()\n"
"Found: C.foo(dynamic) => dynamic\n"
"#0 Object.noSuchMethod "
- "(dart:core-patch/dart:core/object_patch.dart:46)\n"
+ "(dart:core-patch/dart:core/object_patch.dart:47)\n"
"#1 main (test-lib:8:12)";
}
EXPECT_ERROR(error_handle, error);
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index ac2c227..e2657ff 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -1112,7 +1112,17 @@
class_helper.ReadUntilIncluding(ClassHelper::kFlags);
if (class_helper.is_enum_class()) klass.set_is_enum_class();
- class_helper.ReadUntilIncluding(ClassHelper::kAnnotations);
+ class_helper.ReadUntilExcluding(ClassHelper::kAnnotations);
+ intptr_t annotation_count = helper_.ReadListLength();
+ bool has_pragma_annotation = false;
+ {
+ String& native_name_unused = String::Handle(Z);
+ bool is_potential_native_unused = false;
+ ReadVMAnnotations(annotation_count, &native_name_unused,
+ &is_potential_native_unused, &has_pragma_annotation);
+ }
+ klass.set_has_pragma(has_pragma_annotation);
+ class_helper.SetJustRead(ClassHelper::kAnnotations);
class_helper.ReadUntilExcluding(ClassHelper::kTypeParameters);
intptr_t type_parameter_counts =
helper_.ReadListLength(); // read type_parameters list length.
@@ -1128,7 +1138,7 @@
class_helper.SetJustRead(ClassHelper::kTypeParameters);
}
- if (FLAG_enable_mirrors && class_helper.annotation_count_ > 0) {
+ if ((FLAG_enable_mirrors || has_pragma_annotation) && annotation_count > 0) {
library.AddClassMetadata(klass, toplevel_class, TokenPosition::kNoSource,
class_offset - correction_offset_);
}
@@ -1228,6 +1238,16 @@
intptr_t constructor_offset = helper_.ReaderOffset() - correction_offset_;
ActiveMemberScope active_member_scope(&active_class_, NULL);
ConstructorHelper constructor_helper(&helper_);
+ constructor_helper.ReadUntilExcluding(ConstructorHelper::kAnnotations);
+ intptr_t annotation_count = helper_.ReadListLength();
+ bool has_pragma_annotation;
+ {
+ String& native_name_unused = String::Handle();
+ bool is_potential_native_unused;
+ ReadVMAnnotations(annotation_count, &native_name_unused,
+ &is_potential_native_unused, &has_pragma_annotation);
+ }
+ constructor_helper.SetJustRead(ConstructorHelper::kAnnotations);
constructor_helper.ReadUntilExcluding(ConstructorHelper::kFunction);
const String& name =
@@ -1254,6 +1274,7 @@
functions_.Add(&function);
function.set_kernel_offset(constructor_offset);
function.set_result_type(T.ReceiverType(klass));
+ function.set_has_pragma(has_pragma_annotation);
FunctionNodeHelper function_node_helper(&helper_);
function_node_helper.ReadUntilExcluding(
@@ -1270,7 +1291,8 @@
constructor_helper.SetJustRead(ConstructorHelper::kFunction);
constructor_helper.ReadUntilExcluding(ConstructorHelper::kEnd);
- if (FLAG_enable_mirrors && constructor_helper.annotation_count_ > 0) {
+ if ((FLAG_enable_mirrors || has_pragma_annotation) &&
+ annotation_count > 0) {
library.AddFunctionMetadata(function, TokenPosition::kNoSource,
constructor_offset);
}
@@ -1330,18 +1352,18 @@
//
// Output parameters:
//
-// `native_name`: non-null if `ExternalName(<name>)` was identified.
+// `native_name`: non-null if `@ExternalName(...)` was identified.
//
-// `is_potential_native`: non-null if there may be an `ExternalName`
+// `is_potential_native`: non-null if there may be an `@ExternalName(...)`
// annotation and we need to re-try after reading the constants table.
//
// `has_pragma_annotation`: non-null if @pragma(...) was found (no information
// is given on the kind of pragma directive).
//
-void KernelLoader::ReadProcedureAnnotations(intptr_t annotation_count,
- String* native_name,
- bool* is_potential_native,
- bool* has_pragma_annotation) {
+void KernelLoader::ReadVMAnnotations(intptr_t annotation_count,
+ String* native_name,
+ bool* is_potential_native,
+ bool* has_pragma_annotation) {
*is_potential_native = false;
*has_pragma_annotation = false;
String& detected_name = String::Handle(Z);
@@ -1449,8 +1471,8 @@
bool is_potential_native;
bool has_pragma_annotation;
const intptr_t annotation_count = helper_.ReadListLength();
- ReadProcedureAnnotations(annotation_count, &native_name, &is_potential_native,
- &has_pragma_annotation);
+ ReadVMAnnotations(annotation_count, &native_name, &is_potential_native,
+ &has_pragma_annotation);
// If this is a potential native, we'll unset is_external in
// AnnotateNativeProcedures instead.
is_external = is_external && native_name.IsNull();
diff --git a/runtime/vm/kernel_loader.h b/runtime/vm/kernel_loader.h
index 671e71b..7b77dd9 100644
--- a/runtime/vm/kernel_loader.h
+++ b/runtime/vm/kernel_loader.h
@@ -160,10 +160,10 @@
void AnnotateNativeProcedures(const Array& constant_table);
void LoadNativeExtensionLibraries(const Array& constant_table);
- void ReadProcedureAnnotations(intptr_t annotation_count,
- String* native_name,
- bool* is_potential_native,
- bool* has_pragma_annotation);
+ void ReadVMAnnotations(intptr_t annotation_count,
+ String* native_name,
+ bool* is_potential_native,
+ bool* has_pragma_annotation);
const String& DartSymbolPlain(StringIndex index) {
return translation_helper_.DartSymbolPlain(index);
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index b9f0f7b..4639c40 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -571,6 +571,7 @@
cls.set_type_arguments_field_offset_in_words(Class::kNoTypeArguments);
cls.set_num_type_arguments(0);
cls.set_num_own_type_arguments(0);
+ cls.set_has_pragma(false);
cls.set_num_native_fields(0);
cls.InitEmptyFields();
isolate->RegisterClass(cls);
@@ -2191,6 +2192,7 @@
result.set_id(FakeObject::kClassId);
result.set_num_type_arguments(0);
result.set_num_own_type_arguments(0);
+ result.set_has_pragma(false);
result.set_num_native_fields(0);
result.set_state_bits(0);
if ((FakeObject::kClassId < kInstanceCid) ||
@@ -2226,10 +2228,24 @@
}
void Class::set_num_own_type_arguments(intptr_t value) const {
- if (!Utils::IsInt(16, value)) {
+ if (!Utils::IsUint(kNumOwnTypeArgumentsSize, value)) {
ReportTooManyTypeArguments(*this);
}
- StoreNonPointer(&raw_ptr()->num_own_type_arguments_, value);
+ StoreNonPointer(
+ &raw_ptr()->has_pragma_and_num_own_type_arguments_,
+ NumOwnTypeArguments::update(
+ value, raw_ptr()->has_pragma_and_num_own_type_arguments_));
+}
+
+void Class::set_has_pragma_and_num_own_type_arguments(uint16_t value) const {
+ StoreNonPointer(&raw_ptr()->has_pragma_and_num_own_type_arguments_, value);
+}
+
+void Class::set_has_pragma(bool value) const {
+ StoreNonPointer(
+ &raw_ptr()->has_pragma_and_num_own_type_arguments_,
+ HasPragmaBit::update(value,
+ raw_ptr()->has_pragma_and_num_own_type_arguments_));
}
// Initialize class fields of type Array with empty array.
@@ -3495,6 +3511,7 @@
result.set_id(index);
result.set_num_type_arguments(kUnknownNumTypeArguments);
result.set_num_own_type_arguments(kUnknownNumTypeArguments);
+ result.set_has_pragma(false);
result.set_num_native_fields(0);
result.set_state_bits(0);
result.InitEmptyFields();
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index d4e3f63..23e1105 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1538,8 +1538,21 @@
// functions_hash_table is in use iff there are at least this many functions.
static const intptr_t kFunctionLookupHashTreshold = 16;
+ enum HasPragmaAndNumOwnTypeArgumentsBits {
+ kHasPragmaBit = 0,
+ kNumOwnTypeArgumentsPos = 1,
+ kNumOwnTypeArgumentsSize = 15
+ };
+
+ class HasPragmaBit : public BitField<uint16_t, bool, kHasPragmaBit, 1> {};
+ class NumOwnTypeArguments : public BitField<uint16_t,
+ uint16_t,
+ kNumOwnTypeArgumentsPos,
+ kNumOwnTypeArgumentsSize> {};
+
// Initial value for the cached number of type arguments.
- static const intptr_t kUnknownNumTypeArguments = -1;
+ static const intptr_t kUnknownNumTypeArguments =
+ (1U << kNumOwnTypeArgumentsSize) - 1;
int16_t num_type_arguments() const { return raw_ptr()->num_type_arguments_; }
void set_num_type_arguments(intptr_t value) const;
@@ -1547,11 +1560,22 @@
return OFFSET_OF(RawClass, num_type_arguments_);
}
- int16_t num_own_type_arguments() const {
- return raw_ptr()->num_own_type_arguments_;
+ public:
+ bool has_pragma() const {
+ return HasPragmaBit::decode(
+ raw_ptr()->has_pragma_and_num_own_type_arguments_);
+ }
+ void set_has_pragma(bool has_pragma) const;
+
+ private:
+ uint16_t num_own_type_arguments() const {
+ return NumOwnTypeArguments::decode(
+ raw_ptr()->has_pragma_and_num_own_type_arguments_);
}
void set_num_own_type_arguments(intptr_t value) const;
+ void set_has_pragma_and_num_own_type_arguments(uint16_t value) const;
+
// Assigns empty array to all raw class array fields.
void InitEmptyFields();
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 9632e50..96fdaca 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -4006,6 +4006,7 @@
method->has_external,
method->has_native, // May change.
current_class(), method->decl_begin_pos));
+ func.set_has_pragma(IsPragmaAnnotation(method->metadata_pos));
ASSERT(innermost_function().IsNull());
innermost_function_ = func.raw();
@@ -4811,6 +4812,7 @@
bool is_abstract = false;
TokenPosition declaration_pos =
metadata_pos.IsReal() ? metadata_pos : TokenPos();
+ const bool is_pragma = IsPragmaAnnotation(metadata_pos);
if (is_patch_source() && IsPatchAnnotation(metadata_pos)) {
is_patch = true;
metadata_pos = TokenPosition::kNoSource;
@@ -4859,6 +4861,9 @@
cls.set_token_pos(declaration_pos);
}
}
+ if (is_pragma) {
+ cls.set_has_pragma(true);
+ }
ASSERT(!cls.IsNull());
ASSERT(cls.functions() == Object::empty_array().raw());
set_current_class(cls);
@@ -5574,8 +5579,12 @@
}
TokenPosScope saved_pos(this);
SetPosition(pos);
- ExpectToken(Token::kAT);
- return IsSymbol(Symbols::Patch());
+ while (CurrentToken() == Token::kAT) {
+ ConsumeToken();
+ if (IsSymbol(Symbols::Patch())) return true;
+ SkipOneMetadata();
+ }
+ return false;
}
bool Parser::IsPragmaAnnotation(TokenPosition pos) {
@@ -5584,8 +5593,27 @@
}
TokenPosScope saved_pos(this);
SetPosition(pos);
- ExpectToken(Token::kAT);
- return IsSymbol(Symbols::Pragma());
+ while (CurrentToken() == Token::kAT) {
+ ConsumeToken();
+ if (IsSymbol(Symbols::Pragma())) return true;
+ SkipOneMetadata();
+ }
+ return false;
+}
+
+void Parser::SkipOneMetadata() {
+ ExpectIdentifier("identifier expected");
+ if (CurrentToken() == Token::kPERIOD) {
+ ConsumeToken();
+ ExpectIdentifier("identifier expected");
+ if (CurrentToken() == Token::kPERIOD) {
+ ConsumeToken();
+ ExpectIdentifier("identifier expected");
+ }
+ }
+ if (CurrentToken() == Token::kLPAREN) {
+ SkipToMatchingParenthesis();
+ }
}
TokenPosition Parser::SkipMetadata() {
@@ -5595,18 +5623,7 @@
TokenPosition metadata_pos = TokenPos();
while (CurrentToken() == Token::kAT) {
ConsumeToken();
- ExpectIdentifier("identifier expected");
- if (CurrentToken() == Token::kPERIOD) {
- ConsumeToken();
- ExpectIdentifier("identifier expected");
- if (CurrentToken() == Token::kPERIOD) {
- ConsumeToken();
- ExpectIdentifier("identifier expected");
- }
- }
- if (CurrentToken() == Token::kLPAREN) {
- SkipToMatchingParenthesis();
- }
+ SkipOneMetadata();
}
return metadata_pos;
}
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 2a4952e..4e9d40b 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -412,6 +412,7 @@
void SkipToMatching();
void SkipToMatchingParenthesis();
void SkipBlock();
+ void SkipOneMetadata();
TokenPosition SkipMetadata();
bool IsPatchAnnotation(TokenPosition pos);
bool IsPragmaAnnotation(TokenPosition pos);
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index ab1af6d..59e3b05 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -791,8 +791,12 @@
int32_t next_field_offset_in_words_; // Offset of the next instance field.
classid_t id_; // Class Id, also index in the class table.
int16_t num_type_arguments_; // Number of type arguments in flattened vector.
- int16_t num_own_type_arguments_; // Number of non-overlapping type arguments.
- uint16_t num_native_fields_; // Number of native fields in class.
+
+ // Bitfields with number of non-overlapping type arguments and 'has_pragma'
+ // bit.
+ uint16_t has_pragma_and_num_own_type_arguments_;
+
+ uint16_t num_native_fields_;
uint16_t state_bits_;
NOT_IN_PRECOMPILED(intptr_t kernel_offset_);
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 7d6bc72..288f9f1 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -58,7 +58,7 @@
}
cls.set_type_arguments_field_offset_in_words(reader->Read<int32_t>());
cls.set_num_type_arguments(reader->Read<int16_t>());
- cls.set_num_own_type_arguments(reader->Read<int16_t>());
+ cls.set_has_pragma_and_num_own_type_arguments(reader->Read<int16_t>());
cls.set_num_native_fields(reader->Read<uint16_t>());
cls.set_token_pos(TokenPosition::SnapshotDecode(reader->Read<int32_t>()));
cls.set_state_bits(reader->Read<uint16_t>());
@@ -114,7 +114,7 @@
}
writer->Write<int32_t>(ptr()->type_arguments_field_offset_in_words_);
writer->Write<uint16_t>(ptr()->num_type_arguments_);
- writer->Write<uint16_t>(ptr()->num_own_type_arguments_);
+ writer->Write<uint16_t>(ptr()->has_pragma_and_num_own_type_arguments_);
writer->Write<uint16_t>(ptr()->num_native_fields_);
writer->Write<int32_t>(ptr()->token_pos_.SnapshotEncode());
writer->Write<uint16_t>(ptr()->state_bits_);
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index cc3cce9..247eb55 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -459,7 +459,7 @@
V(GrowRegExpStack, "_growRegExpStack") \
V(DebugProcedureName, ":Eval") \
V(DebugClassName, "#DebugClass") \
- V(vm_entry_point, "vm.entry_point")
+ V(vm_entry_point, "vm.entry-point")
// Contains a list of frequently used strings in a canonicalized form. This
// list is kept in the vm_isolate in order to share the copy across isolates
diff --git a/sdk/lib/cli/wait_for.dart b/sdk/lib/cli/wait_for.dart
index ffde36c..3b1c86d 100644
--- a/sdk/lib/cli/wait_for.dart
+++ b/sdk/lib/cli/wait_for.dart
@@ -46,6 +46,7 @@
*/
external void _waitForEvent(int timeoutMillis);
+@pragma("vm.entry-point")
void Function(int) _getWaitForEvent() => _waitForEvent;
// This should be set from C++ code by the embedder to wire up waitFor() to the
diff --git a/sdk/lib/core/annotations.dart b/sdk/lib/core/annotations.dart
index 4c7c812..dc6109b 100644
--- a/sdk/lib/core/annotations.dart
+++ b/sdk/lib/core/annotations.dart
@@ -248,7 +248,7 @@
* function foo is annotated with a pragma 'other-pragma' specific to OtherTool.
*
*/
-@pragma('vm.entry_point')
+@pragma('vm.entry-point')
class pragma {
/**
* The name of the hint.
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart
index ba2321e..59899e1 100644
--- a/sdk/lib/core/errors.dart
+++ b/sdk/lib/core/errors.dart
@@ -116,6 +116,8 @@
* Error thrown when attempting to throw [:null:].
*/
class NullThrownError extends Error {
+ @pragma("vm.entry-point")
+ NullThrownError();
String toString() => "Throw of null.";
}
@@ -139,6 +141,7 @@
* If the `message` is not a [String], it is assumed to be a value instead
* of a message.
*/
+ @pragma("vm.entry-point")
ArgumentError([this.message])
: invalidValue = null,
_hasValue = false,
@@ -157,6 +160,7 @@
* names differ from the interface, it might be more useful to use the
* interface method's argument name (or just rename arguments to match).
*/
+ @pragma("vm.entry-point")
ArgumentError.value(value, [this.name, this.message])
: invalidValue = value,
_hasValue = true;
@@ -202,6 +206,7 @@
/**
* Create a new [RangeError] with the given [message].
*/
+ @pragma("vm.entry-point")
RangeError(var message)
: start = null,
end = null,
@@ -234,6 +239,7 @@
* invalid value, and the [message] can override the default error
* description.
*/
+ @pragma("vm.entry-point")
RangeError.range(num invalidValue, int minValue, int maxValue,
[String name, String message])
: start = minValue,
@@ -411,6 +417,7 @@
*/
class FallThroughError extends Error {
FallThroughError();
+ @pragma("vm.entry-point")
external FallThroughError._create(String url, int line);
external String toString();
@@ -481,6 +488,7 @@
*/
class UnsupportedError extends Error {
final String message;
+ @pragma("vm.entry-point")
UnsupportedError(this.message);
String toString() => "Unsupported operation: $message";
}
@@ -538,6 +546,7 @@
}
class OutOfMemoryError implements Error {
+ @pragma("vm.entry-point")
const OutOfMemoryError();
String toString() => "Out of Memory";
@@ -545,6 +554,7 @@
}
class StackOverflowError implements Error {
+ @pragma("vm.entry-point")
const StackOverflowError();
String toString() => "Stack Overflow";
@@ -560,6 +570,7 @@
*/
class CyclicInitializationError extends Error {
final String variableName;
+ @pragma("vm.entry-point")
CyclicInitializationError([this.variableName]);
String toString() => variableName == null
? "Reading static variable during its initialization"
diff --git a/sdk/lib/core/exceptions.dart b/sdk/lib/core/exceptions.dart
index aacddea..8a90653 100644
--- a/sdk/lib/core/exceptions.dart
+++ b/sdk/lib/core/exceptions.dart
@@ -74,6 +74,7 @@
* Optionally also supply the actual [source] with the incorrect format,
* and the [offset] in the format where a problem was detected.
*/
+ @pragma("vm.entry-point")
const FormatException([this.message = "", this.source, this.offset]);
/**
@@ -174,6 +175,7 @@
// Exception thrown when doing integer division with a zero divisor.
class IntegerDivisionByZeroException implements Exception {
+ @pragma("vm.entry-point")
const IntegerDivisionByZeroException();
String toString() => "IntegerDivisionByZeroException";
}
diff --git a/sdk/lib/core/identical.dart b/sdk/lib/core/identical.dart
index cc00c30..149780c 100644
--- a/sdk/lib/core/identical.dart
+++ b/sdk/lib/core/identical.dart
@@ -18,4 +18,5 @@
*
* This hash code is compatible with [identical].
*/
+@pragma("vm.entry-point")
external int identityHashCode(Object object);
diff --git a/sdk/lib/core/object.dart b/sdk/lib/core/object.dart
index 0338f48..38d6e27 100644
--- a/sdk/lib/core/object.dart
+++ b/sdk/lib/core/object.dart
@@ -104,6 +104,7 @@
*
* The default behavior is to throw a [NoSuchMethodError].
*/
+ @pragma("vm.entry-point")
external dynamic noSuchMethod(Invocation invocation);
/**
diff --git a/sdk/lib/developer/profiler.dart b/sdk/lib/developer/profiler.dart
index 593c27f..d620179 100644
--- a/sdk/lib/developer/profiler.dart
+++ b/sdk/lib/developer/profiler.dart
@@ -144,6 +144,7 @@
}
// ignore: unused_element, called from native code
+ @pragma("vm.entry-point", !const bool.fromEnvironment("dart.vm.product"))
static String _printMetrics() {
var metrics = [];
for (var metric in _metrics.values) {
diff --git a/sdk/lib/io/common.dart b/sdk/lib/io/common.dart
index 10f3c39..79de9fb 100644
--- a/sdk/lib/io/common.dart
+++ b/sdk/lib/io/common.dart
@@ -64,6 +64,7 @@
final int errorCode;
/** Creates an OSError object from a message and an errorCode. */
+ @pragma("vm.entry-point")
const OSError([this.message = "", this.errorCode = noErrorCode]);
/** Converts an OSError object to a string representation. */
diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart
index 683e22a..7b5deb7 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -126,6 +126,7 @@
* If [path] is an absolute path, it will be immune to changes to the
* current working directory.
*/
+ @pragma("vm.entry-point")
factory Directory(String path) {
final IOOverrides overrides = IOOverrides.current;
if (overrides == null) {
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart
index 08995da..df99209 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -247,6 +247,7 @@
* If [path] is an absolute path, it will be immune to changes to the
* current working directory.
*/
+ @pragma("vm.entry-point")
factory File(String path) {
final IOOverrides overrides = IOOverrides.current;
if (overrides == null) {
@@ -979,6 +980,7 @@
* [message], optional file system path [path] and optional OS error
* [osError].
*/
+ @pragma("vm.entry-point")
const FileSystemException([this.message = "", this.path = "", this.osError]);
String toString() {
diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart
index 9029dcb..1e78582 100644
--- a/sdk/lib/io/link.dart
+++ b/sdk/lib/io/link.dart
@@ -12,6 +12,7 @@
/**
* Creates a Link object.
*/
+ @pragma("vm.entry-point")
factory Link(String path) {
final IOOverrides overrides = IOOverrides.current;
if (overrides == null) {
diff --git a/sdk/lib/io/namespace_impl.dart b/sdk/lib/io/namespace_impl.dart
index 2ba6748..490a574 100644
--- a/sdk/lib/io/namespace_impl.dart
+++ b/sdk/lib/io/namespace_impl.dart
@@ -19,5 +19,6 @@
// If it is not set up by the embedder, relative paths will be resolved
// relative to the process's current working directory and absolute paths will
// be left relative to the file system root.
+ @pragma("vm.entry-point")
external static void _setupNamespace(var namespace);
}
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index 4b3f28f..6f3f494 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -378,6 +378,7 @@
* get the fields of the certificate.
*/
abstract class X509Certificate {
+ @pragma("vm.entry-point")
external factory X509Certificate._();
/// The DER encoded bytes of the certificate.
@@ -1256,6 +1257,7 @@
final String message;
final OSError osError;
+ @pragma("vm.entry-point")
const TlsException([String message = "", OSError osError = null])
: this._("TlsException", message, osError);
@@ -1281,6 +1283,7 @@
* a secure network connection.
*/
class HandshakeException extends TlsException {
+ @pragma("vm.entry-point")
const HandshakeException([String message = "", OSError osError = null])
: super._("HandshakeException", message, osError);
}
@@ -1291,6 +1294,7 @@
* certificate.
*/
class CertificateException extends TlsException {
+ @pragma("vm.entry-point")
const CertificateException([String message = "", OSError osError = null])
: super._("CertificateException", message, osError);
}
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 8b07a3a..99e708c 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -26,6 +26,7 @@
class IsolateSpawnException implements Exception {
/** Error message reported by the spawn operation. */
final String message;
+ @pragma("vm.entry-point")
IsolateSpawnException(this.message);
String toString() => "IsolateSpawnException: $message";
}
diff --git a/sdk/lib/typed_data/typed_data.dart b/sdk/lib/typed_data/typed_data.dart
index 4592c82..5ef8261 100644
--- a/sdk/lib/typed_data/typed_data.dart
+++ b/sdk/lib/typed_data/typed_data.dart
@@ -455,6 +455,7 @@
* Creates a [ByteData] of the specified length (in elements), all of
* whose bytes are initially zero.
*/
+ @pragma("vm.entry-point")
external factory ByteData(int length);
/**
diff --git a/sdk/lib/vmservice/vmservice.dart b/sdk/lib/vmservice/vmservice.dart
index 186cb23..674efd1 100644
--- a/sdk/lib/vmservice/vmservice.dart
+++ b/sdk/lib/vmservice/vmservice.dart
@@ -696,11 +696,13 @@
}
}
+@pragma("vm.entry-point")
RawReceivePort boot() {
// Return the port we expect isolate control messages on.
return isolateControlPort;
}
+@pragma("vm.entry-point", !const bool.fromEnvironment("dart.vm.product"))
void _registerIsolate(int port_id, SendPort sp, String name) {
var service = new VMService();
service.runningIsolates.isolateStartup(port_id, sp, name);
diff --git a/tests/standalone_2/app_snapshot_share_test.dart b/tests/standalone_2/app_snapshot_share_test.dart
index 6603417..050f610 100644
--- a/tests/standalone_2/app_snapshot_share_test.dart
+++ b/tests/standalone_2/app_snapshot_share_test.dart
@@ -41,8 +41,6 @@
'$buildDir/gen/runtime/bin/precompiler_entry_points.json',
'--entry-points',
'pkg/vm/lib/transformations/type_flow/entry_points_extra.json',
- '--entry-points',
- 'pkg/vm/lib/transformations/type_flow/entry_points_extra_standalone.json',
scriptPath,
];
runSync("pkg/vm/tool/gen_kernel${Platform.isWindows ? '.bat' : ''}", args);
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index 61de489d..7d42256 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -1037,8 +1037,6 @@
'${_configuration.buildDirectory}/gen/runtime/bin/precompiler_entry_points.json',
'--entry-points',
'${pkgVmDir}/lib/transformations/type_flow/entry_points_extra.json',
- '--entry-points',
- '${pkgVmDir}/lib/transformations/type_flow/entry_points_extra_standalone.json',
]);
}