[deps] Roll dart-lang/native
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 Bug: https://github.com/dart-lang/native/issues/2888 Change-Id: I13479fbb5ac637d1e9f496d19e838fb58c97d258 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/+/480980 Reviewed-by: Nate Biggs <natebiggs@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com> Auto-Submit: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
committed by
Commit Queue
parent
5ae4980074
commit
a5ce342250
@@ -145,7 +145,7 @@ vars = {
|
||||
"i18n_rev": "dd8a792a8492370a594706c8304d2eb8db844d7a",
|
||||
"leak_tracker_rev": "f5620600a5ce1c44f65ddaa02001e200b096e14c", # rolled manually
|
||||
"material_color_utilities_rev": "799b6ba2f3f1c28c67cc7e0b4f18e0c7d7f3c03e",
|
||||
"native_rev": "cc90d34518c8462c0867fc6d1177028e474157ef", # rolled manually while record_use is experimental
|
||||
"native_rev": "14169ab6e648cc06c4086facbb8e23b46b9fb35e", # rolled manually while record_use is experimental
|
||||
"protobuf_rev": "9e30258e0aa6a6430ee36c84b75308a9702fde42",
|
||||
"pub_rev": "26c6985c742593d081f8b58450f463a584a4203a", # rolled manually
|
||||
"shelf_rev": "dd830a0338b31bee92fe7ebc20b9bb963403b6b0",
|
||||
|
||||
@@ -83,20 +83,16 @@ class RecordUseCollector {
|
||||
),
|
||||
calls: callMap.map(
|
||||
(key, value) => MapEntry(
|
||||
Definition(
|
||||
name: key.name!,
|
||||
scope: key.enclosingClass?.name,
|
||||
importUri: key.library.canonicalUri.toString(),
|
||||
),
|
||||
Definition(key.library.canonicalUri.toString(), [
|
||||
if (key.enclosingClass?.name != null) Name(key.enclosingClass!.name),
|
||||
Name(key.name!),
|
||||
]),
|
||||
value,
|
||||
),
|
||||
),
|
||||
instances: instanceMap.map((key, value) {
|
||||
return MapEntry(
|
||||
Definition(
|
||||
importUri: key.library.canonicalUri.toString(),
|
||||
name: key.name,
|
||||
),
|
||||
Definition(key.library.canonicalUri.toString(), [Name(key.name)]),
|
||||
value,
|
||||
);
|
||||
}),
|
||||
|
||||
@@ -29,8 +29,12 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someExternalFunction",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "someExternalFunction"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_js_test/js_interop.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,9 +132,8 @@ void main() async {
|
||||
final actualRecordedUsages = recordedUsages.readAsStringSync();
|
||||
final u = RecordedUsages.fromJson(jsonDecode(actualRecordedUsages));
|
||||
final constArguments = u.constArgumentsFor(Definition(
|
||||
importUri: 'package:drop_data_asset/src/drop_data_asset.dart',
|
||||
scope: 'MyMath',
|
||||
name: 'add',
|
||||
'package:drop_data_asset/src/drop_data_asset.dart',
|
||||
[Name('MyMath'), Name('add')],
|
||||
));
|
||||
expect(constArguments.length, 1);
|
||||
expect(constArguments.first.named.isEmpty, true);
|
||||
@@ -176,8 +175,8 @@ void main() async {
|
||||
final actualRecordedUsages = recordedUsages.readAsStringSync();
|
||||
final u = RecordedUsages.fromJson(jsonDecode(actualRecordedUsages));
|
||||
final constantsOf = u.constantsOf(Definition(
|
||||
importUri: 'package:drop_data_asset/src/drop_data_asset.dart',
|
||||
name: 'RecordCallToC',
|
||||
'package:drop_data_asset/src/drop_data_asset.dart',
|
||||
[Name('RecordCallToC')],
|
||||
));
|
||||
expect(constantsOf.length, 0);
|
||||
});
|
||||
|
||||
@@ -125,10 +125,9 @@ class CallRecorder {
|
||||
final enclosingLibrary = target.enclosingLibrary;
|
||||
final importUri = enclosingLibrary.importUri.toString();
|
||||
|
||||
return Definition(
|
||||
importUri: importUri,
|
||||
scope: target.enclosingClass?.name,
|
||||
name: target.name.text,
|
||||
);
|
||||
return Definition(importUri, [
|
||||
if (target.enclosingClass?.name != null) Name(target.enclosingClass!.name),
|
||||
Name(target.name.text),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class InstanceRecorder {
|
||||
final enclosingLibrary = cls.enclosingLibrary;
|
||||
final importUri = enclosingLibrary.importUri.toString();
|
||||
|
||||
return Definition(importUri: importUri, name: cls.name);
|
||||
return Definition(importUri, [Name(cls.name)]);
|
||||
}
|
||||
|
||||
InstanceReference _createInstanceReference(
|
||||
|
||||
@@ -20,9 +20,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod2",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod2"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/basic.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "generate",
|
||||
"scope": "OtherClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "OtherClass"
|
||||
},
|
||||
{
|
||||
"name": "generate"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/complex.dart"
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -26,8 +26,12 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod2",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "someStaticMethod2"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/const_argument_instance.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,12 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "doSomething",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "doSomething"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/enum_const_arg.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,12 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "_extension#0|callWithArgs",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "_extension#0|callWithArgs"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/extension.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,12 @@
|
||||
},
|
||||
"recordings": [
|
||||
{
|
||||
"identifier": {
|
||||
"name": "MyClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "MyClass"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/instance_class.dart"
|
||||
},
|
||||
"instances": [
|
||||
|
||||
@@ -73,8 +73,12 @@
|
||||
},
|
||||
"recordings": [
|
||||
{
|
||||
"identifier": {
|
||||
"name": "MyClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "MyClass"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/instance_complex.dart"
|
||||
},
|
||||
"instances": [
|
||||
|
||||
+6
-2
@@ -27,8 +27,12 @@
|
||||
},
|
||||
"recordings": [
|
||||
{
|
||||
"identifier": {
|
||||
"name": "MyClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "MyClass"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/instance_duplicates.dart"
|
||||
},
|
||||
"instances": [
|
||||
|
||||
+6
-2
@@ -10,8 +10,12 @@
|
||||
},
|
||||
"recordings": [
|
||||
{
|
||||
"identifier": {
|
||||
"name": "MyClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "MyClass"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/instance_not_annotation.dart"
|
||||
},
|
||||
"instances": [
|
||||
|
||||
+9
-3
@@ -27,9 +27,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/loading_units_multiple_helper_shared.dart"
|
||||
}
|
||||
}
|
||||
|
||||
+18
-6
@@ -20,9 +20,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/loading_units_simple.dart"
|
||||
}
|
||||
},
|
||||
@@ -36,9 +42,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/loading_units_simple_helper.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +45,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/map_complex_keys.dart"
|
||||
}
|
||||
}
|
||||
|
||||
+9
-3
@@ -76,9 +76,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/named_and_positional.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,9 +68,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/named_both.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/named_optional.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/named_required.dart"
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -23,8 +23,12 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "Ext|foo",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "Ext|foo"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/named_with_function_arg.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,12 @@
|
||||
},
|
||||
"recordings": [
|
||||
{
|
||||
"identifier": {
|
||||
"name": "MyClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "MyClass"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/nested.dart"
|
||||
},
|
||||
"instances": [
|
||||
@@ -48,8 +52,12 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"name": "MyOtherClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "MyOtherClass"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/nested.dart"
|
||||
},
|
||||
"instances": [
|
||||
|
||||
+6
-2
@@ -17,8 +17,12 @@
|
||||
},
|
||||
"recordings": [
|
||||
{
|
||||
"identifier": {
|
||||
"name": "Recorded",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "Recorded"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/nested_instance_constant.dart"
|
||||
},
|
||||
"instances": [
|
||||
|
||||
@@ -20,9 +20,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/partfile_main.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,9 +41,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/positional_both.dart"
|
||||
}
|
||||
}
|
||||
|
||||
+9
-3
@@ -41,9 +41,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/positional_both_with_type_argument.dart"
|
||||
}
|
||||
}
|
||||
|
||||
+9
-3
@@ -31,9 +31,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/positional_optional.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,12 @@
|
||||
},
|
||||
"recordings": [
|
||||
{
|
||||
"identifier": {
|
||||
"name": "MyClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "MyClass"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/record_enum.dart"
|
||||
},
|
||||
"instances": [
|
||||
|
||||
+6
-2
@@ -16,8 +16,12 @@
|
||||
},
|
||||
"recordings": [
|
||||
{
|
||||
"identifier": {
|
||||
"name": "MyClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "MyClass"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/record_instance_constant_empty.dart"
|
||||
},
|
||||
"instances": [
|
||||
|
||||
@@ -20,9 +20,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/simple.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,9 +11,15 @@
|
||||
"type": "tearoff"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/tearoff.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,12 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someTopLevelMethod",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "someTopLevelMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/top_level_method.dart"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,9 +117,15 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "someStaticMethod",
|
||||
"scope": "SomeClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "SomeClass"
|
||||
},
|
||||
{
|
||||
"name": "someStaticMethod"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/types_of_arguments.dart"
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -46,8 +46,12 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "recorded",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "recorded"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/unsupported_collections.dart"
|
||||
}
|
||||
}
|
||||
|
||||
+12
-4
@@ -26,14 +26,22 @@
|
||||
"type": "with_arguments"
|
||||
}
|
||||
],
|
||||
"identifier": {
|
||||
"name": "recorded",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "recorded"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/unsupported_instance.dart"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identifier": {
|
||||
"name": "MyClass",
|
||||
"definition": {
|
||||
"path": [
|
||||
{
|
||||
"name": "MyClass"
|
||||
}
|
||||
],
|
||||
"uri": "package:record_use_test/unsupported_instance.dart"
|
||||
},
|
||||
"instances": [
|
||||
|
||||
Reference in New Issue
Block a user