From a2adab7dfdc069175abfc667c9f75a43811c69d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= Date: Tue, 15 Nov 2022 15:41:49 +0000 Subject: [PATCH 1/2] Update Function class documentation: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Language spec does not require that evaluations of the same function literal should create distinct objects. Remove the parts in `Function` documentation to reflect that. Also fixes formatting of markdown. Invalid test file (with Dart 2 and 3 versions) removed: the tests assume function literals won't be lifted to top-level. Change-Id: Ib7a9464ad992cf461e77ef2d8ef336c7b0f4875a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269721 Reviewed-by: Lasse Nielsen Reviewed-by: Aske Simon Christensen Commit-Queue: Ömer Ağacan Reviewed-by: Erik Ernst --- .../tests/concurrency/stress_test_list.json | 2 - sdk/lib/core/function.dart | 65 +++++++++++++------ .../function/local_non_equal_test.dart | 33 ---------- .../function/local_non_equal_test.dart | 35 ---------- 4 files changed, 46 insertions(+), 89 deletions(-) delete mode 100644 tests/language/function/local_non_equal_test.dart delete mode 100644 tests/language_2/function/local_non_equal_test.dart diff --git a/runtime/tests/concurrency/stress_test_list.json b/runtime/tests/concurrency/stress_test_list.json index e901d31f95215..84518822baacf 100644 --- a/runtime/tests/concurrency/stress_test_list.json +++ b/runtime/tests/concurrency/stress_test_list.json @@ -1112,7 +1112,6 @@ "../../../tests/language/function/local2_test.dart", "../../../tests/language/function/local3_test.dart", "../../../tests/language/function/local_function_test.dart", - "../../../tests/language/function/local_non_equal_test.dart", "../../../tests/language/function/malformed_result_type_runtime_test.dart", "../../../tests/language/function/propagation_test.dart", "../../../tests/language/function/regress_45601_test.dart", @@ -4516,7 +4515,6 @@ "../../../tests/language_2/function/local2_test.dart", "../../../tests/language_2/function/local3_test.dart", "../../../tests/language_2/function/local_function_test.dart", - "../../../tests/language_2/function/local_non_equal_test.dart", "../../../tests/language_2/function/malformed_result_type_runtime_test.dart", "../../../tests/language_2/function/propagation_test.dart", "../../../tests/language_2/function/regress_45601_test.dart", diff --git a/sdk/lib/core/function.dart b/sdk/lib/core/function.dart index 608b542ff35b8..7ec53f370482b 100644 --- a/sdk/lib/core/function.dart +++ b/sdk/lib/core/function.dart @@ -148,17 +148,17 @@ abstract class Function { /// Test whether another object is equal to this function. /// - /// Function objects are only equal to other function objects - /// (an object satisfying `object is Function`), - /// and never to non-function objects. + /// Function objects are only equal to other function objects (an object + /// satisfying `object is Function`), and never to non-function objects. /// - /// Some function objects are considered equal by `==` - /// because they are recognized as representing the "same function": + /// Some function objects are considered equal by `==` because they are + /// recognized as representing the "same function": /// /// - It is the same object. Static and top-level functions are compile time /// constants when used as values, so referring to the same function twice /// always yields the same object, as does referring to a local function /// declaration twice in the same scope where it was declared. + /// /// ```dart /// void main() { /// assert(identical(print, print)); @@ -166,34 +166,61 @@ abstract class Function { /// assert(identical(add, add)); /// } /// ``` + /// /// - The functions are same member method extracted from the same object. - /// Repeatedly extracting ("tearing off") the same instance method of - /// the same object to a function value - /// gives equal, but not necessarily identical, function values. + /// Repeatedly extracting ("tearing off") the same instance method of the + /// same object to a function value gives equal, but not necessarily + /// identical, function values. + /// /// ```dart /// var o = Object(); /// assert(o.toString == o.toString); /// ``` + /// /// - Instantiations of equal generic functions with the *same* types /// yields equal results. + /// /// ```dart - /// T id(T value) => value; - /// assert(id == id); + /// T id(T value) => value; + /// assert(id == id); /// ``` - /// (If the function is a constant and the type arguments are known at - /// compile-time, the results may also be identical.) - /// - /// Different evaluations of function literals - /// never give rise to equal function objects. - /// Each time a function literal is evaluated, - /// it creates a new function value that is not equal to any other function - /// value, not even ones created by the same expression. + /// + /// (If the function is a constant and the type arguments are known at + /// compile-time, the results may also be identical.) + /// + /// Different evaluations of function literals are not guaranteed or required + /// to give rise to identical or equal function objects. For example: + /// /// ```dart /// var functions = []; /// for (var i = 0; i < 2; i++) { /// functions.add((x) => x); /// } - /// assert(functions[0] != functions[1]); + /// print(identical(functions[0], functions[1])); // 'true' or 'false' + /// print(functions[0] == functions[1]); // 'true' or 'false' /// ``` + /// + /// If the distinct values are identical, they are always equal. + /// + /// If the function values are equal, they are guaranteed to behave + /// indistinguishably for all arguments. + /// + /// If two functions values behave differently, they are never equal or + /// identical. + /// + /// The reason to not require a specific equality or identity of the values + /// of a function expression is to allow compiler optimizations. If a + /// function expression does not depend on surrounding variables, an + /// implementation can safely be shared between multiple evaluations. For + /// example: + /// + /// ```dart + /// List ints = [6, 2, 5, 1, 4, 3]; + /// ints.sort((x, y) => x - y); + /// print(ints); + /// ``` + /// + /// A compiler can convert the closure `(x, y) => x - y` into a top-level + /// function. bool operator ==(Object other); } diff --git a/tests/language/function/local_non_equal_test.dart b/tests/language/function/local_non_equal_test.dart deleted file mode 100644 index 5fbaf57dc435b..0000000000000 --- a/tests/language/function/local_non_equal_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file -// 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. - -import "package:expect/expect.dart"; - -foo() => () => 42; -bar() { - var c = () => 54; - return c; -} - -baz() { - c() => 68; - return c; -} - -main() { - var first = foo(); - var second = foo(); - Expect.isFalse(identical(first, second)); - Expect.notEquals(first, second); - - first = bar(); - second = bar(); - Expect.isFalse(identical(first, second)); - Expect.notEquals(first, second); - - first = baz(); - second = baz(); - Expect.isFalse(identical(first, second)); - Expect.notEquals(first, second); -} diff --git a/tests/language_2/function/local_non_equal_test.dart b/tests/language_2/function/local_non_equal_test.dart deleted file mode 100644 index 8111821169ec2..0000000000000 --- a/tests/language_2/function/local_non_equal_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -foo() => () => 42; -bar() { - var c = () => 54; - return c; -} - -baz() { - c() => 68; - return c; -} - -main() { - var first = foo(); - var second = foo(); - Expect.isFalse(identical(first, second)); - Expect.notEquals(first, second); - - first = bar(); - second = bar(); - Expect.isFalse(identical(first, second)); - Expect.notEquals(first, second); - - first = baz(); - second = baz(); - Expect.isFalse(identical(first, second)); - Expect.notEquals(first, second); -} From a2de36e708b8a8e15d3bd49eef2cede57e649436 Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Tue, 15 Nov 2022 17:15:58 +0000 Subject: [PATCH 2/2] [vm] Rename the default implementation classes of Map and Set. _InternalLinkedHashMap => _Map _InternalImmutableLinkedHashMap => _ConstMap _InternalLinkedHashSet => _Set _InternalImmutableLinkedHashSet => _ConstSet This makes things nicer to read in places that display implementation names, such as stack traces, debuggers, profilers and inspectors. TEST=ci Change-Id: Iec851c80ea2086cbe79934565dbf35f04809a836 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266303 Reviewed-by: Daco Harkes Commit-Queue: Ryan Macnak Reviewed-by: Chloe Stefantsova --- .../lib/src/fasta/source/source_loader.dart | 8 +- .../set_literal.expression.yaml.expect | 2 +- ...unds_literals.dart.weak.transformed.expect | 32 +-- ...t_collections.dart.weak.transformed.expect | 2 +- ...constant_type.dart.weak.transformed.expect | 6 +- ...ow_collection.dart.weak.transformed.expect | 2 +- ...ion_inference.dart.weak.transformed.expect | 174 +++++++------- ...on_inference2.dart.weak.transformed.expect | 174 +++++++------- ...n_set_literal.dart.weak.transformed.expect | 2 +- ...type_argument.dart.weak.transformed.expect | 2 +- .../issue37027.dart.weak.transformed.expect | 2 +- ..._aware_spread.dart.weak.transformed.expect | 2 +- ...aware_spread2.dart.weak.transformed.expect | 2 +- ...variable_type.dart.weak.transformed.expect | 2 +- ...ad_collection.dart.weak.transformed.expect | 2 +- ...ion_inference.dart.weak.transformed.expect | 14 +- ...on_inference2.dart.weak.transformed.expect | 14 +- ...literal_error.dart.weak.transformed.expect | 2 +- ..._and_bounds.dart.strong.transformed.expect | 2 +- ...ts_and_bounds.dart.weak.transformed.expect | 2 +- .../no_outline_change_22.yaml.world.1.expect | 2 +- .../no_outline_change_22.yaml.world.2.expect | 2 +- ...ue_is_precise.dart.weak.transformed.expect | 4 +- ...tal_inference.dart.weak.transformed.expect | 4 +- ...ension_method.dart.weak.transformed.expect | 4 +- .../issue42758.dart.strong.transformed.expect | 20 +- .../issue42758.dart.weak.transformed.expect | 20 +- .../issue43256.dart.strong.transformed.expect | 4 +- .../issue43256.dart.weak.transformed.expect | 4 +- .../issue43455.dart.strong.transformed.expect | 14 +- .../issue43455.dart.weak.transformed.expect | 14 +- .../issue43495.dart.strong.transformed.expect | 88 +++---- .../issue43495.dart.weak.transformed.expect | 88 +++---- ...ead_if_null.dart.strong.transformed.expect | 10 +- ...pread_if_null.dart.weak.transformed.expect | 10 +- ...le_warnings.dart.strong.transformed.expect | 4 +- ...able_warnings.dart.weak.transformed.expect | 4 +- ...s_from_opt_in.dart.weak.transformed.expect | 64 ++--- ...ss_null_aware.dart.weak.transformed.expect | 2 +- .../issue_42423.dart.weak.transformed.expect | 2 +- ...iguation_rule.dart.weak.transformed.expect | 18 +- ...guation_rule2.dart.weak.transformed.expect | 18 +- .../fold_initial.dart.weak.transformed.expect | 10 +- ...fold_initial2.dart.weak.transformed.expect | 6 +- .../invariance.dart.weak.transformed.expect | 8 +- .../invariance2.dart.weak.transformed.expect | 8 +- .../set_add_all.dart.weak.transformed.expect | 34 +-- ..._add_all_nnbd.dart.weak.transformed.expect | 38 +-- pkg/vm/lib/target/vm.dart | 22 +- .../specializer/map_factory_specializer.dart | 4 +- .../specializer/set_factory_specializer.dart | 4 +- .../class_generics_case1.dart.expect | 4 +- .../transformer/const_map.dart.expect | 2 +- .../transformer/const_set.dart.expect | 2 +- .../set_map_constructor_concrete.dart.expect | 20 +- pkg/vm_service/test/get_object_rpc_test.dart | 20 +- .../tests/service/get_object_rpc_test.dart | 20 +- .../tests/service_2/get_object_rpc_test.dart | 20 +- .../heapsnapshot/lib/src/expression.dart | 10 +- runtime/vm/app_snapshot.cc | 96 ++++---- runtime/vm/bootstrap.cc | 8 +- runtime/vm/class_finalizer.cc | 16 +- runtime/vm/class_id.h | 12 +- runtime/vm/compiler/aot/precompiler.cc | 14 +- runtime/vm/compiler/backend/il_serializer.cc | 16 +- runtime/vm/compiler/backend/slot.h | 2 +- .../vm/compiler/frontend/constant_reader.cc | 16 +- runtime/vm/compiler/runtime_api.cc | 8 +- runtime/vm/compiler/runtime_api.h | 4 +- runtime/vm/isolate.cc | 4 +- runtime/vm/isolate_reload_test.cc | 6 +- runtime/vm/message_snapshot.cc | 106 ++++----- runtime/vm/object.cc | 220 ++++++++---------- runtime/vm/object.h | 153 ++++++------ runtime/vm/object_graph.cc | 18 +- runtime/vm/object_graph_copy.cc | 22 +- runtime/vm/object_service.cc | 8 +- runtime/vm/object_store.cc | 4 +- runtime/vm/object_store.h | 8 +- runtime/vm/object_test.cc | 99 ++++---- runtime/vm/raw_object.cc | 16 +- runtime/vm/raw_object.h | 36 +-- runtime/vm/raw_object_fields.cc | 48 ++-- runtime/vm/service.cc | 8 +- runtime/vm/symbols.h | 8 +- runtime/vm/tagged_pointer.h | 8 +- sdk/lib/_internal/vm/lib/hash_factories.dart | 4 +- .../_internal/vm_shared/lib/compact_hash.dart | 44 ++-- 88 files changed, 1019 insertions(+), 1073 deletions(-) diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart index 87af9ee880f82..32b7ca8c7607c 100644 --- a/pkg/front_end/lib/src/fasta/source/source_loader.dart +++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart @@ -2925,8 +2925,8 @@ abstract class LinkedHashMap implements Map { bool Function(dynamic)? isValidKey}) => null; } -class _InternalLinkedHashMap { - _InternalLinkedHashMap(); +class _Map { + _Map(); } abstract class LinkedHashSet implements Set { @@ -2936,8 +2936,8 @@ abstract class LinkedHashSet implements Set { bool Function(dynamic)? isValidKey}) => null; } -class _InternalLinkedHashSet { - _InternalLinkedHashSet(); +class _Set { + _Set(); } class _UnmodifiableSet { diff --git a/pkg/front_end/testcases/expression/set_literal.expression.yaml.expect b/pkg/front_end/testcases/expression/set_literal.expression.yaml.expect index e957ffa788930..7d7b48891b33b 100644 --- a/pkg/front_end/testcases/expression/set_literal.expression.yaml.expect +++ b/pkg/front_end/testcases/expression/set_literal.expression.yaml.expect @@ -2,6 +2,6 @@ Errors: { } method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic return block { - final dart.core::Set #t1 = new dart.collection::_InternalLinkedHashSet::•(); + final dart.core::Set #t1 = new dart.collection::_Set::•(); #t1.{dart.core::Set::add}{Invariant}("a"){(dart.core::String) → dart.core::bool}; } =>#t1; diff --git a/pkg/front_end/testcases/general/bounds_literals.dart.weak.transformed.expect b/pkg/front_end/testcases/general/bounds_literals.dart.weak.transformed.expect index c308cd0c5c7bc..e2ef2a35e15f2 100644 --- a/pkg/front_end/testcases/general/bounds_literals.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/bounds_literals.dart.weak.transformed.expect @@ -146,52 +146,52 @@ static method test() → dynamic { , self::G>>{}; , self::G>{}; block { - final core::Set> #t1 = new col::_InternalLinkedHashSet::•>(); + final core::Set> #t1 = new col::_Set::•>(); } =>#t1; block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); } =>#t2; block { - final core::Set> #t3 = new col::_InternalLinkedHashSet::•>(); + final core::Set> #t3 = new col::_Set::•>(); } =>#t3; block { - final core::Set> #t4 = new col::_InternalLinkedHashSet::•>(); + final core::Set> #t4 = new col::_Set::•>(); } =>#t4; block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); } =>#t5; block { - final core::Set #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set #t6 = new col::_Set::•(); } =>#t6; block { - final core::Set #t7 = new col::_InternalLinkedHashSet::•(); + final core::Set #t7 = new col::_Set::•(); } =>#t7; block { - final core::Set> #t8 = new col::_InternalLinkedHashSet::•>(); + final core::Set> #t8 = new col::_Set::•>(); } =>#t8; block { - final core::Set>> #t9 = new col::_InternalLinkedHashSet::•>>(); + final core::Set>> #t9 = new col::_Set::•>>(); } =>#t9; block { - final core::Set>> #t10 = new col::_InternalLinkedHashSet::•>>(); + final core::Set>> #t10 = new col::_Set::•>>(); } =>#t10; block { - final core::Set>> #t11 = new col::_InternalLinkedHashSet::•>>(); + final core::Set>> #t11 = new col::_Set::•>>(); } =>#t11; block { - final core::Set>> #t12 = new col::_InternalLinkedHashSet::•>>(); + final core::Set>> #t12 = new col::_Set::•>>(); } =>#t12; block { - final core::Set> #t13 = new col::_InternalLinkedHashSet::•>(); + final core::Set> #t13 = new col::_Set::•>(); } =>#t13; block { - final core::Set>> #t14 = new col::_InternalLinkedHashSet::•>>(); + final core::Set>> #t14 = new col::_Set::•>>(); } =>#t14; block { - final core::Set> #t15 = new col::_InternalLinkedHashSet::•>(); + final core::Set> #t15 = new col::_Set::•>(); } =>#t15; block { - final core::Set> #t16 = new col::_InternalLinkedHashSet::•>(); + final core::Set> #t16 = new col::_Set::•>(); } =>#t16; core::_GrowableList::•>(0); core::_GrowableList::•(0); diff --git a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.transformed.expect index 9dec79d0e9784..76f9f5c6f7ca0 100644 --- a/pkg/front_end/testcases/general/constants/const_collections.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/constants/const_collections.dart.weak.transformed.expect @@ -354,7 +354,7 @@ static method main() → dynamic { core::print(#C11); core::print(#C14); core::print( block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}("hello"){(core::String) → core::bool}; } =>#t2); core::print(#C16); diff --git a/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.transformed.expect index bf097d3500c43..7f305232db342 100644 --- a/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/constants/potentially_constant_type.dart.weak.transformed.expect @@ -161,7 +161,7 @@ class Class extends core::Object /*hasConstCo final field dynamic field15; const constructor •(dynamic o) → self::Class* : self::Class::field1 = #C1, self::Class::field5 = core::_GrowableList::•(0), self::Class::field6 = block { - final core::Set* #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t1 = new col::_Set::•(); } =>#t1, self::Class::field7 = {}, self::Class::field8 = o is invalid-type, self::Class::field9 = o is self::Class*, self::Class::field10 = o as invalid-type, self::Class::field11 = o as self::Class*, self::Class::field15 = core::_GrowableList::•*>(0), super core::Object::•() ; method method() → void { @@ -344,7 +344,7 @@ class Class extends core::Object /*hasConstCo final field dynamic field15; const constructor •(dynamic o) → self2::Class : self2::Class::field1 = #C1, self2::Class::field5 = core::_GrowableList::•(0), self2::Class::field6 = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); } =>#t2, self2::Class::field7 = {}, self2::Class::field8 = o is{ForNonNullableByDefault} self2::Class::T%, self2::Class::field9 = o is{ForNonNullableByDefault} self2::Class, self2::Class::field10 = o as{ForNonNullableByDefault} self2::Class::T%, self2::Class::field11 = o{self2::Class::T%} as{ForNonNullableByDefault} self2::Class, self2::Class::field15 = core::_GrowableList::•>(0), super core::Object::•() ; method method() → void { @@ -586,7 +586,7 @@ class Class extends core::Object /*hasConstCo final field dynamic field16; const constructor •(dynamic o) → self3::Class : self3::Class::field1 = self3::Class::T%, self3::Class::field2 = self3::Class, self3::Class::field3 = #C24, self3::Class::field4 = #C24, self3::Class::field5 = core::_GrowableList::•(0), self3::Class::field6 = block { - final core::Set #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set #t3 = new col::_Set::•(); } =>#t3, self3::Class::field7 = {}, self3::Class::field8 = o is{ForNonNullableByDefault} self3::Class::T%, self3::Class::field9 = o is{ForNonNullableByDefault} self3::Class, self3::Class::field10 = o as{ForNonNullableByDefault} self3::Class::T%, self3::Class::field11 = o{self3::Class::T%} as{ForNonNullableByDefault} self3::Class, self3::Class::field12 = #C25, self3::Class::field13 = #C25, self3::Class::field14 = #C24>, self3::Class::field15 = core::_GrowableList::•>(0), self3::Class::field16 = #C26, super core::Object::•() ; method method() → void { diff --git a/pkg/front_end/testcases/general/control_flow_collection.dart.weak.transformed.expect b/pkg/front_end/testcases/general/control_flow_collection.dart.weak.transformed.expect index 2026161301f1a..34fea3de404e0 100644 --- a/pkg/front_end/testcases/general/control_flow_collection.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/control_flow_collection.dart.weak.transformed.expect @@ -34,7 +34,7 @@ static method main() → dynamic { #t1.{core::List::add}{Invariant}(i){(core::int) → void}; } =>#t1; final core::Set aSet = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t2.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; diff --git a/pkg/front_end/testcases/general/control_flow_collection_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/general/control_flow_collection_inference.dart.weak.transformed.expect index e710cb14d29f1..1682c67b01c4d 100644 --- a/pkg/front_end/testcases/general/control_flow_collection_inference.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/control_flow_collection_inference.dart.weak.transformed.expect @@ -457,7 +457,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t1.{core::List::add}{Invariant}(42){(core::int*) →* void}; } =>#t1; core::Set* set10 = block { - final core::Set* #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t2 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t2.{core::Set::add}{Invariant}(42){(core::int*) →* core::bool*}; #t2.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; @@ -474,7 +474,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t4.{core::List::add}{Invariant}(dynVar){(dynamic) →* void}; } =>#t4; core::Set* set11 = block { - final core::Set* #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t5 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t5.{core::Set::add}{Invariant}(dynVar){(dynamic) →* core::bool*}; #t5.{core::Set::add}{Invariant}(null){(dynamic) →* core::bool*}; @@ -491,7 +491,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t7.{core::List::add}{Invariant}(core::_GrowableList::_literal1(42)){(core::List*) →* void}; } =>#t7; core::Set*>* set12 = block { - final core::Set*>* #t8 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t8 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t8.{core::Set::add}{Invariant}(core::_GrowableList::_literal1(42)){(core::List*) →* core::bool*}; #t8.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -508,7 +508,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t10.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable*) →* void}; } =>#t10; core::Set* set20 = block { - final core::Set* #t11 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t11 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t11.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable*) →* void}; #t11.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; @@ -525,7 +525,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t13.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable*) →* void}; } =>#t13; core::Set* set21 = block { - final core::Set* #t14 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t14 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t14.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable*) →* void}; #t14.{core::Set::add}{Invariant}(null){(dynamic) →* core::bool*}; @@ -542,7 +542,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t16.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::_literal1(42))){(core::Iterable*>*) →* void}; } =>#t16; core::Set*>* set22 = block { - final core::Set*>* #t17 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t17 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t17.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::_literal1(42))){(core::Iterable*>*) →* void}; #t17.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -560,7 +560,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t19.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable*) →* void}; } =>#t19; core::Set* set30 = block { - final core::Set* #t20 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t20 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t20.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable*) →* void}; @@ -580,7 +580,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t22.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable*) →* void}; } =>#t22; core::Set* set31 = block { - final core::Set* #t23 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t23 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t23.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable*) →* void}; @@ -600,7 +600,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t25.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::_literal1(42))){(core::Iterable*>*) →* void}; } =>#t25; core::Set*>* set33 = block { - final core::Set*>* #t26 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t26 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t26.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::_literal1(42))){(core::Iterable*>*) →* void}; @@ -619,7 +619,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t28.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; } =>#t28; core::Set*>* set40 = block { - final core::Set*>* #t29 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t29 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t29.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; #t29.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -631,15 +631,15 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor final core::List*>* #t30 = core::_GrowableList::•*>(0); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t30.{core::List::addAll}{Invariant}( block { - final core::Set*>* #t31 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t31 = new col::_Set::•*>(); #t31.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* core::bool*}; } =>#t31){(core::Iterable*>*) →* void}; } =>#t30; core::Set*>* set41 = block { - final core::Set*>* #t32 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t32 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t32.{core::Set::addAll}{Invariant}( block { - final core::Set*>* #t33 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t33 = new col::_Set::•*>(); #t33.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* core::bool*}; } =>#t33){(core::Iterable*>*) →* void}; #t32.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -651,7 +651,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t34.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; } =>#t34; core::Set*>* set42 = block { - final core::Set*>* #t35 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t35 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t35.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; @@ -670,7 +670,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t37.{core::List::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable*) →* void}; } =>#t37; core::Set* set50 = block { - final core::Set* #t38 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t38 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t38.{core::Set::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable*) →* void}; #t38.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; @@ -685,14 +685,14 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor final core::List* #t40 = core::_GrowableList::•(0); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t40.{core::List::addAll}{Invariant}( block { - final core::Set* #t41 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t41 = new col::_Set::•(); } =>#t41){(core::Iterable*) →* void}; } =>#t40; core::Set* set51 = block { - final core::Set* #t42 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t42 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t42.{core::Set::addAll}{Invariant}( block { - final core::Set* #t43 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t43 = new col::_Set::•(); } =>#t43){(core::Iterable*) →* void}; #t42.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; } =>#t42; @@ -703,7 +703,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t44.{core::List::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable*) →* void}; } =>#t44; core::Set* set52 = block { - final core::Set* #t45 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t45 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t45.{core::Set::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable*) →* void}; @@ -722,7 +722,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t47.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; } =>#t47; core::Set*>* set60 = block { - final core::Set*>* #t48 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t48 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t48.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; #t48.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -740,7 +740,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t50.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; } =>#t50; core::Set*>* set61 = block { - final core::Set*>* #t51 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t51 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t51.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; @@ -759,7 +759,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t53.{core::List::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* void}; } =>#t53; core::Set*>* set70 = block { - final core::Set*>* #t54 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t54 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t54.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* core::bool*}; #t54.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -771,7 +771,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t55.{core::List::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* void}; } =>#t55; core::Set*>* set71 = block { - final core::Set*>* #t56 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t56 = new col::_Set::•*>(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t56.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* core::bool*}; @@ -785,7 +785,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t57.{core::List::add}{Invariant}(3.14){(core::num*) →* void}; } =>#t57; core::Set* set80 = block { - final core::Set* #t58 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t58 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t58.{core::Set::add}{Invariant}(42){(core::num*) →* core::bool*}; else @@ -808,7 +808,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t60.{core::List::addAll}{Invariant}(listDouble){(core::Iterable*) →* void}; } =>#t60; core::Set* set81 = block { - final core::Set* #t61 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t61 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t61.{core::Set::addAll}{Invariant}(listInt){(core::Iterable*) →* void}; else @@ -831,7 +831,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t63.{core::List::addAll}{Invariant}(dynVar as{TypeError,ForDynamic} core::Iterable*){(core::Iterable*) →* void}; } =>#t63; core::Set* set82 = block { - final core::Set* #t64 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t64 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t64.{core::Set::addAll}{Invariant}(listInt){(core::Iterable*) →* void}; else @@ -839,7 +839,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t64.{core::Set::add}{Invariant}(null){(dynamic) →* core::bool*}; } =>#t64; core::Set* map82 = block { - final core::Set* #t65 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t65 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t65.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:73:38: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -857,7 +857,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t66.{core::List::addAll}{Invariant}(listDouble){(core::Iterable*) →* void}; } =>#t66; core::Set* set83 = block { - final core::Set* #t67 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t67 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t67.{core::Set::addAll}{Invariant}(listInt){(core::Iterable*) →* void}; else @@ -878,7 +878,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t69.{core::List::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*){(core::int*) →* void}; } =>#t69; core::Set* set90 = block { - final core::Set* #t70 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t70 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t70.{core::Set::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*){(core::int*) →* core::bool*}; #t70.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; @@ -903,7 +903,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor } } =>#t72; core::Set* set91 = block { - final core::Set* #t75 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t75 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) { core::Iterator* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable*).{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -937,7 +937,7 @@ static method testIfElement(dynamic dynVar, core::List* listInt, cor #t82.{core::List::add}{Invariant}(42){(core::int*) →* void}; } =>#t82; core::Set* set100 = block { - final core::Set* #t83 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t83 = new col::_Set::•(); if(dynVar as{TypeError,ForDynamic} core::bool*) #t83.{core::Set::add}{Invariant}(42){(core::int*) →* core::bool*}; } =>#t83; @@ -956,7 +956,7 @@ static method testIfElementErrors(core::Map* map) → dy ^" in "bar" as{TypeError} core::int*){(core::int*) →* void}; } =>#t85; block { - final core::Set* #t86 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t86 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t86.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:90:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'. {if (oracle(\"foo\")) \"bar\", null}; @@ -979,7 +979,7 @@ static method testIfElementErrors(core::Map* map) → dy ^" in "bar" as{TypeError} core::int*)){(core::Iterable*) →* void}; } =>#t88; block { - final core::Set* #t89 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t89 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t89.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:93:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'. {if (oracle(\"foo\")) ...[\"bar\"], null}; @@ -1003,7 +1003,7 @@ static method testIfElementErrors(core::Map* map) → dy ^"){(core::int*) →* void}; } =>#t91; block { - final core::Set* #t92 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t92 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t92.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:96:31: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -1030,7 +1030,7 @@ static method testIfElementErrors(core::Map* map) → dy ^" in 3.14 as{TypeError} core::String*){(core::String*) →* void}; } =>#t93; block { - final core::Set* #t94 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t94 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t94.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:99:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'. {if (oracle(\"foo\")) 42 else 3.14, null}; @@ -1064,7 +1064,7 @@ static method testIfElementErrors(core::Map* map) → dy #t96.{core::List::add}{Invariant}(42){(core::int*) →* void}; } =>#t96; block { - final core::Set* #t97 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t97 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t97.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:102:31: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -1092,7 +1092,7 @@ static method testIfElementErrors(core::Map* map) → dy ^"){(core::int*) →* void}; } =>#t98; block { - final core::Set* #t99 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t99 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t99.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:105:31: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -1135,7 +1135,7 @@ static method testIfElementErrors(core::Map* map) → dy #t100.{core::List::add}{Invariant}(42){(core::int*) →* void}; } =>#t100; core::Set* set20 = block { - final core::Set* #t101 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t101 = new col::_Set::•(); if(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:115:25: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. Set set20 = {if (42) 42}; ^" in 42 as{TypeError} core::bool*) @@ -1160,7 +1160,7 @@ static method testIfElementErrors(core::Map* map) → dy ^" in 42 as{TypeError} core::String*){(core::String*) →* void}; } =>#t103; core::Set* set40 = block { - final core::Set* #t104 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t104 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic} core::bool*) #t104.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:118:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'. Set set40 = {if (oracle(\"foo\")) true else 42}; @@ -1200,7 +1200,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t107.{core::List::add}{Invariant}(42){(core::int*) →* void}; } =>#t107; core::Set* set10 = block { - final core::Set* #t108 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t108 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t108.{core::Set::add}{Invariant}(42){(core::int*) →* core::bool*}; #t108.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; @@ -1217,7 +1217,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t110.{core::List::add}{Invariant}(dynVar){(dynamic) →* void}; } =>#t110; core::Set* set11 = block { - final core::Set* #t111 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t111 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t111.{core::Set::add}{Invariant}(dynVar){(dynamic) →* core::bool*}; #t111.{core::Set::add}{Invariant}(null){(dynamic) →* core::bool*}; @@ -1234,7 +1234,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t113.{core::List::add}{Invariant}(core::_GrowableList::_literal1(42)){(core::List*) →* void}; } =>#t113; core::Set*>* set12 = block { - final core::Set*>* #t114 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t114 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t114.{core::Set::add}{Invariant}(core::_GrowableList::_literal1(42)){(core::List*) →* core::bool*}; #t114.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -1251,7 +1251,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t116.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable*) →* void}; } =>#t116; core::Set* set20 = block { - final core::Set* #t117 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t117 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t117.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable*) →* void}; #t117.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; @@ -1268,7 +1268,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t119.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable*) →* void}; } =>#t119; core::Set* set21 = block { - final core::Set* #t120 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t120 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t120.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable*) →* void}; #t120.{core::Set::add}{Invariant}(null){(dynamic) →* core::bool*}; @@ -1285,7 +1285,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t122.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::_literal1(42))){(core::Iterable*>*) →* void}; } =>#t122; core::Set*>* set22 = block { - final core::Set*>* #t123 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t123 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t123.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::_literal1(42))){(core::Iterable*>*) →* void}; #t123.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -1303,7 +1303,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t125.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable*) →* void}; } =>#t125; core::Set* set30 = block { - final core::Set* #t126 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t126 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t126.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable*) →* void}; @@ -1323,7 +1323,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t128.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable*) →* void}; } =>#t128; core::Set* set31 = block { - final core::Set* #t129 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t129 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t129.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable*) →* void}; @@ -1343,7 +1343,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t131.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::_literal1(42))){(core::Iterable*>*) →* void}; } =>#t131; core::Set*>* set33 = block { - final core::Set*>* #t132 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t132 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t132.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::_literal1(42))){(core::Iterable*>*) →* void}; @@ -1362,7 +1362,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t134.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; } =>#t134; core::Set*>* set40 = block { - final core::Set*>* #t135 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t135 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t135.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; #t135.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -1377,15 +1377,15 @@ static method testForElement(dynamic dynVar, core::List* listInt, co final core::List*>* #t137 = core::_GrowableList::•*>(0); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t137.{core::List::addAll}{Invariant}( block { - final core::Set*>* #t138 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t138 = new col::_Set::•*>(); #t138.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* core::bool*}; } =>#t138){(core::Iterable*>*) →* void}; } =>#t137; core::Set*>* set41 = block { - final core::Set*>* #t139 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t139 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t139.{core::Set::addAll}{Invariant}( block { - final core::Set*>* #t140 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t140 = new col::_Set::•*>(); #t140.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* core::bool*}; } =>#t140){(core::Iterable*>*) →* void}; #t139.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -1397,7 +1397,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t141.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; } =>#t141; core::Set*>* set42 = block { - final core::Set*>* #t142 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t142 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t142.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; @@ -1416,7 +1416,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t144.{core::List::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable*) →* void}; } =>#t144; core::Set* set50 = block { - final core::Set* #t145 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t145 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t145.{core::Set::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable*) →* void}; #t145.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; @@ -1431,14 +1431,14 @@ static method testForElement(dynamic dynVar, core::List* listInt, co final core::List* #t147 = core::_GrowableList::•(0); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t147.{core::List::addAll}{Invariant}( block { - final core::Set* #t148 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t148 = new col::_Set::•(); } =>#t148){(core::Iterable*) →* void}; } =>#t147; core::Set* set51 = block { - final core::Set* #t149 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t149 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t149.{core::Set::addAll}{Invariant}( block { - final core::Set* #t150 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t150 = new col::_Set::•(); } =>#t150){(core::Iterable*) →* void}; #t149.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; } =>#t149; @@ -1449,7 +1449,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t151.{core::List::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable*) →* void}; } =>#t151; core::Set* set52 = block { - final core::Set* #t152 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t152 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t152.{core::Set::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable*) →* void}; @@ -1461,7 +1461,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t153.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; } =>#t153; core::Set*>* set60 = block { - final core::Set*>* #t154 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t154 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t154.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; #t154.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -1479,7 +1479,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t156.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; } =>#t156; core::Set*>* set61 = block { - final core::Set*>* #t157 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t157 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t157.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1*>(core::_GrowableList::•(0))){(core::Iterable*>*) →* void}; @@ -1498,7 +1498,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t159.{core::List::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* void}; } =>#t159; core::Set*>* set70 = block { - final core::Set*>* #t160 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t160 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t160.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* core::bool*}; #t160.{core::Set::add}{Invariant}(null){(core::List*) →* core::bool*}; @@ -1516,7 +1516,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t162.{core::List::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* void}; } =>#t162; core::Set*>* set71 = block { - final core::Set*>* #t163 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t163 = new col::_Set::•*>(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t163.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List*) →* core::bool*}; @@ -1538,7 +1538,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t165.{core::List::add}{Invariant}(3.14){(core::num*) →* void}; } =>#t165; core::Set* set80 = block { - final core::Set* #t166 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t166 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t166.{core::Set::add}{Invariant}(42){(core::num*) →* core::bool*}; @@ -1564,7 +1564,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t168.{core::List::addAll}{Invariant}(listDouble){(core::Iterable*) →* void}; } =>#t168; core::Set* set81 = block { - final core::Set* #t169 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t169 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t169.{core::Set::addAll}{Invariant}(listInt){(core::Iterable*) →* void}; @@ -1590,7 +1590,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t171.{core::List::addAll}{Invariant}(dynVar as{TypeError,ForDynamic} core::Iterable*){(core::Iterable*) →* void}; } =>#t171; core::Set* set82 = block { - final core::Set* #t172 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t172 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t172.{core::Set::addAll}{Invariant}(listInt){(core::Iterable*) →* void}; @@ -1616,7 +1616,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t174.{core::List::addAll}{Invariant}(listDouble){(core::Iterable*) →* void}; } =>#t174; core::Set* set83 = block { - final core::Set* #t175 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t175 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t175.{core::Set::addAll}{Invariant}(listInt){(core::Iterable*) →* void}; @@ -1639,7 +1639,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t177.{core::List::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*){(core::int*) →* void}; } =>#t177; core::Set* set90 = block { - final core::Set* #t178 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t178 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t178.{core::Set::add}{Invariant}(dynVar as{TypeError,ForDynamic} core::int*){(core::int*) →* core::bool*}; #t178.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; @@ -1664,7 +1664,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co } } =>#t180; core::Set* set91 = block { - final core::Set* #t183 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t183 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) { core::Iterator* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable*).{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -1698,7 +1698,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t190.{core::List::add}{Invariant}(42){(core::int*) →* void}; } =>#t190; core::Set* set100 = block { - final core::Set* #t192 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t192 = new col::_Set::•(); for (final core::int* #t193 = index = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; index = index.{core::num::+}(1){(core::num*) →* core::int*}) #t192.{core::Set::add}{Invariant}(42){(core::int*) →* core::bool*}; } =>#t192; @@ -1718,7 +1718,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co } } =>#t196; core::Set* set110 = block { - final core::Set* #t197 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t197 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = core::_GrowableList::_literal3(1, 2, 3).{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -1750,7 +1750,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co } } =>#t199; core::Set* set120 = block { - final core::Set* #t200 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t200 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = (dynVar as{TypeError,ForDynamic} core::Iterable*).{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -1777,7 +1777,7 @@ static method testForElement(dynamic dynVar, core::List* listInt, co #t202.{core::List::add}{Invariant}(i){(core::int*) →* void}; } =>#t202; core::Set* set130 = block { - final core::Set* #t203 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t203 = new col::_Set::•(); for (core::int* i = 1; i.{core::num::<}(2){(core::num*) →* core::bool*}; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t203.{core::Set::add}{Invariant}(i){(core::int*) →* core::bool*}; } =>#t203; @@ -1796,7 +1796,7 @@ static method testForElementErrors(core::Map* map, core: ^" in "bar" as{TypeError} core::int*){(core::int*) →* void}; } =>#t205; block { - final core::Set* #t206 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t206 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t206.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:213:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'. {for (int i = 0; oracle(\"foo\"); i++) \"bar\", null}; @@ -1823,7 +1823,7 @@ static method testForElementErrors(core::Map* map, core: ^" in "bar" as{TypeError} core::int*)){(core::Iterable*) →* void}; } =>#t208; block { - final core::Set* #t209 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t209 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t209.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:216:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'. {for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"], null}; @@ -1851,7 +1851,7 @@ static method testForElementErrors(core::Map* map, core: ^"){(core::int*) →* void}; } =>#t211; block { - final core::Set* #t212 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t212 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) #t212.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:219:48: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -1879,7 +1879,7 @@ static method testForElementErrors(core::Map* map, core: ^" in 3.14 as{TypeError} core::String*){(core::String*) →* void}; } =>#t213; block { - final core::Set* #t214 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t214 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t214.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:222:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'. @@ -1916,7 +1916,7 @@ static method testForElementErrors(core::Map* map, core: #t216.{core::List::add}{Invariant}(42){(core::int*) →* void}; } =>#t216; block { - final core::Set* #t217 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t217 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t217.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:225:62: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. @@ -1946,7 +1946,7 @@ static method testForElementErrors(core::Map* map, core: ^"){(core::int*) →* void}; } =>#t218; block { - final core::Set* #t219 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t219 = new col::_Set::•(); for (core::int* i = 0; self::oracle("foo") as{TypeError,ForDynamic} core::bool*; i = i.{core::num::+}(1){(core::num*) →* core::int*}) if(self::oracle() as{TypeError,ForDynamic} core::bool*) #t219.{core::Set::add}{Invariant}(42){(core::int*) →* core::bool*}; @@ -1981,7 +1981,7 @@ static method testForElementErrors(core::Map* map, core: } } =>#t220; block { - final core::Set* #t222 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t222 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = core::_GrowableList::_literal1(1).{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -2026,7 +2026,7 @@ static method testForElementErrors(core::Map* map, core: } } =>#t226; core::Set* set10 = block { - final core::Set* #t227 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t227 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:237:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable'. - 'Iterable' is from 'dart:core'. @@ -2068,7 +2068,7 @@ static method testForElementErrors(core::Map* map, core: } } =>#t229; core::Set* set20 = block { - final core::Set* #t230 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t230 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = core::_GrowableList::_literal2(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:240:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'. var set20 = {for (int i in [\"not\", \"int\"]) i, null}; @@ -2116,7 +2116,7 @@ static method testForElementErrors(core::Map* map, core: } } =>#t232; core::Set* set30 = block { - final core::Set* #t234 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t234 = new col::_Set::•(); { Never :stream = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:243:36: Error: The type 'String' used in the 'for' loop must implement 'Stream'. - 'Stream' is from 'dart:async'. @@ -2173,7 +2173,7 @@ static method testForElementErrors(core::Map* map, core: } } =>#t238; core::Set* set40 = block { - final core::Set* #t240 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t240 = new col::_Set::•(); { asy::Stream :stream = asy::Stream::fromIterable(core::_GrowableList::_literal2(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:246:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'. var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null}; @@ -2218,7 +2218,7 @@ static method testForElementErrors(core::Map* map, core: #t244.{core::List::add}{Invariant}(42){(core::int*) →* void}; } =>#t244; core::Set* set50 = block { - final core::Set* #t245 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t245 = new col::_Set::•(); for (; ; ) #t245.{core::Set::add}{Invariant}(42){(core::int*) →* core::bool*}; #t245.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; @@ -2237,7 +2237,7 @@ static method testForElementErrors(core::Map* map, core: #t247.{core::List::add}{Invariant}(42){(core::int*) →* void}; } =>#t247; core::Set* set60 = block { - final core::Set* #t248 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t248 = new col::_Set::•(); for (; invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference.dart:252:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'. var set60 = {for (; \"not bool\";) 42, null}; ^" in "not bool" as{TypeError} core::bool*; ) @@ -2260,7 +2260,7 @@ static method testForElementErrorsNotAsync(asy::Stream* stream) → #t250.{core::List::add}{Invariant}(i){(core::int*) →* void}; } =>#t250; block { - final core::Set* #t251 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t251 = new col::_Set::•(); await for (core::int* i in stream) #t251.{core::Set::add}{Invariant}(i){(core::int*) →* core::bool*}; } =>#t251; @@ -2277,7 +2277,7 @@ static method testPromotion(self::A* a) → dynamic { #t253.{core::List::add}{Invariant}(a{self::B*}.{self::B::foo}{core::int*}){(core::int*) →* void}; } =>#t253; core::Set* set10 = block { - final core::Set* #t254 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t254 = new col::_Set::•(); if(a is self::B*) #t254.{core::Set::add}{Invariant}(a{self::B*}.{self::B::foo}{core::int*}){(core::int*) →* core::bool*}; } =>#t254; diff --git a/pkg/front_end/testcases/general/control_flow_collection_inference2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/control_flow_collection_inference2.dart.weak.transformed.expect index 58aec66f97521..60836b6420968 100644 --- a/pkg/front_end/testcases/general/control_flow_collection_inference2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/control_flow_collection_inference2.dart.weak.transformed.expect @@ -447,7 +447,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t1.{core::List::add}{Invariant}(42){(core::int) → void}; } =>#t1; core::Set set10 = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t2.{core::Set::add}{Invariant}(42){(core::int?) → core::bool}; #t2.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; @@ -464,7 +464,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t4.{core::List::add}{Invariant}(dynVar){(dynamic) → void}; } =>#t4; core::Set set11 = block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t5.{core::Set::add}{Invariant}(dynVar){(dynamic) → core::bool}; #t5.{core::Set::add}{Invariant}(null){(dynamic) → core::bool}; @@ -481,7 +481,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t7.{core::List::add}{Invariant}(core::_GrowableList::_literal1(42)){(core::List) → void}; } =>#t7; core::Set?> set12 = block { - final core::Set?> #t8 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t8 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t8.{core::Set::add}{Invariant}(core::_GrowableList::_literal1(42)){(core::List?) → core::bool}; #t8.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -498,7 +498,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t10.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable) → void}; } =>#t10; core::Set set20 = block { - final core::Set #t11 = new col::_InternalLinkedHashSet::•(); + final core::Set #t11 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t11.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable) → void}; #t11.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; @@ -515,7 +515,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t13.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable) → void}; } =>#t13; core::Set set21 = block { - final core::Set #t14 = new col::_InternalLinkedHashSet::•(); + final core::Set #t14 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t14.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable) → void}; #t14.{core::Set::add}{Invariant}(null){(dynamic) → core::bool}; @@ -532,7 +532,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t16.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::_literal1(42))){(core::Iterable>) → void}; } =>#t16; core::Set?> set22 = block { - final core::Set?> #t17 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t17 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t17.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::_literal1(42))){(core::Iterable?>) → void}; #t17.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -550,7 +550,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t19.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable) → void}; } =>#t19; core::Set set30 = block { - final core::Set #t20 = new col::_InternalLinkedHashSet::•(); + final core::Set #t20 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t20.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable) → void}; @@ -570,7 +570,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t22.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable) → void}; } =>#t22; core::Set set31 = block { - final core::Set #t23 = new col::_InternalLinkedHashSet::•(); + final core::Set #t23 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t23.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable) → void}; @@ -590,7 +590,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t25.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::_literal1(42))){(core::Iterable>) → void}; } =>#t25; core::Set?> set33 = block { - final core::Set?> #t26 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t26 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t26.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::_literal1(42))){(core::Iterable?>) → void}; @@ -609,7 +609,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t28.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::•(0))){(core::Iterable>) → void}; } =>#t28; core::Set?> set40 = block { - final core::Set?> #t29 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t29 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t29.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1?>(core::_GrowableList::•(0))){(core::Iterable?>) → void}; #t29.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -621,15 +621,15 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: final core::List> #t30 = core::_GrowableList::•>(0); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t30.{core::List::addAll}{Invariant}( block { - final core::Set> #t31 = new col::_InternalLinkedHashSet::•>(); + final core::Set> #t31 = new col::_Set::•>(); #t31.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List) → core::bool}; } =>#t31){(core::Iterable>) → void}; } =>#t30; core::Set?> set41 = block { - final core::Set?> #t32 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t32 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t32.{core::Set::addAll}{Invariant}( block { - final core::Set?> #t33 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t33 = new col::_Set::•?>(); #t33.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List?) → core::bool}; } =>#t33){(core::Iterable?>) → void}; #t32.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -641,7 +641,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t34.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::•(0))){(core::Iterable>) → void}; } =>#t34; core::Set?> set42 = block { - final core::Set?> #t35 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t35 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t35.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1?>(core::_GrowableList::•(0))){(core::Iterable?>) → void}; @@ -660,7 +660,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t37.{core::List::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable) → void}; } =>#t37; core::Set set50 = block { - final core::Set #t38 = new col::_InternalLinkedHashSet::•(); + final core::Set #t38 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t38.{core::Set::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable) → void}; #t38.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; @@ -675,14 +675,14 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: final core::List #t40 = core::_GrowableList::•(0); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t40.{core::List::addAll}{Invariant}( block { - final core::Set #t41 = new col::_InternalLinkedHashSet::•(); + final core::Set #t41 = new col::_Set::•(); } =>#t41){(core::Iterable) → void}; } =>#t40; core::Set set51 = block { - final core::Set #t42 = new col::_InternalLinkedHashSet::•(); + final core::Set #t42 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t42.{core::Set::addAll}{Invariant}( block { - final core::Set #t43 = new col::_InternalLinkedHashSet::•(); + final core::Set #t43 = new col::_Set::•(); } =>#t43){(core::Iterable) → void}; #t42.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; } =>#t42; @@ -693,7 +693,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t44.{core::List::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable) → void}; } =>#t44; core::Set set52 = block { - final core::Set #t45 = new col::_InternalLinkedHashSet::•(); + final core::Set #t45 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t45.{core::Set::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable) → void}; @@ -712,7 +712,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t47.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::•(0))){(core::Iterable>) → void}; } =>#t47; core::Set?> set60 = block { - final core::Set?> #t48 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t48 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t48.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1?>(core::_GrowableList::•(0))){(core::Iterable?>) → void}; #t48.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -730,7 +730,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t50.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::•(0))){(core::Iterable>) → void}; } =>#t50; core::Set?> set61 = block { - final core::Set?> #t51 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t51 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t51.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1?>(core::_GrowableList::•(0))){(core::Iterable?>) → void}; @@ -749,7 +749,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t53.{core::List::add}{Invariant}(core::_GrowableList::•(0)){(core::List) → void}; } =>#t53; core::Set?> set70 = block { - final core::Set?> #t54 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t54 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t54.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List?) → core::bool}; #t54.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -761,7 +761,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t55.{core::List::add}{Invariant}(core::_GrowableList::•(0)){(core::List) → void}; } =>#t55; core::Set?> set71 = block { - final core::Set?> #t56 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t56 = new col::_Set::•?>(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t56.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List?) → core::bool}; @@ -775,7 +775,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t57.{core::List::add}{Invariant}(3.14){(core::num) → void}; } =>#t57; core::Set set80 = block { - final core::Set #t58 = new col::_InternalLinkedHashSet::•(); + final core::Set #t58 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t58.{core::Set::add}{Invariant}(42){(core::num?) → core::bool}; else @@ -798,7 +798,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t60.{core::List::addAll}{Invariant}(listDouble){(core::Iterable) → void}; } =>#t60; core::Set set81 = block { - final core::Set #t61 = new col::_InternalLinkedHashSet::•(); + final core::Set #t61 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t61.{core::Set::addAll}{Invariant}(listInt){(core::Iterable) → void}; else @@ -821,7 +821,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t63.{core::List::addAll}{Invariant}(dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable){(core::Iterable) → void}; } =>#t63; core::Set set82 = block { - final core::Set #t64 = new col::_InternalLinkedHashSet::•(); + final core::Set #t64 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t64.{core::Set::addAll}{Invariant}(listInt){(core::Iterable) → void}; else @@ -829,7 +829,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t64.{core::Set::add}{Invariant}(null){(dynamic) → core::bool}; } =>#t64; core::Set map82 = block { - final core::Set #t65 = new col::_InternalLinkedHashSet::•(); + final core::Set #t65 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t65.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:71:38: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -847,7 +847,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t66.{core::List::addAll}{Invariant}(listDouble){(core::Iterable) → void}; } =>#t66; core::Set set83 = block { - final core::Set #t67 = new col::_InternalLinkedHashSet::•(); + final core::Set #t67 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t67.{core::Set::addAll}{Invariant}(listInt){(core::Iterable) → void}; else @@ -868,7 +868,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t69.{core::List::add}{Invariant}(dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::int){(core::int) → void}; } =>#t69; core::Set set90 = block { - final core::Set #t70 = new col::_InternalLinkedHashSet::•(); + final core::Set #t70 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t70.{core::Set::add}{Invariant}(dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::int?){(core::int?) → core::bool}; #t70.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; @@ -893,7 +893,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: } } =>#t72; core::Set set91 = block { - final core::Set #t75 = new col::_InternalLinkedHashSet::•(); + final core::Set #t75 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) { core::Iterator :sync-for-iterator = (dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable).{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -927,7 +927,7 @@ static method testIfElement(dynamic dynVar, core::List listInt, core: #t82.{core::List::add}{Invariant}(42){(core::int) → void}; } =>#t82; core::Set set100 = block { - final core::Set #t83 = new col::_InternalLinkedHashSet::•(); + final core::Set #t83 = new col::_Set::•(); if(dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t83.{core::Set::add}{Invariant}(42){(core::int) → core::bool}; } =>#t83; @@ -946,7 +946,7 @@ static method testIfElementErrors(core::Map map) → dynam ^" in "bar" as{TypeError,ForNonNullableByDefault} core::int){(core::int) → void}; } =>#t85; block { - final core::Set #t86 = new col::_InternalLinkedHashSet::•(); + final core::Set #t86 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t86.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:88:29: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. {if (oracle(\"foo\")) \"bar\", null}; @@ -969,7 +969,7 @@ static method testIfElementErrors(core::Map map) → dynam ^" in "bar" as{TypeError,ForNonNullableByDefault} core::int)){(core::Iterable) → void}; } =>#t88; block { - final core::Set #t89 = new col::_InternalLinkedHashSet::•(); + final core::Set #t89 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t89.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:91:33: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. {if (oracle(\"foo\")) ...[\"bar\"], null}; @@ -993,7 +993,7 @@ static method testIfElementErrors(core::Map map) → dynam ^"){(core::int) → void}; } =>#t91; block { - final core::Set #t92 = new col::_InternalLinkedHashSet::•(); + final core::Set #t92 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t92.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:94:32: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -1020,7 +1020,7 @@ static method testIfElementErrors(core::Map map) → dynam ^" in 3.14 as{TypeError,ForNonNullableByDefault} core::String){(core::String) → void}; } =>#t93; block { - final core::Set #t94 = new col::_InternalLinkedHashSet::•(); + final core::Set #t94 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t94.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:97:32: Error: A value of type 'int' can't be assigned to a variable of type 'String?'. {if (oracle(\"foo\")) 42 else 3.14, null}; @@ -1054,7 +1054,7 @@ static method testIfElementErrors(core::Map map) → dynam #t96.{core::List::add}{Invariant}(42){(core::int) → void}; } =>#t96; block { - final core::Set #t97 = new col::_InternalLinkedHashSet::•(); + final core::Set #t97 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t97.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:100:32: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -1082,7 +1082,7 @@ static method testIfElementErrors(core::Map map) → dynam ^"){(core::int) → void}; } =>#t98; block { - final core::Set #t99 = new col::_InternalLinkedHashSet::•(); + final core::Set #t99 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t99.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:103:32: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -1125,7 +1125,7 @@ static method testIfElementErrors(core::Map map) → dynam #t100.{core::List::add}{Invariant}(42){(core::int) → void}; } =>#t100; core::Set set20 = block { - final core::Set #t101 = new col::_InternalLinkedHashSet::•(); + final core::Set #t101 = new col::_Set::•(); if(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:113:25: Error: A value of type 'int' can't be assigned to a variable of type 'bool'. Set set20 = {if (42) 42}; ^" in 42 as{TypeError,ForNonNullableByDefault} core::bool) @@ -1150,7 +1150,7 @@ static method testIfElementErrors(core::Map map) → dynam ^" in 42 as{TypeError,ForNonNullableByDefault} core::String){(core::String) → void}; } =>#t103; core::Set set40 = block { - final core::Set #t104 = new col::_InternalLinkedHashSet::•(); + final core::Set #t104 = new col::_Set::•(); if(self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t104.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:116:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'. Set set40 = {if (oracle(\"foo\")) true else 42}; @@ -1190,7 +1190,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t107.{core::List::add}{Invariant}(42){(core::int) → void}; } =>#t107; core::Set set10 = block { - final core::Set #t108 = new col::_InternalLinkedHashSet::•(); + final core::Set #t108 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t108.{core::Set::add}{Invariant}(42){(core::int?) → core::bool}; #t108.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; @@ -1207,7 +1207,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t110.{core::List::add}{Invariant}(dynVar){(dynamic) → void}; } =>#t110; core::Set set11 = block { - final core::Set #t111 = new col::_InternalLinkedHashSet::•(); + final core::Set #t111 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t111.{core::Set::add}{Invariant}(dynVar){(dynamic) → core::bool}; #t111.{core::Set::add}{Invariant}(null){(dynamic) → core::bool}; @@ -1224,7 +1224,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t113.{core::List::add}{Invariant}(core::_GrowableList::_literal1(42)){(core::List) → void}; } =>#t113; core::Set?> set12 = block { - final core::Set?> #t114 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t114 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t114.{core::Set::add}{Invariant}(core::_GrowableList::_literal1(42)){(core::List?) → core::bool}; #t114.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -1241,7 +1241,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t116.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable) → void}; } =>#t116; core::Set set20 = block { - final core::Set #t117 = new col::_InternalLinkedHashSet::•(); + final core::Set #t117 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t117.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable) → void}; #t117.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; @@ -1258,7 +1258,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t119.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable) → void}; } =>#t119; core::Set set21 = block { - final core::Set #t120 = new col::_InternalLinkedHashSet::•(); + final core::Set #t120 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t120.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable) → void}; #t120.{core::Set::add}{Invariant}(null){(dynamic) → core::bool}; @@ -1275,7 +1275,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t122.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::_literal1(42))){(core::Iterable>) → void}; } =>#t122; core::Set?> set22 = block { - final core::Set?> #t123 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t123 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t123.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::_literal1(42))){(core::Iterable?>) → void}; #t123.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -1293,7 +1293,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t125.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable) → void}; } =>#t125; core::Set set30 = block { - final core::Set #t126 = new col::_InternalLinkedHashSet::•(); + final core::Set #t126 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t126.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(42)){(core::Iterable) → void}; @@ -1313,7 +1313,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t128.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable) → void}; } =>#t128; core::Set set31 = block { - final core::Set #t129 = new col::_InternalLinkedHashSet::•(); + final core::Set #t129 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t129.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(dynVar)){(core::Iterable) → void}; @@ -1333,7 +1333,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t131.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::_literal1(42))){(core::Iterable>) → void}; } =>#t131; core::Set?> set33 = block { - final core::Set?> #t132 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t132 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t132.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::_literal1(42))){(core::Iterable?>) → void}; @@ -1352,7 +1352,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t134.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::•(0))){(core::Iterable>) → void}; } =>#t134; core::Set?> set40 = block { - final core::Set?> #t135 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t135 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t135.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1?>(core::_GrowableList::•(0))){(core::Iterable?>) → void}; #t135.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -1367,15 +1367,15 @@ static method testForElement(dynamic dynVar, core::List listInt, core final core::List> #t137 = core::_GrowableList::•>(0); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t137.{core::List::addAll}{Invariant}( block { - final core::Set> #t138 = new col::_InternalLinkedHashSet::•>(); + final core::Set> #t138 = new col::_Set::•>(); #t138.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List) → core::bool}; } =>#t138){(core::Iterable>) → void}; } =>#t137; core::Set?> set41 = block { - final core::Set?> #t139 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t139 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t139.{core::Set::addAll}{Invariant}( block { - final core::Set?> #t140 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t140 = new col::_Set::•?>(); #t140.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List?) → core::bool}; } =>#t140){(core::Iterable?>) → void}; #t139.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -1387,7 +1387,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t141.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::•(0))){(core::Iterable>) → void}; } =>#t141; core::Set?> set42 = block { - final core::Set?> #t142 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t142 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t142.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1?>(core::_GrowableList::•(0))){(core::Iterable?>) → void}; @@ -1406,7 +1406,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t144.{core::List::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable) → void}; } =>#t144; core::Set set50 = block { - final core::Set #t145 = new col::_InternalLinkedHashSet::•(); + final core::Set #t145 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t145.{core::Set::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable) → void}; #t145.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; @@ -1421,14 +1421,14 @@ static method testForElement(dynamic dynVar, core::List listInt, core final core::List #t147 = core::_GrowableList::•(0); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t147.{core::List::addAll}{Invariant}( block { - final core::Set #t148 = new col::_InternalLinkedHashSet::•(); + final core::Set #t148 = new col::_Set::•(); } =>#t148){(core::Iterable) → void}; } =>#t147; core::Set set51 = block { - final core::Set #t149 = new col::_InternalLinkedHashSet::•(); + final core::Set #t149 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t149.{core::Set::addAll}{Invariant}( block { - final core::Set #t150 = new col::_InternalLinkedHashSet::•(); + final core::Set #t150 = new col::_Set::•(); } =>#t150){(core::Iterable) → void}; #t149.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; } =>#t149; @@ -1439,7 +1439,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t151.{core::List::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable) → void}; } =>#t151; core::Set set52 = block { - final core::Set #t152 = new col::_InternalLinkedHashSet::•(); + final core::Set #t152 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t152.{core::Set::addAll}{Invariant}(core::_GrowableList::•(0)){(core::Iterable) → void}; @@ -1451,7 +1451,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t153.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::•(0))){(core::Iterable>) → void}; } =>#t153; core::Set?> set60 = block { - final core::Set?> #t154 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t154 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t154.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1?>(core::_GrowableList::•(0))){(core::Iterable?>) → void}; #t154.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -1469,7 +1469,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t156.{core::List::addAll}{Invariant}(core::_GrowableList::_literal1>(core::_GrowableList::•(0))){(core::Iterable>) → void}; } =>#t156; core::Set?> set61 = block { - final core::Set?> #t157 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t157 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t157.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1?>(core::_GrowableList::•(0))){(core::Iterable?>) → void}; @@ -1488,7 +1488,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t159.{core::List::add}{Invariant}(core::_GrowableList::•(0)){(core::List) → void}; } =>#t159; core::Set?> set70 = block { - final core::Set?> #t160 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t160 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t160.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List?) → core::bool}; #t160.{core::Set::add}{Invariant}(null){(core::List?) → core::bool}; @@ -1506,7 +1506,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t162.{core::List::add}{Invariant}(core::_GrowableList::•(0)){(core::List) → void}; } =>#t162; core::Set?> set71 = block { - final core::Set?> #t163 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t163 = new col::_Set::•?>(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t163.{core::Set::add}{Invariant}(core::_GrowableList::•(0)){(core::List?) → core::bool}; @@ -1528,7 +1528,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t165.{core::List::add}{Invariant}(3.14){(core::num) → void}; } =>#t165; core::Set set80 = block { - final core::Set #t166 = new col::_InternalLinkedHashSet::•(); + final core::Set #t166 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t166.{core::Set::add}{Invariant}(42){(core::num?) → core::bool}; @@ -1554,7 +1554,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t168.{core::List::addAll}{Invariant}(listDouble){(core::Iterable) → void}; } =>#t168; core::Set set81 = block { - final core::Set #t169 = new col::_InternalLinkedHashSet::•(); + final core::Set #t169 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t169.{core::Set::addAll}{Invariant}(listInt){(core::Iterable) → void}; @@ -1580,7 +1580,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t171.{core::List::addAll}{Invariant}(dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable){(core::Iterable) → void}; } =>#t171; core::Set set82 = block { - final core::Set #t172 = new col::_InternalLinkedHashSet::•(); + final core::Set #t172 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t172.{core::Set::addAll}{Invariant}(listInt){(core::Iterable) → void}; @@ -1606,7 +1606,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t174.{core::List::addAll}{Invariant}(listDouble){(core::Iterable) → void}; } =>#t174; core::Set set83 = block { - final core::Set #t175 = new col::_InternalLinkedHashSet::•(); + final core::Set #t175 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t175.{core::Set::addAll}{Invariant}(listInt){(core::Iterable) → void}; @@ -1629,7 +1629,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t177.{core::List::add}{Invariant}(dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::int){(core::int) → void}; } =>#t177; core::Set set90 = block { - final core::Set #t178 = new col::_InternalLinkedHashSet::•(); + final core::Set #t178 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t178.{core::Set::add}{Invariant}(dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::int?){(core::int?) → core::bool}; #t178.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; @@ -1654,7 +1654,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core } } =>#t180; core::Set set91 = block { - final core::Set #t183 = new col::_InternalLinkedHashSet::•(); + final core::Set #t183 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = (dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable).{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -1688,7 +1688,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t190.{core::List::add}{Invariant}(42){(core::int) → void}; } =>#t190; core::Set set100 = block { - final core::Set #t192 = new col::_InternalLinkedHashSet::•(); + final core::Set #t192 = new col::_Set::•(); for (final core::int #t193 = index = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; index = index.{core::num::+}(1){(core::num) → core::int}) #t192.{core::Set::add}{Invariant}(42){(core::int) → core::bool}; } =>#t192; @@ -1708,7 +1708,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core } } =>#t196; core::Set set110 = block { - final core::Set #t197 = new col::_InternalLinkedHashSet::•(); + final core::Set #t197 = new col::_Set::•(); { core::Iterator :sync-for-iterator = core::_GrowableList::_literal3(1, 2, 3).{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -1740,7 +1740,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core } } =>#t199; core::Set set120 = block { - final core::Set #t200 = new col::_InternalLinkedHashSet::•(); + final core::Set #t200 = new col::_Set::•(); { core::Iterator :sync-for-iterator = (dynVar as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable).{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -1767,7 +1767,7 @@ static method testForElement(dynamic dynVar, core::List listInt, core #t202.{core::List::add}{Invariant}(i){(core::int) → void}; } =>#t202; core::Set set130 = block { - final core::Set #t203 = new col::_InternalLinkedHashSet::•(); + final core::Set #t203 = new col::_Set::•(); for (core::int i = 1; i.{core::num::<}(2){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) #t203.{core::Set::add}{Invariant}(i){(core::int) → core::bool}; } =>#t203; @@ -1786,7 +1786,7 @@ static method testForElementErrors(core::Map map, core::Li ^" in "bar" as{TypeError,ForNonNullableByDefault} core::int){(core::int) → void}; } =>#t205; block { - final core::Set #t206 = new col::_InternalLinkedHashSet::•(); + final core::Set #t206 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t206.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:211:46: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. {for (int i = 0; oracle(\"foo\"); i++) \"bar\", null}; @@ -1813,7 +1813,7 @@ static method testForElementErrors(core::Map map, core::Li ^" in "bar" as{TypeError,ForNonNullableByDefault} core::int)){(core::Iterable) → void}; } =>#t208; block { - final core::Set #t209 = new col::_InternalLinkedHashSet::•(); + final core::Set #t209 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t209.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:214:50: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. {for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"], null}; @@ -1841,7 +1841,7 @@ static method testForElementErrors(core::Map map, core::Li ^"){(core::int) → void}; } =>#t211; block { - final core::Set #t212 = new col::_InternalLinkedHashSet::•(); + final core::Set #t212 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) #t212.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:217:49: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. @@ -1869,7 +1869,7 @@ static method testForElementErrors(core::Map map, core::Li ^" in 3.14 as{TypeError,ForNonNullableByDefault} core::String){(core::String) → void}; } =>#t213; block { - final core::Set #t214 = new col::_InternalLinkedHashSet::•(); + final core::Set #t214 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t214.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:220:63: Error: A value of type 'int' can't be assigned to a variable of type 'String?'. @@ -1906,7 +1906,7 @@ static method testForElementErrors(core::Map map, core::Li #t216.{core::List::add}{Invariant}(42){(core::int) → void}; } =>#t216; block { - final core::Set #t217 = new col::_InternalLinkedHashSet::•(); + final core::Set #t217 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t217.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:223:63: Error: Unexpected type 'Map' of a spread. Expected 'dynamic' or an Iterable. @@ -1936,7 +1936,7 @@ static method testForElementErrors(core::Map map, core::Li ^"){(core::int) → void}; } =>#t218; block { - final core::Set #t219 = new col::_InternalLinkedHashSet::•(); + final core::Set #t219 = new col::_Set::•(); for (core::int i = 0; self::oracle("foo") as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool; i = i.{core::num::+}(1){(core::num) → core::int}) if(self::oracle() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) #t219.{core::Set::add}{Invariant}(42){(core::int?) → core::bool}; @@ -1971,7 +1971,7 @@ static method testForElementErrors(core::Map map, core::Li } } =>#t220; block { - final core::Set #t222 = new col::_InternalLinkedHashSet::•(); + final core::Set #t222 = new col::_Set::•(); { core::Iterator :sync-for-iterator = core::_GrowableList::_literal1(1).{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -2016,7 +2016,7 @@ static method testForElementErrors(core::Map map, core::Li } } =>#t226; core::Set set10 = block { - final core::Set #t227 = new col::_InternalLinkedHashSet::•(); + final core::Set #t227 = new col::_Set::•(); { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:235:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable'. - 'Iterable' is from 'dart:core'. @@ -2058,7 +2058,7 @@ static method testForElementErrors(core::Map map, core::Li } } =>#t229; core::Set set20 = block { - final core::Set #t230 = new col::_InternalLinkedHashSet::•(); + final core::Set #t230 = new col::_Set::•(); { core::Iterator :sync-for-iterator = core::_GrowableList::_literal2(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:238:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'. var set20 = {for (int i in [\"not\", \"int\"]) i, null}; @@ -2106,7 +2106,7 @@ static method testForElementErrors(core::Map map, core::Li } } =>#t232; core::Set set30 = block { - final core::Set #t234 = new col::_InternalLinkedHashSet::•(); + final core::Set #t234 = new col::_Set::•(); { Never :stream = invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:241:36: Error: The type 'String' used in the 'for' loop must implement 'Stream'. - 'Stream' is from 'dart:async'. @@ -2163,7 +2163,7 @@ static method testForElementErrors(core::Map map, core::Li } } =>#t238; core::Set set40 = block { - final core::Set #t240 = new col::_InternalLinkedHashSet::•(); + final core::Set #t240 = new col::_Set::•(); { asy::Stream :stream = asy::Stream::fromIterable(core::_GrowableList::_literal2(invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:244:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'. var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null}; @@ -2208,7 +2208,7 @@ static method testForElementErrors(core::Map map, core::Li #t244.{core::List::add}{Invariant}(42){(core::int) → void}; } =>#t244; core::Set set50 = block { - final core::Set #t245 = new col::_InternalLinkedHashSet::•(); + final core::Set #t245 = new col::_Set::•(); for (; ; ) #t245.{core::Set::add}{Invariant}(42){(core::int?) → core::bool}; #t245.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; @@ -2227,7 +2227,7 @@ static method testForElementErrors(core::Map map, core::Li #t247.{core::List::add}{Invariant}(42){(core::int) → void}; } =>#t247; core::Set set60 = block { - final core::Set #t248 = new col::_InternalLinkedHashSet::•(); + final core::Set #t248 = new col::_Set::•(); for (; invalid-expression "pkg/front_end/testcases/general/control_flow_collection_inference2.dart:250:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'. var set60 = {for (; \"not bool\";) 42, null}; ^" in "not bool" as{TypeError,ForNonNullableByDefault} core::bool; ) @@ -2250,7 +2250,7 @@ static method testForElementErrorsNotAsync(asy::Stream stream) → dy #t250.{core::List::add}{Invariant}(i){(core::int) → void}; } =>#t250; block { - final core::Set #t251 = new col::_InternalLinkedHashSet::•(); + final core::Set #t251 = new col::_Set::•(); await for (core::int i in stream) #t251.{core::Set::add}{Invariant}(i){(core::int) → core::bool}; } =>#t251; @@ -2267,7 +2267,7 @@ static method testPromotion(self::A a) → dynamic { #t253.{core::List::add}{Invariant}(a{self::B}.{self::B::foo}{core::int}){(core::int) → void}; } =>#t253; core::Set set10 = block { - final core::Set #t254 = new col::_InternalLinkedHashSet::•(); + final core::Set #t254 = new col::_Set::•(); if(a is{ForNonNullableByDefault} self::B) #t254.{core::Set::add}{Invariant}(a{self::B}.{self::B::foo}{core::int}){(core::int) → core::bool}; } =>#t254; diff --git a/pkg/front_end/testcases/general/if_null_in_set_literal.dart.weak.transformed.expect b/pkg/front_end/testcases/general/if_null_in_set_literal.dart.weak.transformed.expect index 82d3ba73ff278..9ce2b26bb801a 100644 --- a/pkg/front_end/testcases/general/if_null_in_set_literal.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/if_null_in_set_literal.dart.weak.transformed.expect @@ -7,7 +7,7 @@ static method main() → dynamic { core::Object? a; core::Object? b; return block { - final core::Set #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set #t1 = new col::_Set::•(); #t1.{core::Set::add}{Invariant}(let final core::Object? #t2 = a in #t2 == null ?{core::Object?} b : #t2{core::Object}){(core::Object?) → core::bool}; } =>#t1; } diff --git a/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.transformed.expect b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.transformed.expect index fdf9534cc5974..a7bcc6c445fbc 100644 --- a/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/inferred_generic_function_type_argument.dart.weak.transformed.expect @@ -38,7 +38,7 @@ static method test(() → void f) → dynamic f = self::method<() → void>(); core::List<() → void> list = core::_GrowableList::_literal1<() → void>(f); core::Set<() → void> set = block { - final core::Set<() → void> #t1 = new col::_InternalLinkedHashSet::•<() → void>(); + final core::Set<() → void> #t1 = new col::_Set::•<() → void>(); #t1.{core::Set::add}{Invariant}(f){(() → void) → core::bool}; } =>#t1; core::Map<() → void, core::int> map1 = <() → void, core::int>{f: 1}; diff --git a/pkg/front_end/testcases/general/issue37027.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue37027.dart.weak.transformed.expect index c2874a46f9c38..f64ba4d5bae60 100644 --- a/pkg/front_end/testcases/general/issue37027.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/issue37027.dart.weak.transformed.expect @@ -7,7 +7,7 @@ class C extends core::Object { final field core::Set s; constructor •(core::List ell) → self::C : self::C::s = block { - final core::Set #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set #t1 = new col::_Set::•(); { core::Iterator :sync-for-iterator = ell.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { diff --git a/pkg/front_end/testcases/general/null_aware_spread.dart.weak.transformed.expect b/pkg/front_end/testcases/general/null_aware_spread.dart.weak.transformed.expect index 0c398d41d75bf..7d769d0d0b77e 100644 --- a/pkg/front_end/testcases/general/null_aware_spread.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/null_aware_spread.dart.weak.transformed.expect @@ -13,7 +13,7 @@ static method nullAwareListSpread(core::List* list) → dynamic { } static method nullAwareSetSpread(core::Set* set) → dynamic { set = block { - final core::Set* #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t3 = new col::_Set::•(); #t3.{core::Set::add}{Invariant}("foo"){(core::String*) →* core::bool*}; final core::Iterable* #t4 = set; if(!(#t4 == null)) diff --git a/pkg/front_end/testcases/general/null_aware_spread2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/null_aware_spread2.dart.weak.transformed.expect index 9f28c2645fedb..ea3300e2eb42c 100644 --- a/pkg/front_end/testcases/general/null_aware_spread2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/null_aware_spread2.dart.weak.transformed.expect @@ -13,7 +13,7 @@ static method nullAwareListSpread(core::List? list) → dynamic { } static method nullAwareSetSpread(core::Set? set) → dynamic { set = block { - final core::Set #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set #t3 = new col::_Set::•(); #t3.{core::Set::add}{Invariant}("foo"){(core::String) → core::bool}; final core::Iterable? #t4 = set; if(!(#t4 == null)) diff --git a/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.transformed.expect b/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.transformed.expect index 9fb871192e898..f6ae5d131e7fe 100644 --- a/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/null_check_type_variable_type.dart.weak.transformed.expect @@ -16,7 +16,7 @@ class Class extends core::Object { method setElement(covariant-by-class self::Class::E? element) → void { if(!(this.{self::Class::element}{self::Class::E?} =={core::Object::==}{(core::Object) → core::bool} element)) { this.{self::Class::element} = element; - core::Set elements = new col::_InternalLinkedHashSet::•(); + core::Set elements = new col::_Set::•(); if(!(element == null)) { elements.{core::Set::add}(element{self::Class::E% & self::Element /* '%' & '!' = '!' */}){(self::Element) → core::bool}; } diff --git a/pkg/front_end/testcases/general/spread_collection.dart.weak.transformed.expect b/pkg/front_end/testcases/general/spread_collection.dart.weak.transformed.expect index 4d89f5648256d..7e403376b82af 100644 --- a/pkg/front_end/testcases/general/spread_collection.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/spread_collection.dart.weak.transformed.expect @@ -30,7 +30,7 @@ static method main() → dynamic { #t3.{core::Map::addAll}{Invariant}(#t4{core::Map}){(core::Map) → void}; } =>#t3; final core::Set aSet = block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); #t5.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t5.{core::Set::addAll}{Invariant}(core::_GrowableList::_literal1(2)){(core::Iterable) → void}; final core::Iterable? #t6 = self::nullableList; diff --git a/pkg/front_end/testcases/general/spread_collection_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/general/spread_collection_inference.dart.weak.transformed.expect index 3d689d6e6fbff..c3d7981503f6d 100644 --- a/pkg/front_end/testcases/general/spread_collection_inference.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/spread_collection_inference.dart.weak.transformed.expect @@ -214,7 +214,7 @@ Try providing type arguments for the literal explicitly to disambiguate it. List lhs40 = [...notSpreadInt]; ^"); core::Set* set40 = block { - final core::Set* #t26 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t26 = new col::_Set::•(); #t26.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:115:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable. Set set40 = {...notSpreadInt}; ^"){(dynamic) →* core::bool*}; @@ -226,7 +226,7 @@ Try providing type arguments for the literal explicitly to disambiguate it. List lhs50 = [...notSpreadFunction]; ^"); core::Set* set50 = block { - final core::Set* #t27 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t27 = new col::_Set::•(); #t27.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:121:37: Error: Unexpected type 'int Function()' of a spread. Expected 'dynamic' or an Iterable. Set set50 = {...notSpreadFunction}; ^"){(dynamic) →* core::bool*}; @@ -238,7 +238,7 @@ Try providing type arguments for the literal explicitly to disambiguate it. List lhs60 = [...spread]; ^"); core::Set* set60 = block { - final core::Set* #t28 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t28 = new col::_Set::•(); #t28.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:127:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'. Set set60 = {...spread}; ^"){(core::String*) →* core::bool*}; @@ -253,13 +253,13 @@ Try providing type arguments for the literal explicitly to disambiguate it. List lhs70 = [...null]; ^"); core::Set* set70 = block { - final core::Set* #t29 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t29 = new col::_Set::•(); #t29.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type 'Null'. Set set70 = {...null}; ^"){(core::int*) →* core::bool*}; } =>#t29; core::Set* set71ambiguous = block { - final core::Set* #t30 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t30 = new col::_Set::•(); #t30.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:139:8: Error: Can't spread a value with static type 'Null'. ...null, ^"){(dynamic) →* core::bool*}; @@ -275,13 +275,13 @@ Try providing type arguments for the literal explicitly to disambiguate it. #t31.{core::List::addAll}{Invariant}(#t32){(core::Iterable*) →* void}; } =>#t31; core::Set* set80 = block { - final core::Set* #t33 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t33 = new col::_Set::•(); final has-declared-initializer core::Iterable* #t34 = null; if(!(#t34 == null)) #t33.{core::Set::addAll}{Invariant}(#t34){(core::Iterable*) →* void}; } =>#t33; core::Set* set81ambiguous = block { - final core::Set* #t35 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t35 = new col::_Set::•(); final has-declared-initializer core::Iterable* #t36 = null; if(!(#t36 == null)) #t35.{core::Set::addAll}{Invariant}(#t36){(core::Iterable*) →* void}; diff --git a/pkg/front_end/testcases/general/spread_collection_inference2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/spread_collection_inference2.dart.weak.transformed.expect index bee42b049462b..e7016baf25e53 100644 --- a/pkg/front_end/testcases/general/spread_collection_inference2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/spread_collection_inference2.dart.weak.transformed.expect @@ -230,7 +230,7 @@ Try providing type arguments for the literal explicitly to disambiguate it. List lhs40 = [...notSpreadInt]; ^"); core::Set set40 = block { - final core::Set #t26 = new col::_InternalLinkedHashSet::•(); + final core::Set #t26 = new col::_Set::•(); #t26.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference2.dart:109:37: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable. Set set40 = {...notSpreadInt}; ^"){(dynamic) → core::bool}; @@ -242,7 +242,7 @@ Try providing type arguments for the literal explicitly to disambiguate it. List lhs50 = [...notSpreadFunction]; ^"); core::Set set50 = block { - final core::Set #t27 = new col::_InternalLinkedHashSet::•(); + final core::Set #t27 = new col::_Set::•(); #t27.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference2.dart:115:37: Error: Unexpected type 'int Function()?' of a spread. Expected 'dynamic' or an Iterable. Set set50 = {...notSpreadFunction}; ^"){(dynamic) → core::bool}; @@ -254,7 +254,7 @@ Try providing type arguments for the literal explicitly to disambiguate it. List lhs60 = [...spread]; ^"); core::Set set60 = block { - final core::Set #t28 = new col::_InternalLinkedHashSet::•(); + final core::Set #t28 = new col::_Set::•(); #t28.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference2.dart:121:35: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'. Set set60 = {...spread}; ^"){(core::String) → core::bool}; @@ -269,13 +269,13 @@ Try providing type arguments for the literal explicitly to disambiguate it. List lhs70 = [...null]; ^"); core::Set set70 = block { - final core::Set #t29 = new col::_InternalLinkedHashSet::•(); + final core::Set #t29 = new col::_Set::•(); #t29.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference2.dart:129:29: Error: Can't spread a value with static type 'Null'. Set set70 = {...null}; ^"){(core::int) → core::bool}; } =>#t29; core::Set set71ambiguous = block { - final core::Set #t30 = new col::_InternalLinkedHashSet::•(); + final core::Set #t30 = new col::_Set::•(); #t30.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference2.dart:133:8: Error: Can't spread a value with static type 'Null'. ...null, ^"){(dynamic) → core::bool}; @@ -291,13 +291,13 @@ Try providing type arguments for the literal explicitly to disambiguate it. #t31.{core::List::addAll}{Invariant}(#t32{core::Iterable}){(core::Iterable) → void}; } =>#t31; core::Set set80 = block { - final core::Set #t33 = new col::_InternalLinkedHashSet::•(); + final core::Set #t33 = new col::_Set::•(); final has-declared-initializer core::Iterable? #t34 = null; if(!(#t34 == null)) #t33.{core::Set::addAll}{Invariant}(#t34{core::Iterable}){(core::Iterable) → void}; } =>#t33; core::Set set81ambiguous = block { - final core::Set #t35 = new col::_InternalLinkedHashSet::•(); + final core::Set #t35 = new col::_Set::•(); final has-declared-initializer core::Iterable? #t36 = null; if(!(#t36 == null)) #t35.{core::Set::addAll}{Invariant}(#t36{core::Iterable}){(core::Iterable) → void}; diff --git a/pkg/front_end/testcases/general/top_level_map_literal_error.dart.weak.transformed.expect b/pkg/front_end/testcases/general/top_level_map_literal_error.dart.weak.transformed.expect index d2f3c8a7544db..920c1f1001ad2 100644 --- a/pkg/front_end/testcases/general/top_level_map_literal_error.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/top_level_map_literal_error.dart.weak.transformed.expect @@ -11,7 +11,7 @@ import "dart:core" as core; import "dart:collection" as col; static field core::Set a = block { - final core::Set #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set #t1 = new col::_Set::•(); #t1.{core::Set::add}{Invariant}(0){(core::int) → core::bool}; } =>#t1; static field core::Map b = {0: 1}; diff --git a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.transformed.expect b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.transformed.expect index 6eb4f2d357f91..b2f532727f555 100644 --- a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.transformed.expect @@ -14,7 +14,7 @@ static method test() → dynamic { self::A<(dynamic) → Never> x = self::foo<(dynamic) → Never>((dynamic Z) → Never => throw 42); core::List<(Y%) → self::A> y = core::_GrowableList::_literal1<(Y%) → self::A>(#C1); core::Set<(Y%) → self::A> z = block { - final core::Set<(Y%) → self::A> #t1 = new col::_InternalLinkedHashSet::•<(Y%) → self::A>(); + final core::Set<(Y%) → self::A> #t1 = new col::_Set::•<(Y%) → self::A>(); #t1.{core::Set::add}{Invariant}(y.{core::Iterable::first}{(Y%) → self::A}){((Y%) → self::A) → core::bool}; } =>#t1; } diff --git a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.transformed.expect b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.transformed.expect index 6eb4f2d357f91..b2f532727f555 100644 --- a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.transformed.expect @@ -14,7 +14,7 @@ static method test() → dynamic { self::A<(dynamic) → Never> x = self::foo<(dynamic) → Never>((dynamic Z) → Never => throw 42); core::List<(Y%) → self::A> y = core::_GrowableList::_literal1<(Y%) → self::A>(#C1); core::Set<(Y%) → self::A> z = block { - final core::Set<(Y%) → self::A> #t1 = new col::_InternalLinkedHashSet::•<(Y%) → self::A>(); + final core::Set<(Y%) → self::A> #t1 = new col::_Set::•<(Y%) → self::A>(); #t1.{core::Set::add}{Invariant}(y.{core::Iterable::first}{(Y%) → self::A}){((Y%) → self::A) → core::bool}; } =>#t1; } diff --git a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect index f71d67ed11d5c..9c3b5468cdd5d 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect @@ -199,7 +199,7 @@ library from "org-dartlang-test:///main.dart" as main { return result; } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ toSet() → dart.core::Set { - dart.core::Set result = new dart.collection::_InternalLinkedHashSet::•(); + dart.core::Set result = new dart.collection::_Set::•(); for (dart.core::int i = 0; i.{dart.core::num::<}(this.{dart.core::List::length}{dart.core::int}){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}) { result.{dart.core::Set::add}(this.{dart.core::List::[]}(i){(dart.core::int) → dart.core::int}){(dart.core::int) → dart.core::bool}; } diff --git a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect index f71d67ed11d5c..9c3b5468cdd5d 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect @@ -199,7 +199,7 @@ library from "org-dartlang-test:///main.dart" as main { return result; } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ toSet() → dart.core::Set { - dart.core::Set result = new dart.collection::_InternalLinkedHashSet::•(); + dart.core::Set result = new dart.collection::_Set::•(); for (dart.core::int i = 0; i.{dart.core::num::<}(this.{dart.core::List::length}{dart.core::int}){(dart.core::num) → dart.core::bool}; i = i.{dart.core::num::+}(1){(dart.core::num) → dart.core::int}) { result.{dart.core::Set::add}(this.{dart.core::List::[]}(i){(dart.core::int) → dart.core::int}){(dart.core::int) → dart.core::bool}; } diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.weak.transformed.expect index 0d843e9429361..8f02d7e240d6a 100644 --- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.weak.transformed.expect @@ -128,7 +128,7 @@ static method test1() → dynamic { - 'List' is from 'dart:core'. c1 = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic*/ {}; ^" in ( block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); } =>#t2) as{TypeError,ForNonNullableByDefault} core::List; self::c2 = core::_GrowableList::•(0); self::c2 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:43:59: Error: A value of type 'Set' can't be assigned to a variable of type 'List'. @@ -136,7 +136,7 @@ static method test1() → dynamic { - 'List' is from 'dart:core'. c2 = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic*/ {}; ^" in ( block { - final core::Set #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set #t3 = new col::_Set::•(); } =>#t3) as{TypeError,ForNonNullableByDefault} core::List; self::d = {}; self::d = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:45:36: Error: A value of type 'int' can't be assigned to a variable of type 'Map'. diff --git a/pkg/front_end/testcases/inference_update_1/horizontal_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_update_1/horizontal_inference.dart.weak.transformed.expect index 96c1436a18b0d..6177b6089183e 100644 --- a/pkg/front_end/testcases/inference_update_1/horizontal_inference.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/inference_update_1/horizontal_inference.dart.weak.transformed.expect @@ -51,13 +51,13 @@ static method testPropagateToLaterClosure((() → T%, (T%) → U%, (U%) → V%) → V% f) → dynamic { f, core::int, core::Set>(() → core::List => core::_GrowableList::_literal1(0), (core::List x) → core::int => x.{core::Iterable::single}{core::int}, (core::int y) → core::Set => block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(y){(core::int) → core::bool}; } =>#t2){(() → core::List, (core::List) → core::int, (core::int) → core::Set) → core::Set}; } static method testDependencyCycle(((U%) → T%, (T%) → U%) → core::Map f) → dynamic { f, core::Set>((core::Object? x) → core::List => core::_GrowableList::_literal1(x), (core::Object? y) → core::Set => block { - final core::Set #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set #t3 = new col::_Set::•(); #t3.{core::Set::add}{Invariant}(y){(core::Object?) → core::bool}; } =>#t3){((core::Set) → core::List, (core::List) → core::Set) → core::Map, core::Set>}; } diff --git a/pkg/front_end/testcases/inference_update_1/horizontal_inference_extension_method.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_update_1/horizontal_inference_extension_method.dart.weak.transformed.expect index 32016ec64449e..016bdd0e54d10 100644 --- a/pkg/front_end/testcases/inference_update_1/horizontal_inference_extension_method.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/inference_update_1/horizontal_inference_extension_method.dart.weak.transformed.expect @@ -91,13 +91,13 @@ static method testPropagateToLaterClosure(core::int i) → dynamic { } static method testLongDependencyChain(core::int i) → dynamic { self::_extension#0|_longDependencyChain, core::int, core::Set>(i, () → core::List => core::_GrowableList::_literal1(0), (core::List x) → core::int => x.{core::Iterable::single}{core::int}, (core::int y) → core::Set => block { - final core::Set #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set #t1 = new col::_Set::•(); #t1.{core::Set::add}{Invariant}(y){(core::int) → core::bool}; } =>#t1); } static method testDependencyCycle(core::int i) → dynamic { self::_extension#0|_dependencyCycle, core::Set>(i, (core::Object? x) → core::List => core::_GrowableList::_literal1(x), (core::Object? y) → core::Set => block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(y){(core::Object?) → core::bool}; } =>#t2); } diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect index fc3cda06faf14..0a7d5b22d73f4 100644 --- a/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect @@ -111,35 +111,35 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic { #t8.{core::Set::add}{Invariant}(n1){(Never) → core::bool}; } =>#t8; core::Set s2 = block { - final core::Set #t9 = new col::_InternalLinkedHashSet::•(); + final core::Set #t9 = new col::_Set::•(); final core::Iterable? #t10 = n1; if(!(#t10 == null)) #t9.{core::Set::addAll}{Invariant}(#t10{core::Iterable}){(core::Iterable) → void}; #t9.{core::Set::add}{Invariant}(n1){(Never) → core::bool}; } =>#t9; core::Set s3 = block { - final core::Set #t11 = new col::_InternalLinkedHashSet::•(); + final core::Set #t11 = new col::_Set::•(); #t11.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'. var s3 = {...n2, n1}; ^"){(dynamic) → core::bool}; #t11.{core::Set::add}{Invariant}(n1){(dynamic) → core::bool}; } =>#t11; core::Set s4 = block { - final core::Set #t12 = new col::_InternalLinkedHashSet::•(); + final core::Set #t12 = new col::_Set::•(); final core::Iterable? #t13 = n2; if(!(#t13 == null)) #t12.{core::Set::addAll}{Invariant}(#t13{core::Iterable}){(core::Iterable) → void}; #t12.{core::Set::add}{Invariant}(n1){(Never) → core::bool}; } =>#t12; core::Set s5 = block { - final core::Set #t14 = new col::_InternalLinkedHashSet::•(); + final core::Set #t14 = new col::_Set::•(); #t14.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'. var s5 = {...n3, n1}; ^"){(dynamic) → core::bool}; #t14.{core::Set::add}{Invariant}(n1){(dynamic) → core::bool}; } =>#t14; core::Set s6 = block { - final core::Set #t15 = new col::_InternalLinkedHashSet::•(); + final core::Set #t15 = new col::_Set::•(); final core::Iterable? #t16 = n3; if(!(#t16 == null)) #t15.{core::Set::addAll}{Invariant}(#t16{core::Iterable}){(core::Iterable) → void}; @@ -210,35 +210,35 @@ static method test2(self:: #t31.{core::Set::add}{Invariant}(n1){(self::test2::N1) → core::bool}; } =>#t31; core::Set s2 = block { - final core::Set #t32 = new col::_InternalLinkedHashSet::•(); + final core::Set #t32 = new col::_Set::•(); final core::Iterable? #t33 = n1; if(!(#t33 == null)) #t32.{core::Set::addAll}{Invariant}(#t33{core::Iterable}){(core::Iterable) → void}; #t32.{core::Set::add}{Invariant}(n1){(self::test2::N1) → core::bool}; } =>#t32; core::Set s3 = block { - final core::Set #t34 = new col::_InternalLinkedHashSet::•(); + final core::Set #t34 = new col::_Set::•(); #t34.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'. var s3 = {...n2, n1}; ^"){(dynamic) → core::bool}; #t34.{core::Set::add}{Invariant}(n1){(dynamic) → core::bool}; } =>#t34; core::Set s4 = block { - final core::Set #t35 = new col::_InternalLinkedHashSet::•(); + final core::Set #t35 = new col::_Set::•(); final core::Iterable? #t36 = n2; if(!(#t36 == null)) #t35.{core::Set::addAll}{Invariant}(#t36{core::Iterable}){(core::Iterable) → void}; #t35.{core::Set::add}{Invariant}(n1){(self::test2::N1) → core::bool}; } =>#t35; core::Set s5 = block { - final core::Set #t37 = new col::_InternalLinkedHashSet::•(); + final core::Set #t37 = new col::_Set::•(); #t37.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'. var s5 = {...n3, n1}; ^"){(dynamic) → core::bool}; #t37.{core::Set::add}{Invariant}(n1){(dynamic) → core::bool}; } =>#t37; core::Set s6 = block { - final core::Set #t38 = new col::_InternalLinkedHashSet::•(); + final core::Set #t38 = new col::_Set::•(); final core::Iterable? #t39 = n3; if(!(#t39 == null)) #t38.{core::Set::addAll}{Invariant}(#t39{core::Iterable}){(core::Iterable) → void}; diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect index 16928b39b4ab7..5cacb17dc093b 100644 --- a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect @@ -112,35 +112,35 @@ static method test1(Never n1, Never? n2, Null n3) → dynamic { #t10.{core::Set::add}{Invariant}(let final Never #t12 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never) → core::bool}; } =>#t10; core::Set s2 = block { - final core::Set #t13 = new col::_InternalLinkedHashSet::•(); + final core::Set #t13 = new col::_Set::•(); final core::Iterable? #t14 = let final Never #t15 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); if(!(#t14 == null)) #t13.{core::Set::addAll}{Invariant}(#t14{core::Iterable}){(core::Iterable) → void}; #t13.{core::Set::add}{Invariant}(let final Never #t16 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never) → core::bool}; } =>#t13; core::Set s3 = block { - final core::Set #t17 = new col::_InternalLinkedHashSet::•(); + final core::Set #t17 = new col::_Set::•(); #t17.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'. var s3 = {...n2, n1}; ^"){(dynamic) → core::bool}; #t17.{core::Set::add}{Invariant}(let final Never #t18 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(dynamic) → core::bool}; } =>#t17; core::Set s4 = block { - final core::Set #t19 = new col::_InternalLinkedHashSet::•(); + final core::Set #t19 = new col::_Set::•(); final core::Iterable? #t20 = n2; if(!(#t20 == null)) #t19.{core::Set::addAll}{Invariant}(#t20{core::Iterable}){(core::Iterable) → void}; #t19.{core::Set::add}{Invariant}(let final Never #t21 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(Never) → core::bool}; } =>#t19; core::Set s5 = block { - final core::Set #t22 = new col::_InternalLinkedHashSet::•(); + final core::Set #t22 = new col::_Set::•(); #t22.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'. var s5 = {...n3, n1}; ^"){(dynamic) → core::bool}; #t22.{core::Set::add}{Invariant}(let final Never #t23 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(dynamic) → core::bool}; } =>#t22; core::Set s6 = block { - final core::Set #t24 = new col::_InternalLinkedHashSet::•(); + final core::Set #t24 = new col::_Set::•(); final core::Iterable? #t25 = n3; if(!(#t25 == null)) #t24.{core::Set::addAll}{Invariant}(#t25{core::Iterable}){(core::Iterable) → void}; @@ -211,35 +211,35 @@ static method test2(self:: #t57.{core::Set::add}{Invariant}(let final self::test2::N1 #t59 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1) → core::bool}; } =>#t57; core::Set s2 = block { - final core::Set #t60 = new col::_InternalLinkedHashSet::•(); + final core::Set #t60 = new col::_Set::•(); final core::Iterable? #t61 = let final self::test2::N1 #t62 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`."); if(!(#t61 == null)) #t60.{core::Set::addAll}{Invariant}(#t61{core::Iterable}){(core::Iterable) → void}; #t60.{core::Set::add}{Invariant}(let final self::test2::N1 #t63 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1) → core::bool}; } =>#t60; core::Set s3 = block { - final core::Set #t64 = new col::_InternalLinkedHashSet::•(); + final core::Set #t64 = new col::_Set::•(); #t64.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'. var s3 = {...n2, n1}; ^"){(dynamic) → core::bool}; #t64.{core::Set::add}{Invariant}(let final self::test2::N1 #t65 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(dynamic) → core::bool}; } =>#t64; core::Set s4 = block { - final core::Set #t66 = new col::_InternalLinkedHashSet::•(); + final core::Set #t66 = new col::_Set::•(); final core::Iterable? #t67 = n2; if(!(#t67 == null)) #t66.{core::Set::addAll}{Invariant}(#t67{core::Iterable}){(core::Iterable) → void}; #t66.{core::Set::add}{Invariant}(let final self::test2::N1 #t68 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(self::test2::N1) → core::bool}; } =>#t66; core::Set s5 = block { - final core::Set #t69 = new col::_InternalLinkedHashSet::•(); + final core::Set #t69 = new col::_Set::•(); #t69.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'. var s5 = {...n3, n1}; ^"){(dynamic) → core::bool}; #t69.{core::Set::add}{Invariant}(let final self::test2::N1 #t70 = n1 in throw new _in::ReachabilityError::•("`null` encountered as the result from expression with type `Never`.")){(dynamic) → core::bool}; } =>#t69; core::Set s6 = block { - final core::Set #t71 = new col::_InternalLinkedHashSet::•(); + final core::Set #t71 = new col::_Set::•(); final core::Iterable? #t72 = n3; if(!(#t72 == null)) #t71.{core::Set::addAll}{Invariant}(#t72{core::Iterable}){(core::Iterable) → void}; diff --git a/pkg/front_end/testcases/nnbd/issue43256.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43256.dart.strong.transformed.expect index 985b3f4994130..502f13de11a4f 100644 --- a/pkg/front_end/testcases/nnbd/issue43256.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43256.dart.strong.transformed.expect @@ -67,7 +67,7 @@ static field core::Map map1 = block { #t1.{core::Map::addAll}{Invariant}(self::nullableMap!){(core::Map) → void}; } =>#t1; static field core::Set set1 = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(0){(dynamic) → core::bool}; if(self::i.{core::num::>}(0){(core::num) → core::bool}) #t2.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. @@ -108,7 +108,7 @@ static method testMap?, Z extends core::List>(self::testIterables::X% x, self::testIterables::Y% y, self::testIterables::Z z) → dynamic { core::Set set2 = block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); #t5.{core::Set::add}{Invariant}(0){(dynamic) → core::bool}; if(self::i.{core::num::>}(0){(core::num) → core::bool}) #t5.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable. diff --git a/pkg/front_end/testcases/nnbd/issue43256.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue43256.dart.weak.transformed.expect index 985b3f4994130..502f13de11a4f 100644 --- a/pkg/front_end/testcases/nnbd/issue43256.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43256.dart.weak.transformed.expect @@ -67,7 +67,7 @@ static field core::Map map1 = block { #t1.{core::Map::addAll}{Invariant}(self::nullableMap!){(core::Map) → void}; } =>#t1; static field core::Set set1 = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(0){(dynamic) → core::bool}; if(self::i.{core::num::>}(0){(core::num) → core::bool}) #t2.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:23:17: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. @@ -108,7 +108,7 @@ static method testMap?, Z extends core::List>(self::testIterables::X% x, self::testIterables::Y% y, self::testIterables::Z z) → dynamic { core::Set set2 = block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); #t5.{core::Set::add}{Invariant}(0){(dynamic) → core::bool}; if(self::i.{core::num::>}(0){(core::num) → core::bool}) #t5.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43256.dart:48:19: Error: Unexpected type 'X' of a spread. Expected 'dynamic' or an Iterable. diff --git a/pkg/front_end/testcases/nnbd/issue43455.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43455.dart.strong.transformed.expect index 53a4e60245381..70628c7b4bf20 100644 --- a/pkg/front_end/testcases/nnbd/issue43455.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43455.dart.strong.transformed.expect @@ -9,22 +9,22 @@ class C extends core::Object { ; method test(covariant-by-class self::C::X% x, covariant-by-class self::C::Y? y) → dynamic { core::Set v = block { - final core::Set #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set #t1 = new col::_Set::•(); #t1.{core::Set::add}{Invariant}(x){(core::Object?) → core::bool}; #t1.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; } =>#t1; core::Set w = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; #t2.{core::Set::add}{Invariant}(x){(core::Object?) → core::bool}; } =>#t2; core::Set p = block { - final core::Set #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set #t3 = new col::_Set::•(); #t3.{core::Set::add}{Invariant}(y){(core::Object?) → core::bool}; #t3.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; } =>#t3; core::Set q = block { - final core::Set #t4 = new col::_InternalLinkedHashSet::•(); + final core::Set #t4 = new col::_Set::•(); #t4.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; #t4.{core::Set::add}{Invariant}(y){(core::Object?) → core::bool}; } =>#t4; @@ -38,12 +38,12 @@ class C extends core::Object { self::assertLeftSubtype>(q); if(x is{ForNonNullableByDefault} core::Object?) { core::Set v = block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); #t5.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */}){(core::Object?) → core::bool}; #t5.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; } =>#t5; core::Set w = block { - final core::Set #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set #t6 = new col::_Set::•(); #t6.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; #t6.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */}){(core::Object?) → core::bool}; } =>#t6; @@ -58,7 +58,7 @@ static method assertRightSubtype(dynamic x) → dynamic { x as{ForNonNullableByDefault} core::Set; } static method assertLeftSubtype(self::assertLeftSubtype::X% x) → dynamic { - new col::_InternalLinkedHashSet::•() as{ForNonNullableByDefault} self::assertLeftSubtype::X%; + new col::_Set::•() as{ForNonNullableByDefault} self::assertLeftSubtype::X%; } static method main() → dynamic { new self::C::•().{self::C::test}(42, null){(core::int?, core::int?) → dynamic}; diff --git a/pkg/front_end/testcases/nnbd/issue43455.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue43455.dart.weak.transformed.expect index 53a4e60245381..70628c7b4bf20 100644 --- a/pkg/front_end/testcases/nnbd/issue43455.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43455.dart.weak.transformed.expect @@ -9,22 +9,22 @@ class C extends core::Object { ; method test(covariant-by-class self::C::X% x, covariant-by-class self::C::Y? y) → dynamic { core::Set v = block { - final core::Set #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set #t1 = new col::_Set::•(); #t1.{core::Set::add}{Invariant}(x){(core::Object?) → core::bool}; #t1.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; } =>#t1; core::Set w = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; #t2.{core::Set::add}{Invariant}(x){(core::Object?) → core::bool}; } =>#t2; core::Set p = block { - final core::Set #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set #t3 = new col::_Set::•(); #t3.{core::Set::add}{Invariant}(y){(core::Object?) → core::bool}; #t3.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; } =>#t3; core::Set q = block { - final core::Set #t4 = new col::_InternalLinkedHashSet::•(); + final core::Set #t4 = new col::_Set::•(); #t4.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; #t4.{core::Set::add}{Invariant}(y){(core::Object?) → core::bool}; } =>#t4; @@ -38,12 +38,12 @@ class C extends core::Object { self::assertLeftSubtype>(q); if(x is{ForNonNullableByDefault} core::Object?) { core::Set v = block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); #t5.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */}){(core::Object?) → core::bool}; #t5.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; } =>#t5; core::Set w = block { - final core::Set #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set #t6 = new col::_Set::•(); #t6.{core::Set::add}{Invariant}(42){(core::Object?) → core::bool}; #t6.{core::Set::add}{Invariant}(x{self::C::X% & core::Object? /* '%' & '?' = '%' */}){(core::Object?) → core::bool}; } =>#t6; @@ -58,7 +58,7 @@ static method assertRightSubtype(dynamic x) → dynamic { x as{ForNonNullableByDefault} core::Set; } static method assertLeftSubtype(self::assertLeftSubtype::X% x) → dynamic { - new col::_InternalLinkedHashSet::•() as{ForNonNullableByDefault} self::assertLeftSubtype::X%; + new col::_Set::•() as{ForNonNullableByDefault} self::assertLeftSubtype::X%; } static method main() → dynamic { new self::C::•().{self::C::test}(42, null){(core::int?, core::int?) → dynamic}; diff --git a/pkg/front_end/testcases/nnbd/issue43495.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43495.dart.strong.transformed.expect index f91d3452e185c..9ef47bda185c3 100644 --- a/pkg/front_end/testcases/nnbd/issue43495.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43495.dart.strong.transformed.expect @@ -187,13 +187,13 @@ static method foo(core::bool condition, core::Iterable iterable, core:: - 'List' is from 'dart:core'. {...a}, // Error. ^": null}, block { - final core::Set #t4 = new col::_InternalLinkedHashSet::•(); + final core::Set #t4 = new col::_Set::•(); #t4.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map?' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. {...d}, // Error. ^"){(core::int) → core::bool}; } =>#t4, block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:14:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...a}, // Error. @@ -207,7 +207,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t5, block { - final core::Set #t8 = new col::_InternalLinkedHashSet::•(); + final core::Set #t8 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:15:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...b}, // Error. @@ -221,7 +221,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t8, block { - final core::Set #t11 = new col::_InternalLinkedHashSet::•(); + final core::Set #t11 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:16:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...c}, // Error. @@ -241,7 +241,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: {if (condition) ...d}, // Error. ^", null){(core::int, core::int) → void}; } =>#t14, block { - final core::Set #t15 = new col::_InternalLinkedHashSet::•(); + final core::Set #t15 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -261,7 +261,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t15, block { - final core::Set #t18 = new col::_InternalLinkedHashSet::•(); + final core::Set #t18 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -281,7 +281,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t18, block { - final core::Set #t21 = new col::_InternalLinkedHashSet::•(); + final core::Set #t21 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -312,7 +312,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t24, block { - final core::Set #t25 = new col::_InternalLinkedHashSet::•(); + final core::Set #t25 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:22:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...a}, // Error. @@ -326,7 +326,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t25, block { - final core::Set #t28 = new col::_InternalLinkedHashSet::•(); + final core::Set #t28 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:23:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...b}, // Error. @@ -340,7 +340,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t28, block { - final core::Set #t31 = new col::_InternalLinkedHashSet::•(); + final core::Set #t31 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:24:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...c}, // Error. @@ -360,17 +360,17 @@ static method foo(core::bool condition, core::Iterable iterable, core:: {for (int i = 0; i < 42; ++i) ...d}, // Error. ^", null){(core::int, core::int) → void}; } =>#t34, block { - final core::Set #t35 = new col::_InternalLinkedHashSet::•(); + final core::Set #t35 = new col::_Set::•(); final core::Iterable? #t36 = a; if(!(#t36 == null)) #t35.{core::Set::addAll}{Invariant}(#t36{core::Iterable}){(core::Iterable) → void}; } =>#t35, block { - final core::Set #t37 = new col::_InternalLinkedHashSet::•(); + final core::Set #t37 = new col::_Set::•(); final core::Iterable? #t38 = b; if(!(#t38 == null)) #t37.{core::Set::addAll}{Invariant}(#t38{core::Iterable}){(core::Iterable) → void}; } =>#t37, block { - final core::Set #t39 = new col::_InternalLinkedHashSet::•(); + final core::Set #t39 = new col::_Set::•(); final core::Iterable? #t40 = c; if(!(#t40 == null)) #t39.{core::Set::addAll}{Invariant}(#t40{core::Iterable}){(core::Iterable) → void}; @@ -380,7 +380,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: if(!(#t42 == null)) #t41.{core::Map::addAll}{Invariant}(#t42{core::Map}){(core::Map) → void}; } =>#t41, block { - final core::Set #t43 = new col::_InternalLinkedHashSet::•(); + final core::Set #t43 = new col::_Set::•(); if(condition) { final core::Iterable? #t44 = a; if(!(#t44 == null)) { @@ -395,7 +395,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t43, block { - final core::Set #t47 = new col::_InternalLinkedHashSet::•(); + final core::Set #t47 = new col::_Set::•(); if(condition) { final core::Iterable? #t48 = b; if(!(#t48 == null)) { @@ -410,7 +410,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t47, block { - final core::Set #t51 = new col::_InternalLinkedHashSet::•(); + final core::Set #t51 = new col::_Set::•(); if(condition) { final core::Iterable? #t52 = c; if(!(#t52 == null)) { @@ -432,7 +432,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: #t55.{core::Map::addAll}{Invariant}(#t56{core::Map}){(core::Map) → void}; } } =>#t55, block { - final core::Set #t57 = new col::_InternalLinkedHashSet::•(); + final core::Set #t57 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -453,7 +453,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t57, block { - final core::Set #t61 = new col::_InternalLinkedHashSet::•(); + final core::Set #t61 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -474,7 +474,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t61, block { - final core::Set #t65 = new col::_InternalLinkedHashSet::•(); + final core::Set #t65 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -508,7 +508,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t69, block { - final core::Set #t71 = new col::_InternalLinkedHashSet::•(); + final core::Set #t71 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t72 = a; if(!(#t72 == null)) { @@ -523,7 +523,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t71, block { - final core::Set #t75 = new col::_InternalLinkedHashSet::•(); + final core::Set #t75 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t76 = b; if(!(#t76 == null)) { @@ -538,7 +538,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t75, block { - final core::Set #t79 = new col::_InternalLinkedHashSet::•(); + final core::Set #t79 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t80 = c; if(!(#t80 == null)) { @@ -579,12 +579,12 @@ static method bar?, Y extends core::Set{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:54:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map. {...x}, // Error. ^": null}, block { - final core::Set #t88 = new col::_InternalLinkedHashSet::•(); + final core::Set #t88 = new col::_Set::•(); #t88.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable. {...w}, // Error. ^"){(core::int) → core::bool}; } =>#t88, block { - final core::Set #t89 = new col::_InternalLinkedHashSet::•(); + final core::Set #t89 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:56:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...x}, // Error. @@ -598,7 +598,7 @@ static method bar?, Y extends core::Set#t89, block { - final core::Set #t92 = new col::_InternalLinkedHashSet::•(); + final core::Set #t92 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:57:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...y}, // Error. @@ -612,7 +612,7 @@ static method bar?, Y extends core::Set#t92, block { - final core::Set #t95 = new col::_InternalLinkedHashSet::•(); + final core::Set #t95 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:58:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...z}, // Error. @@ -632,7 +632,7 @@ static method bar?, Y extends core::Set#t98, block { - final core::Set #t99 = new col::_InternalLinkedHashSet::•(); + final core::Set #t99 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -652,7 +652,7 @@ static method bar?, Y extends core::Set#t99, block { - final core::Set #t102 = new col::_InternalLinkedHashSet::•(); + final core::Set #t102 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -672,7 +672,7 @@ static method bar?, Y extends core::Set#t102, block { - final core::Set #t105 = new col::_InternalLinkedHashSet::•(); + final core::Set #t105 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -703,7 +703,7 @@ static method bar?, Y extends core::Set#t108, block { - final core::Set #t109 = new col::_InternalLinkedHashSet::•(); + final core::Set #t109 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:64:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...x}, // Error. @@ -717,7 +717,7 @@ static method bar?, Y extends core::Set#t109, block { - final core::Set #t112 = new col::_InternalLinkedHashSet::•(); + final core::Set #t112 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:65:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...y}, // Error. @@ -731,7 +731,7 @@ static method bar?, Y extends core::Set#t112, block { - final core::Set #t115 = new col::_InternalLinkedHashSet::•(); + final core::Set #t115 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:66:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...z}, // Error. @@ -751,17 +751,17 @@ static method bar?, Y extends core::Set#t118, block { - final core::Set #t119 = new col::_InternalLinkedHashSet::•(); + final core::Set #t119 = new col::_Set::•(); final core::Iterable? #t120 = x; if(!(#t120 == null)) #t119.{core::Set::addAll}{Invariant}(#t120{core::Iterable}){(core::Iterable) → void}; } =>#t119, block { - final core::Set #t121 = new col::_InternalLinkedHashSet::•(); + final core::Set #t121 = new col::_Set::•(); final core::Iterable? #t122 = y; if(!(#t122 == null)) #t121.{core::Set::addAll}{Invariant}(#t122{core::Iterable}){(core::Iterable) → void}; } =>#t121, block { - final core::Set #t123 = new col::_InternalLinkedHashSet::•(); + final core::Set #t123 = new col::_Set::•(); final core::Iterable? #t124 = z; if(!(#t124 == null)) #t123.{core::Set::addAll}{Invariant}(#t124{core::Iterable}){(core::Iterable) → void}; @@ -771,7 +771,7 @@ static method bar?, Y extends core::Set}){(core::Map) → void}; } =>#t125, block { - final core::Set #t127 = new col::_InternalLinkedHashSet::•(); + final core::Set #t127 = new col::_Set::•(); if(condition) { final core::Iterable? #t128 = x; if(!(#t128 == null)) { @@ -786,7 +786,7 @@ static method bar?, Y extends core::Set#t127, block { - final core::Set #t131 = new col::_InternalLinkedHashSet::•(); + final core::Set #t131 = new col::_Set::•(); if(condition) { final core::Iterable? #t132 = y; if(!(#t132 == null)) { @@ -801,7 +801,7 @@ static method bar?, Y extends core::Set#t131, block { - final core::Set #t135 = new col::_InternalLinkedHashSet::•(); + final core::Set #t135 = new col::_Set::•(); if(condition) { final core::Iterable? #t136 = z; if(!(#t136 == null)) { @@ -823,7 +823,7 @@ static method bar?, Y extends core::Set}){(core::Map) → void}; } } =>#t139, block { - final core::Set #t141 = new col::_InternalLinkedHashSet::•(); + final core::Set #t141 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -844,7 +844,7 @@ static method bar?, Y extends core::Set#t141, block { - final core::Set #t145 = new col::_InternalLinkedHashSet::•(); + final core::Set #t145 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -865,7 +865,7 @@ static method bar?, Y extends core::Set#t145, block { - final core::Set #t149 = new col::_InternalLinkedHashSet::•(); + final core::Set #t149 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -899,7 +899,7 @@ static method bar?, Y extends core::Set#t153, block { - final core::Set #t155 = new col::_InternalLinkedHashSet::•(); + final core::Set #t155 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t156 = x; if(!(#t156 == null)) { @@ -914,7 +914,7 @@ static method bar?, Y extends core::Set#t155, block { - final core::Set #t159 = new col::_InternalLinkedHashSet::•(); + final core::Set #t159 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t160 = y; if(!(#t160 == null)) { @@ -929,7 +929,7 @@ static method bar?, Y extends core::Set#t159, block { - final core::Set #t163 = new col::_InternalLinkedHashSet::•(); + final core::Set #t163 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t164 = z; if(!(#t164 == null)) { diff --git a/pkg/front_end/testcases/nnbd/issue43495.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue43495.dart.weak.transformed.expect index f91d3452e185c..9ef47bda185c3 100644 --- a/pkg/front_end/testcases/nnbd/issue43495.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue43495.dart.weak.transformed.expect @@ -187,13 +187,13 @@ static method foo(core::bool condition, core::Iterable iterable, core:: - 'List' is from 'dart:core'. {...a}, // Error. ^": null}, block { - final core::Set #t4 = new col::_InternalLinkedHashSet::•(); + final core::Set #t4 = new col::_Set::•(); #t4.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:13:14: Error: Unexpected type 'Map?' of a spread. Expected 'dynamic' or an Iterable. - 'Map' is from 'dart:core'. {...d}, // Error. ^"){(core::int) → core::bool}; } =>#t4, block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:14:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...a}, // Error. @@ -207,7 +207,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t5, block { - final core::Set #t8 = new col::_InternalLinkedHashSet::•(); + final core::Set #t8 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:15:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...b}, // Error. @@ -221,7 +221,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t8, block { - final core::Set #t11 = new col::_InternalLinkedHashSet::•(); + final core::Set #t11 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:16:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...c}, // Error. @@ -241,7 +241,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: {if (condition) ...d}, // Error. ^", null){(core::int, core::int) → void}; } =>#t14, block { - final core::Set #t15 = new col::_InternalLinkedHashSet::•(); + final core::Set #t15 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -261,7 +261,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t15, block { - final core::Set #t18 = new col::_InternalLinkedHashSet::•(); + final core::Set #t18 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -281,7 +281,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t18, block { - final core::Set #t21 = new col::_InternalLinkedHashSet::•(); + final core::Set #t21 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -312,7 +312,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t24, block { - final core::Set #t25 = new col::_InternalLinkedHashSet::•(); + final core::Set #t25 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:22:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...a}, // Error. @@ -326,7 +326,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t25, block { - final core::Set #t28 = new col::_InternalLinkedHashSet::•(); + final core::Set #t28 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:23:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...b}, // Error. @@ -340,7 +340,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t28, block { - final core::Set #t31 = new col::_InternalLinkedHashSet::•(); + final core::Set #t31 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:24:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...c}, // Error. @@ -360,17 +360,17 @@ static method foo(core::bool condition, core::Iterable iterable, core:: {for (int i = 0; i < 42; ++i) ...d}, // Error. ^", null){(core::int, core::int) → void}; } =>#t34, block { - final core::Set #t35 = new col::_InternalLinkedHashSet::•(); + final core::Set #t35 = new col::_Set::•(); final core::Iterable? #t36 = a; if(!(#t36 == null)) #t35.{core::Set::addAll}{Invariant}(#t36{core::Iterable}){(core::Iterable) → void}; } =>#t35, block { - final core::Set #t37 = new col::_InternalLinkedHashSet::•(); + final core::Set #t37 = new col::_Set::•(); final core::Iterable? #t38 = b; if(!(#t38 == null)) #t37.{core::Set::addAll}{Invariant}(#t38{core::Iterable}){(core::Iterable) → void}; } =>#t37, block { - final core::Set #t39 = new col::_InternalLinkedHashSet::•(); + final core::Set #t39 = new col::_Set::•(); final core::Iterable? #t40 = c; if(!(#t40 == null)) #t39.{core::Set::addAll}{Invariant}(#t40{core::Iterable}){(core::Iterable) → void}; @@ -380,7 +380,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: if(!(#t42 == null)) #t41.{core::Map::addAll}{Invariant}(#t42{core::Map}){(core::Map) → void}; } =>#t41, block { - final core::Set #t43 = new col::_InternalLinkedHashSet::•(); + final core::Set #t43 = new col::_Set::•(); if(condition) { final core::Iterable? #t44 = a; if(!(#t44 == null)) { @@ -395,7 +395,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t43, block { - final core::Set #t47 = new col::_InternalLinkedHashSet::•(); + final core::Set #t47 = new col::_Set::•(); if(condition) { final core::Iterable? #t48 = b; if(!(#t48 == null)) { @@ -410,7 +410,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t47, block { - final core::Set #t51 = new col::_InternalLinkedHashSet::•(); + final core::Set #t51 = new col::_Set::•(); if(condition) { final core::Iterable? #t52 = c; if(!(#t52 == null)) { @@ -432,7 +432,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: #t55.{core::Map::addAll}{Invariant}(#t56{core::Map}){(core::Map) → void}; } } =>#t55, block { - final core::Set #t57 = new col::_InternalLinkedHashSet::•(); + final core::Set #t57 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -453,7 +453,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t57, block { - final core::Set #t61 = new col::_InternalLinkedHashSet::•(); + final core::Set #t61 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -474,7 +474,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t61, block { - final core::Set #t65 = new col::_InternalLinkedHashSet::•(); + final core::Set #t65 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -508,7 +508,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t69, block { - final core::Set #t71 = new col::_InternalLinkedHashSet::•(); + final core::Set #t71 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t72 = a; if(!(#t72 == null)) { @@ -523,7 +523,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t71, block { - final core::Set #t75 = new col::_InternalLinkedHashSet::•(); + final core::Set #t75 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t76 = b; if(!(#t76 == null)) { @@ -538,7 +538,7 @@ static method foo(core::bool condition, core::Iterable iterable, core:: } } } =>#t75, block { - final core::Set #t79 = new col::_InternalLinkedHashSet::•(); + final core::Set #t79 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t80 = c; if(!(#t80 == null)) { @@ -579,12 +579,12 @@ static method bar?, Y extends core::Set{invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:54:19: Error: Unexpected type 'X' of a map spread entry. Expected 'dynamic' or a Map. {...x}, // Error. ^": null}, block { - final core::Set #t88 = new col::_InternalLinkedHashSet::•(); + final core::Set #t88 = new col::_Set::•(); #t88.{core::Set::add}{Invariant}(invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:55:14: Error: Unexpected type 'W' of a spread. Expected 'dynamic' or an Iterable. {...w}, // Error. ^"){(core::int) → core::bool}; } =>#t88, block { - final core::Set #t89 = new col::_InternalLinkedHashSet::•(); + final core::Set #t89 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:56:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...x}, // Error. @@ -598,7 +598,7 @@ static method bar?, Y extends core::Set#t89, block { - final core::Set #t92 = new col::_InternalLinkedHashSet::•(); + final core::Set #t92 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:57:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...y}, // Error. @@ -612,7 +612,7 @@ static method bar?, Y extends core::Set#t92, block { - final core::Set #t95 = new col::_InternalLinkedHashSet::•(); + final core::Set #t95 = new col::_Set::•(); if(condition) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:58:24: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {if (condition) ...z}, // Error. @@ -632,7 +632,7 @@ static method bar?, Y extends core::Set#t98, block { - final core::Set #t99 = new col::_InternalLinkedHashSet::•(); + final core::Set #t99 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -652,7 +652,7 @@ static method bar?, Y extends core::Set#t99, block { - final core::Set #t102 = new col::_InternalLinkedHashSet::•(); + final core::Set #t102 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -672,7 +672,7 @@ static method bar?, Y extends core::Set#t102, block { - final core::Set #t105 = new col::_InternalLinkedHashSet::•(); + final core::Set #t105 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -703,7 +703,7 @@ static method bar?, Y extends core::Set#t108, block { - final core::Set #t109 = new col::_InternalLinkedHashSet::•(); + final core::Set #t109 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:64:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...x}, // Error. @@ -717,7 +717,7 @@ static method bar?, Y extends core::Set#t109, block { - final core::Set #t112 = new col::_InternalLinkedHashSet::•(); + final core::Set #t112 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:65:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...y}, // Error. @@ -731,7 +731,7 @@ static method bar?, Y extends core::Set#t112, block { - final core::Set #t115 = new col::_InternalLinkedHashSet::•(); + final core::Set #t115 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { core::Iterator :sync-for-iterator = invalid-expression "pkg/front_end/testcases/nnbd/issue43495.dart:66:38: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced. {for (int i = 0; i < 42; ++i) ...z}, // Error. @@ -751,17 +751,17 @@ static method bar?, Y extends core::Set#t118, block { - final core::Set #t119 = new col::_InternalLinkedHashSet::•(); + final core::Set #t119 = new col::_Set::•(); final core::Iterable? #t120 = x; if(!(#t120 == null)) #t119.{core::Set::addAll}{Invariant}(#t120{core::Iterable}){(core::Iterable) → void}; } =>#t119, block { - final core::Set #t121 = new col::_InternalLinkedHashSet::•(); + final core::Set #t121 = new col::_Set::•(); final core::Iterable? #t122 = y; if(!(#t122 == null)) #t121.{core::Set::addAll}{Invariant}(#t122{core::Iterable}){(core::Iterable) → void}; } =>#t121, block { - final core::Set #t123 = new col::_InternalLinkedHashSet::•(); + final core::Set #t123 = new col::_Set::•(); final core::Iterable? #t124 = z; if(!(#t124 == null)) #t123.{core::Set::addAll}{Invariant}(#t124{core::Iterable}){(core::Iterable) → void}; @@ -771,7 +771,7 @@ static method bar?, Y extends core::Set}){(core::Map) → void}; } =>#t125, block { - final core::Set #t127 = new col::_InternalLinkedHashSet::•(); + final core::Set #t127 = new col::_Set::•(); if(condition) { final core::Iterable? #t128 = x; if(!(#t128 == null)) { @@ -786,7 +786,7 @@ static method bar?, Y extends core::Set#t127, block { - final core::Set #t131 = new col::_InternalLinkedHashSet::•(); + final core::Set #t131 = new col::_Set::•(); if(condition) { final core::Iterable? #t132 = y; if(!(#t132 == null)) { @@ -801,7 +801,7 @@ static method bar?, Y extends core::Set#t131, block { - final core::Set #t135 = new col::_InternalLinkedHashSet::•(); + final core::Set #t135 = new col::_Set::•(); if(condition) { final core::Iterable? #t136 = z; if(!(#t136 == null)) { @@ -823,7 +823,7 @@ static method bar?, Y extends core::Set}){(core::Map) → void}; } } =>#t139, block { - final core::Set #t141 = new col::_InternalLinkedHashSet::•(); + final core::Set #t141 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -844,7 +844,7 @@ static method bar?, Y extends core::Set#t141, block { - final core::Set #t145 = new col::_InternalLinkedHashSet::•(); + final core::Set #t145 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -865,7 +865,7 @@ static method bar?, Y extends core::Set#t145, block { - final core::Set #t149 = new col::_InternalLinkedHashSet::•(); + final core::Set #t149 = new col::_Set::•(); { core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -899,7 +899,7 @@ static method bar?, Y extends core::Set#t153, block { - final core::Set #t155 = new col::_InternalLinkedHashSet::•(); + final core::Set #t155 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t156 = x; if(!(#t156 == null)) { @@ -914,7 +914,7 @@ static method bar?, Y extends core::Set#t155, block { - final core::Set #t159 = new col::_InternalLinkedHashSet::•(); + final core::Set #t159 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t160 = y; if(!(#t160 == null)) { @@ -929,7 +929,7 @@ static method bar?, Y extends core::Set#t159, block { - final core::Set #t163 = new col::_InternalLinkedHashSet::•(); + final core::Set #t163 = new col::_Set::•(); for (core::int i = 0; i.{core::num::<}(42){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { final core::Iterable? #t164 = z; if(!(#t164 == null)) { diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.transformed.expect index 25f4587cf3345..57878fddabe5d 100644 --- a/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.transformed.expect @@ -47,7 +47,7 @@ static method main() → dynamic { } =>#t11; has-declared-initializer core::Set? set = null; core::print( block { - final core::Set #t13 = new col::_InternalLinkedHashSet::•(); + final core::Set #t13 = new col::_Set::•(); #t13.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t13.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; final core::Iterable? #t14 = set; @@ -56,7 +56,7 @@ static method main() → dynamic { #t13.{core::Set::add}{Invariant}(3){(core::int) → core::bool}; } =>#t13); core::print( block { - final core::Set #t15 = new col::_InternalLinkedHashSet::•(); + final core::Set #t15 = new col::_Set::•(); #t15.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t15.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; final has-declared-initializer core::Iterable? #t16 = null; @@ -65,13 +65,13 @@ static method main() → dynamic { #t15.{core::Set::add}{Invariant}(3){(core::int) → core::bool}; } =>#t15); core::Set set1 = block { - final core::Set #t17 = new col::_InternalLinkedHashSet::•(); + final core::Set #t17 = new col::_Set::•(); final core::Iterable? #t18 = set; if(!(#t18 == null)) #t17.{core::Set::addAll}{Invariant}(#t18{core::Iterable}){(core::Iterable) → void}; } =>#t17; core::Set set3 = block { - final core::Set #t19 = new col::_InternalLinkedHashSet::•(); + final core::Set #t19 = new col::_Set::•(); #t19.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t19.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; final core::Iterable? #t20 = set; @@ -80,7 +80,7 @@ static method main() → dynamic { #t19.{core::Set::add}{Invariant}(3){(core::int) → core::bool}; } =>#t19; core::Set set4 = block { - final core::Set #t21 = new col::_InternalLinkedHashSet::•(); + final core::Set #t21 = new col::_Set::•(); #t21.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t21.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; final has-declared-initializer core::Iterable? #t22 = null; diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.transformed.expect index 25f4587cf3345..57878fddabe5d 100644 --- a/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.transformed.expect @@ -47,7 +47,7 @@ static method main() → dynamic { } =>#t11; has-declared-initializer core::Set? set = null; core::print( block { - final core::Set #t13 = new col::_InternalLinkedHashSet::•(); + final core::Set #t13 = new col::_Set::•(); #t13.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t13.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; final core::Iterable? #t14 = set; @@ -56,7 +56,7 @@ static method main() → dynamic { #t13.{core::Set::add}{Invariant}(3){(core::int) → core::bool}; } =>#t13); core::print( block { - final core::Set #t15 = new col::_InternalLinkedHashSet::•(); + final core::Set #t15 = new col::_Set::•(); #t15.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t15.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; final has-declared-initializer core::Iterable? #t16 = null; @@ -65,13 +65,13 @@ static method main() → dynamic { #t15.{core::Set::add}{Invariant}(3){(core::int) → core::bool}; } =>#t15); core::Set set1 = block { - final core::Set #t17 = new col::_InternalLinkedHashSet::•(); + final core::Set #t17 = new col::_Set::•(); final core::Iterable? #t18 = set; if(!(#t18 == null)) #t17.{core::Set::addAll}{Invariant}(#t18{core::Iterable}){(core::Iterable) → void}; } =>#t17; core::Set set3 = block { - final core::Set #t19 = new col::_InternalLinkedHashSet::•(); + final core::Set #t19 = new col::_Set::•(); #t19.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t19.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; final core::Iterable? #t20 = set; @@ -80,7 +80,7 @@ static method main() → dynamic { #t19.{core::Set::add}{Invariant}(3){(core::int) → core::bool}; } =>#t19; core::Set set4 = block { - final core::Set #t21 = new col::_InternalLinkedHashSet::•(); + final core::Set #t21 = new col::_Set::•(); #t21.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t21.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; final has-declared-initializer core::Iterable? #t22 = null; diff --git a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.transformed.expect index b641bbf59197c..dc090196c3328 100644 --- a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.transformed.expect @@ -144,13 +144,13 @@ static method warning(core::String s, core::List l, core::Map}){(core::Iterable) → void}; } =>#t5; core::Set a = block { - final core::Set #t7 = new col::_InternalLinkedHashSet::•(); + final core::Set #t7 = new col::_Set::•(); final core::Iterable? #t8 = l; if(!(#t8 == null)) #t7.{core::Set::addAll}{Invariant}(#t8{core::Iterable}){(core::Iterable) → void}; } =>#t7; block { - final core::Set #t9 = new col::_InternalLinkedHashSet::•(); + final core::Set #t9 = new col::_Set::•(); final core::Iterable? #t10 = l; if(!(#t10 == null)) #t9.{core::Set::addAll}{Invariant}(#t10{core::Iterable}){(core::Iterable) → void}; diff --git a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.transformed.expect index b641bbf59197c..dc090196c3328 100644 --- a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.transformed.expect @@ -144,13 +144,13 @@ static method warning(core::String s, core::List l, core::Map}){(core::Iterable) → void}; } =>#t5; core::Set a = block { - final core::Set #t7 = new col::_InternalLinkedHashSet::•(); + final core::Set #t7 = new col::_Set::•(); final core::Iterable? #t8 = l; if(!(#t8 == null)) #t7.{core::Set::addAll}{Invariant}(#t8{core::Iterable}){(core::Iterable) → void}; } =>#t7; block { - final core::Set #t9 = new col::_InternalLinkedHashSet::•(); + final core::Set #t9 = new col::_Set::•(); final core::Iterable? #t10 = l; if(!(#t10 == null)) #t9.{core::Set::addAll}{Invariant}(#t10{core::Iterable}){(core::Iterable) → void}; diff --git a/pkg/front_end/testcases/nnbd_mixed/infer_constraints_from_opt_in.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/infer_constraints_from_opt_in.dart.weak.transformed.expect index 39165379da54c..d78f1cadb1c65 100644 --- a/pkg/front_end/testcases/nnbd_mixed/infer_constraints_from_opt_in.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd_mixed/infer_constraints_from_opt_in.dart.weak.transformed.expect @@ -36,82 +36,82 @@ static method main() → dynamic { core::List* local1h = core::_GrowableList::_literal1(inf::field8); core::List* local1i = core::_GrowableList::_literal1(null); core::Set*>* local2a = block { - final core::Set*>* #t1 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t1 = new col::_Set::•*>(); #t1.{core::Set::add}{Invariant}(inf::field1){(inf::C*) →* core::bool*}; #t1.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; } =>#t1; core::Set*>* local2b = block { - final core::Set*>* #t2 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t2 = new col::_Set::•*>(); #t2.{core::Set::add}{Invariant}(inf::field2){(inf::C*) →* core::bool*}; #t2.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; } =>#t2; core::Set*>* local2c = block { - final core::Set*>* #t3 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t3 = new col::_Set::•*>(); #t3.{core::Set::add}{Invariant}(inf::field3){(inf::C*) →* core::bool*}; #t3.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; } =>#t3; core::Set*>* local2d = block { - final core::Set*>* #t4 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t4 = new col::_Set::•*>(); #t4.{core::Set::add}{Invariant}(inf::field4){(inf::C*) →* core::bool*}; #t4.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; } =>#t4; core::Set*>* local2e = block { - final core::Set*>* #t5 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t5 = new col::_Set::•*>(); #t5.{core::Set::add}{Invariant}(inf::field5){(inf::C*) →* core::bool*}; #t5.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; } =>#t5; core::Set*>* local2f = block { - final core::Set*>* #t6 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t6 = new col::_Set::•*>(); #t6.{core::Set::add}{Invariant}(inf::field6){(inf::C*) →* core::bool*}; #t6.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; } =>#t6; core::Set* local2g = block { - final core::Set* #t7 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t7 = new col::_Set::•(); #t7.{core::Set::add}{Invariant}(inf::field7){(core::int*) →* core::bool*}; #t7.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; } =>#t7; core::Set* local2h = block { - final core::Set* #t8 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t8 = new col::_Set::•(); #t8.{core::Set::add}{Invariant}(inf::field8){(core::int*) →* core::bool*}; #t8.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; } =>#t8; core::Set*>* local3a = block { - final core::Set*>* #t9 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t9 = new col::_Set::•*>(); #t9.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; #t9.{core::Set::add}{Invariant}(inf::field1){(inf::C*) →* core::bool*}; } =>#t9; core::Set*>* local3b = block { - final core::Set*>* #t10 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t10 = new col::_Set::•*>(); #t10.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; #t10.{core::Set::add}{Invariant}(inf::field2){(inf::C*) →* core::bool*}; } =>#t10; core::Set*>* local3c = block { - final core::Set*>* #t11 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t11 = new col::_Set::•*>(); #t11.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; #t11.{core::Set::add}{Invariant}(inf::field3){(inf::C*) →* core::bool*}; } =>#t11; core::Set*>* local3d = block { - final core::Set*>* #t12 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t12 = new col::_Set::•*>(); #t12.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; #t12.{core::Set::add}{Invariant}(inf::field4){(inf::C*) →* core::bool*}; } =>#t12; core::Set*>* local3e = block { - final core::Set*>* #t13 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t13 = new col::_Set::•*>(); #t13.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; #t13.{core::Set::add}{Invariant}(inf::field5){(inf::C*) →* core::bool*}; } =>#t13; core::Set*>* local3f = block { - final core::Set*>* #t14 = new col::_InternalLinkedHashSet::•*>(); + final core::Set*>* #t14 = new col::_Set::•*>(); #t14.{core::Set::add}{Invariant}(null){(inf::C*) →* core::bool*}; #t14.{core::Set::add}{Invariant}(inf::field6){(inf::C*) →* core::bool*}; } =>#t14; core::Set* local3g = block { - final core::Set* #t15 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t15 = new col::_Set::•(); #t15.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; #t15.{core::Set::add}{Invariant}(inf::field7){(core::int*) →* core::bool*}; } =>#t15; core::Set* local3h = block { - final core::Set* #t16 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t16 = new col::_Set::•(); #t16.{core::Set::add}{Invariant}(null){(core::int*) →* core::bool*}; #t16.{core::Set::add}{Invariant}(inf::field8){(core::int*) →* core::bool*}; } =>#t16; @@ -166,82 +166,82 @@ static method method() → dynamic { core::List local1h = core::_GrowableList::_literal1(inf::field8); core::List local1i = core::_GrowableList::_literal1(null); core::Set?> local2a = block { - final core::Set?> #t17 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t17 = new col::_Set::•?>(); #t17.{core::Set::add}{Invariant}(inf::field1){(inf::C?) → core::bool}; #t17.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; } =>#t17; core::Set?> local2b = block { - final core::Set?> #t18 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t18 = new col::_Set::•?>(); #t18.{core::Set::add}{Invariant}(inf::field2){(inf::C?) → core::bool}; #t18.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; } =>#t18; core::Set?> local2c = block { - final core::Set?> #t19 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t19 = new col::_Set::•?>(); #t19.{core::Set::add}{Invariant}(inf::field3){(inf::C?) → core::bool}; #t19.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; } =>#t19; core::Set?> local2d = block { - final core::Set?> #t20 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t20 = new col::_Set::•?>(); #t20.{core::Set::add}{Invariant}(inf::field4){(inf::C?) → core::bool}; #t20.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; } =>#t20; core::Set?> local2e = block { - final core::Set?> #t21 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t21 = new col::_Set::•?>(); #t21.{core::Set::add}{Invariant}(inf::field5){(inf::C?) → core::bool}; #t21.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; } =>#t21; core::Set?> local2f = block { - final core::Set?> #t22 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t22 = new col::_Set::•?>(); #t22.{core::Set::add}{Invariant}(inf::field6){(inf::C?) → core::bool}; #t22.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; } =>#t22; core::Set local2g = block { - final core::Set #t23 = new col::_InternalLinkedHashSet::•(); + final core::Set #t23 = new col::_Set::•(); #t23.{core::Set::add}{Invariant}(inf::field7){(core::int?) → core::bool}; #t23.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; } =>#t23; core::Set local2h = block { - final core::Set #t24 = new col::_InternalLinkedHashSet::•(); + final core::Set #t24 = new col::_Set::•(); #t24.{core::Set::add}{Invariant}(inf::field8){(core::int?) → core::bool}; #t24.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; } =>#t24; core::Set?> local3a = block { - final core::Set?> #t25 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t25 = new col::_Set::•?>(); #t25.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; #t25.{core::Set::add}{Invariant}(inf::field1){(inf::C?) → core::bool}; } =>#t25; core::Set?> local3b = block { - final core::Set?> #t26 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t26 = new col::_Set::•?>(); #t26.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; #t26.{core::Set::add}{Invariant}(inf::field2){(inf::C?) → core::bool}; } =>#t26; core::Set?> local3c = block { - final core::Set?> #t27 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t27 = new col::_Set::•?>(); #t27.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; #t27.{core::Set::add}{Invariant}(inf::field3){(inf::C?) → core::bool}; } =>#t27; core::Set?> local3d = block { - final core::Set?> #t28 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t28 = new col::_Set::•?>(); #t28.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; #t28.{core::Set::add}{Invariant}(inf::field4){(inf::C?) → core::bool}; } =>#t28; core::Set?> local3e = block { - final core::Set?> #t29 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t29 = new col::_Set::•?>(); #t29.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; #t29.{core::Set::add}{Invariant}(inf::field5){(inf::C?) → core::bool}; } =>#t29; core::Set?> local3f = block { - final core::Set?> #t30 = new col::_InternalLinkedHashSet::•?>(); + final core::Set?> #t30 = new col::_Set::•?>(); #t30.{core::Set::add}{Invariant}(null){(inf::C?) → core::bool}; #t30.{core::Set::add}{Invariant}(inf::field6){(inf::C?) → core::bool}; } =>#t30; core::Set local3g = block { - final core::Set #t31 = new col::_InternalLinkedHashSet::•(); + final core::Set #t31 = new col::_Set::•(); #t31.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; #t31.{core::Set::add}{Invariant}(inf::field7){(core::int?) → core::bool}; } =>#t31; core::Set local3h = block { - final core::Set #t32 = new col::_InternalLinkedHashSet::•(); + final core::Set #t32 = new col::_Set::•(); #t32.{core::Set::add}{Invariant}(null){(core::int?) → core::bool}; #t32.{core::Set::add}{Invariant}(inf::field8){(core::int?) → core::bool}; } =>#t32; diff --git a/pkg/front_end/testcases/nnbd_mixed/regress_null_aware.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/regress_null_aware.dart.weak.transformed.expect index eebc12c72b56a..326c9db6c908d 100644 --- a/pkg/front_end/testcases/nnbd_mixed/regress_null_aware.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd_mixed/regress_null_aware.dart.weak.transformed.expect @@ -29,6 +29,6 @@ class Class extends core::Object { static method main(dynamic args) → dynamic { if(false) new self::Class::•().{self::Class::method}("", block { - final core::Set* #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t5 = new col::_Set::•(); } =>#t5){(core::String*, core::Set*) →* core::List*}; } diff --git a/pkg/front_end/testcases/regress/issue_42423.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_42423.dart.weak.transformed.expect index 60ba64c37725b..34002ba799578 100644 --- a/pkg/front_end/testcases/regress/issue_42423.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/regress/issue_42423.dart.weak.transformed.expect @@ -8,7 +8,7 @@ import "package:expect/expect.dart"; static method test1(dynamic stringList) → dynamic { core::Set intSet = block { - final core::Set #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set #t1 = new col::_Set::•(); final core::Iterable? #t2 = stringList as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable?; if(!(#t2 == null)) { core::Iterator :sync-for-iterator = #t2{core::Iterable}.{core::Iterable::iterator}{core::Iterator}; diff --git a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.weak.transformed.expect b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.weak.transformed.expect index 9642b094f7e0d..73bc0198466ab 100644 --- a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.weak.transformed.expect @@ -55,10 +55,10 @@ import "dart:collection" show LinkedHashMap, LinkedHashSet; static method main() → dynamic async /* futureValueType= dynamic */ { core::Map* m = {}; core::Set* s = block { - final core::Set* #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t1 = new col::_Set::•(); } =>#t1; core::Iterable* i = block { - final core::Set* #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t2 = new col::_Set::•(); } =>#t2; col::LinkedHashSet* lhs = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:15:28: Error: The set literal type 'Set' isn't of expected type 'LinkedHashSet'. - 'Set' is from 'dart:core'. @@ -66,7 +66,7 @@ static method main() → dynamic async /* futureValueType= dynamic */ { Change the type of the set literal or the context in which it is used. LinkedHashSet lhs = {}; ^" in block { - final core::Set* #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t3 = new col::_Set::•(); } =>#t3; col::LinkedHashMap* lhm = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:16:34: Error: The map literal type 'Map' isn't of expected type 'LinkedHashMap'. - 'Map' is from 'dart:core'. @@ -89,11 +89,11 @@ static method mapfun() → asy::Future*>* asy return {}; static method setfun() → asy::Future*>* async /* futureValueType= core::Set* */ return block { - final core::Set* #t4 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t4 = new col::_Set::•(); } =>#t4; static method iterablefun() → asy::Future*>* async /* futureValueType= core::Iterable* */ return block { - final core::Set* #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t5 = new col::_Set::•(); } =>#t5; static method lhsfun() → asy::Future*>* async /* futureValueType= col::LinkedHashSet* */ return invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:34:46: Error: The set literal type 'Future>' isn't of expected type 'Future>'. @@ -103,7 +103,7 @@ static method lhsfun() → asy::Future*>* async / Change the type of the set literal or the context in which it is used. Future> lhsfun() async => {}; ^" in block { - final core::Set* #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t6 = new col::_Set::•(); } =>#t6; static method lhmfun() → asy::Future*>* async /* futureValueType= col::LinkedHashMap* */ return invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:35:52: Error: The map literal type 'Future>' isn't of expected type 'Future>'. @@ -117,11 +117,11 @@ static method mapfun2() → FutureOr*>* return {}; static method setfun2() → FutureOr*>* return block { - final core::Set* #t7 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t7 = new col::_Set::•(); } =>#t7; static method iterablefun2() → FutureOr*>* return block { - final core::Set* #t8 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t8 = new col::_Set::•(); } =>#t8; static method lhsfun2() → FutureOr*>* return invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:40:43: Error: A value of type 'Set' can't be assigned to a variable of type 'FutureOr>'. @@ -129,7 +129,7 @@ static method lhsfun2() → FutureOr*>* - 'LinkedHashSet' is from 'dart:collection'. FutureOr> lhsfun2() => {}; ^" in ( block { - final core::Set* #t9 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t9 = new col::_Set::•(); } =>#t9) as{TypeError} FutureOr*>*; static method lhmfun2() → FutureOr*>* return invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:41:49: Error: A value of type 'Map' can't be assigned to a variable of type 'FutureOr>'. diff --git a/pkg/front_end/testcases/set_literals/disambiguation_rule2.dart.weak.transformed.expect b/pkg/front_end/testcases/set_literals/disambiguation_rule2.dart.weak.transformed.expect index 1cc8211c3e7e9..316871bdf5dbb 100644 --- a/pkg/front_end/testcases/set_literals/disambiguation_rule2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/set_literals/disambiguation_rule2.dart.weak.transformed.expect @@ -51,17 +51,17 @@ import "dart:collection" show LinkedHashMap, LinkedHashSet; static method main() → dynamic async /* futureValueType= dynamic */ { core::Map m = {}; core::Set s = block { - final core::Set #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set #t1 = new col::_Set::•(); } =>#t1; core::Iterable i = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); } =>#t2; col::LinkedHashSet lhs = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule2.dart:13:28: Error: A value of type 'Set' can't be assigned to a variable of type 'LinkedHashSet'. - 'Set' is from 'dart:core'. - 'LinkedHashSet' is from 'dart:collection'. LinkedHashSet lhs = {}; ^" in ( block { - final core::Set #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set #t3 = new col::_Set::•(); } =>#t3) as{TypeError,ForNonNullableByDefault} col::LinkedHashSet; col::LinkedHashMap lhm = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule2.dart:14:34: Error: A value of type 'Map' can't be assigned to a variable of type 'LinkedHashMap'. - 'Map' is from 'dart:core'. @@ -83,11 +83,11 @@ static method mapfun() → asy::Future> async / return {}; static method setfun() → asy::Future> async /* futureValueType= core::Set */ return block { - final core::Set #t4 = new col::_InternalLinkedHashSet::•(); + final core::Set #t4 = new col::_Set::•(); } =>#t4; static method iterablefun() → asy::Future> async /* futureValueType= core::Iterable */ return block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); } =>#t5; static method lhsfun() → asy::Future> async /* futureValueType= col::LinkedHashSet */ return invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule2.dart:32:46: Error: A value of type 'Set' can't be returned from an async function with return type 'Future>'. @@ -96,7 +96,7 @@ static method lhsfun() → asy::Future> async /* f - 'LinkedHashSet' is from 'dart:collection'. Future> lhsfun() async => {}; ^" in ( block { - final core::Set #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set #t6 = new col::_Set::•(); } =>#t6) as{TypeError,ForNonNullableByDefault} col::LinkedHashSet; static method lhmfun() → asy::Future> async /* futureValueType= col::LinkedHashMap */ return invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule2.dart:33:52: Error: A value of type 'Map' can't be returned from an async function with return type 'Future>'. @@ -109,11 +109,11 @@ static method mapfun2() → FutureOr> return {}; static method setfun2() → FutureOr> return block { - final core::Set #t7 = new col::_InternalLinkedHashSet::•(); + final core::Set #t7 = new col::_Set::•(); } =>#t7; static method iterablefun2() → FutureOr> return block { - final core::Set #t8 = new col::_InternalLinkedHashSet::•(); + final core::Set #t8 = new col::_Set::•(); } =>#t8; static method lhsfun2() → FutureOr> return invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule2.dart:38:43: Error: A value of type 'Set' can't be returned from a function with return type 'FutureOr>'. @@ -121,7 +121,7 @@ static method lhsfun2() → FutureOr> - 'LinkedHashSet' is from 'dart:collection'. FutureOr> lhsfun2() => {}; ^" in ( block { - final core::Set #t9 = new col::_InternalLinkedHashSet::•(); + final core::Set #t9 = new col::_Set::•(); } =>#t9) as{TypeError,ForNonNullableByDefault} FutureOr>; static method lhmfun2() → FutureOr> return invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule2.dart:39:49: Error: A value of type 'Map' can't be returned from a function with return type 'FutureOr>'. diff --git a/pkg/front_end/testcases/unified_collections/fold_initial.dart.weak.transformed.expect b/pkg/front_end/testcases/unified_collections/fold_initial.dart.weak.transformed.expect index 673b6f001ee7c..9cc81f2d0f7dd 100644 --- a/pkg/front_end/testcases/unified_collections/fold_initial.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/unified_collections/fold_initial.dart.weak.transformed.expect @@ -17,7 +17,7 @@ static method foldInitialElements() → void { } =>#t1; self::expect(core::_GrowableList::generate(7, (core::int* i) → core::int* => i), list); core::Set* set = block { - final core::Set* #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(element0 as{TypeError,ForDynamic} core::int*){(core::int*) →* core::bool*}; #t2.{core::Set::add}{Invariant}(element1 as{TypeError} core::int*){(core::int*) →* core::bool*}; #t2.{core::Set::add}{Invariant}(element2){(core::int*) →* core::bool*}; @@ -51,7 +51,7 @@ static method foldInitialSpread1() → void { } =>#t3; self::expect(core::_GrowableList::generate(7, (core::int* i) → core::int* => i), list); core::Set* set = block { - final core::Set* #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t6 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = (initial as{TypeError,ForDynamic} core::Iterable*).{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -92,7 +92,7 @@ static method foldInitialSpread2() → void { } =>#t9; self::expect(core::_GrowableList::generate(7, (core::int* i) → core::int* => i), list); core::Set* set = block { - final core::Set* #t12 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t12 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = initial.{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -133,7 +133,7 @@ static method foldInitialSpread3() → void { } =>#t15; self::expect(core::_GrowableList::generate(7, (core::int* i) → core::int* => i), list); core::Set* set = block { - final core::Set* #t18 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t18 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = initial.{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -209,7 +209,7 @@ static method foldInitialSpread6() → void { } =>#t25; self::expect(core::_GrowableList::generate(7, (core::int* i) → core::int* => i), list); core::Set* set = block { - final core::Set* #t27 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t27 = new col::_Set::•(); final core::Iterable* #t28 = initial; if(!(#t28 == null)) #t27.{core::Set::addAll}{Invariant}(#t28){(core::Iterable*) →* void}; diff --git a/pkg/front_end/testcases/unified_collections/fold_initial2.dart.weak.transformed.expect b/pkg/front_end/testcases/unified_collections/fold_initial2.dart.weak.transformed.expect index 633fc0e204dd8..9dc9b91b4a503 100644 --- a/pkg/front_end/testcases/unified_collections/fold_initial2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/unified_collections/fold_initial2.dart.weak.transformed.expect @@ -17,7 +17,7 @@ static method foldInitialElements() → void { } =>#t1; self::expect(core::_GrowableList::generate(7, (core::int? i) → core::int? => i), list); core::Set set = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(element0 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int?){(core::int?) → core::bool}; #t2.{core::Set::add}{Invariant}(element1{core::int}){(core::int?) → core::bool}; #t2.{core::Set::add}{Invariant}(element2){(core::int?) → core::bool}; @@ -51,7 +51,7 @@ static method foldInitialSpread1() → void { } =>#t3; self::expect(core::_GrowableList::generate(7, (core::int i) → core::int => i), list); core::Set set = block { - final core::Set #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set #t6 = new col::_Set::•(); { core::Iterator :sync-for-iterator = (initial as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable).{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -178,7 +178,7 @@ static method foldInitialSpread6([core::bool c = #C1]) → void { } =>#t17; self::expect(core::_GrowableList::generate(7, (core::int i) → core::int => i), list); core::Set set = block { - final core::Set #t19 = new col::_InternalLinkedHashSet::•(); + final core::Set #t19 = new col::_Set::•(); final core::Iterable? #t20 = initial; if(!(#t20 == null)) #t19.{core::Set::addAll}{Invariant}(#t20{core::Iterable}){(core::Iterable) → void}; diff --git a/pkg/front_end/testcases/unified_collections/invariance.dart.weak.transformed.expect b/pkg/front_end/testcases/unified_collections/invariance.dart.weak.transformed.expect index bdc91574e562f..c71cf2a2e946b 100644 --- a/pkg/front_end/testcases/unified_collections/invariance.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/unified_collections/invariance.dart.weak.transformed.expect @@ -34,19 +34,19 @@ static method main() → dynamic { #t1.{core::List::add}{Invariant}(2){(core::int*) →* void}; } =>#t1; core::Set* set1 = block { - final core::Set* #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t6 = new col::_Set::•(); #t6.{core::Set::add}{Invariant}(0){(core::int*) →* core::bool*}; } =>#t6; core::Set* set2 = block { - final core::Set* #t7 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t7 = new col::_Set::•(); #t7.{core::Set::add}{Invariant}(0){(core::num*) →* core::bool*}; } =>#t7; dynamic set3 = block { - final core::Set* #t8 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t8 = new col::_Set::•(); #t8.{core::Set::add}{Invariant}(0){(core::int*) →* core::bool*}; } =>#t8; core::Set* set = block { - final core::Set* #t9 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t9 = new col::_Set::•(); #t9.{core::Set::add}{Invariant}(0){(core::int*) →* core::bool*}; #t9.{core::Set::addAll}{Invariant}(set1){(core::Iterable*) →* void}; { diff --git a/pkg/front_end/testcases/unified_collections/invariance2.dart.weak.transformed.expect b/pkg/front_end/testcases/unified_collections/invariance2.dart.weak.transformed.expect index 3470bf4131f45..9db26dec97173 100644 --- a/pkg/front_end/testcases/unified_collections/invariance2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/unified_collections/invariance2.dart.weak.transformed.expect @@ -25,19 +25,19 @@ static method main() → dynamic { #t1.{core::List::add}{Invariant}(2){(core::int?) → void}; } =>#t1; core::Set set1 = block { - final core::Set #t4 = new col::_InternalLinkedHashSet::•(); + final core::Set #t4 = new col::_Set::•(); #t4.{core::Set::add}{Invariant}(0){(core::int) → core::bool}; } =>#t4; core::Set set2 = block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); #t5.{core::Set::add}{Invariant}(0){(core::int?) → core::bool}; } =>#t5; dynamic set3 = block { - final core::Set #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set #t6 = new col::_Set::•(); #t6.{core::Set::add}{Invariant}(0){(core::int) → core::bool}; } =>#t6; core::Set set = block { - final core::Set #t7 = new col::_InternalLinkedHashSet::•(); + final core::Set #t7 = new col::_Set::•(); #t7.{core::Set::add}{Invariant}(0){(core::int?) → core::bool}; #t7.{core::Set::addAll}{Invariant}(set1){(core::Iterable) → void}; #t7.{core::Set::addAll}{Invariant}(set2){(core::Iterable) → void}; diff --git a/pkg/front_end/testcases/unified_collections/set_add_all.dart.weak.transformed.expect b/pkg/front_end/testcases/unified_collections/set_add_all.dart.weak.transformed.expect index eb20a9e849612..c81b1a844cf1b 100644 --- a/pkg/front_end/testcases/unified_collections/set_add_all.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/unified_collections/set_add_all.dart.weak.transformed.expect @@ -6,55 +6,55 @@ import "dart:_internal" as _in; static method useAddAll() → void { dynamic dynamicSet1 = block { - final core::Set* #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t1 = new col::_Set::•(); #t1.{core::Set::add}{Invariant}(0){(core::int*) →* core::bool*}; #t1.{core::Set::add}{Invariant}(1){(core::int*) →* core::bool*}; #t1.{core::Set::add}{Invariant}(2){(core::int*) →* core::bool*}; } =>#t1; dynamic dynamicSet2 = block { - final core::Set* #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(3){(core::num*) →* core::bool*}; #t2.{core::Set::add}{Invariant}(4){(core::num*) →* core::bool*}; #t2.{core::Set::add}{Invariant}(5){(core::num*) →* core::bool*}; } =>#t2; core::Iterable* iterableIntSet = block { - final core::Set* #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t3 = new col::_Set::•(); #t3.{core::Set::add}{Invariant}(6){(core::int*) →* core::bool*}; #t3.{core::Set::add}{Invariant}(7){(core::int*) →* core::bool*}; #t3.{core::Set::add}{Invariant}(8){(core::int*) →* core::bool*}; } =>#t3; core::Iterable* iterableNumSet1 = block { - final core::Set* #t4 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t4 = new col::_Set::•(); #t4.{core::Set::add}{Invariant}(9){(core::int*) →* core::bool*}; #t4.{core::Set::add}{Invariant}(10){(core::int*) →* core::bool*}; #t4.{core::Set::add}{Invariant}(11){(core::int*) →* core::bool*}; } =>#t4; core::Iterable* iterableNumSet2 = block { - final core::Set* #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t5 = new col::_Set::•(); #t5.{core::Set::add}{Invariant}(12){(core::num*) →* core::bool*}; #t5.{core::Set::add}{Invariant}(13){(core::num*) →* core::bool*}; #t5.{core::Set::add}{Invariant}(14){(core::num*) →* core::bool*}; } =>#t5; core::Set* intSet = block { - final core::Set* #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t6 = new col::_Set::•(); #t6.{core::Set::add}{Invariant}(15){(core::int*) →* core::bool*}; #t6.{core::Set::add}{Invariant}(16){(core::int*) →* core::bool*}; #t6.{core::Set::add}{Invariant}(17){(core::int*) →* core::bool*}; } =>#t6; core::Set* numSet1 = block { - final core::Set* #t7 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t7 = new col::_Set::•(); #t7.{core::Set::add}{Invariant}(18){(core::int*) →* core::bool*}; #t7.{core::Set::add}{Invariant}(19){(core::int*) →* core::bool*}; #t7.{core::Set::add}{Invariant}(20){(core::int*) →* core::bool*}; } =>#t7; core::Set* numSet2 = block { - final core::Set* #t8 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t8 = new col::_Set::•(); #t8.{core::Set::add}{Invariant}(21){(core::num*) →* core::bool*}; #t8.{core::Set::add}{Invariant}(22){(core::num*) →* core::bool*}; #t8.{core::Set::add}{Invariant}(23){(core::num*) →* core::bool*}; } =>#t8; core::Set* set1 = block { - final core::Set* #t9 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t9 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = (dynamicSet1 as{TypeError,ForDynamic} core::Iterable*).{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -120,7 +120,7 @@ static method useAddAll() → void { } =>#t9; self::expect(core::_GrowableList::generate(24, (core::int* i) → core::int* => i).{core::Iterable::toSet}(){() →* core::Set*}, set1); core::Set* set2 = block { - final core::Set* #t22 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t22 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = (dynamicSet1 as{TypeError,ForDynamic} core::Iterable*).{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -150,7 +150,7 @@ static method useAddAll() → void { } =>#t22; self::expect(core::_GrowableList::generate(24, (core::int* i) → core::int* => i).{core::Iterable::toSet}(){() →* core::Set*}, set2); core::Set* set3 = block { - final core::Set* #t27 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t27 = new col::_Set::•(); final core::Iterable* #t28 = dynamicSet1 as{TypeError,ForDynamic} core::Iterable*; if(!(#t28 == null)) { core::Iterator* :sync-for-iterator = #t28.{core::Iterable::iterator}{core::Iterator*}; @@ -226,7 +226,7 @@ static method useAddAll() → void { } =>#t27; self::expect(core::_GrowableList::generate(24, (core::int* i) → core::int* => i).{core::Iterable::toSet}(){() →* core::Set*}, set3); core::Set* set4 = block { - final core::Set* #t48 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t48 = new col::_Set::•(); final core::Iterable* #t49 = dynamicSet1 as{TypeError,ForDynamic} core::Iterable*; if(!(#t49 == null)) { core::Iterator* :sync-for-iterator = #t49.{core::Iterable::iterator}{core::Iterator*}; @@ -270,7 +270,7 @@ static method useAddAll() → void { } =>#t48; self::expect(core::_GrowableList::generate(24, (core::int* i) → core::int* => i).{core::Iterable::toSet}(){() →* core::Set*}, set4); core::Set* set5 = block { - final core::Set* #t61 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t61 = new col::_Set::•(); { core::Iterator* :sync-for-iterator = (dynamicSet1 as{TypeError,ForDynamic} core::Iterable*).{core::Iterable::iterator}{core::Iterator*}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -347,7 +347,7 @@ static method useAddAll() → void { } =>#t74; self::expect(core::_GrowableList::generate(24, (core::int* i) → core::int* => i).{core::Iterable::toSet}(){() →* core::Set*}, set6); core::Set* set7 = block { - final core::Set* #t75 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t75 = new col::_Set::•(); final core::Iterable* #t76 = dynamicSet1 as{TypeError,ForDynamic} core::Iterable*; if(!(#t76 == null)) { core::Iterator* :sync-for-iterator = #t76.{core::Iterable::iterator}{core::Iterator*}; @@ -423,7 +423,7 @@ static method useAddAll() → void { } =>#t75; self::expect(core::_GrowableList::generate(24, (core::int* i) → core::int* => i).{core::Iterable::toSet}(){() →* core::Set*}, set7); core::Set* set8 = block { - final core::Set* #t96 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t96 = new col::_Set::•(); final core::Iterable* #t97 = dynamicSet1 as{TypeError,ForDynamic} core::Iterable*; if(!(#t97 == null)) #t96.{core::Set::addAll}{Invariant}(#t97){(core::Iterable*) →* void}; @@ -452,13 +452,13 @@ static method useAddAll() → void { self::expect(core::_GrowableList::generate(24, (core::int* i) → core::int* => i).{core::Iterable::toSet}(){() →* core::Set*}, set8); { core::Set* intSet1 = block { - final core::Set* #t105 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t105 = new col::_Set::•(); #t105.{core::Set::add}{Invariant}(0){(core::int*) →* core::bool*}; #t105.{core::Set::add}{Invariant}(1){(core::int*) →* core::bool*}; #t105.{core::Set::add}{Invariant}(2){(core::int*) →* core::bool*}; } =>#t105; core::Set* intSet2 = block { - final core::Set* #t106 = new col::_InternalLinkedHashSet::•(); + final core::Set* #t106 = new col::_Set::•(); #t106.{core::Set::add}{Invariant}(3){(core::int*) →* core::bool*}; #t106.{core::Set::add}{Invariant}(4){(core::int*) →* core::bool*}; #t106.{core::Set::add}{Invariant}(5){(core::int*) →* core::bool*}; diff --git a/pkg/front_end/testcases/unified_collections/set_add_all_nnbd.dart.weak.transformed.expect b/pkg/front_end/testcases/unified_collections/set_add_all_nnbd.dart.weak.transformed.expect index a4ab1106ed2c7..bb3ed04b9a09b 100644 --- a/pkg/front_end/testcases/unified_collections/set_add_all_nnbd.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/unified_collections/set_add_all_nnbd.dart.weak.transformed.expect @@ -6,37 +6,37 @@ import "dart:_internal" as _in; static method useAddAll() → void { dynamic dynamicSet1 = block { - final core::Set #t1 = new col::_InternalLinkedHashSet::•(); + final core::Set #t1 = new col::_Set::•(); #t1.{core::Set::add}{Invariant}(0){(core::int) → core::bool}; #t1.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t1.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; } =>#t1; dynamic dynamicSet2 = block { - final core::Set #t2 = new col::_InternalLinkedHashSet::•(); + final core::Set #t2 = new col::_Set::•(); #t2.{core::Set::add}{Invariant}(3){(core::num) → core::bool}; #t2.{core::Set::add}{Invariant}(4){(core::num) → core::bool}; #t2.{core::Set::add}{Invariant}(5){(core::num) → core::bool}; } =>#t2; dynamic dynamicSet3 = block { - final core::Set #t3 = new col::_InternalLinkedHashSet::•(); + final core::Set #t3 = new col::_Set::•(); #t3.{core::Set::add}{Invariant}(6){(core::int?) → core::bool}; #t3.{core::Set::add}{Invariant}(7){(core::int?) → core::bool}; #t3.{core::Set::add}{Invariant}(8){(core::int?) → core::bool}; } =>#t3; core::Iterable iterableIntSet = block { - final core::Set #t4 = new col::_InternalLinkedHashSet::•(); + final core::Set #t4 = new col::_Set::•(); #t4.{core::Set::add}{Invariant}(9){(core::int) → core::bool}; #t4.{core::Set::add}{Invariant}(10){(core::int) → core::bool}; #t4.{core::Set::add}{Invariant}(11){(core::int) → core::bool}; } =>#t4; core::Set intSet = block { - final core::Set #t5 = new col::_InternalLinkedHashSet::•(); + final core::Set #t5 = new col::_Set::•(); #t5.{core::Set::add}{Invariant}(12){(core::int) → core::bool}; #t5.{core::Set::add}{Invariant}(13){(core::int) → core::bool}; #t5.{core::Set::add}{Invariant}(14){(core::int) → core::bool}; } =>#t5; core::Set set1 = block { - final core::Set #t6 = new col::_InternalLinkedHashSet::•(); + final core::Set #t6 = new col::_Set::•(); { core::Iterator :sync-for-iterator = (dynamicSet1 as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable).{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -72,7 +72,7 @@ static method useAddAll() → void { } =>#t6; self::expect(core::_GrowableList::generate(15, (core::int i) → core::int => i).{core::Iterable::toSet}(){() → core::Set}, set1); core::Set set2 = block { - final core::Set #t13 = new col::_InternalLinkedHashSet::•(); + final core::Set #t13 = new col::_Set::•(); { core::Iterator :sync-for-iterator = (dynamicSet1 as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable).{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -108,7 +108,7 @@ static method useAddAll() → void { } =>#t13; self::expect(core::_GrowableList::generate(15, (core::int i) → core::int => i).{core::Iterable::toSet}(){() → core::Set}, set2); core::Set set3 = block { - final core::Set #t20 = new col::_InternalLinkedHashSet::•(); + final core::Set #t20 = new col::_Set::•(); { core::Iterator :sync-for-iterator = (dynamicSet1 as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable).{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { @@ -153,13 +153,13 @@ static method useAddAll() → void { self::expect(core::_GrowableList::generate(15, (core::int i) → core::int => i).{core::Iterable::toSet}(){() → core::Set}, set4); { core::Set intSet1 = block { - final core::Set #t28 = new col::_InternalLinkedHashSet::•(); + final core::Set #t28 = new col::_Set::•(); #t28.{core::Set::add}{Invariant}(0){(core::int) → core::bool}; #t28.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t28.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; } =>#t28; core::Set intSet2 = block { - final core::Set #t29 = new col::_InternalLinkedHashSet::•(); + final core::Set #t29 = new col::_Set::•(); #t29.{core::Set::add}{Invariant}(3){(core::int) → core::bool}; #t29.{core::Set::add}{Invariant}(4){(core::int) → core::bool}; #t29.{core::Set::add}{Invariant}(5){(core::int) → core::bool}; @@ -173,37 +173,37 @@ static method useAddAll() → void { } static method useAddAllNullable() → void { dynamic dynamicSet1 = block { - final core::Set #t31 = new col::_InternalLinkedHashSet::•(); + final core::Set #t31 = new col::_Set::•(); #t31.{core::Set::add}{Invariant}(0){(core::int) → core::bool}; #t31.{core::Set::add}{Invariant}(1){(core::int) → core::bool}; #t31.{core::Set::add}{Invariant}(2){(core::int) → core::bool}; } =>#t31; dynamic dynamicSet2 = block { - final core::Set #t32 = new col::_InternalLinkedHashSet::•(); + final core::Set #t32 = new col::_Set::•(); #t32.{core::Set::add}{Invariant}(3){(core::num) → core::bool}; #t32.{core::Set::add}{Invariant}(4){(core::num) → core::bool}; #t32.{core::Set::add}{Invariant}(5){(core::num) → core::bool}; } =>#t32; dynamic dynamicSet3 = block { - final core::Set #t33 = new col::_InternalLinkedHashSet::•(); + final core::Set #t33 = new col::_Set::•(); #t33.{core::Set::add}{Invariant}(6){(core::int?) → core::bool}; #t33.{core::Set::add}{Invariant}(7){(core::int?) → core::bool}; #t33.{core::Set::add}{Invariant}(8){(core::int?) → core::bool}; } =>#t33; core::Iterable? iterableIntSet = true ?{core::Set?} block { - final core::Set #t34 = new col::_InternalLinkedHashSet::•(); + final core::Set #t34 = new col::_Set::•(); #t34.{core::Set::add}{Invariant}(9){(core::int) → core::bool}; #t34.{core::Set::add}{Invariant}(10){(core::int) → core::bool}; #t34.{core::Set::add}{Invariant}(11){(core::int) → core::bool}; } =>#t34 : null; core::Set? intSet = true ?{core::Set?} block { - final core::Set #t35 = new col::_InternalLinkedHashSet::•(); + final core::Set #t35 = new col::_Set::•(); #t35.{core::Set::add}{Invariant}(12){(core::int) → core::bool}; #t35.{core::Set::add}{Invariant}(13){(core::int) → core::bool}; #t35.{core::Set::add}{Invariant}(14){(core::int) → core::bool}; } =>#t35 : null; core::Set set1 = block { - final core::Set #t36 = new col::_InternalLinkedHashSet::•(); + final core::Set #t36 = new col::_Set::•(); final core::Iterable? #t37 = dynamicSet1 as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable?; if(!(#t37 == null)) { core::Iterator :sync-for-iterator = #t37{core::Iterable}.{core::Iterable::iterator}{core::Iterator}; @@ -246,7 +246,7 @@ static method useAddAllNullable() → void { } =>#t36; self::expect(core::_GrowableList::generate(15, (core::int i) → core::int => i).{core::Iterable::toSet}(){() → core::Set}, set1); core::Set set2 = block { - final core::Set #t48 = new col::_InternalLinkedHashSet::•(); + final core::Set #t48 = new col::_Set::•(); final core::Iterable? #t49 = dynamicSet1 as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable?; if(!(#t49 == null)) { core::Iterator :sync-for-iterator = #t49{core::Iterable}.{core::Iterable::iterator}{core::Iterator}; @@ -289,7 +289,7 @@ static method useAddAllNullable() → void { } =>#t48; self::expect(core::_GrowableList::generate(15, (core::int i) → core::int => i).{core::Iterable::toSet}(){() → core::Set}, set2); core::Set set3 = block { - final core::Set #t60 = new col::_InternalLinkedHashSet::•(); + final core::Set #t60 = new col::_Set::•(); final core::Iterable? #t61 = dynamicSet1 as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable?; if(!(#t61 == null)) { core::Iterator :sync-for-iterator = #t61{core::Iterable}.{core::Iterable::iterator}{core::Iterator}; @@ -332,7 +332,7 @@ static method useAddAllNullable() → void { } =>#t60; self::expect(core::_GrowableList::generate(15, (core::int i) → core::int => i).{core::Iterable::toSet}(){() → core::Set}, set3); core::Set set4 = block { - final core::Set #t72 = new col::_InternalLinkedHashSet::•(); + final core::Set #t72 = new col::_Set::•(); final core::Iterable? #t73 = dynamicSet1 as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable?; if(!(#t73 == null)) #t72.{core::Set::addAll}{Invariant}(#t73{core::Iterable}){(core::Iterable) → void}; diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart index 169e534add3b5..d0166e51ca515 100644 --- a/pkg/vm/lib/target/vm.dart +++ b/pkg/vm/lib/target/vm.dart @@ -30,10 +30,10 @@ class VmTarget extends Target { Class? _growableList; Class? _immutableList; - Class? _internalImmutableLinkedHashMap; - Class? _internalImmutableLinkedHashSet; - Class? _internalLinkedHashMap; - Class? _internalLinkedHashSet; + Class? _constMap; + Class? _constSet; + Class? _map; + Class? _set; Class? _record; Class? _oneByteString; Class? _twoByteString; @@ -431,26 +431,24 @@ class VmTarget extends Target { @override Class concreteMapLiteralClass(CoreTypes coreTypes) { - return _internalLinkedHashMap ??= - coreTypes.index.getClass('dart:collection', '_InternalLinkedHashMap'); + return _map ??= coreTypes.index.getClass('dart:collection', '_Map'); } @override Class concreteConstMapLiteralClass(CoreTypes coreTypes) { - return _internalImmutableLinkedHashMap ??= coreTypes.index - .getClass('dart:collection', '_InternalImmutableLinkedHashMap'); + return _constMap ??= + coreTypes.index.getClass('dart:collection', '_ConstMap'); } @override Class concreteSetLiteralClass(CoreTypes coreTypes) { - return _internalLinkedHashSet ??= - coreTypes.index.getClass('dart:collection', '_InternalLinkedHashSet'); + return _set ??= coreTypes.index.getClass('dart:collection', '_Set'); } @override Class concreteConstSetLiteralClass(CoreTypes coreTypes) { - return _internalImmutableLinkedHashSet ??= coreTypes.index - .getClass('dart:collection', '_InternalImmutableLinkedHashSet'); + return _constSet ??= + coreTypes.index.getClass('dart:collection', '_ConstSet'); } @override diff --git a/pkg/vm/lib/transformations/specializer/map_factory_specializer.dart b/pkg/vm/lib/transformations/specializer/map_factory_specializer.dart index e25ce12ebc7b3..2bcb7378271fa 100644 --- a/pkg/vm/lib/transformations/specializer/map_factory_specializer.dart +++ b/pkg/vm/lib/transformations/specializer/map_factory_specializer.dart @@ -9,7 +9,7 @@ import 'package:vm/transformations/specializer/factory_specializer.dart'; /// Replaces invocation of Map factory constructors with /// factories of VM-specific classes. -/// new LinkedHashMap() => new _InternalLinkedHashMap() +/// new LinkedHashMap() => new _Map() class MapFactorySpecializer extends BaseSpecializer { final Procedure _linkedHashMapDefaultFactory; final Constructor _internalLinkedHashMapConstructor; @@ -25,7 +25,7 @@ class MapFactorySpecializer extends BaseSpecializer { _internalLinkedHashMapConstructor = assertNotNull( coreTypes.index.getConstructor( 'dart:collection', - '_InternalLinkedHashMap', + '_Map', '', ), ) { diff --git a/pkg/vm/lib/transformations/specializer/set_factory_specializer.dart b/pkg/vm/lib/transformations/specializer/set_factory_specializer.dart index f76cd70cff389..a181d180c2db2 100644 --- a/pkg/vm/lib/transformations/specializer/set_factory_specializer.dart +++ b/pkg/vm/lib/transformations/specializer/set_factory_specializer.dart @@ -10,7 +10,7 @@ import 'package:vm/transformations/specializer/factory_specializer.dart'; /// Replaces invocation of Set factory constructors with /// factories of VM-specific classes. -/// new LinkedHashSet() => new _InternalLinkedHashSet() +/// new LinkedHashSet() => new _Set() class SetFactorySpecializer extends BaseSpecializer { final Procedure _linkedHashSetDefaultFactory; final Constructor _internalLinkedHashSetConstructor; @@ -26,7 +26,7 @@ class SetFactorySpecializer extends BaseSpecializer { _internalLinkedHashSetConstructor = assertNotNull( coreTypes.index.getConstructor( 'dart:collection', - '_InternalLinkedHashSet', + '_Set', '', ), ) { diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart.expect index 63b00b038341e..d945a88102cc9 100644 --- a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart.expect +++ b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart.expect @@ -10,12 +10,12 @@ class Element extends core::Object { ; } class InheritedElement extends self::Element { -[@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap<#lib::Element, dart.core::Object?>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] final field core::Map _dependents; +[@vm.inferred-type.metadata=dart.collection::_Map<#lib::Element, dart.core::Object?>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] final field core::Map _dependents; synthetic constructor •() → self::InheritedElement : self::InheritedElement::_dependents = {}, super self::Element::•() ; [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:2,getterSelectorId:3] method setDependencies([@vm.inferred-type.metadata=!] self::Element dependent, [@vm.inferred-type.metadata=dart.core::_Smi?] core::Object? value) → void { - [@vm.call-site-attributes.metadata=receiverType:dart.core::Map<#lib::Element, dart.core::Object?>] [@vm.direct-call.metadata=dart.collection::__InternalLinkedHashMap&_HashVMBase&MapMixin&_HashBase&_OperatorEqualsAndHashCode&_LinkedHashMapMixin.[]=] [@vm.inferred-type.metadata=!? (skip check)] [@vm.direct-call.metadata=#lib::InheritedElement._dependents] [@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap<#lib::Element, dart.core::Object?>] this.{self::InheritedElement::_dependents}{core::Map}.{core::Map::[]=}(dependent, value){(self::Element, core::Object?) → void}; + [@vm.call-site-attributes.metadata=receiverType:dart.core::Map<#lib::Element, dart.core::Object?>] [@vm.direct-call.metadata=dart.collection::__Map&_HashVMBase&MapMixin&_HashBase&_OperatorEqualsAndHashCode&_LinkedHashMapMixin.[]=] [@vm.inferred-type.metadata=!? (skip check)] [@vm.direct-call.metadata=#lib::InheritedElement._dependents] [@vm.inferred-type.metadata=dart.collection::_Map<#lib::Element, dart.core::Object?>] this.{self::InheritedElement::_dependents}{core::Map}.{core::Map::[]=}(dependent, value){(self::Element, core::Object?) → void}; } } static method main() → dynamic { diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart.expect index 3d5b38e406cdd..cb26e72d5349e 100644 --- a/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart.expect +++ b/pkg/vm/testcases/transformations/type_flow/transformer/const_map.dart.expect @@ -11,7 +11,7 @@ class _Attribute extends core::Object { : super core::Object::•() ; static method fromReader() → self::_Attribute { - final self::_AttributeName name = [@vm.direct-call.metadata=dart.collection::__InternalImmutableLinkedHashMap&_HashVMImmutableBase&MapMixin&_HashBase&_OperatorEqualsAndCanonicalHashCode&_LinkedHashMapMixin&_UnmodifiableMapMixin&_ImmutableLinkedHashMapMixin.[]] [@vm.inferred-type.metadata=#lib::_AttributeName? (skip check)] #C8.{core::Map::[]}(#C1){(core::Object?) → self::_AttributeName?}!; + final self::_AttributeName name = [@vm.direct-call.metadata=dart.collection::__ConstMap&_HashVMImmutableBase&MapMixin&_HashBase&_OperatorEqualsAndCanonicalHashCode&_LinkedHashMapMixin&_UnmodifiableMapMixin&_ImmutableLinkedHashMapMixin.[]] [@vm.inferred-type.metadata=#lib::_AttributeName? (skip check)] #C8.{core::Map::[]}(#C1){(core::Object?) → self::_AttributeName?}!; return new self::_Attribute::_(); } } diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart.expect index eff141845da9d..0539966f277d5 100644 --- a/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart.expect +++ b/pkg/vm/testcases/transformations/type_flow/transformer/const_set.dart.expect @@ -11,7 +11,7 @@ class _Attribute extends core::Object { : super core::Object::•() ; static method fromReader() → self::_Attribute { - final core::bool name = [@vm.direct-call.metadata=dart.collection::__InternalImmutableLinkedHashSet&_HashVMImmutableBase&SetMixin&_HashBase&_OperatorEqualsAndCanonicalHashCode&_LinkedHashSetMixin&_UnmodifiableSetMixin&_ImmutableLinkedHashSetMixin.contains] [@vm.inferred-type.metadata=!? (skip check)] #C3.{core::Set::contains}(#C2){(core::Object?) → core::bool}; + final core::bool name = [@vm.direct-call.metadata=dart.collection::__ConstSet&_HashVMImmutableBase&SetMixin&_HashBase&_OperatorEqualsAndCanonicalHashCode&_LinkedHashSetMixin&_UnmodifiableSetMixin&_ImmutableLinkedHashSetMixin.contains] [@vm.inferred-type.metadata=!? (skip check)] #C3.{core::Set::contains}(#C2){(core::Object?) → core::bool}; return let final self::_AttributeName #t1 = #C8.{core::List::[]}(#C2){(core::int) → self::_AttributeName} in new self::_Attribute::_(); } } diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/set_map_constructor_concrete.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/set_map_constructor_concrete.dart.expect index 0dd6380312121..b08f9e9642b65 100644 --- a/pkg/vm/testcases/transformations/type_flow/transformer/set_map_constructor_concrete.dart.expect +++ b/pkg/vm/testcases/transformations/type_flow/transformer/set_map_constructor_concrete.dart.expect @@ -6,29 +6,29 @@ import "dart:collection" as col; import "dart:collection"; import "dart:core"; -[@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashSet?]static field core::Set globalSet = new col::_InternalLinkedHashSet::•(); +[@vm.inferred-type.metadata=dart.collection::_Set?]static field core::Set globalSet = new col::_Set::•(); [@vm.inferred-type.metadata=dart.collection::_CompactLinkedIdentityHashSet?]static field core::Set identitySet = [@vm.inferred-type.metadata=dart.collection::_CompactLinkedIdentityHashSet] col::LinkedHashSet::identity(); -[@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashSet?]static field core::Set linkedSet = new col::_InternalLinkedHashSet::•(); +[@vm.inferred-type.metadata=dart.collection::_Set?]static field core::Set linkedSet = new col::_Set::•(); static field core::Set linkedIdentitySet = [@vm.inferred-type.metadata=!] col::LinkedHashSet::•(#C1, #C2); static field core::Set linkedCustomSet = let final (core::String, core::String) → core::bool #t1 = (core::String a, core::String b) → core::bool => [@vm.inferred-type.metadata=!? (receiver not int)] a =={core::String::==}{(core::Object) → core::bool} b in let final (core::String) → core::int #t2 = (core::String o) → core::int => o.{core::String::hashCode}{core::int} in let final (dynamic) → core::bool #t3 = (dynamic o) → core::bool => true in [@vm.inferred-type.metadata=!] col::LinkedHashSet::•(#t1, #t2, isValidKey: #t3); -[@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap?]static field core::Map globalMap = [@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap] core::Map::•(); +[@vm.inferred-type.metadata=dart.collection::_Map?]static field core::Map globalMap = [@vm.inferred-type.metadata=dart.collection::_Map] core::Map::•(); [@vm.inferred-type.metadata=dart.collection::_CompactLinkedIdentityHashMap?]static field core::Map identityMap = [@vm.inferred-type.metadata=dart.collection::_CompactLinkedIdentityHashMap] col::LinkedHashMap::identity(); [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView?]static field core::Map unmodifiableMap = [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView] core::Map::unmodifiable([@vm.inferred-type.metadata=dart.collection::_CompactLinkedIdentityHashMap?] self::identityMap); -[@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap?]static field core::Map globalMapLiteral = {}; -[@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap?]static field core::Map linkedMap = new col::_InternalLinkedHashMap::•(); +[@vm.inferred-type.metadata=dart.collection::_Map?]static field core::Map globalMapLiteral = {}; +[@vm.inferred-type.metadata=dart.collection::_Map?]static field core::Map linkedMap = new col::_Map::•(); static field core::Map linkedIdentityMap = [@vm.inferred-type.metadata=!] col::LinkedHashMap::•(#C1, #C2); static field core::Map linkedCustomMap = let final (core::String, core::String) → core::bool #t4 = (core::String a, core::String b) → core::bool => [@vm.inferred-type.metadata=!? (receiver not int)] a =={core::String::==}{(core::Object) → core::bool} b in let final (core::String) → core::int #t5 = (core::String o) → core::int => o.{core::String::hashCode}{core::int} in let final (dynamic) → core::bool #t6 = (dynamic o) → core::bool => true in [@vm.inferred-type.metadata=!] col::LinkedHashMap::•(#t4, #t5, isValidKey: #t6); static method main() → dynamic { - core::print([@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashSet?] self::globalSet); + core::print([@vm.inferred-type.metadata=dart.collection::_Set?] self::globalSet); core::print([@vm.inferred-type.metadata=dart.collection::_CompactLinkedIdentityHashSet?] self::identitySet); - core::print([@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashSet?] self::linkedSet); + core::print([@vm.inferred-type.metadata=dart.collection::_Set?] self::linkedSet); core::print(self::linkedIdentitySet); core::print(self::linkedCustomSet); - core::print([@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap?] self::globalMap); - core::print([@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap?] self::globalMapLiteral); + core::print([@vm.inferred-type.metadata=dart.collection::_Map?] self::globalMap); + core::print([@vm.inferred-type.metadata=dart.collection::_Map?] self::globalMapLiteral); core::print([@vm.inferred-type.metadata=dart.collection::_CompactLinkedIdentityHashMap?] self::identityMap); core::print([@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView?] self::unmodifiableMap); - core::print([@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap?] self::linkedMap); + core::print([@vm.inferred-type.metadata=dart.collection::_Map?] self::linkedMap); core::print(self::linkedIdentityMap); core::print(self::linkedCustomMap); } diff --git a/pkg/vm_service/test/get_object_rpc_test.dart b/pkg/vm_service/test/get_object_rpc_test.dart index c722d98f2ced4..b437b65c2787b 100644 --- a/pkg/vm_service/test/get_object_rpc_test.dart +++ b/pkg/vm_service/test/get_object_rpc_test.dart @@ -324,10 +324,10 @@ var tests = [ final objectId = evalResult.id!; final result = await service.getObject(isolateId, objectId) as Instance; expect(result.kind, InstanceKind.kMap); - expect(result.json!['_vmType'], equals('LinkedHashMap')); + expect(result.json!['_vmType'], equals('Map')); expect(result.id, startsWith('objects/')); expect(result.valueAsString, isNull); - expect(result.classRef!.name, equals('_InternalLinkedHashMap')); + expect(result.classRef!.name, equals('_Map')); expect(result.size, isPositive); expect(result.fields, isEmpty); expect(result.length, equals(3)); @@ -366,10 +366,10 @@ var tests = [ final result = await service.getObject(isolateId, objectId, count: 2) as Instance; expect(result.kind, InstanceKind.kMap); - expect(result.json!['_vmType'], equals('LinkedHashMap')); + expect(result.json!['_vmType'], equals('Map')); expect(result.id, startsWith('objects/')); expect(result.valueAsString, isNull); - expect(result.classRef!.name, equals('_InternalLinkedHashMap')); + expect(result.classRef!.name, equals('_Map')); expect(result.size, isPositive); expect(result.fields, isEmpty); expect(result.length, equals(3)); @@ -402,10 +402,10 @@ var tests = [ final result = await service.getObject(isolateId, objectId, offset: 2, count: 2) as Instance; expect(result.kind, InstanceKind.kMap); - expect(result.json!['_vmType'], equals('LinkedHashMap')); + expect(result.json!['_vmType'], equals('Map')); expect(result.id, startsWith('objects/')); expect(result.valueAsString, isNull); - expect(result.classRef!.name, equals('_InternalLinkedHashMap')); + expect(result.classRef!.name, equals('_Map')); expect(result.size, isPositive); expect(result.fields, isEmpty); expect(result.length, equals(3)); @@ -432,10 +432,10 @@ var tests = [ final result = await service.getObject(isolateId, objectId, offset: 100, count: 2) as Instance; expect(result.kind, InstanceKind.kMap); - expect(result.json!['_vmType'], equals('LinkedHashMap')); + expect(result.json!['_vmType'], equals('Map')); expect(result.id, startsWith('objects/')); expect(result.valueAsString, isNull); - expect(result.classRef!.name, equals('_InternalLinkedHashMap')); + expect(result.classRef!.name, equals('_Map')); expect(result.size, isPositive); expect(result.fields, isEmpty); expect(result.length, equals(3)); @@ -454,10 +454,10 @@ var tests = [ final objectId = evalResult.id!; final result = await service.getObject(isolateId, objectId) as Instance; expect(result.kind, InstanceKind.kSet); - expect(result.json!['_vmType'], equals('LinkedHashSet')); + expect(result.json!['_vmType'], equals('Set')); expect(result.id, startsWith('objects/')); expect(result.valueAsString, isNull); - expect(result.classRef!.name, equals('_InternalLinkedHashSet')); + expect(result.classRef!.name, equals('_Set')); expect(result.size, isPositive); expect(result.fields, isEmpty); expect(result.length, equals(3)); diff --git a/runtime/observatory/tests/service/get_object_rpc_test.dart b/runtime/observatory/tests/service/get_object_rpc_test.dart index 6749c5a36f7ff..54ef0de2f390c 100644 --- a/runtime/observatory/tests/service/get_object_rpc_test.dart +++ b/runtime/observatory/tests/service/get_object_rpc_test.dart @@ -342,11 +342,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Map')); - expect(result['_vmType'], equals('LinkedHashMap')); + expect(result['_vmType'], equals('Map')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashMap')); + expect(result['class']['name'], equals('_Map')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); @@ -384,11 +384,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Map')); - expect(result['_vmType'], equals('LinkedHashMap')); + expect(result['_vmType'], equals('Map')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashMap')); + expect(result['class']['name'], equals('_Map')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); @@ -421,11 +421,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Map')); - expect(result['_vmType'], equals('LinkedHashMap')); + expect(result['_vmType'], equals('Map')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashMap')); + expect(result['class']['name'], equals('_Map')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); @@ -452,11 +452,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Map')); - expect(result['_vmType'], equals('LinkedHashMap')); + expect(result['_vmType'], equals('Map')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashMap')); + expect(result['class']['name'], equals('_Map')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); @@ -475,11 +475,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Set')); - expect(result['_vmType'], equals('LinkedHashSet')); + expect(result['_vmType'], equals('Set')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashSet')); + expect(result['class']['name'], equals('_Set')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); diff --git a/runtime/observatory_2/tests/service_2/get_object_rpc_test.dart b/runtime/observatory_2/tests/service_2/get_object_rpc_test.dart index d2094b5308f14..52a46b2362f66 100644 --- a/runtime/observatory_2/tests/service_2/get_object_rpc_test.dart +++ b/runtime/observatory_2/tests/service_2/get_object_rpc_test.dart @@ -340,11 +340,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Map')); - expect(result['_vmType'], equals('LinkedHashMap')); + expect(result['_vmType'], equals('Map')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashMap')); + expect(result['class']['name'], equals('_Map')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); @@ -382,11 +382,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Map')); - expect(result['_vmType'], equals('LinkedHashMap')); + expect(result['_vmType'], equals('Map')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashMap')); + expect(result['class']['name'], equals('_Map')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); @@ -419,11 +419,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Map')); - expect(result['_vmType'], equals('LinkedHashMap')); + expect(result['_vmType'], equals('Map')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashMap')); + expect(result['class']['name'], equals('_Map')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); @@ -450,11 +450,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Map')); - expect(result['_vmType'], equals('LinkedHashMap')); + expect(result['_vmType'], equals('Map')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashMap')); + expect(result['class']['name'], equals('_Map')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); @@ -473,11 +473,11 @@ var tests = [ var result = await isolate.invokeRpcNoUpgrade('getObject', params); expect(result['type'], equals('Instance')); expect(result['kind'], equals('Set')); - expect(result['_vmType'], equals('LinkedHashSet')); + expect(result['_vmType'], equals('Set')); expect(result['id'], startsWith('objects/')); expect(result['valueAsString'], isNull); expect(result['class']['type'], equals('@Class')); - expect(result['class']['name'], equals('_InternalLinkedHashSet')); + expect(result['class']['name'], equals('_Set')); expect(result['size'], isPositive); expect(result['fields'], isEmpty); expect(result['length'], equals(3)); diff --git a/runtime/tools/heapsnapshot/lib/src/expression.dart b/runtime/tools/heapsnapshot/lib/src/expression.dart index feee6c321f49e..a218df7f3e39f 100644 --- a/runtime/tools/heapsnapshot/lib/src/expression.dart +++ b/runtime/tools/heapsnapshot/lib/src/expression.dart @@ -31,13 +31,9 @@ class FilterExpression extends SetExpression { } else if (pattern == 'List') { return ['_List', '_GrowableList', '_ImmutableList']; } else if (pattern == 'Map') { - return [ - '_HashMap', - '_CompactLinkedHashSet', - '_CompactImmutableLinkedHashSet', - '_InternalLinkedHashMap', - '_InternalImmutableLinkedHashMap' - ]; + return ['_HashMap', '_Map', '_ConstMap']; + } else if (pattern == 'Set') { + return ['_HashSet', '_Set', '_ConstSet']; } return [pattern]; }) diff --git a/runtime/vm/app_snapshot.cc b/runtime/vm/app_snapshot.cc index 4fd99435dcf0b..b33dd1dd16d25 100644 --- a/runtime/vm/app_snapshot.cc +++ b/runtime/vm/app_snapshot.cc @@ -5443,20 +5443,20 @@ class WeakPropertyDeserializationCluster : public DeserializationCluster { }; #if !defined(DART_PRECOMPILED_RUNTIME) -class LinkedHashMapSerializationCluster : public SerializationCluster { +class MapSerializationCluster : public SerializationCluster { public: - LinkedHashMapSerializationCluster(bool is_canonical, intptr_t cid) - : SerializationCluster("LinkedHashMap", + MapSerializationCluster(bool is_canonical, intptr_t cid) + : SerializationCluster("Map", cid, - compiler::target::LinkedHashMap::InstanceSize(), + compiler::target::Map::InstanceSize(), is_canonical) {} - ~LinkedHashMapSerializationCluster() {} + ~MapSerializationCluster() {} void Trace(Serializer* s, ObjectPtr object) { - LinkedHashMapPtr map = LinkedHashMap::RawCast(object); + MapPtr map = Map::RawCast(object); // We never have mutable hashmaps in snapshots. ASSERT(map->untag()->IsCanonical()); - ASSERT_EQUAL(map.GetClassId(), kImmutableLinkedHashMapCid); + ASSERT_EQUAL(map.GetClassId(), kConstMapCid); objects_.Add(map); PushFromTo(map); } @@ -5465,7 +5465,7 @@ class LinkedHashMapSerializationCluster : public SerializationCluster { const intptr_t count = objects_.length(); s->WriteUnsigned(count); for (intptr_t i = 0; i < count; i++) { - LinkedHashMapPtr map = objects_[i]; + MapPtr map = objects_[i]; s->AssignRef(map); } } @@ -5473,27 +5473,27 @@ class LinkedHashMapSerializationCluster : public SerializationCluster { void WriteFill(Serializer* s) { const intptr_t count = objects_.length(); for (intptr_t i = 0; i < count; i++) { - LinkedHashMapPtr map = objects_[i]; + MapPtr map = objects_[i]; AutoTraceObject(map); WriteFromTo(map); } } private: - GrowableArray objects_; + GrowableArray objects_; }; #endif // !DART_PRECOMPILED_RUNTIME -class LinkedHashMapDeserializationCluster +class MapDeserializationCluster : public AbstractInstanceDeserializationCluster { public: - explicit LinkedHashMapDeserializationCluster(bool is_canonical, intptr_t cid) - : AbstractInstanceDeserializationCluster("LinkedHashMap", is_canonical), + explicit MapDeserializationCluster(bool is_canonical, intptr_t cid) + : AbstractInstanceDeserializationCluster("Map", is_canonical), cid_(cid) {} - ~LinkedHashMapDeserializationCluster() {} + ~MapDeserializationCluster() {} void ReadAlloc(Deserializer* d) { - ReadAllocFixedSize(d, LinkedHashMap::InstanceSize()); + ReadAllocFixedSize(d, Map::InstanceSize()); } void ReadFill(Deserializer* d_, bool primary) { @@ -5502,8 +5502,8 @@ class LinkedHashMapDeserializationCluster const intptr_t cid = cid_; const bool mark_canonical = primary && is_canonical(); for (intptr_t id = start_index_, n = stop_index_; id < n; id++) { - LinkedHashMapPtr map = static_cast(d.Ref(id)); - Deserializer::InitializeHeader(map, cid, LinkedHashMap::InstanceSize(), + MapPtr map = static_cast(d.Ref(id)); + Deserializer::InitializeHeader(map, cid, Map::InstanceSize(), mark_canonical); d.ReadFromTo(map); } @@ -5514,20 +5514,20 @@ class LinkedHashMapDeserializationCluster }; #if !defined(DART_PRECOMPILED_RUNTIME) -class LinkedHashSetSerializationCluster : public SerializationCluster { +class SetSerializationCluster : public SerializationCluster { public: - LinkedHashSetSerializationCluster(bool is_canonical, intptr_t cid) - : SerializationCluster("LinkedHashSet", + SetSerializationCluster(bool is_canonical, intptr_t cid) + : SerializationCluster("Set", cid, - compiler::target::LinkedHashSet::InstanceSize(), + compiler::target::Set::InstanceSize(), is_canonical) {} - ~LinkedHashSetSerializationCluster() {} + ~SetSerializationCluster() {} void Trace(Serializer* s, ObjectPtr object) { - LinkedHashSetPtr set = LinkedHashSet::RawCast(object); + SetPtr set = Set::RawCast(object); // We never have mutable hashsets in snapshots. ASSERT(set->untag()->IsCanonical()); - ASSERT_EQUAL(set.GetClassId(), kImmutableLinkedHashSetCid); + ASSERT_EQUAL(set.GetClassId(), kConstSetCid); objects_.Add(set); PushFromTo(set); } @@ -5536,7 +5536,7 @@ class LinkedHashSetSerializationCluster : public SerializationCluster { const intptr_t count = objects_.length(); s->WriteUnsigned(count); for (intptr_t i = 0; i < count; i++) { - LinkedHashSetPtr set = objects_[i]; + SetPtr set = objects_[i]; s->AssignRef(set); } } @@ -5544,27 +5544,27 @@ class LinkedHashSetSerializationCluster : public SerializationCluster { void WriteFill(Serializer* s) { const intptr_t count = objects_.length(); for (intptr_t i = 0; i < count; i++) { - LinkedHashSetPtr set = objects_[i]; + SetPtr set = objects_[i]; AutoTraceObject(set); WriteFromTo(set); } } private: - GrowableArray objects_; + GrowableArray objects_; }; #endif // !DART_PRECOMPILED_RUNTIME -class LinkedHashSetDeserializationCluster +class SetDeserializationCluster : public AbstractInstanceDeserializationCluster { public: - explicit LinkedHashSetDeserializationCluster(bool is_canonical, intptr_t cid) - : AbstractInstanceDeserializationCluster("LinkedHashSet", is_canonical), + explicit SetDeserializationCluster(bool is_canonical, intptr_t cid) + : AbstractInstanceDeserializationCluster("Set", is_canonical), cid_(cid) {} - ~LinkedHashSetDeserializationCluster() {} + ~SetDeserializationCluster() {} void ReadAlloc(Deserializer* d) { - ReadAllocFixedSize(d, LinkedHashSet::InstanceSize()); + ReadAllocFixedSize(d, Set::InstanceSize()); } void ReadFill(Deserializer* d_, bool primary) { @@ -5573,8 +5573,8 @@ class LinkedHashSetDeserializationCluster const intptr_t cid = cid_; const bool mark_canonical = primary && is_canonical(); for (intptr_t id = start_index_, n = stop_index_; id < n; id++) { - LinkedHashSetPtr set = static_cast(d.Ref(id)); - Deserializer::InitializeHeader(set, cid, LinkedHashSet::InstanceSize(), + SetPtr set = static_cast(d.Ref(id)); + Deserializer::InitializeHeader(set, cid, Set::InstanceSize(), mark_canonical); d.ReadFromTo(set); } @@ -7031,18 +7031,16 @@ SerializationCluster* Serializer::NewClusterForClass(intptr_t cid, return new (Z) RegExpSerializationCluster(); case kWeakPropertyCid: return new (Z) WeakPropertySerializationCluster(); - case kLinkedHashMapCid: + case kMapCid: // We do not have mutable hash maps in snapshots. UNREACHABLE(); - case kImmutableLinkedHashMapCid: - return new (Z) LinkedHashMapSerializationCluster( - is_canonical, kImmutableLinkedHashMapCid); - case kLinkedHashSetCid: + case kConstMapCid: + return new (Z) MapSerializationCluster(is_canonical, kConstMapCid); + case kSetCid: // We do not have mutable hash sets in snapshots. UNREACHABLE(); - case kImmutableLinkedHashSetCid: - return new (Z) LinkedHashSetSerializationCluster( - is_canonical, kImmutableLinkedHashSetCid); + case kConstSetCid: + return new (Z) SetSerializationCluster(is_canonical, kConstSetCid); case kArrayCid: return new (Z) ArraySerializationCluster(is_canonical, kArrayCid); case kImmutableArrayCid: @@ -8198,18 +8196,16 @@ DeserializationCluster* Deserializer::ReadCluster() { case kWeakPropertyCid: ASSERT(!is_canonical); return new (Z) WeakPropertyDeserializationCluster(); - case kLinkedHashMapCid: + case kMapCid: // We do not have mutable hash maps in snapshots. UNREACHABLE(); - case kImmutableLinkedHashMapCid: - return new (Z) LinkedHashMapDeserializationCluster( - is_canonical, kImmutableLinkedHashMapCid); - case kLinkedHashSetCid: + case kConstMapCid: + return new (Z) MapDeserializationCluster(is_canonical, kConstMapCid); + case kSetCid: // We do not have mutable hash sets in snapshots. UNREACHABLE(); - case kImmutableLinkedHashSetCid: - return new (Z) LinkedHashSetDeserializationCluster( - is_canonical, kImmutableLinkedHashSetCid); + case kConstSetCid: + return new (Z) SetDeserializationCluster(is_canonical, kConstSetCid); case kArrayCid: return new (Z) ArrayDeserializationCluster(is_canonical, kArrayCid); case kImmutableArrayCid: diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc index 0df052068736f..d9f7a43f04a96 100644 --- a/runtime/vm/bootstrap.cc +++ b/runtime/vm/bootstrap.cc @@ -96,13 +96,13 @@ static void Finish(Thread* thread) { cls.EnsureIsFinalized(thread); cls = object_store->immutable_array_class(); cls.EnsureIsFinalized(thread); - cls = object_store->linked_hash_map_class(); + cls = object_store->map_impl_class(); cls.EnsureIsFinalized(thread); - cls = object_store->immutable_linked_hash_map_class(); + cls = object_store->const_map_impl_class(); cls.EnsureIsFinalized(thread); - cls = object_store->linked_hash_set_class(); + cls = object_store->set_impl_class(); cls.EnsureIsFinalized(thread); - cls = object_store->immutable_linked_hash_set_class(); + cls = object_store->const_set_impl_class(); cls.EnsureIsFinalized(thread); } diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc index c7a1028341c55..b37ed066e7d0c 100644 --- a/runtime/vm/class_finalizer.cc +++ b/runtime/vm/class_finalizer.cc @@ -271,14 +271,14 @@ void ClassFinalizer::VerifyBootstrapClasses() { ASSERT_EQUAL(Finalizer::InstanceSize(), cls.host_instance_size()); cls = object_store->finalizer_entry_class(); ASSERT_EQUAL(FinalizerEntry::InstanceSize(), cls.host_instance_size()); - cls = object_store->linked_hash_map_class(); - ASSERT_EQUAL(LinkedHashMap::InstanceSize(), cls.host_instance_size()); - cls = object_store->immutable_linked_hash_map_class(); - ASSERT_EQUAL(LinkedHashMap::InstanceSize(), cls.host_instance_size()); - cls = object_store->linked_hash_set_class(); - ASSERT_EQUAL(LinkedHashSet::InstanceSize(), cls.host_instance_size()); - cls = object_store->immutable_linked_hash_set_class(); - ASSERT_EQUAL(LinkedHashSet::InstanceSize(), cls.host_instance_size()); + cls = object_store->map_impl_class(); + ASSERT_EQUAL(Map::InstanceSize(), cls.host_instance_size()); + cls = object_store->const_map_impl_class(); + ASSERT_EQUAL(Map::InstanceSize(), cls.host_instance_size()); + cls = object_store->set_impl_class(); + ASSERT_EQUAL(Set::InstanceSize(), cls.host_instance_size()); + cls = object_store->const_set_impl_class(); + ASSERT_EQUAL(Set::InstanceSize(), cls.host_instance_size()); #endif // defined(DEBUG) // Remember the currently pending classes. diff --git a/runtime/vm/class_id.h b/runtime/vm/class_id.h index 84a230c7b92e4..2beb5a6fc34c7 100644 --- a/runtime/vm/class_id.h +++ b/runtime/vm/class_id.h @@ -110,12 +110,12 @@ typedef uint16_t ClassIdTagType; CLASS_LIST_INTERNAL_ONLY(V) CLASS_LIST_INSTANCE_SINGLETONS(V) #define CLASS_LIST_MAPS(V) \ - V(LinkedHashMap) \ - V(ImmutableLinkedHashMap) + V(Map) \ + V(ConstMap) #define CLASS_LIST_SETS(V) \ - V(LinkedHashSet) \ - V(ImmutableLinkedHashSet) + V(Set) \ + V(ConstSet) #define CLASS_LIST_FIXED_LENGTH_ARRAYS(V) \ V(Array) \ @@ -190,8 +190,8 @@ typedef uint16_t ClassIdTagType; #define CLASS_LIST_FOR_HANDLES(V) \ CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP(V) \ - V(LinkedHashMap) \ - V(LinkedHashSet) \ + V(Map) \ + V(Set) \ V(Array) \ V(GrowableObjectArray) \ V(String) diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc index 5de5b8b876455..10f4dc30aa7ea 100644 --- a/runtime/vm/compiler/aot/precompiler.cc +++ b/runtime/vm/compiler/aot/precompiler.cc @@ -2510,10 +2510,9 @@ class ConstantInstanceVisitor { } break; } - case kImmutableLinkedHashMapCid: { - const LinkedHashMap& map = - LinkedHashMap::Handle(LinkedHashMap::RawCast(object_ptr)); - LinkedHashMap::Iterator iterator(map); + case kConstMapCid: { + const Map& map = Map::Handle(Map::RawCast(object_ptr)); + Map::Iterator iterator(map); while (iterator.MoveNext()) { ObjectPtr element = iterator.CurrentKey(); Visit(element); @@ -2532,10 +2531,9 @@ class ConstantInstanceVisitor { } break; } - case kImmutableLinkedHashSetCid: { - const LinkedHashSet& set = - LinkedHashSet::Handle(LinkedHashSet::RawCast(object_ptr)); - LinkedHashSet::Iterator iterator(set); + case kConstSetCid: { + const Set& set = Set::Handle(Set::RawCast(object_ptr)); + Set::Iterator iterator(set); while (iterator.MoveNext()) { ObjectPtr element = iterator.CurrentKey(); Visit(element); diff --git a/runtime/vm/compiler/backend/il_serializer.cc b/runtime/vm/compiler/backend/il_serializer.cc index 5910c8c5fe37d..7cbfed8f6efe9 100644 --- a/runtime/vm/compiler/backend/il_serializer.cc +++ b/runtime/vm/compiler/backend/il_serializer.cc @@ -1553,8 +1553,8 @@ void FlowGraphSerializer::WriteObjectImpl(const Object& x, } break; } - case kImmutableLinkedHashMapCid: - case kImmutableLinkedHashSetCid: { + case kConstMapCid: + case kConstSetCid: { const auto& map = LinkedHashBase::Cast(x); ASSERT(map.IsCanonical()); const intptr_t length = map.Length(); @@ -1564,7 +1564,7 @@ void FlowGraphSerializer::WriteObjectImpl(const Object& x, const auto& data = Array::Handle(Z, map.data()); auto& elem = Object::Handle(Z); intptr_t used_data; - if (cid == kImmutableLinkedHashMapCid) { + if (cid == kConstMapCid) { used_data = length << 1; } else { used_data = length; @@ -1830,17 +1830,17 @@ const Object& FlowGraphDeserializer::ReadObjectImpl(intptr_t cid, } break; } - case kImmutableLinkedHashMapCid: - case kImmutableLinkedHashSetCid: { + case kConstMapCid: + case kConstSetCid: { const intptr_t length = Read(); const auto& type_args = Read(); Instance& result = Instance::ZoneHandle(Z); intptr_t used_data; - if (cid == kImmutableLinkedHashMapCid) { - result = ImmutableLinkedHashMap::NewUninitialized(Heap::kOld); + if (cid == kConstMapCid) { + result = ConstMap::NewUninitialized(Heap::kOld); used_data = (length << 1); } else { - result = ImmutableLinkedHashSet::NewUninitialized(Heap::kOld); + result = ConstSet::NewUninitialized(Heap::kOld); used_data = length; } // LinkedHashBase is not a proper handle type, so diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h index f8f0d77e89c49..bdbfd492e9217 100644 --- a/runtime/vm/compiler/backend/slot.h +++ b/runtime/vm/compiler/backend/slot.h @@ -54,7 +54,7 @@ class ParsedFunction; #define NULLABLE_BOXED_NATIVE_SLOTS_LIST(V) \ V(Array, UntaggedArray, type_arguments, TypeArguments, FINAL) \ V(Finalizer, UntaggedFinalizer, type_arguments, TypeArguments, FINAL) \ - V(FinalizerBase, UntaggedFinalizerBase, all_entries, LinkedHashSet, VAR) \ + V(FinalizerBase, UntaggedFinalizerBase, all_entries, Set, VAR) \ V(FinalizerBase, UntaggedFinalizerBase, detachments, Dynamic, VAR) \ V(FinalizerBase, UntaggedFinalizer, entries_collected, FinalizerEntry, VAR) \ V(FinalizerEntry, UntaggedFinalizerEntry, value, Dynamic, VAR) \ diff --git a/runtime/vm/compiler/frontend/constant_reader.cc b/runtime/vm/compiler/frontend/constant_reader.cc index 93dd2056a3d12..0ec98adb9d71b 100644 --- a/runtime/vm/compiler/frontend/constant_reader.cc +++ b/runtime/vm/compiler/frontend/constant_reader.cc @@ -264,8 +264,7 @@ InstancePtr ConstantReader::ReadConstantInternal(intptr_t constant_index) { } case kMapConstant: { const auto& map_class = Class::Handle( - Z, - H.isolate_group()->object_store()->immutable_linked_hash_map_class()); + Z, H.isolate_group()->object_store()->const_map_impl_class()); ASSERT(!map_class.IsNull()); ASSERT(map_class.is_finalized()); @@ -287,9 +286,8 @@ InstancePtr ConstantReader::ReadConstantInternal(intptr_t constant_index) { type_arguments = type.arguments(); // Fill map with constant elements. - const auto& map = LinkedHashMap::Handle( - Z, ImmutableLinkedHashMap::NewUninitialized(Heap::kOld)); - ASSERT_EQUAL(map.GetClassId(), kImmutableLinkedHashMapCid); + const auto& map = Map::Handle(Z, ConstMap::NewUninitialized(Heap::kOld)); + ASSERT_EQUAL(map.GetClassId(), kConstMapCid); map.SetTypeArguments(type_arguments); const intptr_t length = reader.ReadUInt(); const intptr_t used_data = (length << 1); @@ -359,8 +357,7 @@ InstancePtr ConstantReader::ReadConstantInternal(intptr_t constant_index) { } case kSetConstant: { const auto& set_class = Class::Handle( - Z, - H.isolate_group()->object_store()->immutable_linked_hash_set_class()); + Z, H.isolate_group()->object_store()->const_set_impl_class()); ASSERT(!set_class.IsNull()); ASSERT(set_class.is_finalized()); @@ -380,9 +377,8 @@ InstancePtr ConstantReader::ReadConstantInternal(intptr_t constant_index) { type_arguments = type.arguments(); // Fill set with constant elements. - const auto& set = LinkedHashSet::Handle( - Z, ImmutableLinkedHashSet::NewUninitialized(Heap::kOld)); - ASSERT_EQUAL(set.GetClassId(), kImmutableLinkedHashSetCid); + const auto& set = Set::Handle(Z, ConstSet::NewUninitialized(Heap::kOld)); + ASSERT_EQUAL(set.GetClassId(), kConstSetCid); set.SetTypeArguments(type_arguments); const intptr_t length = reader.ReadUInt(); const intptr_t used_data = length; diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc index 60e4f3ff57755..3e60e59da2059 100644 --- a/runtime/vm/compiler/runtime_api.cc +++ b/runtime/vm/compiler/runtime_api.cc @@ -451,10 +451,10 @@ static uword GetInstanceSizeImpl(const dart::Class& handle) { return Closure::InstanceSize(); case kTypedDataBaseCid: return TypedDataBase::InstanceSize(); - case kLinkedHashMapCid: - return LinkedHashMap::InstanceSize(); - case kLinkedHashSetCid: - return LinkedHashSet::InstanceSize(); + case kMapCid: + return Map::InstanceSize(); + case kSetCid: + return Set::InstanceSize(); case kUnhandledExceptionCid: return UnhandledException::InstanceSize(); case kWeakPropertyCid: diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h index c529d99beb663..9e1500c2496ad 100644 --- a/runtime/vm/compiler/runtime_api.h +++ b/runtime/vm/compiler/runtime_api.h @@ -659,12 +659,12 @@ class ImmutableLinkedHashBase : public LinkedHashBase { static word data_offset(); }; -class LinkedHashMap : public LinkedHashBase { +class Map : public LinkedHashBase { public: FINAL_CLASS(); }; -class LinkedHashSet : public LinkedHashBase { +class Set : public LinkedHashBase { public: FINAL_CLASS(); }; diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc index 49f6de967b3a9..70e0eccc11131 100644 --- a/runtime/vm/isolate.cc +++ b/runtime/vm/isolate.cc @@ -2489,7 +2489,7 @@ void Isolate::RunAndCleanupFinalizersOnShutdown() { auto& weak_reference = WeakReference::Handle(stack_zone.GetZone()); auto& finalizer = FinalizerBase::Handle(stack_zone.GetZone()); auto& current_entry = FinalizerEntry::Handle(stack_zone.GetZone()); - auto& all_entries = LinkedHashSet::Handle(stack_zone.GetZone()); + auto& all_entries = Set::Handle(stack_zone.GetZone()); for (int i = 0; i < num_finalizers; i++) { weak_reference ^= finalizers.At(i); finalizer ^= weak_reference.target(); @@ -2510,7 +2510,7 @@ void Isolate::RunAndCleanupFinalizersOnShutdown() { // Immediately call native callback. const auto& native_finalizer = NativeFinalizer::Cast(finalizer); all_entries = finalizer.all_entries(); - LinkedHashSet::Iterator iterator(all_entries); + Set::Iterator iterator(all_entries); while (iterator.MoveNext()) { current_entry ^= iterator.CurrentKey(); native_finalizer.RunCallback(current_entry, "Isolate shutdown"); diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc index 72bed375d4f87..362607ad487e9 100644 --- a/runtime/vm/isolate_reload_test.cc +++ b/runtime/vm/isolate_reload_test.cc @@ -4076,10 +4076,8 @@ TEST_CASE(IsolateReload_RunNewFieldInitializersWithGenerics) { EXPECT_VALID(lib); // Verify that we ran field initializers on existing instances and // correct type arguments were used. - EXPECT_STREQ( - "List _InternalLinkedHashMap List " - "_InternalLinkedHashMap", - SimpleInvokeStr(lib, "main")); + EXPECT_STREQ("List _Map List _Map", + SimpleInvokeStr(lib, "main")); } TEST_CASE(IsolateReload_AddNewStaticField) { diff --git a/runtime/vm/message_snapshot.cc b/runtime/vm/message_snapshot.cc index a4798f7f0c614..4060076a06d4b 100644 --- a/runtime/vm/message_snapshot.cc +++ b/runtime/vm/message_snapshot.cc @@ -2180,23 +2180,20 @@ class CapabilityMessageDeserializationCluster } }; -class LinkedHashMapMessageSerializationCluster - : public MessageSerializationCluster { +class MapMessageSerializationCluster : public MessageSerializationCluster { public: - LinkedHashMapMessageSerializationCluster(Zone* zone, - bool is_canonical, - intptr_t cid) - : MessageSerializationCluster("LinkedHashMap", + MapMessageSerializationCluster(Zone* zone, bool is_canonical, intptr_t cid) + : MessageSerializationCluster("Map", is_canonical ? MessagePhase::kCanonicalInstances : MessagePhase::kNonCanonicalInstances, cid, is_canonical), objects_(zone, 0) {} - ~LinkedHashMapMessageSerializationCluster() {} + ~MapMessageSerializationCluster() {} void Trace(MessageSerializer* s, Object* object) { - LinkedHashMap* map = static_cast(object); + Map* map = static_cast(object); objects_.Add(map); // Compensation for bogus type prefix optimization. @@ -2216,7 +2213,7 @@ class LinkedHashMapMessageSerializationCluster const intptr_t count = objects_.length(); s->WriteUnsigned(count); for (intptr_t i = 0; i < count; i++) { - LinkedHashMap* map = objects_[i]; + Map* map = objects_[i]; s->AssignRef(map); } } @@ -2224,7 +2221,7 @@ class LinkedHashMapMessageSerializationCluster void WriteEdges(MessageSerializer* s) { const intptr_t count = objects_.length(); for (intptr_t i = 0; i < count; i++) { - LinkedHashMap* map = objects_[i]; + Map* map = objects_[i]; s->WriteRef(map->untag()->type_arguments()); s->WriteRef(map->untag()->data()); s->WriteRef(map->untag()->used_data()); @@ -2232,27 +2229,25 @@ class LinkedHashMapMessageSerializationCluster } private: - GrowableArray objects_; + GrowableArray objects_; }; -class LinkedHashMapMessageDeserializationCluster - : public MessageDeserializationCluster { +class MapMessageDeserializationCluster : public MessageDeserializationCluster { public: - LinkedHashMapMessageDeserializationCluster(bool is_canonical, intptr_t cid) - : MessageDeserializationCluster("LinkedHashMap", is_canonical), - cid_(cid) {} - ~LinkedHashMapMessageDeserializationCluster() {} + MapMessageDeserializationCluster(bool is_canonical, intptr_t cid) + : MessageDeserializationCluster("Map", is_canonical), cid_(cid) {} + ~MapMessageDeserializationCluster() {} void ReadNodes(MessageDeserializer* d) { const intptr_t count = d->ReadUnsigned(); for (intptr_t i = 0; i < count; i++) { - d->AssignRef(LinkedHashMap::NewUninitialized(cid_)); + d->AssignRef(Map::NewUninitialized(cid_)); } } void ReadEdges(MessageDeserializer* d) { for (intptr_t id = start_index_; id < stop_index_; id++) { - LinkedHashMapPtr map = static_cast(d->Ref(id)); + MapPtr map = static_cast(d->Ref(id)); map->untag()->set_hash_mask(Smi::New(0)); map->untag()->set_type_arguments( static_cast(d->ReadRef())); @@ -2264,14 +2259,14 @@ class LinkedHashMapMessageDeserializationCluster ObjectPtr PostLoad(MessageDeserializer* d) { if (!is_canonical()) { - ASSERT(cid_ == kLinkedHashMapCid); + ASSERT(cid_ == kMapCid); return PostLoadLinkedHash(d); } - ASSERT(cid_ == kImmutableLinkedHashMapCid); + ASSERT(cid_ == kConstMapCid); SafepointMutexLocker ml( d->isolate_group()->constant_canonicalization_mutex()); - LinkedHashMap& instance = LinkedHashMap::Handle(d->zone()); + Map& instance = Map::Handle(d->zone()); for (intptr_t i = start_index_; i < stop_index_; i++) { instance ^= d->Ref(i); instance ^= instance.CanonicalizeLocked(d->thread()); @@ -2284,23 +2279,20 @@ class LinkedHashMapMessageDeserializationCluster const intptr_t cid_; }; -class LinkedHashSetMessageSerializationCluster - : public MessageSerializationCluster { +class SetMessageSerializationCluster : public MessageSerializationCluster { public: - LinkedHashSetMessageSerializationCluster(Zone* zone, - bool is_canonical, - intptr_t cid) - : MessageSerializationCluster("LinkedHashSet", + SetMessageSerializationCluster(Zone* zone, bool is_canonical, intptr_t cid) + : MessageSerializationCluster("Set", is_canonical ? MessagePhase::kCanonicalInstances : MessagePhase::kNonCanonicalInstances, cid, is_canonical), objects_(zone, 0) {} - ~LinkedHashSetMessageSerializationCluster() {} + ~SetMessageSerializationCluster() {} void Trace(MessageSerializer* s, Object* object) { - LinkedHashSet* set = static_cast(object); + Set* set = static_cast(object); objects_.Add(set); // Compensation for bogus type prefix optimization. @@ -2320,7 +2312,7 @@ class LinkedHashSetMessageSerializationCluster const intptr_t count = objects_.length(); s->WriteUnsigned(count); for (intptr_t i = 0; i < count; i++) { - LinkedHashSet* set = objects_[i]; + Set* set = objects_[i]; s->AssignRef(set); } } @@ -2328,7 +2320,7 @@ class LinkedHashSetMessageSerializationCluster void WriteEdges(MessageSerializer* s) { const intptr_t count = objects_.length(); for (intptr_t i = 0; i < count; i++) { - LinkedHashSet* set = objects_[i]; + Set* set = objects_[i]; s->WriteRef(set->untag()->type_arguments()); s->WriteRef(set->untag()->data()); s->WriteRef(set->untag()->used_data()); @@ -2336,27 +2328,25 @@ class LinkedHashSetMessageSerializationCluster } private: - GrowableArray objects_; + GrowableArray objects_; }; -class LinkedHashSetMessageDeserializationCluster - : public MessageDeserializationCluster { +class SetMessageDeserializationCluster : public MessageDeserializationCluster { public: - LinkedHashSetMessageDeserializationCluster(bool is_canonical, intptr_t cid) - : MessageDeserializationCluster("LinkedHashSet", is_canonical), - cid_(cid) {} - ~LinkedHashSetMessageDeserializationCluster() {} + SetMessageDeserializationCluster(bool is_canonical, intptr_t cid) + : MessageDeserializationCluster("Set", is_canonical), cid_(cid) {} + ~SetMessageDeserializationCluster() {} void ReadNodes(MessageDeserializer* d) { const intptr_t count = d->ReadUnsigned(); for (intptr_t i = 0; i < count; i++) { - d->AssignRef(LinkedHashSet::NewUninitialized(cid_)); + d->AssignRef(Set::NewUninitialized(cid_)); } } void ReadEdges(MessageDeserializer* d) { for (intptr_t id = start_index_; id < stop_index_; id++) { - LinkedHashSetPtr map = static_cast(d->Ref(id)); + SetPtr map = static_cast(d->Ref(id)); map->untag()->set_hash_mask(Smi::New(0)); map->untag()->set_type_arguments( static_cast(d->ReadRef())); @@ -2368,14 +2358,14 @@ class LinkedHashSetMessageDeserializationCluster ObjectPtr PostLoad(MessageDeserializer* d) { if (!is_canonical()) { - ASSERT(cid_ == kLinkedHashSetCid); + ASSERT(cid_ == kSetCid); return PostLoadLinkedHash(d); } - ASSERT(cid_ == kImmutableLinkedHashSetCid); + ASSERT(cid_ == kConstSetCid); SafepointMutexLocker ml( d->isolate_group()->constant_canonicalization_mutex()); - LinkedHashSet& instance = LinkedHashSet::Handle(d->zone()); + Set& instance = Set::Handle(d->zone()); for (intptr_t i = start_index_; i < stop_index_; i++) { instance ^= d->Ref(i); instance ^= instance.CanonicalizeLocked(d->thread()); @@ -3175,14 +3165,12 @@ MessageSerializationCluster* BaseSerializer::NewClusterForClass( return new (Z) CapabilityMessageSerializationCluster(Z); case kTransferableTypedDataCid: return new (Z) TransferableTypedDataMessageSerializationCluster(); - case kLinkedHashMapCid: - case kImmutableLinkedHashMapCid: - return new (Z) - LinkedHashMapMessageSerializationCluster(Z, is_canonical, cid); - case kLinkedHashSetCid: - case kImmutableLinkedHashSetCid: - return new (Z) - LinkedHashSetMessageSerializationCluster(Z, is_canonical, cid); + case kMapCid: + case kConstMapCid: + return new (Z) MapMessageSerializationCluster(Z, is_canonical, cid); + case kSetCid: + case kConstSetCid: + return new (Z) SetMessageSerializationCluster(Z, is_canonical, cid); case kArrayCid: case kImmutableArrayCid: return new (Z) ArrayMessageSerializationCluster(Z, is_canonical, cid); @@ -3261,14 +3249,12 @@ MessageDeserializationCluster* BaseDeserializer::ReadCluster() { case kTransferableTypedDataCid: ASSERT(!is_canonical); return new (Z) TransferableTypedDataMessageDeserializationCluster(); - case kLinkedHashMapCid: - case kImmutableLinkedHashMapCid: - return new (Z) - LinkedHashMapMessageDeserializationCluster(is_canonical, cid); - case kLinkedHashSetCid: - case kImmutableLinkedHashSetCid: - return new (Z) - LinkedHashSetMessageDeserializationCluster(is_canonical, cid); + case kMapCid: + case kConstMapCid: + return new (Z) MapMessageDeserializationCluster(is_canonical, cid); + case kSetCid: + case kConstSetCid: + return new (Z) SetMessageDeserializationCluster(is_canonical, cid); case kArrayCid: case kImmutableArrayCid: return new (Z) ArrayMessageDeserializationCluster(is_canonical, cid); diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc index 1d031cc5d03f0..b33f9a97b0501 100644 --- a/runtime/vm/object.cc +++ b/runtime/vm/object.cc @@ -621,7 +621,7 @@ void Object::InitVtables() { #define INIT_VTABLE(clazz) \ { \ - LinkedHashMap fake_handle; \ + Map fake_handle; \ builtin_vtables_[k##clazz##Cid] = fake_handle.vtable(); \ } CLASS_LIST_MAPS(INIT_VTABLE) @@ -629,7 +629,7 @@ void Object::InitVtables() { #define INIT_VTABLE(clazz) \ { \ - LinkedHashSet fake_handle; \ + Set fake_handle; \ builtin_vtables_[k##clazz##Cid] = fake_handle.vtable(); \ } CLASS_LIST_SETS(INIT_VTABLE) @@ -1718,8 +1718,8 @@ ErrorPtr Object::Init(IsolateGroup* isolate_group, object_store->set_array_class(cls); // VM classes that are parameterized (Array, ImmutableArray, - // GrowableObjectArray, LinkedHashMap, ImmutableLinkedHashMap, - // LinkedHashSet, ImmutableLinkedHashSet) are also pre-finalized, so + // GrowableObjectArray, Map, ConstMap, + // Set, ConstSet) are also pre-finalized, so // CalculateFieldOffsets() is not called, so we need to set the offset // of their type_arguments_ field, which is explicitly // declared in their respective Raw* classes. @@ -2025,7 +2025,7 @@ ErrorPtr Object::Init(IsolateGroup* isolate_group, RegisterPrivateClass(cls, Symbols::_MirrorReference(), lib); // Pre-register the collection library so we can place the vm class - // LinkedHashMap there rather than the core library. + // Map there rather than the core library. lib = Library::LookupLibrary(thread, Symbols::DartCollection()); if (lib.IsNull()) { lib = Library::NewLibraryHelper(Symbols::DartCollection(), true); @@ -2036,44 +2036,38 @@ ErrorPtr Object::Init(IsolateGroup* isolate_group, object_store->set_bootstrap_library(ObjectStore::kCollection, lib); ASSERT(!lib.IsNull()); ASSERT(lib.ptr() == Library::CollectionLibrary()); - cls = Class::New(isolate_group); - object_store->set_linked_hash_map_class(cls); - cls.set_type_arguments_field_offset( - LinkedHashMap::type_arguments_offset(), - RTN::LinkedHashMap::type_arguments_offset()); + cls = Class::New(isolate_group); + object_store->set_map_impl_class(cls); + cls.set_type_arguments_field_offset(Map::type_arguments_offset(), + RTN::Map::type_arguments_offset()); cls.set_num_type_arguments_unsafe(2); - RegisterPrivateClass(cls, Symbols::_LinkedHashMap(), lib); + RegisterPrivateClass(cls, Symbols::_Map(), lib); pending_classes.Add(cls); - cls = Class::New( - kImmutableLinkedHashMapCid, isolate_group); - object_store->set_immutable_linked_hash_map_class(cls); - cls.set_type_arguments_field_offset( - LinkedHashMap::type_arguments_offset(), - RTN::LinkedHashMap::type_arguments_offset()); + cls = Class::New(kConstMapCid, isolate_group); + object_store->set_const_map_impl_class(cls); + cls.set_type_arguments_field_offset(Map::type_arguments_offset(), + RTN::Map::type_arguments_offset()); cls.set_num_type_arguments_unsafe(2); cls.set_is_prefinalized(); - RegisterPrivateClass(cls, Symbols::_ImmutableLinkedHashMap(), lib); + RegisterPrivateClass(cls, Symbols::_ConstMap(), lib); pending_classes.Add(cls); - cls = Class::New(isolate_group); - object_store->set_linked_hash_set_class(cls); - cls.set_type_arguments_field_offset( - LinkedHashSet::type_arguments_offset(), - RTN::LinkedHashSet::type_arguments_offset()); + cls = Class::New(isolate_group); + object_store->set_set_impl_class(cls); + cls.set_type_arguments_field_offset(Set::type_arguments_offset(), + RTN::Set::type_arguments_offset()); cls.set_num_type_arguments_unsafe(1); - RegisterPrivateClass(cls, Symbols::_LinkedHashSet(), lib); + RegisterPrivateClass(cls, Symbols::_Set(), lib); pending_classes.Add(cls); - cls = Class::New( - kImmutableLinkedHashSetCid, isolate_group); - object_store->set_immutable_linked_hash_set_class(cls); - cls.set_type_arguments_field_offset( - LinkedHashSet::type_arguments_offset(), - RTN::LinkedHashSet::type_arguments_offset()); + cls = Class::New(kConstSetCid, isolate_group); + object_store->set_const_set_impl_class(cls); + cls.set_type_arguments_field_offset(Set::type_arguments_offset(), + RTN::Set::type_arguments_offset()); cls.set_num_type_arguments_unsafe(1); cls.set_is_prefinalized(); - RegisterPrivateClass(cls, Symbols::_ImmutableLinkedHashSet(), lib); + RegisterPrivateClass(cls, Symbols::_ConstSet(), lib); pending_classes.Add(cls); // Pre-register the async library so we can place the vm class @@ -2518,19 +2512,17 @@ ErrorPtr Object::Init(IsolateGroup* isolate_group, isolate_group); object_store->set_growable_object_array_class(cls); - cls = Class::New(isolate_group); - object_store->set_linked_hash_map_class(cls); + cls = Class::New(isolate_group); + object_store->set_map_impl_class(cls); - cls = Class::New( - kImmutableLinkedHashMapCid, isolate_group); - object_store->set_immutable_linked_hash_map_class(cls); + cls = Class::New(kConstMapCid, isolate_group); + object_store->set_const_map_impl_class(cls); - cls = Class::New(isolate_group); - object_store->set_linked_hash_set_class(cls); + cls = Class::New(isolate_group); + object_store->set_set_impl_class(cls); - cls = Class::New( - kImmutableLinkedHashSetCid, isolate_group); - object_store->set_immutable_linked_hash_set_class(cls); + cls = Class::New(kConstSetCid, isolate_group); + object_store->set_const_set_impl_class(cls); cls = Class::New(isolate_group); object_store->set_float32x4_class(cls); @@ -25029,8 +25021,7 @@ class DefaultHashTraits { } }; -LinkedHashMapPtr LinkedHashMap::NewDefault(intptr_t class_id, - Heap::Space space) { +MapPtr Map::NewDefault(intptr_t class_id, Heap::Space space) { const Array& data = Array::Handle(Array::New(kInitialIndexSize, space)); const TypedData& index = TypedData::Handle( TypedData::New(kTypedDataUint32ArrayCid, kInitialIndexSize, space)); @@ -25038,23 +25029,20 @@ LinkedHashMapPtr LinkedHashMap::NewDefault(intptr_t class_id, static const intptr_t kAvailableBits = (kSmiBits >= 32) ? 32 : kSmiBits; static const intptr_t kInitialHashMask = (1 << (kAvailableBits - kInitialIndexBits)) - 1; - return LinkedHashMap::New(class_id, data, index, kInitialHashMask, 0, 0, - space); -} - -LinkedHashMapPtr LinkedHashMap::New(intptr_t class_id, - const Array& data, - const TypedData& index, - intptr_t hash_mask, - intptr_t used_data, - intptr_t deleted_keys, - Heap::Space space) { - ASSERT(class_id == kLinkedHashMapCid || - class_id == kImmutableLinkedHashMapCid); - ASSERT(IsolateGroup::Current()->object_store()->linked_hash_map_class() != + return Map::New(class_id, data, index, kInitialHashMask, 0, 0, space); +} + +MapPtr Map::New(intptr_t class_id, + const Array& data, + const TypedData& index, + intptr_t hash_mask, + intptr_t used_data, + intptr_t deleted_keys, + Heap::Space space) { + ASSERT(class_id == kMapCid || class_id == kConstMapCid); + ASSERT(IsolateGroup::Current()->object_store()->map_impl_class() != Class::null()); - LinkedHashMap& result = - LinkedHashMap::Handle(LinkedHashMap::NewUninitialized(class_id, space)); + Map& result = Map::Handle(Map::NewUninitialized(class_id, space)); result.set_data(data); result.set_index(index); result.set_hash_mask(hash_mask); @@ -25063,26 +25051,24 @@ LinkedHashMapPtr LinkedHashMap::New(intptr_t class_id, return result.ptr(); } -LinkedHashMapPtr LinkedHashMap::NewUninitialized(intptr_t class_id, - Heap::Space space) { - ASSERT(IsolateGroup::Current()->object_store()->linked_hash_map_class() != +MapPtr Map::NewUninitialized(intptr_t class_id, Heap::Space space) { + ASSERT(IsolateGroup::Current()->object_store()->map_impl_class() != Class::null()); - LinkedHashMap& result = LinkedHashMap::Handle(); + Map& result = Map::Handle(); { - ObjectPtr raw = - Object::Allocate(class_id, LinkedHashMap::InstanceSize(), space, - LinkedHashMap::ContainsCompressedPointers()); + ObjectPtr raw = Object::Allocate(class_id, Map::InstanceSize(), space, + Map::ContainsCompressedPointers()); NoSafepointScope no_safepoint; result ^= raw; } return result.ptr(); } -const char* LinkedHashMap::ToCString() const { +const char* Map::ToCString() const { Zone* zone = Thread::Current()->zone(); return zone->PrintToString( - "_%sLinkedHashMap len:%" Pd, - GetClassId() == kImmutableLinkedHashMapCid ? "Immutable" : "", Length()); + "%s len:%" Pd, GetClassId() == kConstMapCid ? "_ConstMap" : "_Map", + Length()); } void LinkedHashBase::ComputeAndSetHashMask() const { @@ -25093,7 +25079,7 @@ void LinkedHashBase::ComputeAndSetHashMask() const { const auto& data_array = Array::Handle(zone, data()); const intptr_t data_length = Utils::RoundUpToPowerOfTwo(data_array.Length()); - const intptr_t index_size_mult = IsLinkedHashMap() ? 1 : 2; + const intptr_t index_size_mult = IsMap() ? 1 : 2; const intptr_t index_size = Utils::Maximum(LinkedHashBase::kInitialIndexSize, data_length * index_size_mult); ASSERT(Utils::IsPowerOfTwo(index_size)); @@ -25188,37 +25174,29 @@ void LinkedHashBase::CanonicalizeFieldsLocked(Thread* thread) const { ASSERT(index_td.IsNull()); } -ImmutableLinkedHashMapPtr ImmutableLinkedHashMap::NewDefault( - Heap::Space space) { - ASSERT(IsolateGroup::Current() - ->object_store() - ->immutable_linked_hash_map_class() != Class::null()); - return static_cast( - LinkedHashMap::NewDefault(kClassId, space)); -} - -ImmutableLinkedHashMapPtr ImmutableLinkedHashMap::NewUninitialized( - Heap::Space space) { - ASSERT(IsolateGroup::Current() - ->object_store() - ->immutable_linked_hash_map_class() != Class::null()); - return static_cast( - LinkedHashMap::NewUninitialized(kClassId, space)); +ConstMapPtr ConstMap::NewDefault(Heap::Space space) { + ASSERT(IsolateGroup::Current()->object_store()->const_map_impl_class() != + Class::null()); + return static_cast(Map::NewDefault(kClassId, space)); } -LinkedHashSetPtr LinkedHashSet::New(intptr_t class_id, - const Array& data, - const TypedData& index, - intptr_t hash_mask, - intptr_t used_data, - intptr_t deleted_keys, - Heap::Space space) { - ASSERT(class_id == kLinkedHashSetCid || - class_id == kImmutableLinkedHashSetCid); - ASSERT(IsolateGroup::Current()->object_store()->linked_hash_set_class() != +ConstMapPtr ConstMap::NewUninitialized(Heap::Space space) { + ASSERT(IsolateGroup::Current()->object_store()->const_map_impl_class() != Class::null()); - LinkedHashSet& result = - LinkedHashSet::Handle(LinkedHashSet::NewUninitialized(class_id, space)); + return static_cast(Map::NewUninitialized(kClassId, space)); +} + +SetPtr Set::New(intptr_t class_id, + const Array& data, + const TypedData& index, + intptr_t hash_mask, + intptr_t used_data, + intptr_t deleted_keys, + Heap::Space space) { + ASSERT(class_id == kSetCid || class_id == kConstSetCid); + ASSERT(IsolateGroup::Current()->object_store()->set_impl_class() != + Class::null()); + Set& result = Set::Handle(Set::NewUninitialized(class_id, space)); result.set_data(data); result.set_index(index); result.set_hash_mask(hash_mask); @@ -25227,8 +25205,7 @@ LinkedHashSetPtr LinkedHashSet::New(intptr_t class_id, return result.ptr(); } -LinkedHashSetPtr LinkedHashSet::NewDefault(intptr_t class_id, - Heap::Space space) { +SetPtr Set::NewDefault(intptr_t class_id, Heap::Space space) { const Array& data = Array::Handle(Array::New(kInitialIndexSize, space)); const TypedData& index = TypedData::Handle( TypedData::New(kTypedDataUint32ArrayCid, kInitialIndexSize, space)); @@ -25236,48 +25213,39 @@ LinkedHashSetPtr LinkedHashSet::NewDefault(intptr_t class_id, static const intptr_t kAvailableBits = (kSmiBits >= 32) ? 32 : kSmiBits; static const intptr_t kInitialHashMask = (1 << (kAvailableBits - kInitialIndexBits)) - 1; - return LinkedHashSet::New(class_id, data, index, kInitialHashMask, 0, 0, - space); + return Set::New(class_id, data, index, kInitialHashMask, 0, 0, space); } -LinkedHashSetPtr LinkedHashSet::NewUninitialized(intptr_t class_id, - Heap::Space space) { - ASSERT(IsolateGroup::Current()->object_store()->linked_hash_set_class() != +SetPtr Set::NewUninitialized(intptr_t class_id, Heap::Space space) { + ASSERT(IsolateGroup::Current()->object_store()->set_impl_class() != Class::null()); - LinkedHashSet& result = LinkedHashSet::Handle(); + Set& result = Set::Handle(); { - ObjectPtr raw = - Object::Allocate(class_id, LinkedHashSet::InstanceSize(), space, - LinkedHashSet::ContainsCompressedPointers()); + ObjectPtr raw = Object::Allocate(class_id, Set::InstanceSize(), space, + Set::ContainsCompressedPointers()); NoSafepointScope no_safepoint; result ^= raw; } return result.ptr(); } -ImmutableLinkedHashSetPtr ImmutableLinkedHashSet::NewDefault( - Heap::Space space) { - ASSERT(IsolateGroup::Current() - ->object_store() - ->immutable_linked_hash_set_class() != Class::null()); - return static_cast( - LinkedHashSet::NewDefault(kClassId, space)); +ConstSetPtr ConstSet::NewDefault(Heap::Space space) { + ASSERT(IsolateGroup::Current()->object_store()->const_set_impl_class() != + Class::null()); + return static_cast(Set::NewDefault(kClassId, space)); } -ImmutableLinkedHashSetPtr ImmutableLinkedHashSet::NewUninitialized( - Heap::Space space) { - ASSERT(IsolateGroup::Current() - ->object_store() - ->immutable_linked_hash_set_class() != Class::null()); - return static_cast( - LinkedHashSet::NewUninitialized(kClassId, space)); +ConstSetPtr ConstSet::NewUninitialized(Heap::Space space) { + ASSERT(IsolateGroup::Current()->object_store()->const_set_impl_class() != + Class::null()); + return static_cast(Set::NewUninitialized(kClassId, space)); } -const char* LinkedHashSet::ToCString() const { +const char* Set::ToCString() const { Zone* zone = Thread::Current()->zone(); return zone->PrintToString( - "_%sLinkedHashSet len:%" Pd, - GetClassId() == kImmutableLinkedHashSetCid ? "Immutable" : "", Length()); + "%s len:%" Pd, GetClassId() == kConstSetCid ? "_ConstSet" : "_Set", + Length()); } const char* FutureOr::ToCString() const { diff --git a/runtime/vm/object.h b/runtime/vm/object.h index e74b49edc3af0..843146ada9149 100644 --- a/runtime/vm/object.h +++ b/runtime/vm/object.h @@ -108,8 +108,12 @@ class BaseTextBuffer; static constexpr bool ContainsCompressedPointers() { \ return UntaggedObjectType::kContainsCompressedPointers; \ } \ - object##Ptr ptr() const { return static_cast(ptr_); } \ - bool Is##object() const { return true; } \ + object##Ptr ptr() const { \ + return static_cast(ptr_); \ + } \ + bool Is##object() const { \ + return true; \ + } \ DART_NOINLINE static object& Handle() { \ return static_cast( \ HandleImpl(Thread::Current()->zone(), object::null(), kClassId)); \ @@ -184,11 +188,13 @@ class BaseTextBuffer; private: /* NOLINT */ \ /* Initialize the handle based on the ptr in the presence of null. */ \ static void initializeHandle(object* obj, ObjectPtr ptr) { \ - obj->SetPtr(ptr, kClassId); \ + obj->setPtr(ptr, kClassId); \ } \ /* Disallow allocation, copy constructors and override super assignment. */ \ public: /* NOLINT */ \ - void operator delete(void* pointer) { UNREACHABLE(); } \ + void operator delete(void* pointer) { \ + UNREACHABLE(); \ + } \ \ private: /* NOLINT */ \ void* operator new(size_t size); \ @@ -639,13 +645,13 @@ class Object { uword raw_value() const { return static_cast(ptr()); } - inline void SetPtr(ObjectPtr value, intptr_t default_cid); + inline void setPtr(ObjectPtr value, intptr_t default_cid); void CheckHandle() const; DART_NOINLINE static Object& HandleImpl(Zone* zone, ObjectPtr ptr, intptr_t default_cid) { Object* obj = reinterpret_cast(VMHandles::AllocateHandle(zone)); - obj->SetPtr(ptr, default_cid); + obj->setPtr(ptr, default_cid); return *obj; } DART_NOINLINE static Object& ZoneHandleImpl(Zone* zone, @@ -653,12 +659,12 @@ class Object { intptr_t default_cid) { Object* obj = reinterpret_cast(VMHandles::AllocateZoneHandle(zone)); - obj->SetPtr(ptr, default_cid); + obj->setPtr(ptr, default_cid); return *obj; } DART_NOINLINE static Object* ReadOnlyHandleImpl(intptr_t cid) { Object* obj = reinterpret_cast(Dart::AllocateReadOnlyHandle()); - obj->SetPtr(Object::null(), cid); + obj->setPtr(Object::null(), cid); return obj; } @@ -822,7 +828,7 @@ class Object { /* Initialize the handle based on the ptr in the presence of null. */ static void initializeHandle(Object* obj, ObjectPtr ptr) { - obj->SetPtr(ptr, kObjectCid); + obj->setPtr(ptr, kObjectCid); } static cpp_vtable builtin_vtables_[kNumPredefinedCids]; @@ -11360,20 +11366,19 @@ class LinkedHashBase : public Instance { } static const LinkedHashBase& Cast(const Object& obj) { - ASSERT(obj.IsLinkedHashMap() || obj.IsLinkedHashSet()); + ASSERT(obj.IsMap() || obj.IsSet()); return static_cast(obj); } bool IsImmutable() const { - return GetClassId() == kImmutableLinkedHashMapCid || - GetClassId() == kImmutableLinkedHashSetCid; + return GetClassId() == kConstMapCid || GetClassId() == kConstSetCid; } virtual TypeArgumentsPtr GetTypeArguments() const { return untag()->type_arguments(); } virtual void SetTypeArguments(const TypeArguments& value) const { - const intptr_t num_type_args = IsLinkedHashMap() ? 2 : 1; + const intptr_t num_type_args = IsMap() ? 2 : 1; ASSERT(value.IsNull() || ((value.Length() >= num_type_args) && value.IsInstantiated() /*&& value.IsCanonical()*/)); @@ -11412,7 +11417,7 @@ class LinkedHashBase : public Instance { if (untag()->deleted_keys() == Object::null()) return 0; intptr_t used = Smi::Value(untag()->used_data()); - if (IsLinkedHashMap()) { + if (IsMap()) { used >>= 1; } const intptr_t deleted = Smi::Value(untag()->deleted_keys()); @@ -11455,25 +11460,26 @@ class ImmutableLinkedHashBase : public AllStatic { }; // Corresponds to +// - _Map in dart:collection // - "new Map()", // - non-const map literals, and // - the default constructor of LinkedHashMap in dart:collection. -class LinkedHashMap : public LinkedHashBase { +class Map : public LinkedHashBase { public: static intptr_t InstanceSize() { - return RoundedAllocationSize(sizeof(UntaggedLinkedHashMap)); + return RoundedAllocationSize(sizeof(UntaggedMap)); } // Allocates a map with some default capacity, just like "new Map()". - static LinkedHashMapPtr NewDefault(intptr_t class_id = kLinkedHashMapCid, - Heap::Space space = Heap::kNew); - static LinkedHashMapPtr New(intptr_t class_id, - const Array& data, - const TypedData& index, - intptr_t hash_mask, - intptr_t used_data, - intptr_t deleted_keys, - Heap::Space space = Heap::kNew); + static MapPtr NewDefault(intptr_t class_id = kMapCid, + Heap::Space space = Heap::kNew); + static MapPtr New(intptr_t class_id, + const Array& data, + const TypedData& index, + intptr_t hash_mask, + intptr_t used_data, + intptr_t deleted_keys, + Heap::Space space = Heap::kNew); // This iterator differs somewhat from its Dart counterpart (_CompactIterator // in runtime/lib/compact_hash.dart): @@ -11482,7 +11488,7 @@ class LinkedHashMap : public LinkedHashBase { // MoveNext returns false will result in crashes. class Iterator : public ValueObject { public: - explicit Iterator(const LinkedHashMap& map) + explicit Iterator(const Map& map) : data_(Array::Handle(map.data())), scratch_(Object::Handle()), offset_(-2), @@ -11514,32 +11520,34 @@ class LinkedHashMap : public LinkedHashBase { }; private: - FINAL_HEAP_OBJECT_IMPLEMENTATION(LinkedHashMap, LinkedHashBase); + FINAL_HEAP_OBJECT_IMPLEMENTATION(Map, LinkedHashBase); // Allocate a map, but leave all fields set to null. // Used during deserialization (since map might contain itself as key/value). - static LinkedHashMapPtr NewUninitialized(intptr_t class_id, - Heap::Space space = Heap::kNew); + static MapPtr NewUninitialized(intptr_t class_id, + Heap::Space space = Heap::kNew); friend class Class; - friend class ImmutableLinkedHashMap; - friend class LinkedHashMapDeserializationCluster; + friend class ConstMap; + friend class MapDeserializationCluster; }; -class ImmutableLinkedHashMap : public AllStatic { +// Corresponds to +// - _ConstMap in dart:collection +// - const map literals +class ConstMap : public AllStatic { public: static constexpr bool ContainsCompressedPointers() { - return LinkedHashMap::ContainsCompressedPointers(); + return Map::ContainsCompressedPointers(); } - static ImmutableLinkedHashMapPtr NewDefault(Heap::Space space = Heap::kNew); + static ConstMapPtr NewDefault(Heap::Space space = Heap::kNew); - static ImmutableLinkedHashMapPtr NewUninitialized( - Heap::Space space = Heap::kNew); + static ConstMapPtr NewUninitialized(Heap::Space space = Heap::kNew); - static const ClassId kClassId = kImmutableLinkedHashMapCid; + static const ClassId kClassId = kConstMapCid; - static intptr_t InstanceSize() { return LinkedHashMap::InstanceSize(); } + static intptr_t InstanceSize() { return Map::InstanceSize(); } private: static intptr_t NextFieldOffset() { @@ -11547,29 +11555,34 @@ class ImmutableLinkedHashMap : public AllStatic { return -kWordSize; } - static ImmutableLinkedHashMapPtr raw(const LinkedHashMap& map) { - return static_cast(map.ptr()); + static ConstMapPtr raw(const Map& map) { + return static_cast(map.ptr()); } friend class Class; }; -class LinkedHashSet : public LinkedHashBase { +// Corresponds to +// - _Set in dart:collection, +// - "new Set()", +// - non-const set literals, and +// - the default constructor of LinkedHashSet in dart:collection. +class Set : public LinkedHashBase { public: static intptr_t InstanceSize() { - return RoundedAllocationSize(sizeof(UntaggedLinkedHashSet)); + return RoundedAllocationSize(sizeof(UntaggedSet)); } // Allocates a set with some default capacity, just like "new Set()". - static LinkedHashSetPtr NewDefault(intptr_t class_id = kLinkedHashSetCid, - Heap::Space space = Heap::kNew); - static LinkedHashSetPtr New(intptr_t class_id, - const Array& data, - const TypedData& index, - intptr_t hash_mask, - intptr_t used_data, - intptr_t deleted_keys, - Heap::Space space = Heap::kNew); + static SetPtr NewDefault(intptr_t class_id = kSetCid, + Heap::Space space = Heap::kNew); + static SetPtr New(intptr_t class_id, + const Array& data, + const TypedData& index, + intptr_t hash_mask, + intptr_t used_data, + intptr_t deleted_keys, + Heap::Space space = Heap::kNew); // This iterator differs somewhat from its Dart counterpart (_CompactIterator // in runtime/lib/compact_hash.dart): @@ -11578,7 +11591,7 @@ class LinkedHashSet : public LinkedHashBase { // MoveNext returns false will result in crashes. class Iterator : public ValueObject { public: - explicit Iterator(const LinkedHashSet& set) + explicit Iterator(const Set& set) : data_(Array::Handle(set.data())), scratch_(Object::Handle()), offset_(-1), @@ -11608,32 +11621,34 @@ class LinkedHashSet : public LinkedHashBase { }; private: - FINAL_HEAP_OBJECT_IMPLEMENTATION(LinkedHashSet, LinkedHashBase); + FINAL_HEAP_OBJECT_IMPLEMENTATION(Set, LinkedHashBase); // Allocate a set, but leave all fields set to null. // Used during deserialization (since set might contain itself as key/value). - static LinkedHashSetPtr NewUninitialized(intptr_t class_id, - Heap::Space space = Heap::kNew); + static SetPtr NewUninitialized(intptr_t class_id, + Heap::Space space = Heap::kNew); friend class Class; - friend class ImmutableLinkedHashSet; - friend class LinkedHashSetDeserializationCluster; + friend class ConstSet; + friend class SetDeserializationCluster; }; -class ImmutableLinkedHashSet : public AllStatic { +// Corresponds to +// - _ConstSet in dart:collection +// - const set literals +class ConstSet : public AllStatic { public: static constexpr bool ContainsCompressedPointers() { - return LinkedHashSet::ContainsCompressedPointers(); + return Set::ContainsCompressedPointers(); } - static ImmutableLinkedHashSetPtr NewDefault(Heap::Space space = Heap::kNew); + static ConstSetPtr NewDefault(Heap::Space space = Heap::kNew); - static ImmutableLinkedHashSetPtr NewUninitialized( - Heap::Space space = Heap::kNew); + static ConstSetPtr NewUninitialized(Heap::Space space = Heap::kNew); - static const ClassId kClassId = kImmutableLinkedHashSetCid; + static const ClassId kClassId = kConstSetCid; - static intptr_t InstanceSize() { return LinkedHashSet::InstanceSize(); } + static intptr_t InstanceSize() { return Set::InstanceSize(); } private: static intptr_t NextFieldOffset() { @@ -11641,8 +11656,8 @@ class ImmutableLinkedHashSet : public AllStatic { return -kWordSize; } - static ImmutableLinkedHashSetPtr raw(const LinkedHashSet& map) { - return static_cast(map.ptr()); + static ConstSetPtr raw(const Set& map) { + return static_cast(map.ptr()); } friend class Class; @@ -12374,8 +12389,8 @@ class FinalizerBase : public Instance { return OFFSET_OF(UntaggedFinalizerBase, detachments_); } - LinkedHashSetPtr all_entries() const { return untag()->all_entries(); } - void set_all_entries(const LinkedHashSet& value) const { + SetPtr all_entries() const { return untag()->all_entries(); } + void set_all_entries(const Set& value) const { untag()->set_all_entries(value.ptr()); } static intptr_t all_entries_offset() { @@ -12555,7 +12570,7 @@ ClassPtr Object::clazz() const { } DART_FORCE_INLINE -void Object::SetPtr(ObjectPtr value, intptr_t default_cid) { +void Object::setPtr(ObjectPtr value, intptr_t default_cid) { ptr_ = value; intptr_t cid = value->GetClassIdMayBeSmi(); // Free-list elements cannot be wrapped in a handle. diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc index d5e40531bdda7..4eb7e5728db64 100644 --- a/runtime/vm/object_graph.cc +++ b/runtime/vm/object_graph.cc @@ -539,7 +539,7 @@ class RetainingPathVisitor : public ObjectGraph::Visitor { } // A LinkedHasMap overwrites its internal storage. // Keeping both of them in the list is redundant. - if (was_last_array_ && obj->IsLinkedHashMap()) { + if (was_last_array_ && obj->IsMap()) { was_last_array_ = false; return 1; } @@ -1146,14 +1146,14 @@ class Pass2Visitor : public ObjectVisitor, writer_->WriteUnsigned(kLengthData); writer_->WriteUnsigned(Smi::Value( static_cast(obj)->untag()->length())); - } else if (cid == kLinkedHashMapCid || cid == kImmutableLinkedHashMapCid) { + } else if (cid == kMapCid || cid == kConstMapCid) { writer_->WriteUnsigned(kLengthData); writer_->WriteUnsigned( - Smi::Value(static_cast(obj)->untag()->used_data())); - } else if (cid == kLinkedHashSetCid || cid == kImmutableLinkedHashSetCid) { + Smi::Value(static_cast(obj)->untag()->used_data())); + } else if (cid == kSetCid || cid == kConstSetCid) { writer_->WriteUnsigned(kLengthData); writer_->WriteUnsigned( - Smi::Value(static_cast(obj)->untag()->used_data())); + Smi::Value(static_cast(obj)->untag()->used_data())); } else if (cid == kObjectPoolCid) { writer_->WriteUnsigned(kLengthData); writer_->WriteUnsigned(static_cast(obj)->untag()->length_); @@ -1721,13 +1721,13 @@ uint32_t HeapSnapshotWriter::GetHeapSnapshotIdentityHash(Thread* thread, case kExternalTwoByteStringCid: case kGrowableObjectArrayCid: case kImmutableArrayCid: - case kImmutableLinkedHashMapCid: - case kImmutableLinkedHashSetCid: + case kConstMapCid: + case kConstSetCid: case kInstructionsCid: case kInstructionsSectionCid: case kInstructionsTableCid: - case kLinkedHashMapCid: - case kLinkedHashSetCid: + case kMapCid: + case kSetCid: case kMintCid: case kNeverCid: case kSentinelCid: diff --git a/runtime/vm/object_graph_copy.cc b/runtime/vm/object_graph_copy.cc index 6f7bb1c52d265..6305567678525 100644 --- a/runtime/vm/object_graph_copy.cc +++ b/runtime/vm/object_graph_copy.cc @@ -1325,8 +1325,8 @@ class ObjectCopy : public Base { CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY_NOR_MAP(COPY_TO) COPY_TO(Array) COPY_TO(GrowableObjectArray) - COPY_TO(LinkedHashMap) - COPY_TO(LinkedHashSet) + COPY_TO(Map) + COPY_TO(Set) #undef COPY_TO #define COPY_TO(clazz) case kTypedData##clazz##Cid: @@ -1504,8 +1504,8 @@ class ObjectCopy : public Base { from, to, OFFSET_OF(UntaggedLinkedHashBase, hash_mask_), OFFSET_OF(UntaggedLinkedHashBase, hash_mask_)); Base::StoreCompressedPointersNoBarrier( - from, to, OFFSET_OF(UntaggedLinkedHashMap, deleted_keys_), - OFFSET_OF(UntaggedLinkedHashMap, deleted_keys_)); + from, to, OFFSET_OF(UntaggedMap, deleted_keys_), + OFFSET_OF(UntaggedMap, deleted_keys_)); } Base::ForwardCompressedPointer(from, to, OFFSET_OF(UntaggedLinkedHashBase, data_)); @@ -1514,16 +1514,14 @@ class ObjectCopy : public Base { OFFSET_OF(UntaggedLinkedHashBase, used_data_)); } - void CopyLinkedHashMap(typename Types::LinkedHashMap from, - typename Types::LinkedHashMap to) { - CopyLinkedHashBase<2, typename Types::LinkedHashMap>( - from, to, UntagLinkedHashMap(from), UntagLinkedHashMap(to)); + void CopyMap(typename Types::Map from, typename Types::Map to) { + CopyLinkedHashBase<2, typename Types::Map>(from, to, UntagMap(from), + UntagMap(to)); } - void CopyLinkedHashSet(typename Types::LinkedHashSet from, - typename Types::LinkedHashSet to) { - CopyLinkedHashBase<1, typename Types::LinkedHashSet>( - from, to, UntagLinkedHashSet(from), UntagLinkedHashSet(to)); + void CopySet(typename Types::Set from, typename Types::Set to) { + CopyLinkedHashBase<1, typename Types::Set>(from, to, UntagSet(from), + UntagSet(to)); } void CopyDouble(typename Types::Double from, typename Types::Double to) { diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc index 6f4a272e549a3..683c75921841d 100644 --- a/runtime/vm/object_service.cc +++ b/runtime/vm/object_service.cc @@ -1415,7 +1415,7 @@ void GrowableObjectArray::PrintJSONImpl(JSONStream* stream, bool ref) const { } } -void LinkedHashMap::PrintJSONImpl(JSONStream* stream, bool ref) const { +void Map::PrintJSONImpl(JSONStream* stream, bool ref) const { JSONObject jsobj(stream); PrintSharedInstanceJSON(&jsobj, ref); jsobj.AddProperty("kind", "Map"); @@ -1437,7 +1437,7 @@ void LinkedHashMap::PrintJSONImpl(JSONStream* stream, bool ref) const { { JSONArray jsarr(&jsobj, "associations"); Object& object = Object::Handle(); - LinkedHashMap::Iterator iterator(*this); + Map::Iterator iterator(*this); int i = 0; while (iterator.MoveNext() && i < limit) { if (i >= offset) { @@ -1452,7 +1452,7 @@ void LinkedHashMap::PrintJSONImpl(JSONStream* stream, bool ref) const { } } -void LinkedHashSet::PrintJSONImpl(JSONStream* stream, bool ref) const { +void Set::PrintJSONImpl(JSONStream* stream, bool ref) const { JSONObject jsobj(stream); PrintSharedInstanceJSON(&jsobj, ref); jsobj.AddProperty("kind", "Set"); @@ -1474,7 +1474,7 @@ void LinkedHashSet::PrintJSONImpl(JSONStream* stream, bool ref) const { { JSONArray jsarr(&jsobj, "elements"); Object& object = Object::Handle(); - LinkedHashSet::Iterator iterator(*this); + Set::Iterator iterator(*this); int i = 0; while (iterator.MoveNext() && i < limit) { if (i >= offset) { diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc index 4d2ea1e0cf430..b6487dc82ffa9 100644 --- a/runtime/vm/object_store.cc +++ b/runtime/vm/object_store.cc @@ -228,9 +228,9 @@ void ObjectStore::InitKnownObjects() { Zone* zone = thread->zone(); Class& cls = Class::Handle(zone); const Library& collection_lib = Library::Handle(zone, collection_library()); - cls = collection_lib.LookupClassAllowPrivate(Symbols::_LinkedHashSet()); + cls = collection_lib.LookupClassAllowPrivate(Symbols::_Set()); ASSERT(!cls.IsNull()); - set_linked_hash_set_class(cls); + set_set_impl_class(cls); #ifdef DART_PRECOMPILED_RUNTIME // The rest of these objects are only needed for code generation. diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h index 1074d638e119b..9c2ceef4a3a2d 100644 --- a/runtime/vm/object_store.h +++ b/runtime/vm/object_store.h @@ -123,10 +123,10 @@ class ObjectPointerVisitor; RW(Type, array_type) \ RW(Class, immutable_array_class) \ RW(Class, growable_object_array_class) \ - RW(Class, linked_hash_map_class) \ - RW(Class, immutable_linked_hash_map_class) \ - RW(Class, linked_hash_set_class) \ - RW(Class, immutable_linked_hash_set_class) \ + RW(Class, map_impl_class) \ + RW(Class, const_map_impl_class) \ + RW(Class, set_impl_class) \ + RW(Class, const_set_impl_class) \ RW(Class, float32x4_class) \ RW(Class, int32x4_class) \ RW(Class, float64x2_class) \ diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc index 907fb89533a76..2dfc12b744cba 100644 --- a/runtime/vm/object_test.cc +++ b/runtime/vm/object_test.cc @@ -5173,7 +5173,7 @@ static void NativeFinalizer_TwoEntriesCrossGen( isolate_finalizers.Add(weak1); thread->isolate()->set_finalizers(isolate_finalizers); - const auto& all_entries = LinkedHashSet::Handle(LinkedHashSet::NewDefault()); + const auto& all_entries = Set::Handle(Set::NewDefault()); finalizer.set_all_entries(all_entries); const auto& all_entries_data = Array::Handle(all_entries.data()); THR_Print("entry1 space: %s\n", spaces[1] == Heap::kNew ? "new" : "old"); @@ -6209,24 +6209,23 @@ ISOLATE_UNIT_TEST_CASE(PrintJSONPrimitives) { "\"identityHashCode\":0,\"id\":\"\",\"kind\":\"List\",\"length\":0}", buffer); } - // LinkedHashMap reference + // Map reference { JSONStream js; - const LinkedHashMap& array = - LinkedHashMap::Handle(LinkedHashMap::NewDefault()); + const Map& array = Map::Handle(Map::NewDefault()); array.PrintJSON(&js, true); const char* json_str = js.ToCString(); ASSERT(strlen(json_str) < kBufferSize); ElideJSONSubstring("classes", json_str, buffer); ElideJSONSubstring("objects", buffer, buffer); ElideJSONSubstring("libraries", buffer, buffer); - ElideJSONSubstring("_InternalLinkedHashMap@", buffer, buffer); + ElideJSONSubstring("_Map@", buffer, buffer); StripTokenPositions(buffer); ElideJSONSubstring("_TypeParameter@", buffer, buffer); EXPECT_SUBSTRING( - "{\"type\":\"@Instance\",\"_vmType\":\"LinkedHashMap\",\"class\":{" + "{\"type\":\"@Instance\",\"_vmType\":\"Map\",\"class\":{" "\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\",\"name\":\"_" - "InternalLinkedHashMap\",\"_vmName\":\"\",\"location\":{\"type\":" + "Map\",\"_vmName\":\"\",\"location\":{\"type\":" "\"SourceLocation\",\"script\":{\"type\":\"@Script\",\"fixedId\":true," "\"id\":\"\",\"uri\":\"dart:collection-patch\\/" "compact_hash.dart\",\"_kind\":\"kernel\"}" @@ -6613,7 +6612,7 @@ TEST_CASE(HashCode_Type_Int) { /*check_identity=*/false)); } -TEST_CASE(LinkedHashMap_iteration) { +TEST_CASE(Map_iteration) { const char* kScript = "makeMap() {\n" " var map = {'x': 3, 'y': 4, 'z': 5, 'w': 6};\n" @@ -6629,12 +6628,12 @@ TEST_CASE(LinkedHashMap_iteration) { TransitionNativeToVM transition(thread); Instance& dart_map = Instance::Handle(); dart_map ^= Api::UnwrapHandle(h_result); - ASSERT(dart_map.IsLinkedHashMap()); - const LinkedHashMap& cc_map = LinkedHashMap::Cast(dart_map); + ASSERT(dart_map.IsMap()); + const Map& cc_map = Map::Cast(dart_map); EXPECT_EQ(2, cc_map.Length()); - LinkedHashMap::Iterator iterator(cc_map); + Map::Iterator iterator(cc_map); Object& object = Object::Handle(); EXPECT(iterator.MoveNext()); @@ -6746,11 +6745,10 @@ static bool LinkedHashBaseEqual(const LinkedHashBase& map1, } // Copies elements from data. -static LinkedHashMapPtr ConstructImmutableMap( - const Array& input_data, - intptr_t used_data, - const TypeArguments& type_arguments) { - auto& map = LinkedHashMap::Handle(ImmutableLinkedHashMap::NewUninitialized()); +static MapPtr ConstructImmutableMap(const Array& input_data, + intptr_t used_data, + const TypeArguments& type_arguments) { + auto& map = Map::Handle(ConstMap::NewUninitialized()); const auto& data = Array::Handle(Array::New(used_data)); for (intptr_t i = 0; i < used_data; i++) { @@ -6767,7 +6765,7 @@ static LinkedHashMapPtr ConstructImmutableMap( } // Constructs an immutable hashmap from a mutable one in this test. -TEST_CASE(ImmutableLinkedHashMap_vm) { +TEST_CASE(ConstMap_vm) { const char* kScript = R"( enum ExperimentalFlag { alternativeInvalidationStrategy, @@ -6847,16 +6845,16 @@ bool? lookupNull(Map map) => map[null]; { TransitionNativeToVM transition(thread); - const auto& non_const_map = LinkedHashMap::Cast( - Object::Handle(Api::UnwrapHandle(non_const_result))); + const auto& non_const_map = + Map::Cast(Object::Handle(Api::UnwrapHandle(non_const_result))); const auto& non_const_type_args = TypeArguments::Handle(non_const_map.GetTypeArguments()); const auto& non_const_data = Array::Handle(non_const_map.data()); - const auto& const_map = LinkedHashMap::Handle(ConstructImmutableMap( + const auto& const_map = Map::Handle(ConstructImmutableMap( non_const_data, Smi::Value(non_const_map.used_data()), non_const_type_args)); - ASSERT(non_const_map.GetClassId() == kLinkedHashMapCid); - ASSERT(const_map.GetClassId() == kImmutableLinkedHashMapCid); + ASSERT(non_const_map.GetClassId() == kMapCid); + ASSERT(const_map.GetClassId() == kConstMapCid); ASSERT(!non_const_map.IsCanonical()); ASSERT(const_map.IsCanonical()); @@ -6877,10 +6875,10 @@ bool? lookupNull(Map map) => map[null]; TransitionNativeToVM transition(thread); const auto& non_const_object = Object::Handle(Api::UnwrapHandle(non_const_result)); - const auto& non_const_map = LinkedHashMap::Cast(non_const_object); + const auto& non_const_map = Map::Cast(non_const_object); const auto& const_object = Object::Handle(Api::UnwrapHandle(const_argument)); - const auto& const_map = LinkedHashMap::Cast(const_object); + const auto& const_map = Map::Cast(const_object); EXPECT(non_const_map.GetClassId() != const_map.GetClassId()); @@ -6891,7 +6889,7 @@ bool? lookupNull(Map map) => map[null]; } static bool IsLinkedHashBase(const Object& object) { - return object.IsLinkedHashMap() || object.IsLinkedHashSet(); + return object.IsMap() || object.IsSet(); } // Checks that the non-constant and constant HashMap and HashSets are equal. @@ -6915,7 +6913,7 @@ static void HashBaseNonConstEqualsConst(const char* script, const auto& non_const_object = Object::Handle(Api::UnwrapHandle(non_const_result)); const auto& const_object = Object::Handle(Api::UnwrapHandle(const_result)); - non_const_object.IsLinkedHashMap(); + non_const_object.IsMap(); EXPECT(IsLinkedHashBase(non_const_object)); if (!IsLinkedHashBase(non_const_object)) return; const auto& non_const_value = LinkedHashBase::Cast(non_const_object); @@ -6932,17 +6930,15 @@ static void HashBaseNonConstEqualsConst(const char* script, static void HashMapNonConstEqualsConst(const char* script, bool check_data = true) { - HashBaseNonConstEqualsConst(script, check_data); + HashBaseNonConstEqualsConst(script, check_data); } static void HashSetNonConstEqualsConst(const char* script, bool check_data = true) { - HashBaseNonConstEqualsConst(script, check_data); + HashBaseNonConstEqualsConst(script, check_data); } -TEST_CASE(ImmutableLinkedHashMap_small) { +TEST_CASE(ConstMap_small) { const char* kScript = R"( constValue() => const {1: 42, 'foo': 499, 2: 'bar'}; @@ -6955,7 +6951,7 @@ void init() { HashMapNonConstEqualsConst(kScript); } -TEST_CASE(ImmutableLinkedHashMap_null) { +TEST_CASE(ConstMap_null) { const char* kScript = R"( constValue() => const {1: 42, 'foo': 499, null: 'bar'}; @@ -6968,7 +6964,7 @@ void init() { HashMapNonConstEqualsConst(kScript); } -TEST_CASE(ImmutableLinkedHashMap_larger) { +TEST_CASE(ConstMap_larger) { const char* kScript = R"( enum ExperimentalFlag { alternativeInvalidationStrategy, @@ -7038,7 +7034,7 @@ void init() { HashMapNonConstEqualsConst(kScript); } -TEST_CASE(ImmutableLinkedHashMap_nested) { +TEST_CASE(ConstMap_nested) { const char* kScript = R"( enum Abi { wordSize64, @@ -7100,7 +7096,7 @@ void init() { HashMapNonConstEqualsConst(kScript, false); } -TEST_CASE(LinkedHashSet_iteration) { +TEST_CASE(Set_iteration) { const char* kScript = R"( makeSet() { var set = {'x', 'y', 'z', 'w'}; @@ -7117,12 +7113,12 @@ makeSet() { TransitionNativeToVM transition(thread); Instance& dart_set = Instance::Handle(); dart_set ^= Api::UnwrapHandle(h_result); - ASSERT(dart_set.IsLinkedHashSet()); - const LinkedHashSet& cc_set = LinkedHashSet::Cast(dart_set); + ASSERT(dart_set.IsSet()); + const Set& cc_set = Set::Cast(dart_set); EXPECT_EQ(2, cc_set.Length()); - LinkedHashSet::Iterator iterator(cc_set); + Set::Iterator iterator(cc_set); Object& object = Object::Handle(); EXPECT(iterator.MoveNext()); @@ -7137,11 +7133,10 @@ makeSet() { } // Copies elements from data. -static LinkedHashSetPtr ConstructImmutableSet( - const Array& input_data, - intptr_t used_data, - const TypeArguments& type_arguments) { - auto& set = LinkedHashSet::Handle(ImmutableLinkedHashSet::NewUninitialized()); +static SetPtr ConstructImmutableSet(const Array& input_data, + intptr_t used_data, + const TypeArguments& type_arguments) { + auto& set = Set::Handle(ConstSet::NewUninitialized()); const auto& data = Array::Handle(Array::New(used_data)); for (intptr_t i = 0; i < used_data; i++) { @@ -7157,7 +7152,7 @@ static LinkedHashSetPtr ConstructImmutableSet( return set.ptr(); } -TEST_CASE(ImmutableLinkedHashSet_vm) { +TEST_CASE(ConstSet_vm) { const char* kScript = R"( makeNonConstSet() { return {1, 2, 3, 5, 8, 13}; @@ -7177,17 +7172,17 @@ bool containsFive(Set set) => set.contains(5); TransitionNativeToVM transition(thread); const auto& non_const_object = Object::Handle(Api::UnwrapHandle(non_const_result)); - const auto& non_const_set = LinkedHashSet::Cast(non_const_object); - ASSERT(non_const_set.GetClassId() == kLinkedHashSetCid); + const auto& non_const_set = Set::Cast(non_const_object); + ASSERT(non_const_set.GetClassId() == kSetCid); ASSERT(!non_const_set.IsCanonical()); const auto& non_const_data = Array::Handle(non_const_set.data()); const auto& non_const_type_args = TypeArguments::Handle(non_const_set.GetTypeArguments()); - const auto& const_set = LinkedHashSet::Handle(ConstructImmutableSet( + const auto& const_set = Set::Handle(ConstructImmutableSet( non_const_data, Smi::Value(non_const_set.used_data()), non_const_type_args)); - ASSERT(const_set.GetClassId() == kImmutableLinkedHashSetCid); + ASSERT(const_set.GetClassId() == kConstSetCid); ASSERT(const_set.IsCanonical()); const_argument = Api::NewHandle(thread, const_set.ptr()); @@ -7202,10 +7197,10 @@ bool containsFive(Set set) => set.contains(5); TransitionNativeToVM transition(thread); const auto& non_const_object = Object::Handle(Api::UnwrapHandle(non_const_result)); - const auto& non_const_set = LinkedHashSet::Cast(non_const_object); + const auto& non_const_set = Set::Cast(non_const_object); const auto& const_object = Object::Handle(Api::UnwrapHandle(const_argument)); - const auto& const_set = LinkedHashSet::Cast(const_object); + const auto& const_set = Set::Cast(const_object); EXPECT(non_const_set.GetClassId() != const_set.GetClassId()); @@ -7215,7 +7210,7 @@ bool containsFive(Set set) => set.contains(5); } } -TEST_CASE(ImmutableLinkedHashSet_small) { +TEST_CASE(ConstSet_small) { const char* kScript = R"( constValue() => const {1, 2, 3, 5, 8, 13}; @@ -7228,7 +7223,7 @@ void init() { HashSetNonConstEqualsConst(kScript); } -TEST_CASE(ImmutableLinkedHashSet_larger) { +TEST_CASE(ConstSet_larger) { const char* kScript = R"( const Set tokensThatMayFollowTypeArg = { '(', diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc index 004c99db3039e..234ae781cc5f3 100644 --- a/runtime/vm/raw_object.cc +++ b/runtime/vm/raw_object.cc @@ -549,8 +549,8 @@ COMPRESSED_VISITOR(UnwindError) COMPRESSED_VISITOR(ExternalOneByteString) COMPRESSED_VISITOR(ExternalTwoByteString) COMPRESSED_VISITOR(GrowableObjectArray) -COMPRESSED_VISITOR(LinkedHashMap) -COMPRESSED_VISITOR(LinkedHashSet) +COMPRESSED_VISITOR(Map) +COMPRESSED_VISITOR(Set) COMPRESSED_VISITOR(ExternalTypedData) TYPED_DATA_VIEW_VISITOR(TypedDataView) COMPRESSED_VISITOR(ReceivePort) @@ -747,16 +747,16 @@ intptr_t UntaggedImmutableArray::VisitImmutableArrayPointers( return UntaggedArray::VisitArrayPointers(raw_obj, visitor); } -intptr_t UntaggedImmutableLinkedHashMap::VisitImmutableLinkedHashMapPointers( - ImmutableLinkedHashMapPtr raw_obj, +intptr_t UntaggedConstMap::VisitConstMapPointers( + ConstMapPtr raw_obj, ObjectPointerVisitor* visitor) { - return UntaggedLinkedHashMap::VisitLinkedHashMapPointers(raw_obj, visitor); + return UntaggedMap::VisitMapPointers(raw_obj, visitor); } -intptr_t UntaggedImmutableLinkedHashSet::VisitImmutableLinkedHashSetPointers( - ImmutableLinkedHashSetPtr raw_obj, +intptr_t UntaggedConstSet::VisitConstSetPointers( + ConstSetPtr raw_obj, ObjectPointerVisitor* visitor) { - return UntaggedLinkedHashSet::VisitLinkedHashSetPointers(raw_obj, visitor); + return UntaggedSet::VisitSetPointers(raw_obj, visitor); } void UntaggedObject::RememberCard(ObjectPtr const* slot) { diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h index cf321eef79db6..5e653c31ccfb3 100644 --- a/runtime/vm/raw_object.h +++ b/runtime/vm/raw_object.h @@ -3090,19 +3090,19 @@ class UntaggedArray : public UntaggedInstance { // Variable length data follows here. COMPRESSED_VARIABLE_POINTER_FIELDS(ObjectPtr, element, data) - friend class LinkedHashMapSerializationCluster; - friend class LinkedHashMapDeserializationCluster; - friend class LinkedHashSetSerializationCluster; - friend class LinkedHashSetDeserializationCluster; + friend class MapSerializationCluster; + friend class MapDeserializationCluster; + friend class SetSerializationCluster; + friend class SetDeserializationCluster; friend class CodeSerializationCluster; friend class CodeDeserializationCluster; friend class Deserializer; friend class UntaggedCode; friend class UntaggedImmutableArray; friend class GrowableObjectArray; - friend class LinkedHashMap; - friend class UntaggedLinkedHashMap; - friend class UntaggedImmutableLinkedHashMap; + friend class Map; + friend class UntaggedMap; + friend class UntaggedConstMap; friend class Object; friend class ICData; // For high performance access. friend class SubtypeTestCache; // For high performance access. @@ -3149,24 +3149,24 @@ class UntaggedLinkedHashBase : public UntaggedInstance { } }; -class UntaggedLinkedHashMap : public UntaggedLinkedHashBase { - RAW_HEAP_OBJECT_IMPLEMENTATION(LinkedHashMap); +class UntaggedMap : public UntaggedLinkedHashBase { + RAW_HEAP_OBJECT_IMPLEMENTATION(Map); - friend class UntaggedImmutableLinkedHashMap; + friend class UntaggedConstMap; }; -class UntaggedImmutableLinkedHashMap : public UntaggedLinkedHashMap { - RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableLinkedHashMap); +class UntaggedConstMap : public UntaggedMap { + RAW_HEAP_OBJECT_IMPLEMENTATION(ConstMap); }; -class UntaggedLinkedHashSet : public UntaggedLinkedHashBase { - RAW_HEAP_OBJECT_IMPLEMENTATION(LinkedHashSet); +class UntaggedSet : public UntaggedLinkedHashBase { + RAW_HEAP_OBJECT_IMPLEMENTATION(Set); - friend class UntaggedImmutableLinkedHashSet; + friend class UntaggedConstSet; }; -class UntaggedImmutableLinkedHashSet : public UntaggedLinkedHashSet { - RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableLinkedHashSet); +class UntaggedConstSet : public UntaggedSet { + RAW_HEAP_OBJECT_IMPLEMENTATION(ConstSet); }; class UntaggedFloat32x4 : public UntaggedInstance { @@ -3475,7 +3475,7 @@ class UntaggedFinalizerBase : public UntaggedInstance { COMPRESSED_POINTER_FIELD(ObjectPtr, detachments) VISIT_FROM(detachments) - COMPRESSED_POINTER_FIELD(LinkedHashSetPtr, all_entries) + COMPRESSED_POINTER_FIELD(SetPtr, all_entries) COMPRESSED_POINTER_FIELD(FinalizerEntryPtr, entries_collected) template diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc index ef6891162d416..f3e339a028498 100644 --- a/runtime/vm/raw_object_fields.cc +++ b/runtime/vm/raw_object_fields.cc @@ -166,30 +166,30 @@ namespace dart { F(GrowableObjectArray, type_arguments_) \ F(GrowableObjectArray, length_) \ F(GrowableObjectArray, data_) \ - F(LinkedHashMap, type_arguments_) \ - F(LinkedHashMap, index_) \ - F(LinkedHashMap, hash_mask_) \ - F(LinkedHashMap, data_) \ - F(LinkedHashMap, used_data_) \ - F(LinkedHashMap, deleted_keys_) \ - F(ImmutableLinkedHashMap, type_arguments_) \ - F(ImmutableLinkedHashMap, index_) \ - F(ImmutableLinkedHashMap, hash_mask_) \ - F(ImmutableLinkedHashMap, data_) \ - F(ImmutableLinkedHashMap, used_data_) \ - F(ImmutableLinkedHashMap, deleted_keys_) \ - F(LinkedHashSet, type_arguments_) \ - F(LinkedHashSet, index_) \ - F(LinkedHashSet, hash_mask_) \ - F(LinkedHashSet, data_) \ - F(LinkedHashSet, used_data_) \ - F(LinkedHashSet, deleted_keys_) \ - F(ImmutableLinkedHashSet, type_arguments_) \ - F(ImmutableLinkedHashSet, index_) \ - F(ImmutableLinkedHashSet, hash_mask_) \ - F(ImmutableLinkedHashSet, data_) \ - F(ImmutableLinkedHashSet, used_data_) \ - F(ImmutableLinkedHashSet, deleted_keys_) \ + F(Map, type_arguments_) \ + F(Map, index_) \ + F(Map, hash_mask_) \ + F(Map, data_) \ + F(Map, used_data_) \ + F(Map, deleted_keys_) \ + F(ConstMap, type_arguments_) \ + F(ConstMap, index_) \ + F(ConstMap, hash_mask_) \ + F(ConstMap, data_) \ + F(ConstMap, used_data_) \ + F(ConstMap, deleted_keys_) \ + F(Set, type_arguments_) \ + F(Set, index_) \ + F(Set, hash_mask_) \ + F(Set, data_) \ + F(Set, used_data_) \ + F(Set, deleted_keys_) \ + F(ConstSet, type_arguments_) \ + F(ConstSet, index_) \ + F(ConstSet, hash_mask_) \ + F(ConstSet, data_) \ + F(ConstSet, used_data_) \ + F(ConstSet, deleted_keys_) \ F(TypedData, length_) \ F(ExternalTypedData, length_) \ F(ReceivePort, send_port_) \ diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc index c2c28c4740e59..ec4385f869d2c 100644 --- a/runtime/vm/service.cc +++ b/runtime/vm/service.cc @@ -2422,7 +2422,7 @@ static void PrintRetainingPath(Thread* thread, String& name = String::Handle(); Class& element_class = Class::Handle(); Array& element_field_map = Array::Handle(); - LinkedHashMap& map = LinkedHashMap::Handle(); + Map& map = Map::Handle(); Array& map_data = Array::Handle(); Field& field = Field::Handle(); WeakProperty& wp = WeakProperty::Handle(); @@ -2445,13 +2445,13 @@ static void PrintRetainingPath(Thread* thread, AddParentFieldToResponseBasedOnRecord(&field_names, &name, jselement, Record::Cast(element), slot_offset.Value()); - } else if (element.IsLinkedHashMap()) { - map = static_cast(path.At(i * 2)); + } else if (element.IsMap()) { + map = static_cast(path.At(i * 2)); map_data = map.data(); intptr_t element_index = (slot_offset.Value() - Array::element_offset(0)) / Array::kBytesPerElement; - LinkedHashMap::Iterator iterator(map); + Map::Iterator iterator(map); while (iterator.MoveNext()) { if (iterator.CurrentKey() == map_data.At(element_index) || iterator.CurrentValue() == map_data.At(element_index)) { diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h index 52b073c77913d..9540d42fa58bb 100644 --- a/runtime/vm/symbols.h +++ b/runtime/vm/symbols.h @@ -283,6 +283,8 @@ class ObjectPointerVisitor; V(_ClosureCall, "_Closure.call") \ V(_CombinatorMirror, "_CombinatorMirror") \ V(_CompileTimeError, "_CompileTimeError") \ + V(_ConstMap, "_ConstMap") \ + V(_ConstSet, "_ConstSet") \ V(_ControllerSubscription, "_ControllerSubscription") \ V(_DeletedEnumPrefix, "Deleted enum value from ") \ V(_DeletedEnumSentinel, "_deleted_enum_sentinel") \ @@ -326,8 +328,6 @@ class ObjectPointerVisitor; V(_GrowableListGenerateFactory, "_GrowableList.generate") \ V(_GrowableListLiteralFactory, "_GrowableList._literal") \ V(_GrowableListWithData, "_GrowableList._withData") \ - V(_ImmutableLinkedHashMap, "_InternalImmutableLinkedHashMap") \ - V(_ImmutableLinkedHashSet, "_InternalImmutableLinkedHashSet") \ V(_ImmutableList, "_ImmutableList") \ V(_Int16ArrayFactory, "Int16List.") \ V(_Int16ArrayView, "_Int16ArrayView") \ @@ -350,12 +350,11 @@ class ObjectPointerVisitor; V(_LibraryDependencyMirror, "_LibraryDependencyMirror") \ V(_LibraryMirror, "_LibraryMirror") \ V(_LibraryPrefix, "_LibraryPrefix") \ - V(_LinkedHashMap, "_InternalLinkedHashMap") \ - V(_LinkedHashSet, "_InternalLinkedHashSet") \ V(_List, "_List") \ V(_ListFactory, "_List.") \ V(_ListFilledFactory, "_List.filled") \ V(_ListGenerateFactory, "_List.generate") \ + V(_Map, "_Map") \ V(_MethodMirror, "_MethodMirror") \ V(_Mint, "_Mint") \ V(_MirrorReference, "_MirrorReference") \ @@ -367,6 +366,7 @@ class ObjectPointerVisitor; V(_RecordType, "_RecordType") \ V(_RegExp, "_RegExp") \ V(_SendPortImpl, "_SendPortImpl") \ + V(_Set, "_Set") \ V(_Smi, "_Smi") \ V(_SourceLocation, "_SourceLocation") \ V(_SpecialTypeMirror, "_SpecialTypeMirror") \ diff --git a/runtime/vm/tagged_pointer.h b/runtime/vm/tagged_pointer.h index cfbfda72454f3..529e3b2464c83 100644 --- a/runtime/vm/tagged_pointer.h +++ b/runtime/vm/tagged_pointer.h @@ -412,10 +412,10 @@ DEFINE_TAGGED_POINTER(Array, Instance) DEFINE_TAGGED_POINTER(ImmutableArray, Array) DEFINE_TAGGED_POINTER(GrowableObjectArray, Instance) DEFINE_TAGGED_POINTER(LinkedHashBase, Instance) -DEFINE_TAGGED_POINTER(LinkedHashMap, LinkedHashBase) -DEFINE_TAGGED_POINTER(LinkedHashSet, LinkedHashBase) -DEFINE_TAGGED_POINTER(ImmutableLinkedHashMap, LinkedHashMap) -DEFINE_TAGGED_POINTER(ImmutableLinkedHashSet, LinkedHashSet) +DEFINE_TAGGED_POINTER(Map, LinkedHashBase) +DEFINE_TAGGED_POINTER(Set, LinkedHashBase) +DEFINE_TAGGED_POINTER(ConstMap, Map) +DEFINE_TAGGED_POINTER(ConstSet, Set) DEFINE_TAGGED_POINTER(Float32x4, Instance) DEFINE_TAGGED_POINTER(Int32x4, Instance) DEFINE_TAGGED_POINTER(Float64x2, Instance) diff --git a/sdk/lib/_internal/vm/lib/hash_factories.dart b/sdk/lib/_internal/vm/lib/hash_factories.dart index 59a918645b455..fea5baab6bd27 100644 --- a/sdk/lib/_internal/vm/lib/hash_factories.dart +++ b/sdk/lib/_internal/vm/lib/hash_factories.dart @@ -19,7 +19,7 @@ class LinkedHashMap { if (isValidKey == null) { if (hashCode == null) { if (equals == null) { - return new _InternalLinkedHashMap(); + return new _Map(); } hashCode = _defaultHashCode; } else { @@ -50,7 +50,7 @@ class LinkedHashSet { if (isValidKey == null) { if (hashCode == null) { if (equals == null) { - return new _InternalLinkedHashSet(); + return new _Set(); } hashCode = _defaultHashCode; } else { diff --git a/sdk/lib/_internal/vm_shared/lib/compact_hash.dart b/sdk/lib/_internal/vm_shared/lib/compact_hash.dart index ca484a94af919..11da727ae4606 100644 --- a/sdk/lib/_internal/vm_shared/lib/compact_hash.dart +++ b/sdk/lib/_internal/vm_shared/lib/compact_hash.dart @@ -282,16 +282,17 @@ final _uninitializedIndex = new Uint32List(_HashBase._UNINITIALIZED_INDEX_SIZE); // in maps and sets to be monomorphic. final _uninitializedData = new List.filled(0, null); -// VM-internalized implementation of a default-constructed LinkedHashMap. +// VM-internalized implementation of a default-constructed LinkedHashMap. Map +// literals also create instances of this class. @pragma("vm:entry-point") -class _InternalLinkedHashMap extends _HashVMBase +class _Map extends _HashVMBase with MapMixin, _HashBase, _OperatorEqualsAndHashCode, _LinkedHashMapMixin implements LinkedHashMap { - _InternalLinkedHashMap() { + _Map() { _index = _uninitializedIndex; _hashMask = _HashBase._UNINITIALIZED_HASH_MASK; _data = _uninitializedData; @@ -300,8 +301,8 @@ class _InternalLinkedHashMap extends _HashVMBase } void addAll(Map other) { - if (other is _InternalLinkedHashMap) { - final otherBase = other as _InternalLinkedHashMap; // manual promotion. + if (other is _Map) { + final otherBase = other as _Map; // manual promotion. // If this map is empty we might be able to block-copy from [other]. if (isEmpty && _quickCopy(otherBase)) return; // TODO(48143): Pre-grow capacity if it will reduce rehashing. @@ -310,11 +311,11 @@ class _InternalLinkedHashMap extends _HashVMBase } } -// This is essentially the same class as _InternalLinkedHashMap, but it does +// This is essentially the same class as _Map, but it does // not permit any modification of map entries from Dart code. We use // this class for maps constructed from Dart constant maps. @pragma("vm:entry-point") -class _InternalImmutableLinkedHashMap extends _HashVMImmutableBase +class _ConstMap extends _HashVMImmutableBase with MapMixin, _HashBase, @@ -323,8 +324,8 @@ class _InternalImmutableLinkedHashMap extends _HashVMImmutableBase _UnmodifiableMapMixin, _ImmutableLinkedHashMapMixin implements LinkedHashMap { - factory _InternalImmutableLinkedHashMap._uninstantiable() { - throw new UnsupportedError("ImmutableMap can only be allocated by the VM"); + factory _ConstMap._uninstantiable() { + throw new UnsupportedError("_ConstMap can only be allocated by the VM"); } } @@ -946,16 +947,17 @@ mixin _LinkedHashSetMixin on _HashBase, _EqualsAndHashCode { } } -// Set implementation, analogous to _InternalLinkedHashMap. +// Set implementation, analogous to _Map. Set literals create instances of this +// class. @pragma('vm:entry-point') -class _InternalLinkedHashSet extends _HashVMBase +class _Set extends _HashVMBase with SetMixin, _HashBase, _OperatorEqualsAndHashCode, _LinkedHashSetMixin implements LinkedHashSet { - _InternalLinkedHashSet() { + _Set() { _index = _uninitializedIndex; _hashMask = _HashBase._UNINITIALIZED_HASH_MASK; _data = _uninitializedData; @@ -965,16 +967,16 @@ class _InternalLinkedHashSet extends _HashVMBase Set cast() => Set.castFrom(this, newSet: _newEmpty); - static Set _newEmpty() => _InternalLinkedHashSet(); + static Set _newEmpty() => _Set(); // Returns a set of the same type, although this // is not required by the spec. (For instance, always using an identity set // would be technically correct, albeit surprising.) - Set toSet() => _InternalLinkedHashSet()..addAll(this); + Set toSet() => _Set()..addAll(this); void addAll(Iterable other) { - if (other is _InternalLinkedHashSet) { - final otherBase = other as _InternalLinkedHashSet; + if (other is _Set) { + final otherBase = other as _Set; // If this set is empty we might be able to block-copy from [other]. if (isEmpty && _quickCopy(otherBase)) return; // TODO(48143): Pre-grow capacity if it will reduce rehashing. @@ -984,7 +986,7 @@ class _InternalLinkedHashSet extends _HashVMBase } @pragma("vm:entry-point") -class _InternalImmutableLinkedHashSet extends _HashVMImmutableBase +class _ConstSet extends _HashVMImmutableBase with SetMixin, _HashBase, @@ -993,16 +995,16 @@ class _InternalImmutableLinkedHashSet extends _HashVMImmutableBase _UnmodifiableSetMixin, _ImmutableLinkedHashSetMixin implements LinkedHashSet { - factory _InternalImmutableLinkedHashSet._uninstantiable() { - throw new UnsupportedError("ImmutableSet can only be allocated by the VM"); + factory _ConstSet._uninstantiable() { + throw new UnsupportedError("_ConstSet can only be allocated by the VM"); } Set cast() => Set.castFrom(this, newSet: _newEmpty); - static Set _newEmpty() => _InternalLinkedHashSet(); + static Set _newEmpty() => _Set(); // Returns a mutable set. - Set toSet() => _InternalLinkedHashSet()..addAll(this); + Set toSet() => _Set()..addAll(this); } mixin _ImmutableLinkedHashSetMixin