| library; |
| import self as self; |
| import "dart:core" as core; |
| import "dart:collection" as col; |
| import "dart:_internal" as _in; |
| import "dart:math" as math; |
| |
| import "dart:collection"; |
| |
| abstract class _A&Object&ListMixin extends core::Object implements col::ListBase<core::int> /*isAnonymousMixin,isEliminatedMixin,hasConstConstructor*/ { |
| const synthetic constructor •() → self::_A&Object&ListMixin |
| : super core::Object::•() |
| ; |
| get /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ first() → core::int { |
| if(this.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 0) |
| throw _in::IterableElementError::noElement(); |
| return this.{core::List::[]}(0){(core::int) → core::int}; |
| } |
| set /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ first(covariant-by-class core::int value) → void { |
| if(this.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 0) |
| throw _in::IterableElementError::noElement(); |
| this.{core::List::[]=}(0, value){(core::int, core::int) → void}; |
| } |
| get /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ last() → core::int { |
| if(this.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 0) |
| throw _in::IterableElementError::noElement(); |
| return this.{core::List::[]}(this.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::int}){(core::int) → core::int}; |
| } |
| set /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ last(covariant-by-class core::int value) → void { |
| if(this.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 0) |
| throw _in::IterableElementError::noElement(); |
| this.{core::List::[]=}(this.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::int}, value){(core::int, core::int) → void}; |
| } |
| @#C3 |
| get /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ iterator() → core::Iterator<core::int> |
| return new _in::ListIterator::•<core::int>(this); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ elementAt(core::int index) → core::int |
| return this.{core::List::[]}(index){(core::int) → core::int}; |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ followedBy(covariant-by-class core::Iterable<core::int> other) → core::Iterable<core::int> |
| return _in::FollowedByIterable::firstEfficient<core::int>(this, other); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ forEach((core::int) → void action) → void { |
| core::int length = this.{core::List::length}{core::int}; |
| for (core::int i = 0; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| action(this.{core::List::[]}(i){(core::int) → core::int}){(core::int) → void}; |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| } |
| @#C3 |
| get /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ isEmpty() → core::bool |
| return this.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 0; |
| get /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ isNotEmpty() → core::bool |
| return !this.{col::ListBase::isEmpty}{core::bool}; |
| get /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ single() → core::int { |
| if(this.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 0) |
| throw _in::IterableElementError::noElement(); |
| if(this.{core::List::length}{core::int}.{core::num::>}(1){(core::num) → core::bool}) |
| throw _in::IterableElementError::tooMany(); |
| return this.{core::List::[]}(0){(core::int) → core::int}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ contains(core::Object? element) → core::bool { |
| core::int length = this.{core::List::length}{core::int}; |
| for (core::int i = 0; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| if(this.{core::List::[]}(i){(core::int) → core::int} =={core::Object::==}{(core::Object) → core::bool} element) |
| return true; |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| return false; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ every((core::int) → core::bool test) → core::bool { |
| core::int length = this.{core::List::length}{core::int}; |
| for (core::int i = 0; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| if(!test(this.{core::List::[]}(i){(core::int) → core::int}){(core::int) → core::bool}) |
| return false; |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| return true; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ any((core::int) → core::bool test) → core::bool { |
| core::int length = this.{core::List::length}{core::int}; |
| for (core::int i = 0; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| if(test(this.{core::List::[]}(i){(core::int) → core::int}){(core::int) → core::bool}) |
| return true; |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| return false; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ firstWhere((core::int) → core::bool test, {covariant-by-class () →? core::int orElse = #C2}) → core::int { |
| core::int length = this.{core::List::length}{core::int}; |
| for (core::int i = 0; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| core::int element = this.{core::List::[]}(i){(core::int) → core::int}; |
| if(test(element){(core::int) → core::bool}) |
| return element; |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| if(!(orElse == null)) |
| return orElse{() → core::int}(){() → core::int}; |
| throw _in::IterableElementError::noElement(); |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastWhere((core::int) → core::bool test, {covariant-by-class () →? core::int orElse = #C2}) → core::int { |
| core::int length = this.{core::List::length}{core::int}; |
| for (core::int i = length.{core::num::-}(1){(core::num) → core::int}; i.{core::num::>=}(0){(core::num) → core::bool}; i = i.{core::num::-}(1){(core::num) → core::int}) { |
| core::int element = this.{core::List::[]}(i){(core::int) → core::int}; |
| if(test(element){(core::int) → core::bool}) |
| return element; |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| if(!(orElse == null)) |
| return orElse{() → core::int}(){() → core::int}; |
| throw _in::IterableElementError::noElement(); |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ singleWhere((core::int) → core::bool test, {covariant-by-class () →? core::int orElse = #C2}) → core::int { |
| core::int length = this.{core::List::length}{core::int}; |
| late core::int match; |
| core::bool matchFound = false; |
| for (core::int i = 0; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| core::int element = this.{core::List::[]}(i){(core::int) → core::int}; |
| if(test(element){(core::int) → core::bool}) { |
| if(matchFound) { |
| throw _in::IterableElementError::tooMany(); |
| } |
| matchFound = true; |
| match = element; |
| } |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| if(matchFound) |
| return match; |
| if(!(orElse == null)) |
| return orElse{() → core::int}(){() → core::int}; |
| throw _in::IterableElementError::noElement(); |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ join([core::String separator = #C4]) → core::String { |
| if(this.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 0) |
| return ""; |
| core::StringBuffer buffer = let final core::StringBuffer #t1 = new core::StringBuffer::•() in block { |
| #t1.{core::StringBuffer::writeAll}(this, separator){(core::Iterable<dynamic>, [core::String]) → void}; |
| } =>#t1; |
| return buffer.{core::StringBuffer::toString}(){() → core::String}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ where((core::int) → core::bool test) → core::Iterable<core::int> |
| return new _in::WhereIterable::•<core::int>(this, test); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ whereType<T extends core::Object? = dynamic>() → core::Iterable<self::_A&Object&ListMixin::whereType::T%> |
| return new _in::WhereTypeIterable::•<self::_A&Object&ListMixin::whereType::T%>(this); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ map<T extends core::Object? = dynamic>((core::int) → self::_A&Object&ListMixin::map::T% f) → core::Iterable<self::_A&Object&ListMixin::map::T%> |
| return new _in::MappedListIterable::•<core::int, self::_A&Object&ListMixin::map::T%>(this, f); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ expand<T extends core::Object? = dynamic>((core::int) → core::Iterable<self::_A&Object&ListMixin::expand::T%> f) → core::Iterable<self::_A&Object&ListMixin::expand::T%> |
| return new _in::ExpandIterable::•<core::int, self::_A&Object&ListMixin::expand::T%>(this, f); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ reduce(covariant-by-class (core::int, core::int) → core::int combine) → core::int { |
| core::int length = this.{core::List::length}{core::int}; |
| if(length =={core::num::==}{(core::Object) → core::bool} 0) |
| throw _in::IterableElementError::noElement(); |
| core::int value = this.{core::List::[]}(0){(core::int) → core::int}; |
| for (core::int i = 1; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| value = combine(value, this.{core::List::[]}(i){(core::int) → core::int}){(core::int, core::int) → core::int}; |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| return value; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ fold<T extends core::Object? = dynamic>(self::_A&Object&ListMixin::fold::T% initialValue, (self::_A&Object&ListMixin::fold::T%, core::int) → self::_A&Object&ListMixin::fold::T% combine) → self::_A&Object&ListMixin::fold::T% { |
| self::_A&Object&ListMixin::fold::T% value = initialValue; |
| core::int length = this.{core::List::length}{core::int}; |
| for (core::int i = 0; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| value = combine(value, this.{core::List::[]}(i){(core::int) → core::int}){(self::_A&Object&ListMixin::fold::T%, core::int) → self::_A&Object&ListMixin::fold::T%}; |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| return value; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ skip(core::int count) → core::Iterable<core::int> |
| return new _in::SubListIterable::•<core::int>(this, count, null); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ skipWhile((core::int) → core::bool test) → core::Iterable<core::int> { |
| return new _in::SkipWhileIterable::•<core::int>(this, test); |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ take(core::int count) → core::Iterable<core::int> |
| return new _in::SubListIterable::•<core::int>(this, 0, _in::checkNotNullable<core::int>(count, "count")); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ takeWhile((core::int) → core::bool test) → core::Iterable<core::int> { |
| return new _in::TakeWhileIterable::•<core::int>(this, test); |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ toList({core::bool growable = #C5}) → core::List<core::int> { |
| if(this.{col::ListBase::isEmpty}{core::bool}) |
| return core::List::empty<core::int>(growable: growable); |
| core::int first = this.{core::List::[]}(0){(core::int) → core::int}; |
| core::List<core::int> result = core::List::filled<core::int>(this.{core::List::length}{core::int}, first, growable: growable); |
| for (core::int i = 1; i.{core::num::<}(this.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| result.{core::List::[]=}(i, this.{core::List::[]}(i){(core::int) → core::int}){(core::int, core::int) → void}; |
| } |
| return result; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ toSet() → core::Set<core::int> { |
| core::Set<core::int> result = new col::_Set::•<core::int>(); |
| for (core::int i = 0; i.{core::num::<}(this.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| result.{core::Set::add}(this.{core::List::[]}(i){(core::int) → core::int}){(core::int) → core::bool}; |
| } |
| return result; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ add(covariant-by-class core::int element) → void { |
| this.{core::List::[]=}(let final core::int #t2 = this.{core::List::length}{core::int} in let final core::int #t3 = this.{core::List::length} = #t2.{core::num::+}(1){(core::num) → core::int} in #t2, element){(core::int, core::int) → void}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ addAll(covariant-by-class core::Iterable<core::int> iterable) → void { |
| core::int i = this.{core::List::length}{core::int}; |
| { |
| synthesized core::Iterator<core::int> :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator<core::int>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| core::int element = :sync-for-iterator.{core::Iterator::current}{core::int}; |
| { |
| assert(this.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} i || (throw new core::ConcurrentModificationError::•(this))); |
| this.{col::ListBase::add}(element){(core::int) → void}; |
| i = i.{core::num::+}(1){(core::num) → core::int}; |
| } |
| } |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ remove(core::Object? element) → core::bool { |
| for (core::int i = 0; i.{core::num::<}(this.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| if(this.{core::List::[]}(i){(core::int) → core::int} =={core::Object::==}{(core::Object) → core::bool} element) { |
| this.{col::ListBase::_closeGap}(i, i.{core::num::+}(1){(core::num) → core::int}){(core::int, core::int) → void}; |
| return true; |
| } |
| } |
| return false; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ _closeGap(core::int start, core::int end) → void { |
| core::int length = this.{core::List::length}{core::int}; |
| assert(0.{core::num::<=}(start){(core::num) → core::bool}); |
| assert(start.{core::num::<}(end){(core::num) → core::bool}); |
| assert(end.{core::num::<=}(length){(core::num) → core::bool}); |
| core::int size = end.{core::num::-}(start){(core::num) → core::int}; |
| for (core::int i = end; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| this.{core::List::[]=}(i.{core::num::-}(size){(core::num) → core::int}, this.{core::List::[]}(i){(core::int) → core::int}){(core::int, core::int) → void}; |
| } |
| this.{core::List::length} = length.{core::num::-}(size){(core::num) → core::int}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ removeWhere((core::int) → core::bool test) → void { |
| this.{col::ListBase::_filter}(test, false){((core::int) → core::bool, core::bool) → void}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ retainWhere((core::int) → core::bool test) → void { |
| this.{col::ListBase::_filter}(test, true){((core::int) → core::bool, core::bool) → void}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ _filter((core::int) → core::bool test, core::bool retainMatching) → void { |
| core::List<core::int> retained = core::_GrowableList::•<core::int>(0); |
| core::int length = this.{core::List::length}{core::int}; |
| for (core::int i = 0; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| core::int element = this.{core::List::[]}(i){(core::int) → core::int}; |
| if(test(element){(core::int) → core::bool} =={core::Object::==}{(core::Object) → core::bool} retainMatching) { |
| retained.{core::List::add}(element){(core::int) → void}; |
| } |
| if(!(length =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| throw new core::ConcurrentModificationError::•(this); |
| } |
| } |
| if(!(retained.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int})) { |
| this.{col::ListBase::setRange}(0, retained.{core::List::length}{core::int}, retained){(core::int, core::int, core::Iterable<core::int>, [core::int]) → void}; |
| this.{core::List::length} = retained.{core::List::length}{core::int}; |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ clear() → void { |
| this.{core::List::length} = 0; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ cast<R extends core::Object? = dynamic>() → core::List<self::_A&Object&ListMixin::cast::R%> |
| return core::List::castFrom<core::int, self::_A&Object&ListMixin::cast::R%>(this); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ removeLast() → core::int { |
| if(this.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 0) { |
| throw _in::IterableElementError::noElement(); |
| } |
| core::int result = this.{core::List::[]}(this.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::int}){(core::int) → core::int}; |
| this.{core::List::length} = this.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::int}; |
| return result; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sort([(core::int, core::int) →? core::int compare = #C2]) → void { |
| _in::Sort::sort<core::int>(this, let final (core::int, core::int) →? core::int #t4 = compare in #t4 == null ?{(core::int, core::int) → core::int} #C6 : #t4{(core::int, core::int) → core::int}); |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ shuffle([math::Random? random = #C2]) → void { |
| random == null ?{math::Random?} random = math::Random::•() : null; |
| core::int length = this.{core::List::length}{core::int}; |
| while (length.{core::num::>}(1){(core::num) → core::bool}) { |
| core::int pos = random{math::Random}.{math::Random::nextInt}(length){(core::int) → core::int}; |
| length = length.{core::num::-}(1){(core::num) → core::int}; |
| core::int tmp = this.{core::List::[]}(length){(core::int) → core::int}; |
| this.{core::List::[]=}(length, this.{core::List::[]}(pos){(core::int) → core::int}){(core::int, core::int) → void}; |
| this.{core::List::[]=}(pos, tmp){(core::int, core::int) → void}; |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ asMap() → core::Map<core::int, core::int> { |
| return new _in::ListMapView::•<core::int>(this); |
| } |
| operator /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ +(covariant-by-class core::List<core::int> other) → core::List<core::int> |
| return block { |
| final core::List<core::int> #t5 = core::List::of<core::int>(this); |
| #t5.{core::List::addAll}{Invariant}(other){(core::Iterable<core::int>) → void}; |
| } =>#t5; |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sublist(core::int start, [core::int? end = #C2]) → core::List<core::int> { |
| core::int listLength = this.{core::List::length}{core::int}; |
| end == null ?{core::int?} end = listLength : null; |
| core::RangeError::checkValidRange(start, end{core::int}, listLength); |
| return core::List::from<core::int>(this.{col::ListBase::getRange}(start, end{core::int}){(core::int, core::int) → core::Iterable<core::int>}); |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ getRange(core::int start, core::int end) → core::Iterable<core::int> { |
| core::RangeError::checkValidRange(start, end, this.{core::List::length}{core::int}); |
| return new _in::SubListIterable::•<core::int>(this, start, end); |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ removeRange(core::int start, core::int end) → void { |
| core::RangeError::checkValidRange(start, end, this.{core::List::length}{core::int}); |
| if(end.{core::num::>}(start){(core::num) → core::bool}) { |
| this.{col::ListBase::_closeGap}(start, end){(core::int, core::int) → void}; |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ fillRange(core::int start, core::int end, [covariant-by-class core::int? fill = #C2]) → void { |
| core::int value = let core::int? #t6 = fill in #t6 == null ?{core::int} let core::int? #t7 = #t6 in #t7 == null ?{core::int} #t7 as core::int : #t7{core::int} : #t6{core::int}; |
| core::RangeError::checkValidRange(start, end, this.{core::List::length}{core::int}); |
| for (core::int i = start; i.{core::num::<}(end){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| this.{core::List::[]=}(i, value){(core::int, core::int) → void}; |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setRange(core::int start, core::int end, covariant-by-class core::Iterable<core::int> iterable, [core::int skipCount = #C7]) → void { |
| core::RangeError::checkValidRange(start, end, this.{core::List::length}{core::int}); |
| core::int length = end.{core::num::-}(start){(core::num) → core::int}; |
| if(length =={core::num::==}{(core::Object) → core::bool} 0) |
| return; |
| core::RangeError::checkNotNegative(skipCount, "skipCount"); |
| core::List<core::int> otherList; |
| core::int otherStart; |
| if(iterable is core::List<core::int>) { |
| otherList = iterable{core::List<core::int>}; |
| otherStart = skipCount; |
| } |
| else { |
| otherList = iterable.{core::Iterable::skip}(skipCount){(core::int) → core::Iterable<core::int>}.{core::Iterable::toList}(growable: false){({growable: core::bool}) → core::List<core::int>}; |
| otherStart = 0; |
| } |
| if(otherStart.{core::num::+}(length){(core::num) → core::int}.{core::num::>}(otherList.{core::List::length}{core::int}){(core::num) → core::bool}) { |
| throw _in::IterableElementError::tooFew(); |
| } |
| if(otherStart.{core::num::<}(start){(core::num) → core::bool}) { |
| for (core::int i = length.{core::num::-}(1){(core::num) → core::int}; i.{core::num::>=}(0){(core::num) → core::bool}; i = i.{core::num::-}(1){(core::num) → core::int}) { |
| this.{core::List::[]=}(start.{core::num::+}(i){(core::num) → core::int}, otherList.{core::List::[]}(otherStart.{core::num::+}(i){(core::num) → core::int}){(core::int) → core::int}){(core::int, core::int) → void}; |
| } |
| } |
| else { |
| for (core::int i = 0; i.{core::num::<}(length){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| this.{core::List::[]=}(start.{core::num::+}(i){(core::num) → core::int}, otherList.{core::List::[]}(otherStart.{core::num::+}(i){(core::num) → core::int}){(core::int) → core::int}){(core::int, core::int) → void}; |
| } |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ replaceRange(core::int start, core::int end, covariant-by-class core::Iterable<core::int> newContents) → void { |
| core::RangeError::checkValidRange(start, end, this.{core::List::length}{core::int}); |
| if(start =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int}) { |
| this.{col::ListBase::addAll}(newContents){(core::Iterable<core::int>) → void}; |
| return; |
| } |
| if(!(newContents is _in::EfficientLengthIterable<dynamic>)) { |
| newContents = newContents.{core::Iterable::toList}(){({growable: core::bool}) → core::List<core::int>}; |
| } |
| core::int removeLength = end.{core::num::-}(start){(core::num) → core::int}; |
| core::int insertLength = newContents.{core::Iterable::length}{core::int}; |
| if(removeLength.{core::num::>=}(insertLength){(core::num) → core::bool}) { |
| core::int insertEnd = start.{core::num::+}(insertLength){(core::num) → core::int}; |
| this.{col::ListBase::setRange}(start, insertEnd, newContents){(core::int, core::int, core::Iterable<core::int>, [core::int]) → void}; |
| if(removeLength.{core::num::>}(insertLength){(core::num) → core::bool}) { |
| this.{col::ListBase::_closeGap}(insertEnd, end){(core::int, core::int) → void}; |
| } |
| } |
| else |
| if(end =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int}) { |
| core::int i = start; |
| { |
| synthesized core::Iterator<core::int> :sync-for-iterator = newContents.{core::Iterable::iterator}{core::Iterator<core::int>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| core::int element = :sync-for-iterator.{core::Iterator::current}{core::int}; |
| { |
| if(i.{core::num::<}(end){(core::num) → core::bool}) { |
| this.{core::List::[]=}(i, element){(core::int, core::int) → void}; |
| } |
| else { |
| this.{col::ListBase::add}(element){(core::int) → void}; |
| } |
| i = i.{core::num::+}(1){(core::num) → core::int}; |
| } |
| } |
| } |
| } |
| else { |
| core::int delta = insertLength.{core::num::-}(removeLength){(core::num) → core::int}; |
| core::int oldLength = this.{core::List::length}{core::int}; |
| core::int insertEnd = start.{core::num::+}(insertLength){(core::num) → core::int}; |
| for (core::int i = oldLength.{core::num::-}(delta){(core::num) → core::int}; i.{core::num::<}(oldLength){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| this.{col::ListBase::add}(this.{core::List::[]}(i.{core::num::>}(0){(core::num) → core::bool} ?{core::int} i : 0){(core::int) → core::int}){(core::int) → void}; |
| } |
| if(insertEnd.{core::num::<}(oldLength){(core::num) → core::bool}) { |
| this.{col::ListBase::setRange}(insertEnd, oldLength, this, end){(core::int, core::int, core::Iterable<core::int>, [core::int]) → void}; |
| } |
| this.{col::ListBase::setRange}(start, insertEnd, newContents){(core::int, core::int, core::Iterable<core::int>, [core::int]) → void}; |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ indexOf(covariant-by-class core::Object? element, [core::int start = #C7]) → core::int { |
| if(start.{core::num::<}(0){(core::num) → core::bool}) |
| start = 0; |
| for (core::int i = start; i.{core::num::<}(this.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| if(this.{core::List::[]}(i){(core::int) → core::int} =={core::Object::==}{(core::Object) → core::bool} element) |
| return i; |
| } |
| return 1.{core::int::unary-}(){() → core::int}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ indexWhere((core::int) → core::bool test, [core::int start = #C7]) → core::int { |
| if(start.{core::num::<}(0){(core::num) → core::bool}) |
| start = 0; |
| for (core::int i = start; i.{core::num::<}(this.{core::List::length}{core::int}){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| if(test(this.{core::List::[]}(i){(core::int) → core::int}){(core::int) → core::bool}) |
| return i; |
| } |
| return 1.{core::int::unary-}(){() → core::int}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastIndexOf(covariant-by-class core::Object? element, [core::int? start = #C2]) → core::int { |
| if(start == null || start{core::int}.{core::num::>=}(this.{core::List::length}{core::int}){(core::num) → core::bool}) |
| start = this.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::int}; |
| for (core::int i = start{core::int}; i.{core::num::>=}(0){(core::num) → core::bool}; i = i.{core::num::-}(1){(core::num) → core::int}) { |
| if(this.{core::List::[]}(i){(core::int) → core::int} =={core::Object::==}{(core::Object) → core::bool} element) |
| return i; |
| } |
| return 1.{core::int::unary-}(){() → core::int}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ lastIndexWhere((core::int) → core::bool test, [core::int? start = #C2]) → core::int { |
| if(start == null || start{core::int}.{core::num::>=}(this.{core::List::length}{core::int}){(core::num) → core::bool}) |
| start = this.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::int}; |
| for (core::int i = start{core::int}; i.{core::num::>=}(0){(core::num) → core::bool}; i = i.{core::num::-}(1){(core::num) → core::int}) { |
| if(test(this.{core::List::[]}(i){(core::int) → core::int}){(core::int) → core::bool}) |
| return i; |
| } |
| return 1.{core::int::unary-}(){() → core::int}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insert(core::int index, covariant-by-class core::int element) → void { |
| _in::checkNotNullable<core::int>(index, "index"); |
| core::int length = this.{core::List::length}{core::int}; |
| core::RangeError::checkValueInInterval(index, 0, length, "index"); |
| this.{col::ListBase::add}(element){(core::int) → void}; |
| if(!(index =={core::num::==}{(core::Object) → core::bool} length)) { |
| this.{col::ListBase::setRange}(index.{core::num::+}(1){(core::num) → core::int}, length.{core::num::+}(1){(core::num) → core::int}, this, index){(core::int, core::int, core::Iterable<core::int>, [core::int]) → void}; |
| this.{core::List::[]=}(index, element){(core::int, core::int) → void}; |
| } |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ removeAt(core::int index) → core::int { |
| core::int result = this.{core::List::[]}(index){(core::int) → core::int}; |
| this.{col::ListBase::_closeGap}(index, index.{core::num::+}(1){(core::num) → core::int}){(core::int, core::int) → void}; |
| return result; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insertAll(core::int index, covariant-by-class core::Iterable<core::int> iterable) → void { |
| core::RangeError::checkValueInInterval(index, 0, this.{core::List::length}{core::int}, "index"); |
| if(index =={core::num::==}{(core::Object) → core::bool} this.{core::List::length}{core::int}) { |
| this.{col::ListBase::addAll}(iterable){(core::Iterable<core::int>) → void}; |
| return; |
| } |
| if(!(iterable is _in::EfficientLengthIterable<dynamic>) || core::identical(iterable, this)) { |
| iterable = iterable.{core::Iterable::toList}(){({growable: core::bool}) → core::List<core::int>}; |
| } |
| core::int insertionLength = iterable.{core::Iterable::length}{core::int}; |
| if(insertionLength =={core::num::==}{(core::Object) → core::bool} 0) { |
| return; |
| } |
| core::int oldLength = this.{core::List::length}{core::int}; |
| for (core::int i = oldLength.{core::num::-}(insertionLength){(core::num) → core::int}; i.{core::num::<}(oldLength){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| this.{col::ListBase::add}(this.{core::List::[]}(i.{core::num::>}(0){(core::num) → core::bool} ?{core::int} i : 0){(core::int) → core::int}){(core::int) → void}; |
| } |
| if(!(iterable.{core::Iterable::length}{core::int} =={core::num::==}{(core::Object) → core::bool} insertionLength)) { |
| this.{core::List::length} = this.{core::List::length}{core::int}.{core::num::-}(insertionLength){(core::num) → core::int}; |
| throw new core::ConcurrentModificationError::•(iterable); |
| } |
| core::int oldCopyStart = index.{core::num::+}(insertionLength){(core::num) → core::int}; |
| if(oldCopyStart.{core::num::<}(oldLength){(core::num) → core::bool}) { |
| this.{col::ListBase::setRange}(oldCopyStart, oldLength, this, index){(core::int, core::int, core::Iterable<core::int>, [core::int]) → void}; |
| } |
| this.{col::ListBase::setAll}(index, iterable){(core::int, core::Iterable<core::int>) → void}; |
| } |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ setAll(core::int index, covariant-by-class core::Iterable<core::int> iterable) → void { |
| if(iterable is core::List<dynamic>) { |
| this.{col::ListBase::setRange}(index, index.{core::num::+}(iterable.{core::Iterable::length}{core::int}){(core::num) → core::int}, iterable){(core::int, core::int, core::Iterable<core::int>, [core::int]) → void}; |
| } |
| else { |
| { |
| synthesized core::Iterator<core::int> :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator<core::int>}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { |
| core::int element = :sync-for-iterator.{core::Iterator::current}{core::int}; |
| { |
| this.{core::List::[]=}(let final core::int #t8 = index in let final core::int #t9 = index = #t8.{core::num::+}(1){(core::num) → core::int} in #t8, element){(core::int, core::int) → void}; |
| } |
| } |
| } |
| } |
| } |
| get /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ reversed() → core::Iterable<core::int> |
| return new _in::ReversedListIterable::•<core::int>(this); |
| method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ toString() → core::String |
| return col::ListBase::listToString(this); |
| static method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ _compareAny(dynamic a, dynamic b) → core::int { |
| return core::Comparable::compare(a as core::Comparable<dynamic>, b as core::Comparable<dynamic>); |
| } |
| static method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ listToString(core::List<core::Object?> list) → core::String |
| return core::Iterable::iterableToFullString(list, "[", "]"); |
| } |
| class A extends self::_A&Object&ListMixin { |
| field core::int count = 0; |
| synthetic constructor •() → self::A |
| : super self::_A&Object&ListMixin::•() |
| ; |
| operator [](core::int index) → core::int { |
| this.{self::A::count} = this.{self::A::count}{core::int}.{core::num::+}(1){(core::num) → core::int}; |
| return 0; |
| } |
| operator []=(core::int index, covariant-by-class core::int value) → void {} |
| get length() → core::int |
| return 2; |
| set length(core::int value) → void {} |
| } |
| static method main() → dynamic { |
| self::A a = new self::A::•(); |
| { |
| final synthesized self::A #0#0 = a; |
| synthesized core::int #0#4; |
| synthesized core::bool #0#4#isSet = false; |
| synthesized core::int #0#5; |
| synthesized core::bool #0#5#isSet = false; |
| { |
| hoisted core::int x; |
| hoisted core::int y; |
| if(#0#0.{self::A::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C8 && ((#0#4#isSet ?{core::int} #0#4{core::int} : let final core::bool* #t10 = #0#4#isSet = true in #0#4 = #0#0.{self::A::[]}(0){(core::int) → core::int}) is core::int && (let final core::int #t11 = x = #0#4#isSet ?{core::int} #0#4{core::int} : let final core::bool* #t12 = #0#4#isSet = true in #0#4 = #0#0.{self::A::[]}(0){(core::int) → core::int} in true)) && (#0#5#isSet ?{core::int} #0#5{core::int} : let final core::bool* #t13 = #0#5#isSet = true in #0#5 = #0#0.{self::A::[]}(1){(core::int) → core::int}) is core::int) { |
| y = #0#5#isSet ?{core::int} #0#5{core::int} : let final core::bool* #t14 = #0#5#isSet = true in #0#5 = #0#0.{self::A::[]}(1){(core::int) → core::int}; |
| { |
| self::expectEquals(x, 0); |
| self::expectEquals(y, 0); |
| } |
| } |
| } |
| } |
| self::expectEquals(a.{self::A::count}{core::int}, 2); |
| } |
| static method expectEquals(dynamic x, dynamic y) → dynamic { |
| if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) { |
| throw "Expected ${x} to be equal to ${y}."; |
| } |
| } |
| |
| constants { |
| #C1 = "vm:prefer-inline" |
| #C2 = null |
| #C3 = core::pragma {name:#C1, options:#C2} |
| #C4 = "" |
| #C5 = true |
| #C6 = static-tearoff col::ListBase::_compareAny |
| #C7 = 0 |
| #C8 = 2 |
| } |
| |
| Extra constant evaluation status: |
| Evaluated: InstanceInvocation @ org-dartlang-sdk:///sdk/lib/collection/list.dart:454:12 -> IntConstant(-1) |
| Evaluated: InstanceInvocation @ org-dartlang-sdk:///sdk/lib/collection/list.dart:462:12 -> IntConstant(-1) |
| Evaluated: InstanceInvocation @ org-dartlang-sdk:///sdk/lib/collection/list.dart:471:12 -> IntConstant(-1) |
| Evaluated: InstanceInvocation @ org-dartlang-sdk:///sdk/lib/collection/list.dart:480:12 -> IntConstant(-1) |
| Extra constant evaluation: evaluated: 1108, effectively constant: 4 |