diff --git a/.gitignore b/.gitignore index 3fdbd8e67b3..730b92c85b3 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,4 @@ runtime/tools/heapsnapshot/.dart_tool # Gemini CLI .gemini .geminiignore +gemini.md diff --git a/DEPS b/DEPS index c1624d88e97..878b933ec39 100644 --- a/DEPS +++ b/DEPS @@ -145,7 +145,7 @@ vars = { "i18n_rev": "dd8a792a8492370a594706c8304d2eb8db844d7a", "leak_tracker_rev": "f5620600a5ce1c44f65ddaa02001e200b096e14c", # rolled manually "material_color_utilities_rev": "799b6ba2f3f1c28c67cc7e0b4f18e0c7d7f3c03e", - "native_rev": "e10223f7669a6fbe9e4cf7bfee284cd41dd42087", # rolled manually while record_use is experimental + "native_rev": "f8550838fcde605087358e595346240b12c896f6", # rolled manually while record_use is experimental "protobuf_rev": "9e30258e0aa6a6430ee36c84b75308a9702fde42", "pub_rev": "26c6985c742593d081f8b58450f463a584a4203a", # rolled manually "shelf_rev": "dd830a0338b31bee92fe7ebc20b9bb963403b6b0", diff --git a/pkg/compiler/test/record_use/data/lib/js_interop.dart.json.expect b/pkg/compiler/test/record_use/data/lib/js_interop.dart.json.expect index b9540a50096..26c9d3514b5 100644 --- a/pkg/compiler/test/record_use/data/lib/js_interop.dart.json.expect +++ b/pkg/compiler/test/record_use/data/lib/js_interop.dart.json.expect @@ -37,20 +37,22 @@ "dart.tool.dart2js.types:trust": "false" } }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/basic.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/basic.dart.json.expect index e20ad85de15..fd57cf27ac6 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/basic.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/basic.dart.json.expect @@ -32,20 +32,22 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/complex.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/complex.dart.json.expect index a24e73947d6..2b1cf1f8b01 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/complex.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/complex.dart.json.expect @@ -1,5 +1,8 @@ { "constants": [ + { + "type": "non_constant" + }, { "type": "int", "value": 42 @@ -32,24 +35,26 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - null, - null, - null, - null, - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0, + 0, + 0, + 0, + 1 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/const_argument_instance.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/const_argument_instance.dart.json.expect index 9ff8b8cf64d..dc8eaf4cc51 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/const_argument_instance.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/const_argument_instance.dart.json.expect @@ -44,23 +44,22 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 1 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - }, - { - "definition_index": 1 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 1 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/enum_const_arg.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/enum_const_arg.dart.json.expect index 409cb971c46..d6a1eb2bef3 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/enum_const_arg.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/enum_const_arg.dart.json.expect @@ -49,23 +49,22 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 2 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - }, - { - "definition_index": 1 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 2 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/extension.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/extension.dart.json.expect index f928eee32bf..d3d6f3d357c 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/extension.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/extension.dart.json.expect @@ -32,20 +32,22 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/instance_class.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/instance_class.dart.json.expect index 87a6b6cc90b..d07bb169cdf 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/instance_class.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/instance_class.dart.json.expect @@ -32,18 +32,20 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "definition_index": 0, - "instances": [ - { - "constant_index": 1, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - } - ] + "uses": { + "instances": [ + { + "definition_index": 0, + "uses": [ + { + "constant_index": 1, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/instance_complex.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/instance_complex.dart.json.expect index d8579f42a97..8df28b3b422 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/instance_complex.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/instance_complex.dart.json.expect @@ -88,18 +88,20 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "definition_index": 0, - "instances": [ - { - "constant_index": 11, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - } - ] + "uses": { + "instances": [ + { + "definition_index": 0, + "uses": [ + { + "constant_index": 11, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/instance_duplicates.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/instance_duplicates.dart.json.expect index 15716dcb3ef..b6fef9dfb33 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/instance_duplicates.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/instance_duplicates.dart.json.expect @@ -43,25 +43,27 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "definition_index": 0, - "instances": [ - { - "constant_index": 1, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - }, - { - "constant_index": 3, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - } - ] + "uses": { + "instances": [ + { + "definition_index": 0, + "uses": [ + { + "constant_index": 1, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + }, + { + "constant_index": 3, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/instance_not_annotation.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/instance_not_annotation.dart.json.expect index ee82c141eb3..4f001a56d5e 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/instance_not_annotation.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/instance_not_annotation.dart.json.expect @@ -25,18 +25,20 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "definition_index": 0, - "instances": [ - { - "constant_index": 0, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - } - ] + "uses": { + "instances": [ + { + "definition_index": 0, + "uses": [ + { + "constant_index": 0, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/loading_units_multiple.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/loading_units_multiple.dart.json.expect index 1b7cc04f471..59c02184c65 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/loading_units_multiple.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/loading_units_multiple.dart.json.expect @@ -35,29 +35,31 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 1 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 1 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/loading_units_simple.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/loading_units_simple.dart.json.expect index 62ae1794ed1..8ef082cc881 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/loading_units_simple.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/loading_units_simple.dart.json.expect @@ -51,34 +51,36 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - }, - { - "calls": [ - { - "loading_unit_indices": [ - 1 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 1 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + }, + { + "definition_index": 1, + "uses": [ + { + "loading_unit_indices": [ + 1 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/map_complex_keys.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/map_complex_keys.dart.json.expect index 61294ba6573..27b0ffbdabe 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/map_complex_keys.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/map_complex_keys.dart.json.expect @@ -57,20 +57,22 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 4 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 4 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/named_and_positional.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/named_and_positional.dart.json.expect index a1eff9d58c7..eaf4020b34e 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/named_and_positional.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/named_and_positional.dart.json.expect @@ -51,63 +51,65 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "named": { - "l": 1, - "k": 0 + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "named": { + "l": 1, + "k": 0 + }, + "positional": [ + 0 + ], + "type": "with_arguments" }, - "positional": [ - 0 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "named": { - "k": 3, - "l": 1 + { + "loading_unit_indices": [ + 0 + ], + "named": { + "k": 3, + "l": 1 + }, + "positional": [ + 2 + ], + "type": "with_arguments" }, - "positional": [ - 2 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "named": { - "l": 4, - "k": 0 + { + "loading_unit_indices": [ + 0 + ], + "named": { + "l": 4, + "k": 0 + }, + "positional": [ + 2 + ], + "type": "with_arguments" }, - "positional": [ - 2 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "named": { - "l": 4, - "k": 5 - }, - "positional": [ - 2 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + { + "loading_unit_indices": [ + 0 + ], + "named": { + "l": 4, + "k": 5 + }, + "positional": [ + 2 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/named_both.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/named_both.dart.json.expect index 91b02660715..2ce9b096652 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/named_both.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/named_both.dart.json.expect @@ -51,55 +51,57 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "named": { - "i": 0, - "l": 1, - "k": 0 + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "named": { + "i": 0, + "l": 1, + "k": 0 + }, + "type": "with_arguments" }, - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "named": { - "i": 2, - "k": 3, - "l": 1 + { + "loading_unit_indices": [ + 0 + ], + "named": { + "i": 2, + "k": 3, + "l": 1 + }, + "type": "with_arguments" }, - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "named": { - "i": 2, - "l": 4, - "k": 0 + { + "loading_unit_indices": [ + 0 + ], + "named": { + "i": 2, + "l": 4, + "k": 0 + }, + "type": "with_arguments" }, - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "named": { - "i": 2, - "l": 4, - "k": 5 - }, - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + { + "loading_unit_indices": [ + 0 + ], + "named": { + "i": 2, + "l": 4, + "k": 5 + }, + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/named_optional.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/named_optional.dart.json.expect index 07692c4ca51..1878c65fa3d 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/named_optional.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/named_optional.dart.json.expect @@ -36,29 +36,31 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "named": { - "i": 0 + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "named": { + "i": 0 + }, + "type": "with_arguments" }, - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "named": { - "i": 1 - }, - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + { + "loading_unit_indices": [ + 0 + ], + "named": { + "i": 1 + }, + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/named_required.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/named_required.dart.json.expect index 4ae848b612a..ccfb60f10c9 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/named_required.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/named_required.dart.json.expect @@ -36,29 +36,31 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "named": { - "i": 0 + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "named": { + "i": 0 + }, + "type": "with_arguments" }, - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "named": { - "i": 1 - }, - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + { + "loading_unit_indices": [ + 0 + ], + "named": { + "i": 1 + }, + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/named_with_function_arg.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/named_with_function_arg.dart.json.expect index 5bcf75565d9..8849c7c52a3 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/named_with_function_arg.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/named_with_function_arg.dart.json.expect @@ -1,5 +1,8 @@ { "constants": [ + { + "type": "non_constant" + }, { "type": "string", "value": "hello-world" @@ -32,23 +35,25 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "named": { - "s": 0 - }, - "positional": [ - null - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "named": { + "s": 1 + }, + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/nested.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/nested.dart.json.expect index 259ce45212a..26c63543975 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/nested.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/nested.dart.json.expect @@ -56,37 +56,39 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "definition_index": 0, - "instances": [ - { - "constant_index": 1, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - }, - { - "constant_index": 3, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - }, - { - "definition_index": 1, - "instances": [ - { - "constant_index": 4, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - } - ] + "uses": { + "instances": [ + { + "definition_index": 0, + "uses": [ + { + "constant_index": 1, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + }, + { + "constant_index": 3, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + }, + { + "definition_index": 1, + "uses": [ + { + "constant_index": 4, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/nested_instance_constant.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/nested_instance_constant.dart.json.expect index 3cc2d995755..1fb31ee99aa 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/nested_instance_constant.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/nested_instance_constant.dart.json.expect @@ -32,18 +32,20 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "definition_index": 0, - "instances": [ - { - "constant_index": 1, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - } - ] + "uses": { + "instances": [ + { + "definition_index": 0, + "uses": [ + { + "constant_index": 1, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/partfile_main.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/partfile_main.dart.json.expect index e35fe9d870d..9488337ad62 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/partfile_main.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/partfile_main.dart.json.expect @@ -32,20 +32,22 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/positional_both.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/positional_both.dart.json.expect index 65b5f8fd0a7..40bc6cb4162 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/positional_both.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/positional_both.dart.json.expect @@ -44,31 +44,33 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0, - 1 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 2, - 3 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0, + 1 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 2, + 3 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/positional_both_with_type_argument.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/positional_both_with_type_argument.dart.json.expect index 632f4c27153..4089cc5c932 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/positional_both_with_type_argument.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/positional_both_with_type_argument.dart.json.expect @@ -44,31 +44,33 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0, - 1 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 2, - 3 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0, + 1 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 2, + 3 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/positional_optional.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/positional_optional.dart.json.expect index 2f4da94a0e1..7b336aa6e3f 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/positional_optional.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/positional_optional.dart.json.expect @@ -36,29 +36,31 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 1 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 1 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/record_enum.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/record_enum.dart.json.expect index 2494be372d8..30aab5a9af9 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/record_enum.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/record_enum.dart.json.expect @@ -53,21 +53,20 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "definition_index": 0, - "instances": [ - { - "constant_index": 3, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - }, - { - "definition_index": 1 - } - ] + "uses": { + "instances": [ + { + "definition_index": 0, + "uses": [ + { + "constant_index": 3, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/record_instance_constant_empty.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/record_instance_constant_empty.dart.json.expect index 7089ba1f2c5..10457f1a94b 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/record_instance_constant_empty.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/record_instance_constant_empty.dart.json.expect @@ -41,21 +41,20 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "definition_index": 0, - "instances": [ - { - "constant_index": 1, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - }, - { - "definition_index": 1 - } - ] + "uses": { + "instances": [ + { + "definition_index": 0, + "uses": [ + { + "constant_index": 1, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/simple.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/simple.dart.json.expect index 681ffc15484..7b0c63061be 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/simple.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/simple.dart.json.expect @@ -32,20 +32,22 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/tearoff.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/tearoff.dart.json.expect index b3117ce139c..a383a81f91a 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/tearoff.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/tearoff.dart.json.expect @@ -26,17 +26,19 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "type": "tearoff" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "type": "tearoff" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/top_level_method.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/top_level_method.dart.json.expect index 00e3a855906..63451eeb21b 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/top_level_method.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/top_level_method.dart.json.expect @@ -28,20 +28,22 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/types_of_arguments.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/types_of_arguments.dart.json.expect index 47867507f81..9fd3084773e 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/types_of_arguments.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/types_of_arguments.dart.json.expect @@ -65,6 +65,9 @@ "value": 11 } ] + }, + { + "type": "non_constant" } ], "definitions": [ @@ -94,65 +97,67 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 0 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 1 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 2 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 3 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 12 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - null - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 0 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 1 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 2 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 3 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 12 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 13 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/unsupported_collections.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/unsupported_collections.dart.json.expect index a0184d4fe35..e1bb7edae1b 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/unsupported_collections.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/unsupported_collections.dart.json.expect @@ -47,29 +47,31 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 1 - ], - "type": "with_arguments" - }, - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 3 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - } - ] + "uses": { + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 1 + ], + "type": "with_arguments" + }, + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 3 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file diff --git a/pkg/vm/testcases/transformations/record_use/lib/unsupported_instance.dart.json.expect b/pkg/vm/testcases/transformations/record_use/lib/unsupported_instance.dart.json.expect index e8709068f24..f3f3d0dc7a6 100644 --- a/pkg/vm/testcases/transformations/record_use/lib/unsupported_instance.dart.json.expect +++ b/pkg/vm/testcases/transformations/record_use/lib/unsupported_instance.dart.json.expect @@ -44,32 +44,36 @@ "comment": "Recorded usages of objects tagged with a `RecordUse` annotation", "version": "0.4.0" }, - "recordings": [ - { - "calls": [ - { - "loading_unit_indices": [ - 0 - ], - "positional": [ - 1 - ], - "type": "with_arguments" - } - ], - "definition_index": 0 - }, - { - "definition_index": 1, - "instances": [ - { - "constant_index": 1, - "loading_unit_indices": [ - 0 - ], - "type": "constant" - } - ] - } - ] + "uses": { + "instances": [ + { + "definition_index": 1, + "uses": [ + { + "constant_index": 1, + "loading_unit_indices": [ + 0 + ], + "type": "constant" + } + ] + } + ], + "static_calls": [ + { + "definition_index": 0, + "uses": [ + { + "loading_unit_indices": [ + 0 + ], + "positional": [ + 1 + ], + "type": "with_arguments" + } + ] + } + ] + } } \ No newline at end of file