| library; |
| import self as self; |
| import "dart:core" as core; |
| import "dart:collection" as col; |
| |
| import "dart:collection"; |
| |
| class MyMap<K extends core::Object? = dynamic, V extends core::Object? = dynamic> extends self::_MyMap&Object&MapMixin<self::MyMap::K%, self::MyMap::V%> { |
| field core::int containsKeyCount = 0; |
| field core::int indexGetCount = 0; |
| final field core::Map<self::MyMap::K%, self::MyMap::V%> _map; |
| constructor •(core::Map<self::MyMap::K%, self::MyMap::V%> _map) → self::MyMap<self::MyMap::K%, self::MyMap::V%> |
| : self::MyMap::_map = _map, super self::_MyMap&Object&MapMixin::•() |
| ; |
| method containsKey(core::Object? key) → core::bool { |
| this.{self::MyMap::containsKeyCount} = this.{self::MyMap::containsKeyCount}{core::int}.{core::num::+}(1){(core::num) → core::int}; |
| return this.{self::MyMap::_map}{core::Map<self::MyMap::K%, self::MyMap::V%>}.{core::Map::containsKey}(key){(core::Object?) → core::bool}; |
| } |
| operator [](core::Object? key) → self::MyMap::V? { |
| this.{self::MyMap::indexGetCount} = this.{self::MyMap::indexGetCount}{core::int}.{core::num::+}(1){(core::num) → core::int}; |
| return this.{self::MyMap::_map}{core::Map<self::MyMap::K%, self::MyMap::V%>}.{core::Map::[]}(key){(core::Object?) → self::MyMap::V?}; |
| } |
| operator []=(covariant-by-class self::MyMap::K% key, covariant-by-class self::MyMap::V% value) → void |
| return let final core::Map<self::MyMap::K%, self::MyMap::V%> #t1 = this.{self::MyMap::_map}{core::Map<self::MyMap::K%, self::MyMap::V%>} in let final self::MyMap::K% #t2 = key in let final self::MyMap::V% #t3 = value in let final void #t4 = #t1.{core::Map::[]=}(#t2, #t3){(self::MyMap::K%, self::MyMap::V%) → void} in #t3; |
| method clear() → void |
| return this.{self::MyMap::_map}{core::Map<self::MyMap::K%, self::MyMap::V%>}.{core::Map::clear}(){() → void}; |
| get keys() → core::Iterable<self::MyMap::K%> |
| return this.{self::MyMap::_map}{core::Map<self::MyMap::K%, self::MyMap::V%>}.{core::Map::keys}{core::Iterable<self::MyMap::K%>}; |
| method remove(core::Object? key) → self::MyMap::V? |
| return this.{self::MyMap::_map}{core::Map<self::MyMap::K%, self::MyMap::V%>}.{core::Map::remove}(key){(core::Object?) → self::MyMap::V?}; |
| } |
| abstract class _MyMap&Object&MapMixin<K extends core::Object? = dynamic, V extends core::Object? = dynamic> extends core::Object implements col::MapBase<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { |
| const synthetic constructor •() → self::_MyMap&Object&MapMixin<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%> |
| : super core::Object::•() |
| ; |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ containsKey(core::Object? key) → core::bool |
| return this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::contains}(key){(core::Object?) → core::bool}; |
| abstract operator /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ [](core::Object? key) → self::_MyMap&Object&MapMixin::V?; |
| abstract operator /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ []=(covariant-by-class self::_MyMap&Object&MapMixin::K% key, covariant-by-class self::_MyMap&Object&MapMixin::V% value) → void; |
| abstract method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ clear() → void; |
| abstract method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ remove(core::Object? key) → self::_MyMap&Object&MapMixin::V?; |
| abstract get /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ keys() → core::Iterable<self::_MyMap&Object&MapMixin::K%>; |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ cast<RK extends core::Object? = dynamic, RV extends core::Object? = dynamic>() → core::Map<self::_MyMap&Object&MapMixin::cast::RK%, self::_MyMap&Object&MapMixin::cast::RV%> |
| return core::Map::castFrom<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%, self::_MyMap&Object&MapMixin::cast::RK%, self::_MyMap&Object&MapMixin::cast::RV%>(this); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ forEach((self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → void action) → void { |
| { |
| synthesized core::Iterator<self::_MyMap&Object&MapMixin::K%> :sync-for-iterator = this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::iterator}{core::Iterator<self::_MyMap&Object&MapMixin::K%>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| self::_MyMap&Object&MapMixin::K% key = :sync-for-iterator.{core::Iterator::current}{self::_MyMap&Object&MapMixin::K%}; |
| { |
| action(key, let self::_MyMap&Object&MapMixin::V? #t5 = this.{col::MapBase::[]}(key){(core::Object?) → self::_MyMap&Object&MapMixin::V?} in #t5 == null ?{self::_MyMap&Object&MapMixin::V%} let self::_MyMap&Object&MapMixin::V? #t6 = #t5 in #t6 == null ?{self::_MyMap&Object&MapMixin::V%} #t6 as self::_MyMap&Object&MapMixin::V% : #t6{self::_MyMap&Object&MapMixin::V%} : #t5{self::_MyMap&Object&MapMixin::V%}){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → void}; |
| } |
| } |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ addAll(covariant-by-class core::Map<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%> other) → void { |
| other.{core::Map::forEach}((self::_MyMap&Object&MapMixin::K% key, self::_MyMap&Object&MapMixin::V% value) → void { |
| this.{col::MapBase::[]=}(key, value){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → void}; |
| }){((self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → void) → void}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ containsValue(core::Object? value) → core::bool { |
| { |
| synthesized core::Iterator<self::_MyMap&Object&MapMixin::K%> :sync-for-iterator = this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::iterator}{core::Iterator<self::_MyMap&Object&MapMixin::K%>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| self::_MyMap&Object&MapMixin::K% key = :sync-for-iterator.{core::Iterator::current}{self::_MyMap&Object&MapMixin::K%}; |
| { |
| if(this.{col::MapBase::[]}(key){(core::Object?) → self::_MyMap&Object&MapMixin::V?} =={core::Object::==}{(core::Object) → core::bool} value) |
| return true; |
| } |
| } |
| } |
| return false; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ putIfAbsent(covariant-by-class self::_MyMap&Object&MapMixin::K% key, covariant-by-class () → self::_MyMap&Object&MapMixin::V% ifAbsent) → self::_MyMap&Object&MapMixin::V% { |
| if(this.{col::MapBase::containsKey}(key){(core::Object?) → core::bool}) { |
| return let self::_MyMap&Object&MapMixin::V? #t7 = this.{col::MapBase::[]}(key){(core::Object?) → self::_MyMap&Object&MapMixin::V?} in #t7 == null ?{self::_MyMap&Object&MapMixin::V%} let self::_MyMap&Object&MapMixin::V? #t8 = #t7 in #t8 == null ?{self::_MyMap&Object&MapMixin::V%} #t8 as self::_MyMap&Object&MapMixin::V% : #t8{self::_MyMap&Object&MapMixin::V%} : #t7{self::_MyMap&Object&MapMixin::V%}; |
| } |
| return let final self::_MyMap&Object&MapMixin::K% #t9 = key in let final self::_MyMap&Object&MapMixin::V% #t10 = ifAbsent(){() → self::_MyMap&Object&MapMixin::V%} in let final void #t11 = this.{col::MapBase::[]=}(#t9, #t10){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → void} in #t10; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ update(covariant-by-class self::_MyMap&Object&MapMixin::K% key, covariant-by-class (self::_MyMap&Object&MapMixin::V%) → self::_MyMap&Object&MapMixin::V% update, {covariant-by-class () →? self::_MyMap&Object&MapMixin::V% ifAbsent = #C1}) → self::_MyMap&Object&MapMixin::V% { |
| if(this.{col::MapBase::containsKey}(key){(core::Object?) → core::bool}) { |
| return let final self::_MyMap&Object&MapMixin::K% #t12 = key in let final self::_MyMap&Object&MapMixin::V% #t13 = update(let self::_MyMap&Object&MapMixin::V? #t14 = this.{col::MapBase::[]}(key){(core::Object?) → self::_MyMap&Object&MapMixin::V?} in #t14 == null ?{self::_MyMap&Object&MapMixin::V%} let self::_MyMap&Object&MapMixin::V? #t15 = #t14 in #t15 == null ?{self::_MyMap&Object&MapMixin::V%} #t15 as self::_MyMap&Object&MapMixin::V% : #t15{self::_MyMap&Object&MapMixin::V%} : #t14{self::_MyMap&Object&MapMixin::V%}){(self::_MyMap&Object&MapMixin::V%) → self::_MyMap&Object&MapMixin::V%} in let final void #t16 = this.{col::MapBase::[]=}(#t12, #t13){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → void} in #t13; |
| } |
| if(!(ifAbsent == null)) { |
| return let final self::_MyMap&Object&MapMixin::K% #t17 = key in let final self::_MyMap&Object&MapMixin::V% #t18 = ifAbsent{() → self::_MyMap&Object&MapMixin::V%}(){() → self::_MyMap&Object&MapMixin::V%} in let final void #t19 = this.{col::MapBase::[]=}(#t17, #t18){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → void} in #t18; |
| } |
| throw new core::ArgumentError::value(key, "key", "Key not in map."); |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ updateAll(covariant-by-class (self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → self::_MyMap&Object&MapMixin::V% update) → void { |
| { |
| synthesized core::Iterator<self::_MyMap&Object&MapMixin::K%> :sync-for-iterator = this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::iterator}{core::Iterator<self::_MyMap&Object&MapMixin::K%>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| self::_MyMap&Object&MapMixin::K% key = :sync-for-iterator.{core::Iterator::current}{self::_MyMap&Object&MapMixin::K%}; |
| { |
| this.{col::MapBase::[]=}(key, update(key, let self::_MyMap&Object&MapMixin::V? #t20 = this.{col::MapBase::[]}(key){(core::Object?) → self::_MyMap&Object&MapMixin::V?} in #t20 == null ?{self::_MyMap&Object&MapMixin::V%} let self::_MyMap&Object&MapMixin::V? #t21 = #t20 in #t21 == null ?{self::_MyMap&Object&MapMixin::V%} #t21 as self::_MyMap&Object&MapMixin::V% : #t21{self::_MyMap&Object&MapMixin::V%} : #t20{self::_MyMap&Object&MapMixin::V%}){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → self::_MyMap&Object&MapMixin::V%}){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → void}; |
| } |
| } |
| } |
| } |
| get /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ entries() → core::Iterable<core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>> { |
| return this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::map}<core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>>((self::_MyMap&Object&MapMixin::K% key) → core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%> => new core::MapEntry::_<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>(key, let self::_MyMap&Object&MapMixin::V? #t22 = this.{col::MapBase::[]}(key){(core::Object?) → self::_MyMap&Object&MapMixin::V?} in #t22 == null ?{self::_MyMap&Object&MapMixin::V%} let self::_MyMap&Object&MapMixin::V? #t23 = #t22 in #t23 == null ?{self::_MyMap&Object&MapMixin::V%} #t23 as self::_MyMap&Object&MapMixin::V% : #t23{self::_MyMap&Object&MapMixin::V%} : #t22{self::_MyMap&Object&MapMixin::V%})){((self::_MyMap&Object&MapMixin::K%) → core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>) → core::Iterable<core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>>}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ map<K2 extends core::Object? = dynamic, V2 extends core::Object? = dynamic>((self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → core::MapEntry<self::_MyMap&Object&MapMixin::map::K2%, self::_MyMap&Object&MapMixin::map::V2%> transform) → core::Map<self::_MyMap&Object&MapMixin::map::K2%, self::_MyMap&Object&MapMixin::map::V2%> { |
| core::Map<self::_MyMap&Object&MapMixin::map::K2%, self::_MyMap&Object&MapMixin::map::V2%> result = <self::_MyMap&Object&MapMixin::map::K2%, self::_MyMap&Object&MapMixin::map::V2%>{}; |
| { |
| synthesized core::Iterator<self::_MyMap&Object&MapMixin::K%> :sync-for-iterator = this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::iterator}{core::Iterator<self::_MyMap&Object&MapMixin::K%>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| self::_MyMap&Object&MapMixin::K% key = :sync-for-iterator.{core::Iterator::current}{self::_MyMap&Object&MapMixin::K%}; |
| { |
| core::MapEntry<self::_MyMap&Object&MapMixin::map::K2%, self::_MyMap&Object&MapMixin::map::V2%> entry = transform(key, let self::_MyMap&Object&MapMixin::V? #t24 = this.{col::MapBase::[]}(key){(core::Object?) → self::_MyMap&Object&MapMixin::V?} in #t24 == null ?{self::_MyMap&Object&MapMixin::V%} let self::_MyMap&Object&MapMixin::V? #t25 = #t24 in #t25 == null ?{self::_MyMap&Object&MapMixin::V%} #t25 as self::_MyMap&Object&MapMixin::V% : #t25{self::_MyMap&Object&MapMixin::V%} : #t24{self::_MyMap&Object&MapMixin::V%}){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → core::MapEntry<self::_MyMap&Object&MapMixin::map::K2%, self::_MyMap&Object&MapMixin::map::V2%>}; |
| result.{core::Map::[]=}(entry.{core::MapEntry::key}{self::_MyMap&Object&MapMixin::map::K2%}, entry.{core::MapEntry::value}{self::_MyMap&Object&MapMixin::map::V2%}){(self::_MyMap&Object&MapMixin::map::K2%, self::_MyMap&Object&MapMixin::map::V2%) → void}; |
| } |
| } |
| } |
| return result; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ addEntries(covariant-by-class core::Iterable<core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>> newEntries) → void { |
| { |
| synthesized core::Iterator<core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>> :sync-for-iterator = newEntries.{core::Iterable::iterator}{core::Iterator<core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%> entry = :sync-for-iterator.{core::Iterator::current}{core::MapEntry<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>}; |
| { |
| this.{col::MapBase::[]=}(entry.{core::MapEntry::key}{self::_MyMap&Object&MapMixin::K%}, entry.{core::MapEntry::value}{self::_MyMap&Object&MapMixin::V%}){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → void}; |
| } |
| } |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ removeWhere((self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → core::bool test) → void { |
| core::List<self::_MyMap&Object&MapMixin::K%> keysToRemove = core::_GrowableList::•<self::_MyMap&Object&MapMixin::K%>(0); |
| { |
| synthesized core::Iterator<self::_MyMap&Object&MapMixin::K%> :sync-for-iterator = this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::iterator}{core::Iterator<self::_MyMap&Object&MapMixin::K%>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| self::_MyMap&Object&MapMixin::K% key = :sync-for-iterator.{core::Iterator::current}{self::_MyMap&Object&MapMixin::K%}; |
| { |
| if(test(key, let self::_MyMap&Object&MapMixin::V? #t26 = this.{col::MapBase::[]}(key){(core::Object?) → self::_MyMap&Object&MapMixin::V?} in #t26 == null ?{self::_MyMap&Object&MapMixin::V%} let self::_MyMap&Object&MapMixin::V? #t27 = #t26 in #t27 == null ?{self::_MyMap&Object&MapMixin::V%} #t27 as self::_MyMap&Object&MapMixin::V% : #t27{self::_MyMap&Object&MapMixin::V%} : #t26{self::_MyMap&Object&MapMixin::V%}){(self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%) → core::bool}) |
| keysToRemove.{core::List::add}(key){(self::_MyMap&Object&MapMixin::K%) → void}; |
| } |
| } |
| } |
| { |
| synthesized core::Iterator<self::_MyMap&Object&MapMixin::K%> :sync-for-iterator = keysToRemove.{core::Iterable::iterator}{core::Iterator<self::_MyMap&Object&MapMixin::K%>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| self::_MyMap&Object&MapMixin::K% key = :sync-for-iterator.{core::Iterator::current}{self::_MyMap&Object&MapMixin::K%}; |
| { |
| this.{col::MapBase::remove}(key){(core::Object?) → self::_MyMap&Object&MapMixin::V?}; |
| } |
| } |
| } |
| } |
| get /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ length() → core::int |
| return this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::length}{core::int}; |
| get /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ isEmpty() → core::bool |
| return this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::isEmpty}{core::bool}; |
| get /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ isNotEmpty() → core::bool |
| return this.{col::MapBase::keys}{core::Iterable<self::_MyMap&Object&MapMixin::K%>}.{core::Iterable::isNotEmpty}{core::bool}; |
| get /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ values() → core::Iterable<self::_MyMap&Object&MapMixin::V%> |
| return new col::_MapBaseValueIterable::•<self::_MyMap&Object&MapMixin::K%, self::_MyMap&Object&MapMixin::V%>(this); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/maps.dart */ toString() → core::String |
| return col::MapBase::mapToString(this); |
| } |
| static get hasUnsoundNullSafety() → core::bool |
| return #C2 is core::List<core::Object>; |
| static method method(core::Map<core::int, core::String?> m) → core::int { |
| #L1: |
| { |
| final synthesized core::Map<core::int, core::String?> #0#0 = m; |
| synthesized core::String? #0#3; |
| synthesized core::bool #0#3#isSet = false; |
| synthesized core::bool #0#2; |
| synthesized core::bool #0#2#isSet = false; |
| { |
| if((!((#0#3#isSet ?{core::String?} #0#3{core::String?} : let final core::bool #t28 = #0#3#isSet = true in #0#3 = #0#0.{core::Map::[]}(#C3){(core::Object?) → core::String?}) == null) || null is core::String? && (#0#2#isSet ?{core::bool} #0#2{core::bool} : let final core::bool #t29 = #0#2#isSet = true in #0#2 = #0#0.{core::Map::containsKey}(#C3){(core::Object?) → core::bool})) && #C4 =={core::String::==}{(core::Object) → core::bool} (#0#3#isSet ?{core::String?} #0#3{core::String?} : let final core::bool #t30 = #0#3#isSet = true in #0#3 = #0#0.{core::Map::[]}(#C3){(core::Object?) → core::String?})) { |
| { |
| return 0; |
| } |
| } |
| } |
| { |
| if((!((#0#3#isSet ?{core::String?} #0#3{core::String?} : let final core::bool #t31 = #0#3#isSet = true in #0#3 = #0#0.{core::Map::[]}(#C3){(core::Object?) → core::String?}) == null) || null is core::String? && (#0#2#isSet ?{core::bool} #0#2{core::bool} : let final core::bool #t32 = #0#2#isSet = true in #0#2 = #0#0.{core::Map::containsKey}(#C3){(core::Object?) → core::bool})) && #C5 =={core::String::==}{(core::Object) → core::bool} (#0#3#isSet ?{core::String?} #0#3{core::String?} : let final core::bool #t33 = #0#3#isSet = true in #0#3 = #0#0.{core::Map::[]}(#C3){(core::Object?) → core::String?})) { |
| { |
| return 1; |
| } |
| } |
| } |
| } |
| return 2; |
| } |
| static method test(core::Map<core::int, core::String> map, {required core::int expectedValue, required core::int expectedContainsKeyCount, required core::int expectedIndexGetCount}) → dynamic { |
| self::MyMap<core::int, core::String> myMap = new self::MyMap::•<core::int, core::String>(map); |
| self::expect(expectedValue, self::method(myMap), "Unexpected value for ${map}."); |
| self::expect(expectedContainsKeyCount, myMap.{self::MyMap::containsKeyCount}{core::int}, "Unexpected containsKey count for ${map}."); |
| self::expect(expectedIndexGetCount, myMap.{self::MyMap::indexGetCount}{core::int}, "Unexpected indexGet count for ${map}."); |
| } |
| static method main() → dynamic { |
| self::test(<core::int, core::String>{0: "foo"}, expectedValue: 2, expectedContainsKeyCount: 1, expectedIndexGetCount: self::hasUnsoundNullSafety ?{core::int} 0 : 1); |
| self::test(<core::int, core::String>{1: "foo"}, expectedValue: 0, expectedContainsKeyCount: self::hasUnsoundNullSafety ?{core::int} 1 : 0, expectedIndexGetCount: 1); |
| self::test(<core::int, core::String>{1: "bar"}, expectedValue: 1, expectedContainsKeyCount: self::hasUnsoundNullSafety ?{core::int} 1 : 0, expectedIndexGetCount: 1); |
| self::test(<core::int, core::String>{1: "baz"}, expectedValue: 2, expectedContainsKeyCount: self::hasUnsoundNullSafety ?{core::int} 1 : 0, expectedIndexGetCount: 1); |
| } |
| static method expect(dynamic expected, dynamic actual, dynamic message) → dynamic { |
| if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual)) |
| throw "${message} Expected ${expected}, actual ${actual}"; |
| } |
| |
| constants { |
| #C1 = null |
| #C2 = <Null>[] |
| #C3 = 1 |
| #C4 = "foo" |
| #C5 = "bar" |
| } |
| |
| Extra constant evaluation status: |
| Evaluated: IsExpression @ org-dartlang-testcase:///caching_constants.dart:7:49 -> BoolConstant(false) |
| Evaluated: IsExpression @ org-dartlang-testcase:///caching_constants.dart:38:12 -> BoolConstant(true) |
| Evaluated: IsExpression @ org-dartlang-testcase:///caching_constants.dart:40:12 -> BoolConstant(true) |
| Extra constant evaluation: evaluated: 428, effectively constant: 3 |