[deps] Roll dart-lang/native

Dart API changes:

* Loading units are a list and is an object now.
* Instance constants have a reference to their class definition.

JSON changes:

* loading units are a pool now.
* loading units are objects rather than only a string now.
* definitions are a pool now (so that const instances can refer to
  them).

TEST=pkg/compiler/test/record_use/record_use_test.dart
TEST=pkg/dart2wasm/test/record_use_test.dart
TEST=pkg/vm/test/transformations/record_use_test.dart

Change-Id: I5fed1796d9cb08d6f0ade862ba2b4c3b5fea4ebd
Cq-Include-Trybots: luci.dart.try:dart2wasm-asserts-linux-chrome-try,dart2wasm-asserts-minified-linux-d8-try,dart2wasm-linux-chrome-try,dart2wasm-linux-d8-try,dart2wasm-linux-firefox-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/481860
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
Daco Harkes
2026-02-19 13:25:23 -08:00
committed by Commit Queue
parent 10cc8d95c2
commit c24d130767
41 changed files with 1009 additions and 548 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ vars = {
"i18n_rev": "dd8a792a8492370a594706c8304d2eb8db844d7a",
"leak_tracker_rev": "f5620600a5ce1c44f65ddaa02001e200b096e14c", # rolled manually
"material_color_utilities_rev": "799b6ba2f3f1c28c67cc7e0b4f18e0c7d7f3c03e",
"native_rev": "938b8615b0858078ca941417664f997ea6d55f77", # rolled manually while record_use is experimental
"native_rev": "1ebc21186c5fdfb3af7584ce482154cc167796ce", # rolled manually while record_use is experimental
"protobuf_rev": "9e30258e0aa6a6430ee36c84b75308a9702fde42",
"pub_rev": "26c6985c742593d081f8b58450f463a584a4203a", # rolled manually
"shelf_rev": "dd830a0338b31bee92fe7ebc20b9bb963403b6b0",
-1
View File
@@ -12,7 +12,6 @@ linter:
- avoid_empty_else
- avoid_function_literals_in_foreach_calls
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
@@ -57,7 +57,7 @@ class RecordUseCollector {
switch (recordedUse) {
case RecordedCallWithArguments():
final reference = CallWithArguments(
loadingUnit: loadingUnit,
loadingUnits: [LoadingUnit(loadingUnit)],
namedArguments: recordedUse.namedArgumentsInRecordUseFormat(),
positionalArguments: recordedUse
.positionalArgumentsInRecordUseFormat(),
@@ -65,14 +65,14 @@ class RecordUseCollector {
callMap.putIfAbsent(recordedUse.function, () => []).add(reference);
break;
case RecordedTearOff():
final reference = CallTearoff(loadingUnit: loadingUnit);
final reference = CallTearoff(loadingUnits: [LoadingUnit(loadingUnit)]);
callMap.putIfAbsent(recordedUse.function, () => []).add(reference);
break;
case RecordedConstInstance():
final instanceValue = findInstanceValue(recordedUse.constant);
final reference = InstanceConstantReference(
instanceConstant: instanceValue,
loadingUnit: loadingUnit,
loadingUnits: [LoadingUnit(loadingUnit)],
);
instanceMap
.putIfAbsent(recordedUse.constantClass, () => [])
@@ -295,5 +295,13 @@ record_use.InstanceConstant findInstanceValue(
if (name == null) continue;
fieldValues[name] = _findValue(entry.value);
}
return record_use.InstanceConstant(fields: fieldValues);
final cls = constant.type.element;
final libraryUri = cls.library.canonicalUri.toString();
final definition = record_use.Definition(libraryUri, [
record_use.Name(cls.name, kind: record_use.DefinitionKind.classKind),
]);
return record_use.InstanceConstant(
definition: definition,
fields: fieldValues,
);
}
@@ -5,6 +5,25 @@
"value": 6
}
],
"definitions": [
{
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someExternalFunction"
}
],
"uri": "package:record_use_js_test/js_interop.dart"
}
],
"loading_units": [
{
"name": "out"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0",
@@ -22,25 +41,16 @@
{
"calls": [
{
"loading_unit": "out",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someExternalFunction"
}
],
"uri": "package:record_use_js_test/js_interop.dart"
}
"definition_index": 0
}
]
}
+5 -3
View File
@@ -22,6 +22,7 @@ import 'package:kernel/type_environment.dart';
import 'package:kernel/verifier.dart';
import 'package:path/path.dart' as path;
import 'package:pool/pool.dart' as pool;
import 'package:record_use/record_use_internal.dart' as record_use;
import 'package:vm/kernel_front_end.dart' show writeDepfile;
import 'package:vm/transformations/mixin_deduplication.dart'
as mixin_deduplication show transformLibraries;
@@ -710,7 +711,7 @@ Future<CompilationResult> _runCodegenPhase(
await ioManager.writeSupportJs(supportJs);
if (options.recordedUsesFile != null) {
String loadingUnitForNode(TreeNode node) {
record_use.LoadingUnit loadingUnitForNode(TreeNode node) {
while (node is! NamedNode) {
node = node.parent!;
}
@@ -720,9 +721,10 @@ Future<CompilationResult> _runCodegenPhase(
moduleOutputData.modules.length > 1) {
// This is an unassigned reference such as a constant class only
// used for annotations. Assign it to the main module as a placeholder.
return moduleOutputData.mainModule.moduleImportName;
return record_use.LoadingUnit(
moduleOutputData.mainModule.moduleImportName);
}
return moduleOutput.moduleImportName;
return record_use.LoadingUnit(moduleOutput.moduleImportName);
}
record_use.transformComponent(component, options.recordedUsesFile!,
+1 -1
View File
@@ -22,10 +22,10 @@ dependencies:
wasm_builder: any
path: any
pool: any
record_use: any
# Use 'any' constraints here; we get our versions from the DEPS file.
dev_dependencies:
expect: any
js: any
lints: any
record_use: any
@@ -43,7 +43,7 @@ class CallRecorder {
if (isBeingRecorded(constant.target)) {
_addToUsage(
constant.target,
CallTearoff(loadingUnit: _loadingUnitLookup(node)),
CallTearoff(loadingUnits: [_loadingUnitLookup(node)]),
);
}
}
@@ -105,7 +105,7 @@ class CallRecorder {
return CallWithArguments(
positionalArguments: positionalArguments,
namedArguments: namedArguments,
loadingUnit: _loadingUnitLookup(node),
loadingUnits: [_loadingUnitLookup(node)],
);
}
@@ -51,6 +51,14 @@ class InstanceRecorder {
);
}
InstanceReference _createInstanceReference(
ast.ConstantExpression expression,
ast.InstanceConstant constant,
) => InstanceConstantReference(
instanceConstant: evaluateInstanceConstant(constant),
loadingUnits: [_loadingUnitLookup(expression)],
);
Definition _definitionFromClass(ast.Class cls) {
final enclosingLibrary = cls.enclosingLibrary;
final importUri = enclosingLibrary.importUri.toString();
@@ -59,12 +67,4 @@ class InstanceRecorder {
Name(cls.name, kind: DefinitionKind.classKind),
]);
}
InstanceReference _createInstanceReference(
ast.ConstantExpression expression,
ast.InstanceConstant constant,
) => InstanceConstantReference(
instanceConstant: evaluateInstanceConstant(constant),
loadingUnit: _loadingUnitLookup(expression),
);
}
@@ -8,21 +8,24 @@ import 'dart:io';
import 'package:collection/collection.dart';
import 'package:kernel/ast.dart' as ast;
import 'package:record_use/record_use_internal.dart';
import 'package:vm/metadata/loading_units.dart';
import 'package:vm/metadata/loading_units.dart' as vm_metadata;
import 'package:vm/transformations/record_use/record_call.dart';
import 'package:vm/transformations/record_use/record_instance.dart';
/// Maps a kernel node to the a string representing the loading unit it belongs
/// to. Different backends may represent loading units differently.
typedef LoadingUnitLookup = String Function(ast.TreeNode node);
typedef LoadingUnitLookup = LoadingUnit Function(ast.TreeNode node);
LoadingUnitLookup _getDefaultLoadingUnitLookup(ast.Component component) {
final loadingMetadata =
component.metadata[LoadingUnitsMetadataRepository.repositoryTag]
as LoadingUnitsMetadataRepository;
component.metadata[vm_metadata
.LoadingUnitsMetadataRepository
.repositoryTag]
as vm_metadata.LoadingUnitsMetadataRepository;
final loadingUnits = loadingMetadata.mapping[component]?.loadingUnits ?? [];
return (ast.TreeNode node) =>
_loadingUnitForLibrary(enclosingLibrary(node)!, loadingUnits).toString();
return (ast.TreeNode node) => LoadingUnit(
_loadingUnitForLibrary(enclosingLibrary(node)!, loadingUnits).toString(),
);
}
/// Collect calls and constant instances annotated with `@RecordUse`.
@@ -182,6 +185,7 @@ Constant evaluateLiteral(ast.BasicLiteral expression) => switch (expression) {
InstanceConstant evaluateInstanceConstant(ast.InstanceConstant constant) =>
InstanceConstant(
definition: _definitionFromClass(constant.classNode),
fields: constant.fieldValues.map(
(key, value) =>
MapEntry(key.asField.name.text, evaluateConstant(value)),
@@ -191,6 +195,15 @@ InstanceConstant evaluateInstanceConstant(ast.InstanceConstant constant) =>
UnsupportedConstant _unsupported(String constantType) =>
UnsupportedConstant('$constantType is not supported for recording.');
Definition _definitionFromClass(ast.Class cls) {
final enclosingLibrary = cls.enclosingLibrary;
final importUri = enclosingLibrary.importUri.toString();
return Definition(importUri, [
Name(cls.name, kind: DefinitionKind.classKind),
]);
}
ast.Library? enclosingLibrary(ast.TreeNode node) {
while (node is! ast.Library) {
final parent = node.parent;
@@ -202,7 +215,7 @@ ast.Library? enclosingLibrary(ast.TreeNode node) {
int _loadingUnitForLibrary(
ast.Library library,
List<LoadingUnit> loadingUnits,
List<vm_metadata.LoadingUnit> loadingUnits,
) {
final importUri = library.importUri.toString();
return loadingUnits
@@ -5,6 +5,29 @@
"value": 99
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod2"
}
],
"uri": "package:record_use_test/basic.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -13,29 +36,16 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod2"
}
],
"uri": "package:record_use_test/basic.dart"
}
"definition_index": 0
}
]
}
@@ -5,6 +5,29 @@
"value": 42
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "OtherClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "generate"
}
],
"uri": "package:record_use_test/complex.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -13,7 +36,9 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
null,
null,
@@ -24,22 +49,7 @@
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "OtherClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "generate"
}
],
"uri": "package:record_use_test/complex.dart"
}
"definition_index": 0
}
]
}
@@ -5,12 +5,41 @@
"value": 14
},
{
"definition_index": 1,
"type": "instance",
"value": {
"i": 0
}
}
],
"definitions": [
{
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod2"
}
],
"uri": "package:record_use_test/const_argument_instance.dart"
},
{
"path": [
{
"kind": "class",
"name": "SomeClass"
}
],
"uri": "package:record_use_test/const_argument_instance.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -19,25 +48,19 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
1
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod2"
}
],
"uri": "package:record_use_test/const_argument_instance.dart"
}
"definition_index": 0
},
{
"definition_index": 1
}
]
}
@@ -9,6 +9,7 @@
"value": "b"
},
{
"definition_index": 1,
"type": "instance",
"value": {
"index": 0,
@@ -16,6 +17,34 @@
}
}
],
"definitions": [
{
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "doSomething"
}
],
"uri": "package:record_use_test/enum_const_arg.dart"
},
{
"path": [
{
"kind": "class",
"name": "A"
}
],
"uri": "package:record_use_test/enum_const_arg.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -24,25 +53,19 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
2
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "doSomething"
}
],
"uri": "package:record_use_test/enum_const_arg.dart"
}
"definition_index": 0
},
{
"definition_index": 1
}
]
}
@@ -5,6 +5,29 @@
"value": "42"
}
],
"definitions": [
{
"path": [
{
"kind": "extension",
"name": "<unnamed>"
},
{
"disambiguators": [
"instance"
],
"kind": "method",
"name": "callWithArgs"
}
],
"uri": "package:record_use_test/extension.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -13,29 +36,16 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "extension",
"name": "<unnamed>"
},
{
"disambiguators": [
"instance"
],
"kind": "method",
"name": "callWithArgs"
}
],
"uri": "package:record_use_test/extension.dart"
}
"definition_index": 0
}
]
}
@@ -5,31 +5,42 @@
"value": 42
},
{
"definition_index": 0,
"type": "instance",
"value": {
"i": 0
}
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/instance_class.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
},
"recordings": [
{
"definition": {
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/instance_class.dart"
},
"definition_index": 0,
"instances": [
{
"constant_index": 1,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]
@@ -56,6 +56,7 @@
"type": "null"
},
{
"definition_index": 0,
"type": "instance",
"value": {
"i": 0,
@@ -67,25 +68,35 @@
}
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/instance_complex.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
},
"recordings": [
{
"definition": {
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/instance_complex.dart"
},
"definition_index": 0,
"instances": [
{
"constant_index": 11,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]
@@ -5,6 +5,7 @@
"value": 42
},
{
"definition_index": 0,
"type": "instance",
"value": {
"i": 0
@@ -15,36 +16,49 @@
"value": 43
},
{
"definition_index": 0,
"type": "instance",
"value": {
"i": 2
}
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/instance_duplicates.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
},
"recordings": [
{
"definition": {
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/instance_duplicates.dart"
},
"definition_index": 0,
"instances": [
{
"constant_index": 1,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
},
{
"constant_index": 3,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]
@@ -1,28 +1,39 @@
{
"constants": [
{
"definition_index": 0,
"type": "instance"
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/instance_not_annotation.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
},
"recordings": [
{
"definition": {
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/instance_not_annotation.dart"
},
"definition_index": 0,
"instances": [
{
"constant_index": 0,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]
@@ -5,6 +5,32 @@
"value": 42
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/loading_units_multiple_helper_shared.dart"
}
],
"loading_units": [
{
"name": "1"
},
{
"name": "2"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -13,36 +39,25 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
},
{
"loading_unit": "2",
"loading_unit_indices": [
1
],
"positional": [
0
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/loading_units_multiple_helper_shared.dart"
}
"definition_index": 0
}
]
}
@@ -5,6 +5,48 @@
"value": 42
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/loading_units_simple.dart"
},
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/loading_units_simple_helper.dart"
}
],
"loading_units": [
{
"name": "1"
},
{
"name": "2"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -13,56 +55,30 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/loading_units_simple.dart"
}
"definition_index": 0
},
{
"calls": [
{
"loading_unit": "2",
"loading_unit_indices": [
1
],
"positional": [
0
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/loading_units_simple_helper.dart"
}
"definition_index": 1
}
]
}
@@ -30,6 +30,29 @@
]
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/map_complex_keys.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -38,29 +61,16 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
4
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/map_complex_keys.dart"
}
"definition_index": 0
}
]
}
@@ -24,6 +24,29 @@
"value": 4
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/named_and_positional.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -32,7 +55,9 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"l": 1,
"k": 0
@@ -43,7 +68,9 @@
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"k": 3,
"l": 1
@@ -54,7 +81,9 @@
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"l": 4,
"k": 0
@@ -65,7 +94,9 @@
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"l": 4,
"k": 5
@@ -76,22 +107,7 @@
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/named_and_positional.dart"
}
"definition_index": 0
}
]
}
@@ -24,6 +24,29 @@
"value": 4
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/named_both.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -32,7 +55,9 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"i": 0,
"l": 1,
@@ -41,7 +66,9 @@
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"i": 2,
"k": 3,
@@ -50,7 +77,9 @@
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"i": 2,
"l": 4,
@@ -59,7 +88,9 @@
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"i": 2,
"l": 4,
@@ -68,22 +99,7 @@
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/named_both.dart"
}
"definition_index": 0
}
]
}
@@ -9,6 +9,29 @@
"value": 4
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/named_optional.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -17,36 +40,25 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"i": 0
},
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"i": 1
},
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/named_optional.dart"
}
"definition_index": 0
}
]
}
@@ -9,6 +9,29 @@
"value": 5
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/named_required.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -17,36 +40,25 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"i": 0
},
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"i": 1
},
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/named_required.dart"
}
"definition_index": 0
}
]
}
@@ -5,6 +5,29 @@
"value": "hello-world"
}
],
"definitions": [
{
"path": [
{
"kind": "extension",
"name": "Ext"
},
{
"disambiguators": [
"instance"
],
"kind": "method",
"name": "foo"
}
],
"uri": "package:record_use_test/named_with_function_arg.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -13,7 +36,9 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"named": {
"s": 0
},
@@ -23,22 +48,7 @@
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "extension",
"name": "Ext"
},
{
"disambiguators": [
"instance"
],
"kind": "method",
"name": "foo"
}
],
"uri": "package:record_use_test/named_with_function_arg.dart"
}
"definition_index": 0
}
]
}
@@ -5,6 +5,7 @@
"value": 42
},
{
"definition_index": 0,
"type": "instance",
"value": {
"i": 0
@@ -15,57 +16,74 @@
"value": "test"
},
{
"definition_index": 0,
"type": "instance",
"value": {
"i": 2
}
},
{
"definition_index": 1,
"type": "instance"
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/nested.dart"
},
{
"path": [
{
"kind": "class",
"name": "MyOtherClass"
}
],
"uri": "package:record_use_test/nested.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
},
"recordings": [
{
"definition": {
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/nested.dart"
},
"definition_index": 0,
"instances": [
{
"constant_index": 1,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
},
{
"constant_index": 3,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]
},
{
"definition": {
"path": [
{
"kind": "class",
"name": "MyOtherClass"
}
],
"uri": "package:record_use_test/nested.dart"
},
"definition_index": 1,
"instances": [
{
"constant_index": 4,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]
@@ -5,31 +5,42 @@
"value": "id"
},
{
"definition_index": 0,
"type": "instance",
"value": {
"id": 0
}
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "Recorded"
}
],
"uri": "package:record_use_test/nested_instance_constant.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
},
"recordings": [
{
"definition": {
"path": [
{
"kind": "class",
"name": "Recorded"
}
],
"uri": "package:record_use_test/nested_instance_constant.dart"
},
"definition_index": 0,
"instances": [
{
"constant_index": 1,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]
@@ -5,6 +5,29 @@
"value": 42
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/partfile_main.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -13,29 +36,16 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/partfile_main.dart"
}
"definition_index": 0
}
]
}
@@ -17,6 +17,29 @@
"value": 4
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/positional_both.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -25,7 +48,9 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0,
1
@@ -33,7 +58,9 @@
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
2,
3
@@ -41,22 +68,7 @@
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/positional_both.dart"
}
"definition_index": 0
}
]
}
@@ -17,6 +17,29 @@
"value": 4
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/positional_both_with_type_argument.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -25,7 +48,9 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0,
1
@@ -33,7 +58,9 @@
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
2,
3
@@ -41,22 +68,7 @@
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/positional_both_with_type_argument.dart"
}
"definition_index": 0
}
]
}
@@ -9,6 +9,29 @@
"value": 4
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/positional_optional.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -17,36 +40,25 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
1
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/positional_optional.dart"
}
"definition_index": 0
}
]
}
@@ -9,6 +9,7 @@
"value": "a"
},
{
"definition_index": 1,
"type": "instance",
"value": {
"index": 0,
@@ -16,34 +17,57 @@
}
},
{
"definition_index": 0,
"type": "instance",
"value": {
"a": 2
}
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/record_enum.dart"
},
{
"path": [
{
"kind": "class",
"name": "A"
}
],
"uri": "package:record_use_test/record_enum.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
},
"recordings": [
{
"definition": {
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/record_enum.dart"
},
"definition_index": 0,
"instances": [
{
"constant_index": 3,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]
},
{
"definition_index": 1
}
]
}
@@ -1,37 +1,61 @@
{
"constants": [
{
"definition_index": 1,
"type": "instance"
},
{
"definition_index": 0,
"type": "instance",
"value": {
"a": 0
}
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/record_instance_constant_empty.dart"
},
{
"path": [
{
"kind": "class",
"name": "A"
}
],
"uri": "package:record_use_test/record_instance_constant_empty.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
},
"recordings": [
{
"definition": {
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/record_instance_constant_empty.dart"
},
"definition_index": 0,
"instances": [
{
"constant_index": 1,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]
},
{
"definition_index": 1
}
]
}
@@ -5,6 +5,29 @@
"value": 42
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/simple.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -13,29 +36,16 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/simple.dart"
}
"definition_index": 0
}
]
}
@@ -1,4 +1,27 @@
{
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/tearoff.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -7,26 +30,13 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "tearoff"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/tearoff.dart"
}
"definition_index": 0
}
]
}
@@ -5,6 +5,25 @@
"value": 42
}
],
"definitions": [
{
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someTopLevelMethod"
}
],
"uri": "package:record_use_test/top_level_method.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -13,25 +32,16 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someTopLevelMethod"
}
],
"uri": "package:record_use_test/top_level_method.dart"
}
"definition_index": 0
}
]
}
@@ -67,6 +67,29 @@
]
}
],
"definitions": [
{
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/types_of_arguments.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -75,64 +98,61 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
0
],
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
1
],
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
2
],
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
3
],
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
12
],
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
null
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"kind": "class",
"name": "SomeClass"
},
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "someStaticMethod"
}
],
"uri": "package:record_use_test/types_of_arguments.dart"
}
"definition_index": 0
}
]
}
@@ -24,6 +24,25 @@
]
}
],
"definitions": [
{
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "recorded"
}
],
"uri": "package:record_use_test/unsupported_collections.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -32,32 +51,25 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
1
],
"type": "with_arguments"
},
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
3
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "recorded"
}
],
"uri": "package:record_use_test/unsupported_collections.dart"
}
"definition_index": 0
}
]
}
@@ -5,12 +5,41 @@
"type": "unsupported"
},
{
"definition_index": 1,
"type": "instance",
"value": {
"field": 0
}
}
],
"definitions": [
{
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "recorded"
}
],
"uri": "package:record_use_test/unsupported_instance.dart"
},
{
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/unsupported_instance.dart"
}
],
"loading_units": [
{
"name": "1"
}
],
"metadata": {
"comment": "Recorded usages of objects tagged with a `RecordUse` annotation",
"version": "0.4.0"
@@ -19,40 +48,25 @@
{
"calls": [
{
"loading_unit": "1",
"loading_unit_indices": [
0
],
"positional": [
1
],
"type": "with_arguments"
}
],
"definition": {
"path": [
{
"disambiguators": [
"static"
],
"kind": "method",
"name": "recorded"
}
],
"uri": "package:record_use_test/unsupported_instance.dart"
}
"definition_index": 0
},
{
"definition": {
"path": [
{
"kind": "class",
"name": "MyClass"
}
],
"uri": "package:record_use_test/unsupported_instance.dart"
},
"definition_index": 1,
"instances": [
{
"constant_index": 1,
"loading_unit": "1",
"loading_unit_indices": [
0
],
"type": "constant"
}
]