diff --git a/pkg/dev_compiler/lib/runtime/dart/_foreign_helper.js b/pkg/dev_compiler/lib/runtime/dart/_foreign_helper.js index da5466e74464..02764210101f 100644 --- a/pkg/dev_compiler/lib/runtime/dart/_foreign_helper.js +++ b/pkg/dev_compiler/lib/runtime/dart/_foreign_helper.js @@ -34,13 +34,13 @@ var _foreign_helper; class IsolateContext extends core.Object { } // Function JS_CALL_IN_ISOLATE: (dynamic, Function) → dynamic - function JS_CALL_IN_ISOLATE(isolate, function) { + function JS_CALL_IN_ISOLATE(isolate, func) { } // Function DART_CLOSURE_TO_JS: (Function) → dynamic - function DART_CLOSURE_TO_JS(function) { + function DART_CLOSURE_TO_JS(func) { } // Function RAW_DART_FUNCTION_REF: (Function) → dynamic - function RAW_DART_FUNCTION_REF(function) { + function RAW_DART_FUNCTION_REF(func) { } // Function JS_SET_CURRENT_ISOLATE: (dynamic) → void function JS_SET_CURRENT_ISOLATE(isolate) { diff --git a/pkg/dev_compiler/lib/runtime/dart/_interceptors.js b/pkg/dev_compiler/lib/runtime/dart/_interceptors.js index 24e0d164de7c..062285cd427f 100644 --- a/pkg/dev_compiler/lib/runtime/dart/_interceptors.js +++ b/pkg/dev_compiler/lib/runtime/dart/_interceptors.js @@ -168,12 +168,12 @@ var _interceptors; fold(initialValue, combine) { return _internal.IterableMixinWorkaround.fold(this, initialValue, combine); } - firstWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + firstWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; return dart.as(_internal.IterableMixinWorkaround.firstWhere(this, test, orElse), E); } - lastWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + lastWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; return dart.as(_internal.IterableMixinWorkaround.lastWhereList(this, test, orElse), E); } singleWhere(test) { @@ -298,8 +298,8 @@ var _interceptors; toString() { return collection.ListBase.listToString(this); } - toList(opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; if (growable) { return new JSArray.markGrowable(this.slice()); } else { @@ -372,7 +372,7 @@ var _interceptors; return JSExtendableArray; }); let JSExtendableArray = JSExtendableArray$(dart.dynamic); - let _handleIEtoString = Symbol('_handleIEtoString'); + let _handleIEtoString$ = Symbol('_handleIEtoString'); let _isInt32 = Symbol('_isInt32'); let _tdivFast = Symbol('_tdivFast'); let _tdivSlow = Symbol('_tdivSlow'); @@ -536,7 +536,7 @@ var _interceptors; } return _handleIEtoString(result); } - static [_handleIEtoString](result) { + static [_handleIEtoString$](result) { let match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); if (match === null) { throw new core.UnsupportedError(`Unexpected toString result: ${result}`); @@ -687,11 +687,11 @@ var _interceptors; } JSNumber._MIN_INT32 = -2147483648; JSNumber._MAX_INT32 = 2147483647; - let _bitCount = Symbol('_bitCount'); - let _shru = Symbol('_shru'); - let _shrs = Symbol('_shrs'); - let _ors = Symbol('_ors'); - let _spread = Symbol('_spread'); + let _bitCount$ = Symbol('_bitCount'); + let _shru$ = Symbol('_shru'); + let _shrs$ = Symbol('_shrs'); + let _ors$ = Symbol('_ors'); + let _spread$ = Symbol('_spread'); class JSInt extends JSNumber { JSInt() { super.JSNumber(); @@ -717,7 +717,7 @@ var _interceptors; } return _bitCount(_spread(nonneg)); } - static [_bitCount](i) { + static [_bitCount$](i) { i = dart.as(dart.dbinary(_shru(i, 0), '-', dart.dbinary(_shru(i, 1), '&', 1431655765)), core.int); i = (dart.notNull(i) & 858993459)['+'](dart.dbinary(_shru(i, 2), '&', 858993459)); i = 252645135 & i['+'](_shru(i, 4)); @@ -725,16 +725,16 @@ var _interceptors; i = dart.as(_shru(i, 16), core.int); return dart.notNull(i) & 63; } - static [_shru](value, shift) { + static [_shru$](value, shift) { return value >>> shift; } - static [_shrs](value, shift) { + static [_shrs$](value, shift) { return value >> shift; } - static [_ors](a, b) { + static [_ors$](a, b) { return a | b; } - static [_spread](i) { + static [_spread$](i) { i = dart.as(_ors(i, dart.as(_shrs(i, 1), core.int)), core.int); i = dart.as(_ors(i, dart.as(_shrs(i, 2), core.int)), core.int); i = dart.as(_ors(i, dart.as(_shrs(i, 4), core.int)), core.int); @@ -764,9 +764,9 @@ var _interceptors; class JSUInt31 extends JSUInt32 { } let _defaultSplit = Symbol('_defaultSplit'); - let _isWhitespace = Symbol('_isWhitespace'); - let _skipLeadingWhitespace = Symbol('_skipLeadingWhitespace'); - let _skipTrailingWhitespace = Symbol('_skipTrailingWhitespace'); + let _isWhitespace$ = Symbol('_isWhitespace'); + let _skipLeadingWhitespace$ = Symbol('_skipLeadingWhitespace'); + let _skipTrailingWhitespace$ = Symbol('_skipTrailingWhitespace'); class JSString extends Interceptor { JSString() { super.Interceptor(); @@ -824,9 +824,9 @@ var _interceptors; replaceAllMapped(from, convert) { return this.splitMapJoin(from, {onMatch: convert}); } - splitMapJoin(from, opt$) { - let onMatch = opt$ && 'onMatch' in opt$ ? opt$.onMatch : null; - let onNonMatch = opt$ && 'onNonMatch' in opt$ ? opt$.onNonMatch : null; + splitMapJoin(from, opts) { + let onMatch = opts && 'onMatch' in opts ? opts.onMatch : null; + let onNonMatch = opts && 'onNonMatch' in opts ? opts.onNonMatch : null; return dart.as(_js_helper.stringReplaceAllFuncUnchecked(this, from, onMatch, onNonMatch), core.String); } replaceFirst(from, to, startIndex) { @@ -908,7 +908,7 @@ var _interceptors; toUpperCase() { return this.toUpperCase(); } - static [_isWhitespace](codeUnit) { + static [_isWhitespace$](codeUnit) { if (dart.notNull(codeUnit) < 256) { switch (codeUnit) { case 9: @@ -949,7 +949,7 @@ var _interceptors; return false; } } - static [_skipLeadingWhitespace](string, index) { + static [_skipLeadingWhitespace$](string, index) { let SPACE = 32; let CARRIAGE_RETURN = 13; while (dart.notNull(index) < dart.notNull(string.length)) { @@ -961,7 +961,7 @@ var _interceptors; } return index; } - static [_skipTrailingWhitespace](string, index) { + static [_skipTrailingWhitespace$](string, index) { let SPACE = 32; let CARRIAGE_RETURN = 13; while (dart.notNull(index) > 0) { @@ -1178,8 +1178,8 @@ var _interceptors; } let _string = Symbol('_string'); class _CodeUnits extends _internal.UnmodifiableListBase$(core.int) { - _CodeUnits($_string) { - this[_string] = $_string; + _CodeUnits(string$) { + this[_string] = string$; super.UnmodifiableListBase(); } get length() { diff --git a/pkg/dev_compiler/lib/runtime/dart/_internal.js b/pkg/dev_compiler/lib/runtime/dart/_internal.js index 2de7ea2dcc5a..9b0c19999565 100644 --- a/pkg/dev_compiler/lib/runtime/dart/_internal.js +++ b/pkg/dev_compiler/lib/runtime/dart/_internal.js @@ -73,8 +73,8 @@ var _internal; } return false; } - firstWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + firstWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; let length = this.length; for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) { let element = this.elementAt(i); @@ -88,8 +88,8 @@ var _internal; return orElse(); throw IterableElementError.noElement(); } - lastWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + lastWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; let length = this.length; for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { let element = this.elementAt(i); @@ -197,8 +197,8 @@ var _internal; takeWhile(test) { return super.takeWhile(test); } - toList(opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; let result = null; if (growable) { result = ((_) => { @@ -231,10 +231,10 @@ var _internal; let _startIndex = Symbol('_startIndex'); let SubListIterable$ = dart.generic(function(E) { class SubListIterable extends ListIterable$(E) { - SubListIterable($_iterable, $_start, $_endOrLength) { - this[_iterable] = $_iterable; - this[_start] = $_start; - this[_endOrLength] = $_endOrLength; + SubListIterable(iterable$, start$, endOrLength) { + this[_iterable] = iterable$; + this[_start] = start$; + this[_endOrLength] = endOrLength; super.ListIterable(); core.RangeError.checkNotNegative(this[_start], "start"); if (this[_endOrLength] !== null) { @@ -291,8 +291,8 @@ var _internal; return new SubListIterable(this[_iterable], this[_start], newEnd); } } - toList(opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; let start = this[_start]; let end = this[_iterable].length; if (this[_endOrLength] !== null && dart.notNull(this[_endOrLength]) < dart.notNull(end)) @@ -349,15 +349,15 @@ var _internal; let _f = Symbol('_f'); let MappedIterable$ = dart.generic(function(S, T) { class MappedIterable extends collection.IterableBase$(T) { - MappedIterable(iterable, function) { + MappedIterable(iterable, func) { if (dart.is(iterable, EfficientLength)) { - return new EfficientLengthMappedIterable(iterable, function); + return new EfficientLengthMappedIterable(iterable, func); } - return new MappedIterable._(dart.as(iterable, core.Iterable$(S)), function); + return new MappedIterable._(dart.as(iterable, core.Iterable$(S)), func); } - MappedIterable$_($_iterable, $_f) { - this[_iterable] = $_iterable; - this[_f] = $_f; + MappedIterable$_(iterable$, f$) { + this[_iterable] = iterable$; + this[_f] = f$; super.IterableBase(); } get iterator() { @@ -388,8 +388,8 @@ var _internal; let MappedIterable = MappedIterable$(dart.dynamic, dart.dynamic); let EfficientLengthMappedIterable$ = dart.generic(function(S, T) { class EfficientLengthMappedIterable extends MappedIterable$(S, T) { - EfficientLengthMappedIterable(iterable, function) { - super.MappedIterable$_(dart.as(iterable, core.Iterable$(S)), function); + EfficientLengthMappedIterable(iterable, func) { + super.MappedIterable$_(dart.as(iterable, core.Iterable$(S)), func); } } return EfficientLengthMappedIterable; @@ -398,9 +398,9 @@ var _internal; let _iterator = Symbol('_iterator'); let MappedIterator$ = dart.generic(function(S, T) { class MappedIterator extends core.Iterator$(T) { - MappedIterator($_iterator, $_f) { - this[_iterator] = $_iterator; - this[_f] = $_f; + MappedIterator(iterator$, f$) { + this[_iterator] = iterator$; + this[_f] = f$; this[_current] = null; super.Iterator(); } @@ -422,9 +422,9 @@ var _internal; let _source = Symbol('_source'); let MappedListIterable$ = dart.generic(function(S, T) { class MappedListIterable extends ListIterable$(T) { - MappedListIterable($_source, $_f) { - this[_source] = $_source; - this[_f] = $_f; + MappedListIterable(source, f$) { + this[_source] = source; + this[_f] = f$; super.ListIterable(); } get length() { @@ -439,9 +439,9 @@ var _internal; let MappedListIterable = MappedListIterable$(dart.dynamic, dart.dynamic); let WhereIterable$ = dart.generic(function(E) { class WhereIterable extends collection.IterableBase$(E) { - WhereIterable($_iterable, $_f) { - this[_iterable] = $_iterable; - this[_f] = $_f; + WhereIterable(iterable$, f$) { + this[_iterable] = iterable$; + this[_f] = f$; super.IterableBase(); } get iterator() { @@ -453,9 +453,9 @@ var _internal; let WhereIterable = WhereIterable$(dart.dynamic); let WhereIterator$ = dart.generic(function(E) { class WhereIterator extends core.Iterator$(E) { - WhereIterator($_iterator, $_f) { - this[_iterator] = $_iterator; - this[_f] = $_f; + WhereIterator(iterator$, f$) { + this[_iterator] = iterator$; + this[_f] = f$; super.Iterator(); } moveNext() { @@ -475,9 +475,9 @@ var _internal; let WhereIterator = WhereIterator$(dart.dynamic); let ExpandIterable$ = dart.generic(function(S, T) { class ExpandIterable extends collection.IterableBase$(T) { - ExpandIterable($_iterable, $_f) { - this[_iterable] = $_iterable; - this[_f] = $_f; + ExpandIterable(iterable$, f$) { + this[_iterable] = iterable$; + this[_f] = f$; super.IterableBase(); } get iterator() { @@ -491,9 +491,9 @@ var _internal; let _nextExpansion = Symbol('_nextExpansion'); let ExpandIterator$ = dart.generic(function(S, T) { class ExpandIterator extends core.Object { - ExpandIterator($_iterator, $_f) { - this[_iterator] = $_iterator; - this[_f] = $_f; + ExpandIterator(iterator$, f$) { + this[_iterator] = iterator$; + this[_f] = f$; this[_currentExpansion] = dart.as(new EmptyIterator(), core.Iterator$(T)); this[_current] = null; } @@ -532,9 +532,9 @@ var _internal; } return new TakeIterable._(iterable, takeCount); } - TakeIterable$_($_iterable, $_takeCount) { - this[_iterable] = $_iterable; - this[_takeCount] = $_takeCount; + TakeIterable$_(iterable$, takeCount$) { + this[_iterable] = iterable$; + this[_takeCount] = takeCount$; super.IterableBase(); } get iterator() { @@ -563,9 +563,9 @@ var _internal; let _remaining = Symbol('_remaining'); let TakeIterator$ = dart.generic(function(E) { class TakeIterator extends core.Iterator$(E) { - TakeIterator($_iterator, $_remaining) { - this[_iterator] = $_iterator; - this[_remaining] = $_remaining; + TakeIterator(iterator$, remaining) { + this[_iterator] = iterator$; + this[_remaining] = remaining; super.Iterator(); dart.assert(dart.notNull(typeof this[_remaining] == number) && dart.notNull(this[_remaining]) >= 0); } @@ -588,9 +588,9 @@ var _internal; let TakeIterator = TakeIterator$(dart.dynamic); let TakeWhileIterable$ = dart.generic(function(E) { class TakeWhileIterable extends collection.IterableBase$(E) { - TakeWhileIterable($_iterable, $_f) { - this[_iterable] = $_iterable; - this[_f] = $_f; + TakeWhileIterable(iterable$, f$) { + this[_iterable] = iterable$; + this[_f] = f$; super.IterableBase(); } get iterator() { @@ -603,9 +603,9 @@ var _internal; let _isFinished = Symbol('_isFinished'); let TakeWhileIterator$ = dart.generic(function(E) { class TakeWhileIterator extends core.Iterator$(E) { - TakeWhileIterator($_iterator, $_f) { - this[_iterator] = $_iterator; - this[_f] = $_f; + TakeWhileIterator(iterator$, f$) { + this[_iterator] = iterator$; + this[_f] = f$; this[_isFinished] = false; super.Iterator(); } @@ -636,9 +636,9 @@ var _internal; } return new SkipIterable._(iterable, count); } - SkipIterable$_($_iterable, $_skipCount) { - this[_iterable] = $_iterable; - this[_skipCount] = $_skipCount; + SkipIterable$_(iterable$, skipCount$) { + this[_iterable] = iterable$; + this[_skipCount] = skipCount$; super.IterableBase(); if (!(typeof this[_skipCount] == number)) { throw new core.ArgumentError.value(this[_skipCount], "count is not an integer"); @@ -677,9 +677,9 @@ var _internal; let EfficientLengthSkipIterable = EfficientLengthSkipIterable$(dart.dynamic); let SkipIterator$ = dart.generic(function(E) { class SkipIterator extends core.Iterator$(E) { - SkipIterator($_iterator, $_skipCount) { - this[_iterator] = $_iterator; - this[_skipCount] = $_skipCount; + SkipIterator(iterator$, skipCount$) { + this[_iterator] = iterator$; + this[_skipCount] = skipCount$; super.Iterator(); dart.assert(dart.notNull(typeof this[_skipCount] == number) && dart.notNull(this[_skipCount]) >= 0); } @@ -698,9 +698,9 @@ var _internal; let SkipIterator = SkipIterator$(dart.dynamic); let SkipWhileIterable$ = dart.generic(function(E) { class SkipWhileIterable extends collection.IterableBase$(E) { - SkipWhileIterable($_iterable, $_f) { - this[_iterable] = $_iterable; - this[_f] = $_f; + SkipWhileIterable(iterable$, f$) { + this[_iterable] = iterable$; + this[_f] = f$; super.IterableBase(); } get iterator() { @@ -713,9 +713,9 @@ var _internal; let _hasSkipped = Symbol('_hasSkipped'); let SkipWhileIterator$ = dart.generic(function(E) { class SkipWhileIterator extends core.Iterator$(E) { - SkipWhileIterator($_iterator, $_f) { - this[_iterator] = $_iterator; - this[_f] = $_f; + SkipWhileIterator(iterator$, f$) { + this[_iterator] = iterator$; + this[_f] = f$; this[_hasSkipped] = false; super.Iterator(); } @@ -772,20 +772,20 @@ var _internal; any(test) { return false; } - firstWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + firstWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; if (orElse !== null) return orElse(); throw IterableElementError.noElement(); } - lastWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + lastWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; if (orElse !== null) return orElse(); throw IterableElementError.noElement(); } - singleWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + singleWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; if (orElse !== null) return orElse(); throw IterableElementError.noElement(); @@ -821,8 +821,8 @@ var _internal; takeWhile(test) { return this; } - toList(opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; return growable ? new List.from([]) : new core.List(0); } toSet() { @@ -852,7 +852,7 @@ var _internal; return BidirectionalIterator; }); let BidirectionalIterator = BidirectionalIterator$(dart.dynamic); - let _rangeCheck = Symbol('_rangeCheck'); + let _rangeCheck$ = Symbol('_rangeCheck'); let IterableMixinWorkaround$ = dart.generic(function(T) { class IterableMixinWorkaround extends core.Object { static contains(iterable, element) { @@ -1088,7 +1088,7 @@ var _internal; start = dart.notNull(list.length) - 1; return Lists.lastIndexOf(list, element, start); } - static [_rangeCheck](list, start, end) { + static [_rangeCheck$](list, start, end) { core.RangeError.checkValidRange(start, end, list.length); } getRangeList(list, start, end) { @@ -1156,13 +1156,13 @@ var _internal; list.length = insertionLength; list.setRange(dart.notNull(index) + dart.notNull(insertionLength), list.length, list, index); for (let element of iterable) { - list.set((($tmp) => index = dart.notNull($tmp) + 1, $tmp)(index), element); + list.set(((x) => index = dart.notNull(x$) + 1, x$)(index), element); } } static setAllList(list, index, iterable) { core.RangeError.checkValueInInterval(index, 0, list.length, "index"); for (let element of iterable) { - list.set((($tmp) => index = dart.notNull($tmp) + 1, $tmp)(index), element); + list.set(((x) => index = dart.notNull(x$) + 1, x$)(index), element); } } asMapList(l) { @@ -1350,8 +1350,8 @@ var _internal; let UnmodifiableListBase = UnmodifiableListBase$(dart.dynamic); let _backedList = Symbol('_backedList'); class _ListIndicesIterable extends ListIterable$(core.int) { - _ListIndicesIterable($_backedList) { - this[_backedList] = $_backedList; + _ListIndicesIterable(backedList) { + this[_backedList] = backedList; super.ListIterable(); } get length() { @@ -1365,8 +1365,8 @@ var _internal; let _values = Symbol('_values'); let ListMapView$ = dart.generic(function(E) { class ListMapView extends core.Object { - ListMapView($_values) { - this[_values] = $_values; + ListMapView(values) { + this[_values] = values; } get(key) { return this.containsKey(key) ? this[_values].get(key) : null; @@ -1425,8 +1425,8 @@ var _internal; let ListMapView = ListMapView$(dart.dynamic); let ReversedListIterable$ = dart.generic(function(E) { class ReversedListIterable extends ListIterable$(E) { - ReversedListIterable($_source) { - this[_source] = $_source; + ReversedListIterable(source) { + this[_source] = source; super.ListIterable(); } get length() { @@ -1540,9 +1540,9 @@ var _internal; function printToConsole(line) { _js_primitives.printString(`${line}`); } - let _doSort = Symbol('_doSort'); - let _insertionSort = Symbol('_insertionSort'); - let _dualPivotQuicksort = Symbol('_dualPivotQuicksort'); + let _doSort$ = Symbol('_doSort'); + let _insertionSort$ = Symbol('_insertionSort'); + let _dualPivotQuicksort$ = Symbol('_dualPivotQuicksort'); class Sort extends core.Object { static sort(a, compare) { _doSort(a, 0, dart.notNull(a.length) - 1, compare); @@ -1553,14 +1553,14 @@ var _internal; } _doSort(a, from, dart.notNull(to) - 1, compare); } - static [_doSort](a, left, right, compare) { + static [_doSort$](a, left, right, compare) { if (dart.notNull(right) - dart.notNull(left) <= dart.notNull(Sort._INSERTION_SORT_THRESHOLD)) { _insertionSort(a, left, right, compare); } else { _dualPivotQuicksort(a, left, right, compare); } } - static [_insertionSort](a, left, right, compare) { + static [_insertionSort$](a, left, right, compare) { for (let i = dart.notNull(left) + 1; dart.notNull(i) <= dart.notNull(right); i = dart.notNull(i) + 1) { let el = a.get(i); let j = i; @@ -1571,7 +1571,7 @@ var _internal; a.set(j, el); } } - static [_dualPivotQuicksort](a, left, right, compare) { + static [_dualPivotQuicksort$](a, left, right, compare) { dart.assert(dart.notNull(right) - dart.notNull(left) > dart.notNull(Sort._INSERTION_SORT_THRESHOLD)); let sixth = ((dart.notNull(right) - dart.notNull(left) + 1) / 6).truncate(); let index1 = dart.notNull(left) + dart.notNull(sixth); @@ -1660,12 +1660,12 @@ var _internal; continue; } else if (dart.notNull(comp) < 0) { a.set(k, a.get(less)); - a.set((($tmp) => less = dart.notNull($tmp) + 1, $tmp)(less), a.get(great)); - a.set((($tmp) => great = dart.notNull($tmp) - 1, $tmp)(great), ak); + a.set(((x) => less = dart.notNull(x$) + 1, x$)(less), a.get(great)); + a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak); break; } else { a.set(k, a.get(great)); - a.set((($tmp) => great = dart.notNull($tmp) - 1, $tmp)(great), ak); + a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak); break; } } @@ -1695,11 +1695,11 @@ var _internal; comp = dart.dinvokef(compare, a.get(great), pivot1); if (dart.notNull(comp) < 0) { a.set(k, a.get(less)); - a.set((($tmp) => less = dart.notNull($tmp) + 1, $tmp)(less), a.get(great)); - a.set((($tmp) => great = dart.notNull($tmp) - 1, $tmp)(great), ak); + a.set(((x) => less = dart.notNull(x$) + 1, x$)(less), a.get(great)); + a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak); } else { a.set(k, a.get(great)); - a.set((($tmp) => great = dart.notNull($tmp) - 1, $tmp)(great), ak); + a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak); } break; } @@ -1747,11 +1747,11 @@ var _internal; comp = dart.dinvokef(compare, a.get(great), pivot1); if (dart.notNull(comp) < 0) { a.set(k, a.get(less)); - a.set((($tmp) => less = dart.notNull($tmp) + 1, $tmp)(less), a.get(great)); - a.set((($tmp) => great = dart.notNull($tmp) - 1, $tmp)(great), ak); + a.set(((x) => less = dart.notNull(x$) + 1, x$)(less), a.get(great)); + a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak); } else { a.set(k, a.get(great)); - a.set((($tmp) => great = dart.notNull($tmp) - 1, $tmp)(great), ak); + a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak); } break; } @@ -1771,8 +1771,8 @@ var _internal; Symbol(name) { this[_name] = name; } - Symbol$unvalidated($_name) { - this[_name] = $_name; + Symbol$unvalidated(name$) { + this[_name] = name$; } Symbol$validated(name) { this[_name] = validatePublicSymbol(name); diff --git a/pkg/dev_compiler/lib/runtime/dart/_isolate_helper.js b/pkg/dev_compiler/lib/runtime/dart/_isolate_helper.js index 629c83adc6b0..6eff072f8379 100644 --- a/pkg/dev_compiler/lib/runtime/dart/_isolate_helper.js +++ b/pkg/dev_compiler/lib/runtime/dart/_isolate_helper.js @@ -22,8 +22,8 @@ var _isolate_helper; let _receivePort = Symbol('_receivePort'); let _id = Symbol('_id'); class _Serializer extends core.Object { - _Serializer(opt$) { - let serializeSendPorts = opt$ && 'serializeSendPorts' in opt$ ? opt$.serializeSendPorts : true; + _Serializer(opts) { + let serializeSendPorts = opts && 'serializeSendPorts' in opts ? opts.serializeSendPorts : true; this.serializedObjectIds = new core.Map.identity(); this[_serializeSendPorts] = dart.as(serializeSendPorts, core.bool); } @@ -157,8 +157,8 @@ var _isolate_helper; } let _adjustSendPorts = Symbol('_adjustSendPorts'); class _Deserializer extends core.Object { - _Deserializer(opt$) { - let adjustSendPorts = opt$ && 'adjustSendPorts' in opt$ ? opt$.adjustSendPorts : true; + _Deserializer(opts) { + let adjustSendPorts = opts && 'adjustSendPorts' in opts ? opts.adjustSendPorts : true; this.deserializedObjects = new core.List(); this[_adjustSendPorts] = dart.as(adjustSendPorts, core.bool); } @@ -320,8 +320,8 @@ var _isolate_helper; } } // Function _callInIsolate: (_IsolateContext, Function) → dynamic - function _callInIsolate(isolate, function) { - let result = isolate.eval(function); + function _callInIsolate(isolate, function$0) { + let result = isolate.eval(function$0); exports._globalState.topEventLoop.run(); return result; } @@ -380,8 +380,8 @@ var _isolate_helper; }); let _nativeDetectEnvironment = Symbol('_nativeDetectEnvironment'); let _nativeInitWorkerMessageHandler = Symbol('_nativeInitWorkerMessageHandler'); - let _processWorkerMessage = Symbol('_processWorkerMessage'); - let _serializePrintMessage = Symbol('_serializePrintMessage'); + let _processWorkerMessage$ = Symbol('_processWorkerMessage'); + let _serializePrintMessage$ = Symbol('_serializePrintMessage'); class _Manager extends core.Object { get useWorkers() { return this.supportsWorkers; @@ -417,12 +417,12 @@ var _isolate_helper; this.fromCommandLine = !dart.notNull(isWindowDefined) && !dart.notNull(this.isWorker); } [_nativeInitWorkerMessageHandler]() { - let function = function(f, a) { + let function$0 = function(f, a) { return function(e) { f(a, e); }; - }(_foreign_helper.DART_CLOSURE_TO_JS(IsolateNatives[_processWorkerMessage]), this.mainManager); - self.onmessage = function; + }(_foreign_helper.DART_CLOSURE_TO_JS(IsolateNatives[_processWorkerMessage$]), this.mainManager); + self.onmessage = function$0; self.dartPrint = self.dartPrint || function(serialize) { return function(object) { if (self.console && self.console.log) { @@ -433,7 +433,7 @@ var _isolate_helper; }; }(_foreign_helper.DART_CLOSURE_TO_JS(_serializePrintMessage)); } - static [_serializePrintMessage](object) { + static [_serializePrintMessage$](object) { return _serializeMessage(dart.map({command: "print", msg: object})); } maybeCloseWorker() { @@ -449,7 +449,7 @@ var _isolate_helper; let _addRegistration = Symbol('_addRegistration'); class _IsolateContext extends core.Object { _IsolateContext() { - this.id = (($tmp) => exports._globalState.nextIsolateId = dart.notNull($tmp) + 1, $tmp).bind(this)(exports._globalState.nextIsolateId); + this.id = ((x) => exports._globalState.nextIsolateId = dart.notNull(x$) + 1, x$).bind(this)(exports._globalState.nextIsolateId); this.ports = new core.Map(); this.weakPorts = new core.Set(); this.isolateStatics = _foreign_helper.JS_CREATE_ISOLATE(); @@ -778,16 +778,16 @@ var _isolate_helper; return !!self.postMessage; } }); - let _getEventData = Symbol('_getEventData'); - let _log = Symbol('_log'); - let _consoleLog = Symbol('_consoleLog'); - let _getJSFunctionFromName = Symbol('_getJSFunctionFromName'); - let _getJSFunctionName = Symbol('_getJSFunctionName'); + let _getEventData$ = Symbol('_getEventData'); + let _log$ = Symbol('_log'); + let _consoleLog$ = Symbol('_consoleLog'); + let _getJSFunctionFromName$ = Symbol('_getJSFunctionFromName'); + let _getJSFunctionName$ = Symbol('_getJSFunctionName'); let _allocate = Symbol('_allocate'); - let _startWorker = Symbol('_startWorker'); - let _startNonWorker = Symbol('_startNonWorker'); - let _startIsolate = Symbol('_startIsolate'); - let _spawnWorker = Symbol('_spawnWorker'); + let _startWorker$ = Symbol('_startWorker'); + let _startNonWorker$ = Symbol('_startNonWorker'); + let _startIsolate$ = Symbol('_startIsolate'); + let _spawnWorker$ = Symbol('_spawnWorker'); class IsolateNatives extends core.Object { static computeThisScript() { let currentScript = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.CURRENT_SCRIPT); @@ -833,10 +833,10 @@ var _isolate_helper; return matches[1]; throw new core.UnsupportedError(`Cannot extract URI from "${stack}"`); } - static [_getEventData](e) { + static [_getEventData$](e) { return e.data; } - static [_processWorkerMessage](sender, e) { + static [_processWorkerMessage$](sender, e) { let msg = _deserializeMessage(_getEventData(e)); switch (dart.dindex(msg, 'command')) { case 'start': @@ -895,7 +895,7 @@ var _isolate_helper; } }); } - static [_log](msg) { + static [_log$](msg) { if (exports._globalState.isWorker) { exports._globalState.mainManager.postMessage(_serializeMessage(dart.map({command: 'log', msg: msg}))); } else { @@ -908,15 +908,15 @@ var _isolate_helper; } } - static [_consoleLog](msg) { + static [_consoleLog$](msg) { _js_helper.requiresPreamble(); self.console.log(msg); } - static [_getJSFunctionFromName](functionName) { + static [_getJSFunctionFromName$](functionName) { let globalFunctionsContainer = _foreign_helper.JS_EMBEDDED_GLOBAL("", _js_embedded_names.GLOBAL_FUNCTIONS); return globalFunctionsContainer[functionName](); } - static [_getJSFunctionName](f) { + static [_getJSFunctionName$](f) { return dart.as(dart.is(f, _js_helper.Closure) ? f.$name : null, core.String); } static [_allocate](ctor) { @@ -959,7 +959,7 @@ var _isolate_helper; } return completer.future; } - static [_startWorker](functionName, uri, args, message, isSpawnUri, startPaused, replyPort, onError) { + static [_startWorker$](functionName, uri, args, message, isSpawnUri, startPaused, replyPort, onError) { if (args !== null) args = new core.List.from(args); if (exports._globalState.isWorker) { @@ -968,7 +968,7 @@ var _isolate_helper; _spawnWorker(functionName, uri, args, message, isSpawnUri, startPaused, replyPort, onError); } } - static [_startNonWorker](functionName, uri, args, message, isSpawnUri, startPaused, replyPort) { + static [_startNonWorker$](functionName, uri, args, message, isSpawnUri, startPaused, replyPort) { if (uri !== null) { throw new core.UnsupportedError("Currently spawnUri is not supported without web workers."); } @@ -984,7 +984,7 @@ var _isolate_helper; let context = dart.as(_foreign_helper.JS_CURRENT_ISOLATE_CONTEXT(), _IsolateContext); return new isolate.Isolate(context.controlPort.sendPort, {pauseCapability: context.pauseCapability, terminateCapability: context.terminateCapability}); } - static [_startIsolate](topLevel, args, message, isSpawnUri, startPaused, replyTo) { + static [_startIsolate$](topLevel, args, message, isSpawnUri, startPaused, replyTo) { let context = dart.as(_foreign_helper.JS_CURRENT_ISOLATE_CONTEXT(), _IsolateContext); _js_helper.Primitives.initializeStatics(context.id); replyTo.send(new List.from([_SPAWNED_SIGNAL, context.controlPort.sendPort, context.pauseCapability, context.terminateCapability])); @@ -1008,7 +1008,7 @@ var _isolate_helper; runStartFunction(); } } - static [_spawnWorker](functionName, uri, args, message, isSpawnUri, startPaused, replyPort, onError) { + static [_spawnWorker$](functionName, uri, args, message, isSpawnUri, startPaused, replyPort, onError) { if (uri === null) uri = thisScript; let worker = new Worker(uri); @@ -1025,7 +1025,7 @@ var _isolate_helper; }; }(_foreign_helper.DART_CLOSURE_TO_JS(_processWorkerMessage), worker); worker.onmessage = processWorkerMessageTrampoline; - let workerId = (($tmp) => exports._globalState.nextManagerId = dart.notNull($tmp) + 1, $tmp).bind(this)(exports._globalState.nextManagerId); + let workerId = ((x) => exports._globalState.nextManagerId = dart.notNull(x$) + 1, x$).bind(this)(exports._globalState.nextManagerId); workerIds.set(worker, workerId); exports._globalState.managers.set(workerId, worker); worker.postMessage(_serializeMessage(dart.map({command: 'start', id: workerId, replyTo: _serializeMessage(replyPort), args: args, msg: _serializeMessage(message), isSpawnUri: isSpawnUri, startPaused: startPaused, functionName: functionName}))); @@ -1054,8 +1054,8 @@ var _isolate_helper; }); let _checkReplyTo = Symbol('_checkReplyTo'); class _BaseSendPort extends core.Object { - _BaseSendPort($_isolateId) { - this[_isolateId] = $_isolateId; + _BaseSendPort(isolateId$) { + this[_isolateId] = isolateId$; } [_checkReplyTo](replyTo) { if (dart.notNull(replyTo !== null) && dart.notNull(!dart.is(replyTo, _NativeJsSendPort)) && dart.notNull(!dart.is(replyTo, _WorkerSendPort))) { @@ -1065,8 +1065,8 @@ var _isolate_helper; } let _isClosed = Symbol('_isClosed'); class _NativeJsSendPort extends _BaseSendPort { - _NativeJsSendPort($_receivePort, isolateId) { - this[_receivePort] = $_receivePort; + _NativeJsSendPort(receivePort$, isolateId) { + this[_receivePort] = receivePort$; super._BaseSendPort(isolateId); } send(message) { @@ -1094,9 +1094,9 @@ var _isolate_helper; } } class _WorkerSendPort extends _BaseSendPort { - _WorkerSendPort($_workerId, isolateId, $_receivePortId) { - this[_workerId] = $_workerId; - this[_receivePortId] = $_receivePortId; + _WorkerSendPort(workerId$, isolateId, receivePortId$) { + this[_workerId] = workerId$; + this[_receivePortId] = receivePortId$; super._BaseSendPort(isolateId); } send(message) { @@ -1121,15 +1121,15 @@ var _isolate_helper; let _close = Symbol('_close'); let _add = Symbol('_add'); class RawReceivePortImpl extends core.Object { - RawReceivePortImpl($_handler) { - this[_handler] = $_handler; - this[_id] = (($tmp) => _nextFreeId = dart.notNull($tmp) + 1, $tmp)(_nextFreeId); + RawReceivePortImpl(handler) { + this[_handler] = handler; + this[_id] = ((x) => _nextFreeId = dart.notNull(x$) + 1, x$)(_nextFreeId); this[_isClosed] = false; exports._globalState.currentContext.register(this[_id], this); } - RawReceivePortImpl$weak($_handler) { - this[_handler] = $_handler; - this[_id] = (($tmp) => _nextFreeId = dart.notNull($tmp) + 1, $tmp)(_nextFreeId); + RawReceivePortImpl$weak(handler) { + this[_handler] = handler; + this[_id] = ((x) => _nextFreeId = dart.notNull(x$) + 1, x$)(_nextFreeId); this[_isClosed] = false; exports._globalState.currentContext.registerWeak(this[_id], this); } @@ -1173,17 +1173,17 @@ var _isolate_helper; ReceivePortImpl$weak() { this.ReceivePortImpl$fromRawReceivePort(new RawReceivePortImpl.weak(null)); } - ReceivePortImpl$fromRawReceivePort($_rawPort) { - this[_rawPort] = $_rawPort; + ReceivePortImpl$fromRawReceivePort(rawPort) { + this[_rawPort] = rawPort; this[_controller] = null; super.Stream(); this[_controller] = new async.StreamController({onCancel: this.close, sync: true}); this[_rawPort].handler = this[_controller].add; } - listen(onData, opt$) { - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; - let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : null; + listen(onData, opts) { + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; return this[_controller].stream.listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError}); } close() { @@ -1272,8 +1272,8 @@ var _isolate_helper; CapabilityImpl() { this.CapabilityImpl$_internal(_js_helper.random64()); } - CapabilityImpl$_internal($_id) { - this[_id] = $_id; + CapabilityImpl$_internal(id) { + this[_id] = id; } get hashCode() { let hash = this[_id]; diff --git a/pkg/dev_compiler/lib/runtime/dart/_js_helper.js b/pkg/dev_compiler/lib/runtime/dart/_js_helper.js index cfb9ee71bee0..b28b726452e7 100644 --- a/pkg/dev_compiler/lib/runtime/dart/_js_helper.js +++ b/pkg/dev_compiler/lib/runtime/dart/_js_helper.js @@ -65,10 +65,10 @@ var _js_helper; let _fetch = Symbol('_fetch'); let ConstantStringMap$ = dart.generic(function(K, V) { class ConstantStringMap extends ConstantMap$(K, V) { - ConstantStringMap$_(length, $_jsObject, $_keys) { + ConstantStringMap$_(length, jsObject$, keys$) { this.length = length; - this[_jsObject] = $_jsObject; - this[_keys] = $_keys; + this[_jsObject] = jsObject$; + this[_keys] = keys$; super.ConstantMap$_(); } containsValue(needle) { @@ -110,8 +110,8 @@ var _js_helper; let _protoValue = Symbol('_protoValue'); let ConstantProtoMap$ = dart.generic(function(K, V) { class ConstantProtoMap extends ConstantStringMap$(K, V) { - ConstantProtoMap$_(length, jsObject, keys, $_protoValue) { - this[_protoValue] = $_protoValue; + ConstantProtoMap$_(length, jsObject, keys, protoValue) { + this[_protoValue] = protoValue; super.ConstantStringMap$_(dart.as(length, core.int), jsObject, dart.as(keys, core.List$(K))); } containsKey(key) { @@ -132,8 +132,8 @@ var _js_helper; let _map = Symbol('_map'); let _ConstantMapKeyIterable$ = dart.generic(function(K) { class _ConstantMapKeyIterable extends collection.IterableBase$(K) { - _ConstantMapKeyIterable($_map) { - this[_map] = $_map; + _ConstantMapKeyIterable(map$) { + this[_map] = map$; super.IterableBase(); } get iterator() { @@ -150,8 +150,8 @@ var _js_helper; let _getMap = Symbol('_getMap'); let GeneralConstantMap$ = dart.generic(function(K, V) { class GeneralConstantMap extends ConstantMap$(K, V) { - GeneralConstantMap($_jsData) { - this[_jsData] = $_jsData; + GeneralConstantMap(jsData) { + this[_jsData] = jsData; super.ConstantMap$_(); } [_getMap]() { @@ -207,8 +207,8 @@ var _js_helper; return object[property]; } // Function callHasOwnProperty: (dynamic, dynamic, String) → bool - function callHasOwnProperty(function, object, property) { - return function.call(object, property); + function callHasOwnProperty(func, object, property) { + return func.call(object, property); } // Function propertySet: (dynamic, String, dynamic) → void function propertySet(object, property, value) { @@ -474,9 +474,9 @@ var _js_helper; toString() { return `RegExp/${this.pattern}/`; } - JSSyntaxRegExp(source, opt$) { - let multiLine = opt$ && 'multiLine' in opt$ ? opt$.multiLine : false; - let caseSensitive = opt$ && 'caseSensitive' in opt$ ? opt$.caseSensitive : true; + JSSyntaxRegExp(source, opts) { + let multiLine = opts && 'multiLine' in opts ? opts.multiLine : false; + let caseSensitive = opts && 'caseSensitive' in opts ? opts.caseSensitive : true; this.pattern = source; this[_nativeRegExp] = makeNative(source, multiLine, caseSensitive, false); this[_nativeGlobalRegExp] = null; @@ -577,9 +577,9 @@ var _js_helper; } let _match = Symbol('_match'); class _MatchImplementation extends core.Object { - _MatchImplementation(pattern, $_match) { + _MatchImplementation(pattern, match$) { this.pattern = pattern; - this[_match] = $_match; + this[_match] = match$; dart.assert(typeof this[_match].input == string); dart.assert(typeof this[_match].index == number); } @@ -613,10 +613,10 @@ var _js_helper; let _string = Symbol('_string'); let _start = Symbol('_start'); class _AllMatchesIterable extends collection.IterableBase$(core.Match) { - _AllMatchesIterable($_re, $_string, $_start) { - this[_re] = $_re; - this[_string] = $_string; - this[_start] = $_start; + _AllMatchesIterable(re$, string$, start$) { + this[_re] = re$; + this[_string] = string$; + this[_start] = start$; super.IterableBase(); } get iterator() { @@ -627,10 +627,10 @@ var _js_helper; let _nextIndex = Symbol('_nextIndex'); let _current = Symbol('_current'); class _AllMatchesIterator extends core.Object { - _AllMatchesIterator($_regExp, $_string, $_nextIndex) { - this[_regExp] = $_regExp; - this[_string] = $_string; - this[_nextIndex] = $_nextIndex; + _AllMatchesIterator(regExp$, string$, nextIndex$) { + this[_regExp] = regExp$; + this[_string] = string$; + this[_nextIndex] = nextIndex$; this[_current] = null; } get current() { @@ -870,8 +870,8 @@ var _js_helper; let _typeName = Symbol('_typeName'); let _unmangledName = Symbol('_unmangledName'); class TypeImpl extends core.Object { - TypeImpl($_typeName) { - this[_typeName] = $_typeName; + TypeImpl(typeName$) { + this[_typeName] = typeName$; this[_unmangledName] = null; } toString() { @@ -935,8 +935,8 @@ var _js_helper; return _interceptors.getInterceptor(object).constructor.builtin$cls; } // Function getRuntimeTypeAsString: (dynamic, {onTypeVariable: (int) → String}) → String - function getRuntimeTypeAsString(runtimeType, opt$) { - let onTypeVariable = opt$ && 'onTypeVariable' in opt$ ? opt$.onTypeVariable : null; + function getRuntimeTypeAsString(runtimeType, opts) { + let onTypeVariable = opts && 'onTypeVariable' in opts ? opts.onTypeVariable : null; dart.assert(isJsArray(runtimeType)); let className = getConstructorName(getIndex(runtimeType, 0)); return `${className}` + `${joinArguments(runtimeType, 1, {onTypeVariable: onTypeVariable})}`; @@ -946,8 +946,8 @@ var _js_helper; return type.builtin$cls; } // Function runtimeTypeToString: (dynamic, {onTypeVariable: (int) → String}) → String - function runtimeTypeToString(type, opt$) { - let onTypeVariable = opt$ && 'onTypeVariable' in opt$ ? opt$.onTypeVariable : null; + function runtimeTypeToString(type, opts) { + let onTypeVariable = opts && 'onTypeVariable' in opts ? opts.onTypeVariable : null; if (type === null) { return 'dynamic'; } else if (isJsArray(type)) { @@ -965,8 +965,8 @@ var _js_helper; } } // Function joinArguments: (dynamic, int, {onTypeVariable: (int) → String}) → String - function joinArguments(types, startIndex, opt$) { - let onTypeVariable = opt$ && 'onTypeVariable' in opt$ ? opt$.onTypeVariable : null; + function joinArguments(types, startIndex, opts) { + let onTypeVariable = opts && 'onTypeVariable' in opts ? opts.onTypeVariable : null; if (types === null) return ''; dart.assert(isJsArray(types)); @@ -1271,14 +1271,14 @@ var _js_helper; return areAssignableMaps(sNamedParameters, tNamedParameters); } // Function invoke: (dynamic, dynamic) → dynamic - function invoke(function, arguments) { - return invokeOn(function, null, arguments); + function invoke(func, arguments) { + return invokeOn(func, null, arguments); } // Function invokeOn: (dynamic, dynamic, dynamic) → Object - function invokeOn(function, receiver, arguments) { - dart.assert(isJsFunction(function)); + function invokeOn(func, receiver, arguments) { + dart.assert(isJsFunction(func)); dart.assert(dart.notNull(arguments === null) || dart.notNull(isJsArray(arguments))); - return function.apply(receiver, arguments); + return func.apply(receiver, arguments); } // Function call: (dynamic, String) → dynamic function call(object, name) { @@ -1395,12 +1395,12 @@ var _js_helper; let _namedIndices = Symbol('_namedIndices'); let _getCachedInvocation = Symbol('_getCachedInvocation'); class JSInvocationMirror extends core.Object { - JSInvocationMirror($_memberName, $_internalName, $_kind, $_arguments, $_namedArgumentNames) { - this[_memberName] = $_memberName; - this[_internalName] = $_internalName; - this[_kind] = $_kind; - this[_arguments] = $_arguments; - this[_namedArgumentNames] = $_namedArgumentNames; + JSInvocationMirror(memberName$, internalName$, kind$, arguments$, namedArgumentNames) { + this[_memberName] = memberName$; + this[_internalName] = internalName$; + this[_kind] = kind$; + this[_arguments] = arguments$; + this[_namedArgumentNames] = namedArgumentNames; this[_namedIndices] = null; } get memberName() { @@ -1670,11 +1670,11 @@ var _js_helper; positions.set(this.parameterName(index), index); } let index = 0; - ((_) => { - _.sort(); - return _; + ((_$) => { + _$.sort(); + return _$; }).bind(this)(positions.keys.toList()).forEach(((name) => { - this.cachedSortedIndices.set((($tmp) => index = dart.notNull($tmp) + 1, $tmp)(index), positions.get(name)); + this.cachedSortedIndices.set(((x) => index = dart.notNull(x$) + 1, x$)(index), positions.get(name)); }).bind(this)); } return dart.as(this.cachedSortedIndices.get(unsortedIndex), core.int); @@ -1704,8 +1704,8 @@ var _js_helper; let metadata = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.METADATA); return metadata[index]; } - let _throwFormatException = Symbol('_throwFormatException'); - let _fromCharCodeApply = Symbol('_fromCharCodeApply'); + let _throwFormatException$ = Symbol('_throwFormatException'); + let _fromCharCodeApply$ = Symbol('_fromCharCodeApply'); let _mangledNameMatchesType = Symbol('_mangledNameMatchesType'); class Primitives extends core.Object { static initializeStatics(id) { @@ -1720,7 +1720,7 @@ var _js_helper; } return hash; } - static [_throwFormatException](string) { + static [_throwFormatException$](string) { throw new core.FormatException(string); } static parseInt(source, radix, handleError) { @@ -1845,7 +1845,7 @@ var _js_helper; } return null; } - static [_fromCharCodeApply](array) { + static [_fromCharCodeApply$](array) { let result = ""; let kMaxApply = 500; let end = array.length; @@ -2007,7 +2007,7 @@ var _js_helper; } object[key] = value; } - static functionNoSuchMethod(function, positionalArguments, namedArguments) { + static functionNoSuchMethod(func, positionalArguments, namedArguments) { let argumentCount = 0; let arguments = new List.from([]); let namedArgumentList = new List.from([]); @@ -2025,12 +2025,12 @@ var _js_helper; }).bind(this)); } let selectorName = `${_foreign_helper.JS_GET_NAME("CALL_PREFIX")}$${argumentCount}${names}`; - return dart.dinvoke(function, 'noSuchMethod', createUnmangledInvocationMirror(dart.throw_("Unimplemented SymbolLiteral: #call"), selectorName, JSInvocationMirror.METHOD, arguments, namedArgumentList)); + return dart.dinvoke(func, 'noSuchMethod', createUnmangledInvocationMirror(dart.throw_("Unimplemented SymbolLiteral: #call"), selectorName, JSInvocationMirror.METHOD, arguments, namedArgumentList)); } - static applyFunction(function, positionalArguments, namedArguments) { - return namedArguments === null ? applyFunctionWithPositionalArguments(function, positionalArguments) : applyFunctionWithNamedArguments(function, positionalArguments, namedArguments); + static applyFunction(func, positionalArguments, namedArguments) { + return namedArguments === null ? applyFunctionWithPositionalArguments(func, positionalArguments) : applyFunctionWithNamedArguments(func, positionalArguments, namedArguments); } - static applyFunctionWithPositionalArguments(function, positionalArguments) { + static applyFunctionWithPositionalArguments(func, positionalArguments) { let argumentCount = 0; let arguments = null; if (positionalArguments !== null) { @@ -2044,24 +2044,24 @@ var _js_helper; arguments = new List.from([]); } let selectorName = `${_foreign_helper.JS_GET_NAME("CALL_PREFIX")}$${argumentCount}`; - let jsFunction = function[selectorName]; + let jsFunction = func[selectorName]; if (jsFunction === null) { - return functionNoSuchMethod(function, positionalArguments, null); + return functionNoSuchMethod(func, positionalArguments, null); } - return jsFunction.apply(function, arguments); + return jsFunction.apply(func, arguments); } - static applyFunctionWithNamedArguments(function, positionalArguments, namedArguments) { + static applyFunctionWithNamedArguments(func, positionalArguments, namedArguments) { if (namedArguments.isEmpty) { - return applyFunctionWithPositionalArguments(function, positionalArguments); + return applyFunctionWithPositionalArguments(func, positionalArguments); } - let interceptor = _interceptors.getInterceptor(function); + let interceptor = _interceptors.getInterceptor(func); let jsFunction = interceptor["call*"]; if (jsFunction === null) { - return functionNoSuchMethod(function, positionalArguments, namedArguments); + return functionNoSuchMethod(func, positionalArguments, namedArguments); } let info = new ReflectionInfo(jsFunction); if (dart.notNull(info === null) || !dart.notNull(info.areOptionalParametersNamed)) { - return functionNoSuchMethod(function, positionalArguments, namedArguments); + return functionNoSuchMethod(func, positionalArguments, namedArguments); } if (positionalArguments !== null) { positionalArguments = new core.List.from(positionalArguments); @@ -2069,7 +2069,7 @@ var _js_helper; positionalArguments = new List.from([]); } if (info.requiredParameterCount !== positionalArguments.length) { - return functionNoSuchMethod(function, positionalArguments, namedArguments); + return functionNoSuchMethod(func, positionalArguments, namedArguments); } let defaultArguments = new core.Map(); for (let i = 0; dart.notNull(i) < dart.notNull(info.optionalParameterCount); i = dart.notNull(i) + 1) { @@ -2088,10 +2088,10 @@ var _js_helper; } }).bind(this)); if (bad) { - return functionNoSuchMethod(function, positionalArguments, namedArguments); + return functionNoSuchMethod(func, positionalArguments, namedArguments); } positionalArguments.addAll(defaultArguments.values); - return jsFunction.apply(function, positionalArguments); + return jsFunction.apply(func, positionalArguments); } static [_mangledNameMatchesType](mangledName, type) { return mangledName == type[_typeName]; @@ -2214,13 +2214,13 @@ var _js_helper; let _receiver = Symbol('_receiver'); let _pattern = Symbol('_pattern'); class TypeErrorDecoder extends core.Object { - TypeErrorDecoder($_arguments, $_argumentsExpr, $_expr, $_method, $_receiver, $_pattern) { - this[_arguments] = $_arguments; - this[_argumentsExpr] = $_argumentsExpr; - this[_expr] = $_expr; - this[_method] = $_method; - this[_receiver] = $_receiver; - this[_pattern] = $_pattern; + TypeErrorDecoder(arguments$, argumentsExpr$, expr$, method$, receiver$, pattern$) { + this[_arguments] = arguments$; + this[_argumentsExpr] = argumentsExpr$; + this[_expr] = expr$; + this[_method] = method$; + this[_receiver] = receiver$; + this[_pattern] = pattern$; } matchTypeError(message) { let match = new RegExp(this[_pattern]).exec(message); @@ -2274,7 +2274,7 @@ var _js_helper; return new TypeErrorDecoder(arguments, argumentsExpr, expr, method, receiver, pattern); } static provokeCallErrorOn(expression) { - let function = function($expr$) { + let func = function($expr$) { var $argumentsExpr$ = '$arguments$'; try { $expr$.$method$($argumentsExpr$); @@ -2283,10 +2283,10 @@ var _js_helper; } }; - return function(expression); + return func(expression); } static provokeCallErrorOnNull() { - let function = function() { + let func = function() { var $argumentsExpr$ = '$arguments$'; try { null.$method$($argumentsExpr$); @@ -2295,10 +2295,10 @@ var _js_helper; } }; - return function(); + return func(); } static provokeCallErrorOnUndefined() { - let function = function() { + let func = function() { var $argumentsExpr$ = '$arguments$'; try { (void 0).$method$($argumentsExpr$); @@ -2307,10 +2307,10 @@ var _js_helper; } }; - return function(); + return func(); } static provokePropertyErrorOn(expression) { - let function = function($expr$) { + let func = function($expr$) { try { $expr$.$method$; } catch (e) { @@ -2318,10 +2318,10 @@ var _js_helper; } }; - return function(expression); + return func(expression); } static provokePropertyErrorOnNull() { - let function = function() { + let func = function() { try { null.$method$; } catch (e) { @@ -2329,10 +2329,10 @@ var _js_helper; } }; - return function(); + return func(); } static provokePropertyErrorOnUndefined() { - let function = function() { + let func = function() { try { (void 0).$method$; } catch (e) { @@ -2340,7 +2340,7 @@ var _js_helper; } }; - return function(); + return func(); } } dart.defineLazyProperties(TypeErrorDecoder, { @@ -2377,8 +2377,8 @@ var _js_helper; }); let _message = Symbol('_message'); class NullError extends core.Error { - NullError($_message, match) { - this[_message] = $_message; + NullError(message$, match) { + this[_message] = message$; this[_method] = dart.as(match === null ? null : match.method, core.String); super.Error(); } @@ -2389,8 +2389,8 @@ var _js_helper; } } class JsNoSuchMethodError extends core.Error { - JsNoSuchMethodError($_message, match) { - this[_message] = $_message; + JsNoSuchMethodError(message$, match) { + this[_message] = message$; this[_method] = dart.as(match === null ? null : match.method, core.String); this[_receiver] = dart.as(match === null ? null : match.receiver, core.String); super.Error(); @@ -2405,8 +2405,8 @@ var _js_helper; } } class UnknownJsTypeError extends core.Error { - UnknownJsTypeError($_message) { - this[_message] = $_message; + UnknownJsTypeError(message$) { + this[_message] = message$; super.Error(); } toString() { @@ -2491,8 +2491,8 @@ var _js_helper; let _exception = Symbol('_exception'); let _trace = Symbol('_trace'); class _StackTrace extends core.Object { - _StackTrace($_exception) { - this[_exception] = $_exception; + _StackTrace(exception$) { + this[_exception] = exception$; this[_trace] = null; } toString() { @@ -2518,8 +2518,8 @@ var _js_helper; let index = 0; let length = getLength(keyValuePairs); while (dart.notNull(index) < dart.notNull(length)) { - let key = getIndex(keyValuePairs, (($tmp) => index = dart.notNull($tmp) + 1, $tmp)(index)); - let value = getIndex(keyValuePairs, (($tmp) => index = dart.notNull($tmp) + 1, $tmp)(index)); + let key = getIndex(keyValuePairs, ((x) => index = dart.notNull(x$) + 1, x$)(index)); + let value = getIndex(keyValuePairs, ((x) => index = dart.notNull(x$) + 1, x$)(index)); result.set(key, value); } return result; @@ -2544,16 +2544,16 @@ var _js_helper; function convertDartClosureToJS(closure, arity) { if (closure === null) return null; - let function = closure.$identity; - if (!!function) - return function; - function = function(closure, arity, context, invoke) { + let func = closure.$identity; + if (!!func) + return func; + func = function(closure, arity, context, invoke) { return function(a1, a2, a3, a4) { return invoke(closure, context, arity, a1, a2, a3, a4); }; }(closure, arity, _foreign_helper.JS_CURRENT_ISOLATE_CONTEXT(), _foreign_helper.DART_CLOSURE_TO_JS(invokeClosure)); - closure.$identity = function; - return function; + closure.$identity = func; + return func; } class Closure extends core.Object { Closure() { @@ -2563,11 +2563,11 @@ var _js_helper; BoundClosure.receiverOf(dart.as(void 0, BoundClosure)); BoundClosure.selfOf(dart.as(void 0, BoundClosure)); }); - let function = functions[0]; - let name = dart.as(function.$stubName, core.String); - let callName = dart.as(function.$callName, core.String); - function.$reflectionInfo = reflectionInfo; - let info = new ReflectionInfo(function); + let func = functions[0]; + let name = dart.as(func.$stubName, core.String); + let callName = dart.as(func.$callName, core.String); + func.$reflectionInfo = reflectionInfo; + let info = new ReflectionInfo(func); let functionType = info.functionType; let prototype = isStatic ? Object.create(new TearOffClosure().constructor.prototype) : Object.create(new BoundClosure(null, null, null, null).constructor.prototype); prototype.$initialize = prototype.constructor; @@ -2575,16 +2575,16 @@ var _js_helper; this.$initialize(); } : isCsp ? function(a, b, c, d) { this.$initialize(a, b, c, d); - } : new Function("a", "b", "c", "d", "this.$initialize(a,b,c,d);" + (($tmp) => functionCounter = dart.notNull($tmp) + 1, $tmp)(functionCounter)); + } : new Function("a", "b", "c", "d", "this.$initialize(a,b,c,d);" + ((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)); prototype.constructor = constructor; constructor.prototype = prototype; - let trampoline = function; + let trampoline = func; let isIntercepted = false; if (!dart.notNull(isStatic)) { if (jsArguments.length == 1) { isIntercepted = true; } - trampoline = forwardCallTo(receiver, function, isIntercepted); + trampoline = forwardCallTo(receiver, func, isIntercepted); trampoline.$reflectionInfo = reflectionInfo; } else { prototype.$name = propertyName; @@ -2619,7 +2619,7 @@ var _js_helper; prototype["call*"] = trampoline; return constructor; } - static cspForwardCall(arity, isSuperCall, stubName, function) { + static cspForwardCall(arity, isSuperCall, stubName, func) { let getSelf = _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.selfOf); if (isSuperCall) arity = -1; @@ -2665,30 +2665,30 @@ var _js_helper; return function() { return f.apply(s(this), arguments); }; - }(function, getSelf); + }(func, getSelf); } } static get isCsp() { return typeof dart_precompiled == "function"; } - static forwardCallTo(receiver, function, isIntercepted) { + static forwardCallTo(receiver, func, isIntercepted) { if (isIntercepted) - return forwardInterceptedCallTo(receiver, function); - let stubName = dart.as(function.$stubName, core.String); - let arity = function.length; + return forwardInterceptedCallTo(receiver, func); + let stubName = dart.as(func.$stubName, core.String); + let arity = func.length; let lookedUpFunction = receiver[stubName]; - let isSuperCall = !dart.notNull(core.identical(function, lookedUpFunction)); + let isSuperCall = !dart.notNull(core.identical(func, lookedUpFunction)); if (dart.notNull(isCsp) || dart.notNull(isSuperCall) || dart.notNull(arity) >= 27) { - return cspForwardCall(arity, isSuperCall, stubName, function); + return cspForwardCall(arity, isSuperCall, stubName, func); } if (arity === 0) { - return new Function('return function(){' + `return this.${BoundClosure.selfFieldName()}.${stubName}();` + `${(($tmp) => functionCounter = dart.notNull($tmp) + 1, $tmp)(functionCounter)}` + '}')(); + return new Function('return function(){' + `return this.${BoundClosure.selfFieldName()}.${stubName}();` + `${((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')(); } dart.assert(1 <= dart.notNull(arity) && dart.notNull(arity) < 27); let arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(","); - return new Function(`return function(${arguments}){` + `return this.${BoundClosure.selfFieldName()}.${stubName}(${arguments});` + `${(($tmp) => functionCounter = dart.notNull($tmp) + 1, $tmp)(functionCounter)}` + '}')(); + return new Function(`return function(${arguments}){` + `return this.${BoundClosure.selfFieldName()}.${stubName}(${arguments});` + `${((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')(); } - static cspForwardInterceptedCall(arity, isSuperCall, name, function) { + static cspForwardInterceptedCall(arity, isSuperCall, name, func) { let getSelf = _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.selfOf); let getReceiver = _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.receiverOf); if (isSuperCall) @@ -2739,26 +2739,26 @@ var _js_helper; Array.prototype.push.apply(a, arguments); return f.apply(s(this), a); }; - }(function, getSelf, getReceiver); + }(func, getSelf, getReceiver); } } - static forwardInterceptedCallTo(receiver, function) { + static forwardInterceptedCallTo(receiver, func) { let selfField = BoundClosure.selfFieldName(); let receiverField = BoundClosure.receiverFieldName(); - let stubName = dart.as(function.$stubName, core.String); - let arity = function.length; + let stubName = dart.as(func.$stubName, core.String); + let arity = func.length; let isCsp = typeof dart_precompiled == "function"; let lookedUpFunction = receiver[stubName]; - let isSuperCall = !dart.notNull(core.identical(function, lookedUpFunction)); + let isSuperCall = !dart.notNull(core.identical(func, lookedUpFunction)); if (dart.notNull(isCsp) || dart.notNull(isSuperCall) || dart.notNull(arity) >= 28) { - return cspForwardInterceptedCall(arity, isSuperCall, stubName, function); + return cspForwardInterceptedCall(arity, isSuperCall, stubName, func); } if (arity === 1) { - return new Function('return function(){' + `return this.${selfField}.${stubName}(this.${receiverField});` + `${(($tmp) => functionCounter = dart.notNull($tmp) + 1, $tmp)(functionCounter)}` + '}')(); + return new Function('return function(){' + `return this.${selfField}.${stubName}(this.${receiverField});` + `${((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')(); } dart.assert(1 < dart.notNull(arity) && dart.notNull(arity) < 28); let arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, dart.notNull(arity) - 1).join(","); - return new Function(`return function(${arguments}){` + `return this.${selfField}.${stubName}(this.${receiverField}, ${arguments});` + `${(($tmp) => functionCounter = dart.notNull($tmp) + 1, $tmp)(functionCounter)}` + '}')(); + return new Function(`return function(${arguments}){` + `return this.${selfField}.${stubName}(this.${receiverField}, ${arguments});` + `${((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')(); } toString() { return "Closure"; @@ -2781,11 +2781,11 @@ var _js_helper; let _target = Symbol('_target'); let _name = Symbol('_name'); class BoundClosure extends TearOffClosure { - BoundClosure($_self, $_target, $_receiver, $_name) { - this[_self] = $_self; - this[_target] = $_target; - this[_receiver] = $_receiver; - this[_name] = $_name; + BoundClosure(self$, target$, receiver$, name$) { + this[_self] = self$; + this[_target] = target$; + this[_receiver] = receiver$; + this[_name] = name$; super.TearOffClosure(); } ['=='](other) { @@ -3487,8 +3487,8 @@ var _js_helper; let _namedArguments = Symbol('_namedArguments'); let _convert = Symbol('_convert'); class FunctionTypeInfoDecoderRing extends core.Object { - FunctionTypeInfoDecoderRing($_typeData) { - this[_typeData] = $_typeData; + FunctionTypeInfoDecoderRing(typeData) { + this[_typeData] = typeData; this[_cachedToString] = null; } get [_hasReturnType]() { @@ -3498,7 +3498,7 @@ var _js_helper; return this[_typeData].ret; } get [_isVoid]() { - return !!this[_typeData]["void"]; + return !!this[_typeData].void; } get [_hasArguments]() { return "args" in this[_typeData]; @@ -3576,8 +3576,8 @@ var _js_helper; } } class UnimplementedNoSuchMethodError extends core.Error { - UnimplementedNoSuchMethodError($_message) { - this[_message] = $_message; + UnimplementedNoSuchMethodError(message$) { + this[_message] = message$; super.Error(); } toString() { @@ -3708,8 +3708,8 @@ var _js_helper; })); } class MainError extends core.Error { - MainError($_message) { - this[_message] = $_message; + MainError(message$) { + this[_message] = message$; super.Error(); } toString() { diff --git a/pkg/dev_compiler/lib/runtime/dart/_native_typed_data.js b/pkg/dev_compiler/lib/runtime/dart/_native_typed_data.js index e5df8f851541..6461e1bc336c 100644 --- a/pkg/dev_compiler/lib/runtime/dart/_native_typed_data.js +++ b/pkg/dev_compiler/lib/runtime/dart/_native_typed_data.js @@ -125,8 +125,8 @@ var _native_typed_data; NativeFloat32x4List(length) { this[_storage] = new NativeFloat32List(dart.notNull(length) * 4); } - NativeFloat32x4List$_externalStorage($_storage) { - this[_storage] = $_storage; + NativeFloat32x4List$_externalStorage(storage$) { + this[_storage] = storage$; } NativeFloat32x4List$_slowFromList(list) { this[_storage] = new NativeFloat32List(dart.notNull(list.length) * 4); @@ -307,8 +307,8 @@ var _native_typed_data; NativeFloat64x2List(length) { this[_storage] = new NativeFloat64List(dart.notNull(length) * 2); } - NativeFloat64x2List$_externalStorage($_storage) { - this[_storage] = $_storage; + NativeFloat64x2List$_externalStorage(storage$) { + this[_storage] = storage$; } NativeFloat64x2List$_slowFromList(list) { this[_storage] = new NativeFloat64List(dart.notNull(list.length) * 2); @@ -463,9 +463,9 @@ var _native_typed_data; let _setInt32 = Symbol('_setInt32'); let _setUint16 = Symbol('_setUint16'); let _setUint32 = Symbol('_setUint32'); - let _create1 = Symbol('_create1'); - let _create2 = Symbol('_create2'); - let _create3 = Symbol('_create3'); + let _create1$ = Symbol('_create1'); + let _create2$ = Symbol('_create2'); + let _create3$ = Symbol('_create3'); class NativeByteData extends NativeTypedData { NativeByteData(length) { return _create1(_checkLength(length)); @@ -560,13 +560,13 @@ var _native_typed_data; endian = typed_data.Endianness.BIG_ENDIAN; throw new core.UnsupportedError('Uint64 accessor not supported by dart2js.'); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new DataView(new ArrayBuffer(arg)), NativeByteData); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new DataView(arg1, arg2), NativeByteData); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new DataView(arg1, arg2, arg3), NativeByteData); } } @@ -650,13 +650,13 @@ var _native_typed_data; let source = this.subarray(start, end); return _create1(source); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new Float32Array(arg), NativeFloat32List); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new Float32Array(arg1, arg2), NativeFloat32List); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new Float32Array(arg1, arg2, arg3), NativeFloat32List); } } @@ -683,13 +683,13 @@ var _native_typed_data; let source = this.subarray(start, end); return _create1(source); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new Float64Array(arg), NativeFloat64List); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new Float64Array(arg1, arg2), NativeFloat64List); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new Float64Array(arg1, arg2, arg3), NativeFloat64List); } } @@ -720,13 +720,13 @@ var _native_typed_data; let source = this.subarray(start, end); return _create1(source); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new Int16Array(arg), NativeInt16List); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new Int16Array(arg1, arg2), NativeInt16List); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new Int16Array(arg1, arg2, arg3), NativeInt16List); } } @@ -757,13 +757,13 @@ var _native_typed_data; let source = this.subarray(start, end); return _create1(source); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new Int32Array(arg), NativeInt32List); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new Int32Array(arg1, arg2), NativeInt32List); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new Int32Array(arg1, arg2, arg3), NativeInt32List); } } @@ -794,13 +794,13 @@ var _native_typed_data; let source = this.subarray(start, end); return _create1(source); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new Int8Array(arg), NativeInt8List); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new Int8Array(arg1, arg2), NativeInt8List); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new Int8Array(arg1, arg2, arg3), typed_data.Int8List); } } @@ -831,13 +831,13 @@ var _native_typed_data; let source = this.subarray(start, end); return _create1(source); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new Uint16Array(arg), NativeUint16List); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new Uint16Array(arg1, arg2), NativeUint16List); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new Uint16Array(arg1, arg2, arg3), NativeUint16List); } } @@ -868,13 +868,13 @@ var _native_typed_data; let source = this.subarray(start, end); return _create1(source); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new Uint32Array(arg), NativeUint32List); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new Uint32Array(arg1, arg2), NativeUint32List); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new Uint32Array(arg1, arg2, arg3), NativeUint32List); } } @@ -908,13 +908,13 @@ var _native_typed_data; let source = this.subarray(start, end); return _create1(source); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new Uint8ClampedArray(arg), NativeUint8ClampedList); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new Uint8ClampedArray(arg1, arg2), NativeUint8ClampedList); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new Uint8ClampedArray(arg1, arg2, arg3), NativeUint8ClampedList); } } @@ -948,21 +948,21 @@ var _native_typed_data; let source = this.subarray(start, end); return _create1(source); } - static [_create1](arg) { + static [_create1$](arg) { return dart.as(new Uint8Array(arg), NativeUint8List); } - static [_create2](arg1, arg2) { + static [_create2$](arg1, arg2) { return dart.as(new Uint8Array(arg1, arg2), NativeUint8List); } - static [_create3](arg1, arg2, arg3) { + static [_create3$](arg1, arg2, arg3) { return dart.as(new Uint8Array(arg1, arg2, arg3), NativeUint8List); } } dart.defineNamedConstructor(NativeUint8List, 'fromList'); dart.defineNamedConstructor(NativeUint8List, 'view'); - let _truncate = Symbol('_truncate'); + let _truncate$ = Symbol('_truncate'); class NativeFloat32x4 extends core.Object { - static [_truncate](x) { + static [_truncate$](x) { _list.set(0, dart.as(x, core.num)); return _list.get(0); } @@ -1228,10 +1228,10 @@ var _native_typed_data; return _list.buffer.asUint32List(); } }); - let _list = Symbol('_list'); - let _uint32view = Symbol('_uint32view'); + let _list$ = Symbol('_list'); + let _uint32view$ = Symbol('_uint32view'); class NativeInt32x4 extends core.Object { - static [_truncate](x) { + static [_truncate$](x) { _list.set(0, dart.as(x, core.int)); return _list.get(0); } @@ -1256,7 +1256,7 @@ var _native_typed_data; this.w = w ? -1 : 0; } NativeInt32x4$fromFloat32x4Bits(f) { - let floatList = NativeFloat32x4[_list]; + let floatList = NativeFloat32x4[_list$]; floatList.set(0, f.x); floatList.set(1, f.y); floatList.set(2, f.z); @@ -1375,8 +1375,8 @@ var _native_typed_data; return new NativeInt32x4._truncated(this.x, this.y, this.z, _w); } select(trueValue, falseValue) { - let floatList = NativeFloat32x4[_list]; - let intView = NativeFloat32x4[_uint32view]; + let floatList = NativeFloat32x4[_list$]; + let intView = NativeFloat32x4[_uint32view$]; floatList.set(0, trueValue.x); floatList.set(1, trueValue.y); floatList.set(2, trueValue.z); diff --git a/pkg/dev_compiler/lib/runtime/dart/async.js b/pkg/dev_compiler/lib/runtime/dart/async.js index d9f9e56e7e1d..0647976dbbf3 100644 --- a/pkg/dev_compiler/lib/runtime/dart/async.js +++ b/pkg/dev_compiler/lib/runtime/dart/async.js @@ -17,7 +17,7 @@ var async; return zone.registerUnaryCallback(dart.as(errorHandler, dart.throw_("Unimplemented type (dynamic) → dynamic"))); } } - let _getBestStackTrace = Symbol('_getBestStackTrace'); + let _getBestStackTrace$ = Symbol('_getBestStackTrace'); class AsyncError extends core.Object { AsyncError(error, stackTrace) { this.error = error; @@ -31,7 +31,7 @@ var async; _UncaughtAsyncError(error, stackTrace) { super.AsyncError(error, _getBestStackTrace(error, stackTrace)); } - static [_getBestStackTrace](error, stackTrace) { + static [_getBestStackTrace$](error, stackTrace) { if (stackTrace !== null) return stackTrace; if (dart.is(error, core.Error)) { @@ -84,7 +84,7 @@ var async; // Function sendEvent: () → void function sendEvent() { watch.reset(); - let data = computation((($tmp) => computationCount = dart.notNull($tmp) + 1, $tmp)(computationCount)); + let data = computation(((x) => computationCount = dart.notNull(x$) + 1, x$)(computationCount)); controller.add(data); } // Function startPeriodicTimer: () → void @@ -123,9 +123,9 @@ var async; get isBroadcast() { return false; } - asBroadcastStream(opt$) { - let onListen = opt$ && 'onListen' in opt$ ? opt$.onListen : null; - let onCancel = opt$ && 'onCancel' in opt$ ? opt$.onCancel : null; + asBroadcastStream(opts) { + let onListen = opts && 'onListen' in opts ? opts.onListen : null; + let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; return new _AsBroadcastStream(this, dart.closureWrap(onListen, "(StreamSubscription) → void"), dart.closureWrap(onCancel, "(StreamSubscription) → void")); } where(test) { @@ -214,8 +214,8 @@ var async; } return controller.stream; } - handleError(onError, opt$) { - let test = opt$ && 'test' in opt$ ? opt$.test : null; + handleError(onError, opts) { + let test = opts && 'test' in opts ? opts.test : null; return new _HandleErrorStream(this, onError, test); } expand(convert) { @@ -488,8 +488,8 @@ var async; }).bind(this), cancelOnError: true}); return future; } - firstWhere(test, opt$) { - let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : null; + firstWhere(test, opts) { + let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : null; let future = new _Future(); let subscription = null; subscription = this.listen((value) => { @@ -513,8 +513,8 @@ var async; }).bind(this), cancelOnError: true}); return future; } - lastWhere(test, opt$) { - let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : null; + lastWhere(test, opts) { + let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : null; let future = new _Future(); let result = null; let foundResult = false; @@ -599,8 +599,8 @@ var async; }).bind(this), cancelOnError: true}); return future; } - timeout(timeLimit, opt$) { - let onTimeout = opt$ && 'onTimeout' in opt$ ? opt$.onTimeout : null; + timeout(timeLimit, opts) { + let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; let controller = null; let subscription = null; let timer = null; @@ -670,10 +670,10 @@ var async; let Stream = Stream$(dart.dynamic); let _StreamImpl$ = dart.generic(function(T) { class _StreamImpl extends Stream$(T) { - listen(onData, opt$) { - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; - let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : null; + listen(onData, opts) { + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; cancelOnError = core.identical(true, cancelOnError); let subscription = this[_createSubscription](onData, onError, onDone, cancelOnError); this[_onListen](subscription); @@ -689,8 +689,8 @@ var async; let _StreamImpl = _StreamImpl$(dart.dynamic); let _ControllerStream$ = dart.generic(function(T) { class _ControllerStream extends _StreamImpl$(T) { - _ControllerStream($_controller) { - this[_controller] = $_controller; + _ControllerStream(controller$) { + this[_controller] = controller$; super._StreamImpl(); } [_createSubscription](onData, onError, onDone, cancelOnError) { @@ -1080,8 +1080,8 @@ var async; let _BufferingStreamSubscription = _BufferingStreamSubscription$(dart.dynamic); let _ControllerSubscription$ = dart.generic(function(T) { class _ControllerSubscription extends _BufferingStreamSubscription$(T) { - _ControllerSubscription($_controller, onData, onError, onDone, cancelOnError) { - this[_controller] = $_controller; + _ControllerSubscription(controller$, onData, onError, onDone, cancelOnError) { + this[_controller] = controller$; super._BufferingStreamSubscription(onData, onError, onDone, cancelOnError); } [_onCancel]() { @@ -1154,9 +1154,9 @@ var async; let _mayComplete = Symbol('_mayComplete'); let _BroadcastStreamController$ = dart.generic(function(T) { class _BroadcastStreamController extends core.Object { - _BroadcastStreamController($_onListen, $_onCancel) { - this[_onListen] = $_onListen; - this[_onCancel] = $_onCancel; + _BroadcastStreamController(onListen$, onCancel$) { + this[_onListen] = onListen$; + this[_onCancel] = onCancel$; this[_state] = _BroadcastStreamController._STATE_INITIAL; this[_next] = null; this[_previous] = null; @@ -1287,8 +1287,8 @@ var async; get done() { return this[_ensureDoneFuture](); } - addStream(stream, opt$) { - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : true; + addStream(stream, opts) { + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : true; if (!dart.notNull(this[_mayAddEvent])) throw this[_addEventError](); this[_state] = _BroadcastStreamController._STATE_ADDSTREAM; @@ -1532,8 +1532,8 @@ var async; }); let _DoneSubscription = _DoneSubscription$(dart.dynamic); class DeferredLibrary extends core.Object { - DeferredLibrary(libraryName, opt$) { - let uri = opt$ && 'uri' in opt$ ? opt$.uri : null; + DeferredLibrary(libraryName, opts) { + let uri = opts && 'uri' in opts ? opts.uri : null; this.libraryName = libraryName; this.uri = uri; } @@ -1543,8 +1543,8 @@ var async; } let _s = Symbol('_s'); class DeferredLoadException extends core.Object { - DeferredLoadException($_s) { - this[_s] = $_s; + DeferredLoadException(s$) { + this[_s] = s$; } toString() { return `DeferredLoadException: '${this[_s]}'`; @@ -1621,9 +1621,9 @@ var async; }).bind(this)); return dart.as(result, Future$(T)); } - static wait(futures, opt$) { - let eagerError = opt$ && 'eagerError' in opt$ ? opt$.eagerError : false; - let cleanUp = opt$ && 'cleanUp' in opt$ ? opt$.cleanUp : null; + static wait(futures, opts) { + let eagerError = opts && 'eagerError' in opts ? opts.eagerError : false; + let cleanUp = opts && 'cleanUp' in opts ? opts.cleanUp : null; let result = new _Future(); let values = null; let remaining = 0; @@ -1654,7 +1654,7 @@ var async; } } for (let future of futures) { - let pos = (($tmp) => remaining = dart.notNull($tmp) + 1, $tmp)(remaining); + let pos = ((x) => remaining = dart.notNull(x$) + 1, x$)(remaining); future.then(((value) => { remaining = dart.notNull(remaining) - 1; if (values !== null) { @@ -1906,10 +1906,10 @@ var async; let _setErrorObject = Symbol('_setErrorObject'); let _setError = Symbol('_setError'); let _removeListeners = Symbol('_removeListeners'); - let _chainForeignFuture = Symbol('_chainForeignFuture'); - let _chainCoreFuture = Symbol('_chainCoreFuture'); + let _chainForeignFuture$ = Symbol('_chainForeignFuture'); + let _chainCoreFuture$ = Symbol('_chainCoreFuture'); let _completeWithValue = Symbol('_completeWithValue'); - let _propagateToListeners = Symbol('_propagateToListeners'); + let _propagateToListeners$ = Symbol('_propagateToListeners'); let _Future$ = dart.generic(function(T) { class _Future extends core.Object { _Future() { @@ -1955,8 +1955,8 @@ var async; this[_state] = _Future._INCOMPLETE; } } - then(f, opt$) { - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; + then(f, opts) { + let onError = opts && 'onError' in opts ? opts.onError : null; let result = new _Future(); if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { f = dart.closureWrap(result[_zone].registerUnaryCallback(f), "(T) → dynamic"); @@ -1967,8 +1967,8 @@ var async; this[_addListener](new _FutureListener.then(result, f, onError)); return result; } - catchError(onError, opt$) { - let test = opt$ && 'test' in opt$ ? opt$.test : null; + catchError(onError, opts) { + let test = opts && 'test' in opts ? opts.test : null; let result = new _Future(); if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { onError = _registerErrorHandler(onError, result[_zone]); @@ -2039,7 +2039,7 @@ var async; } return prev; } - static [_chainForeignFuture](source, target) { + static [_chainForeignFuture$](source, target) { dart.assert(!dart.notNull(target[_isComplete])); dart.assert(!dart.is(source, _Future)); target[_isChained] = true; @@ -2053,7 +2053,7 @@ var async; target._completeError(error, dart.as(stackTrace, core.StackTrace)); }).bind(this)}); } - static [_chainCoreFuture](source, target) { + static [_chainCoreFuture$](source, target) { dart.assert(!dart.notNull(target[_isComplete])); dart.assert(dart.is(source, _Future)); target[_isChained] = true; @@ -2127,7 +2127,7 @@ var async; this[_completeError](error, stackTrace); }).bind(this)); } - static [_propagateToListeners](source, listeners) { + static [_propagateToListeners$](source, listeners) { while (true) { dart.assert(source[_isComplete]); let hasError = source[_hasError]; @@ -2287,8 +2287,8 @@ var async; source = result; } } - timeout(timeLimit, opt$) { - let onTimeout = opt$ && 'onTimeout' in opt$ ? opt$.onTimeout : null; + timeout(timeLimit, opts) { + let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; if (this[_isComplete]) return new _Future.immediate(this); let result = new _Future(); @@ -2407,15 +2407,15 @@ var async; Zone.current.scheduleMicrotask(Zone.current.bindCallback(callback, {runGuarded: true})); } let _scheduleImmediate = Symbol('_scheduleImmediate'); - let _initializeScheduleImmediate = Symbol('_initializeScheduleImmediate'); - let _scheduleImmediateJsOverride = Symbol('_scheduleImmediateJsOverride'); - let _scheduleImmediateWithSetImmediate = Symbol('_scheduleImmediateWithSetImmediate'); - let _scheduleImmediateWithTimer = Symbol('_scheduleImmediateWithTimer'); + let _initializeScheduleImmediate$ = Symbol('_initializeScheduleImmediate'); + let _scheduleImmediateJsOverride$ = Symbol('_scheduleImmediateJsOverride'); + let _scheduleImmediateWithSetImmediate$ = Symbol('_scheduleImmediateWithSetImmediate'); + let _scheduleImmediateWithTimer$ = Symbol('_scheduleImmediateWithTimer'); class _AsyncRun extends core.Object { static [_scheduleImmediate](callback) { dart.dinvokef(scheduleImmediateClosure, callback); } - static [_initializeScheduleImmediate]() { + static [_initializeScheduleImmediate$]() { _js_helper.requiresPreamble(); if (self.scheduleImmediate !== null) { return _scheduleImmediateJsOverride; @@ -2445,7 +2445,7 @@ var async; } return _scheduleImmediateWithTimer; } - static [_scheduleImmediateJsOverride](callback) { + static [_scheduleImmediateJsOverride$](callback) { // Function internalCallback: () → dynamic function internalCallback() { _isolate_helper.leaveJsAsync(); @@ -2455,7 +2455,7 @@ var async; _isolate_helper.enterJsAsync(); self.scheduleImmediate(_js_helper.convertDartClosureToJS(internalCallback, 0)); } - static [_scheduleImmediateWithSetImmediate](callback) { + static [_scheduleImmediateWithSetImmediate$](callback) { // Function internalCallback: () → dynamic function internalCallback() { _isolate_helper.leaveJsAsync(); @@ -2465,7 +2465,7 @@ var async; _isolate_helper.enterJsAsync(); self.setImmediate(_js_helper.convertDartClosureToJS(internalCallback, 0)); } - static [_scheduleImmediateWithTimer](callback) { + static [_scheduleImmediateWithTimer$](callback) { Timer._createTimer(core.Duration.ZERO, callback); } } @@ -2489,22 +2489,22 @@ var async; let _stream = Symbol('_stream'); let StreamView$ = dart.generic(function(T) { class StreamView extends Stream$(T) { - StreamView($_stream) { - this[_stream] = $_stream; + StreamView(stream$) { + this[_stream] = stream$; super.Stream(); } get isBroadcast() { return this[_stream].isBroadcast; } - asBroadcastStream(opt$) { - let onListen = opt$ && 'onListen' in opt$ ? opt$.onListen : null; - let onCancel = opt$ && 'onCancel' in opt$ ? opt$.onCancel : null; + asBroadcastStream(opts) { + let onListen = opts && 'onListen' in opts ? opts.onListen : null; + let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; return this[_stream].asBroadcastStream({onListen: onListen, onCancel: onCancel}); } - listen(onData, opt$) { - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; - let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : null; + listen(onData, opts) { + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; return this[_stream].listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError}); } } @@ -2528,8 +2528,8 @@ var async; StreamTransformer(transformer) { return new _StreamSubscriptionTransformer(transformer); } - StreamTransformer$fromHandlers(opt$) { - return new _StreamHandlerTransformer(opt$); + StreamTransformer$fromHandlers(opts) { + return new _StreamHandlerTransformer(opts); } } dart.defineNamedConstructor(StreamTransformer, 'fromHandlers'); @@ -2547,8 +2547,8 @@ var async; let StreamIterator = StreamIterator$(dart.dynamic); let _ControllerEventSinkWrapper$ = dart.generic(function(T) { class _ControllerEventSinkWrapper extends core.Object { - _ControllerEventSinkWrapper($_sink) { - this[_sink] = $_sink; + _ControllerEventSinkWrapper(sink$) { + this[_sink] = sink$; } add(data) { this[_sink].add(data); @@ -2567,21 +2567,21 @@ var async; let _ControllerEventSinkWrapper = _ControllerEventSinkWrapper$(dart.dynamic); let StreamController$ = dart.generic(function(T) { class StreamController extends core.Object { - StreamController(opt$) { - let onListen = opt$ && 'onListen' in opt$ ? opt$.onListen : null; - let onPause = opt$ && 'onPause' in opt$ ? opt$.onPause : null; - let onResume = opt$ && 'onResume' in opt$ ? opt$.onResume : null; - let onCancel = opt$ && 'onCancel' in opt$ ? opt$.onCancel : null; - let sync = opt$ && 'sync' in opt$ ? opt$.sync : false; + StreamController(opts) { + let onListen = opts && 'onListen' in opts ? opts.onListen : null; + let onPause = opts && 'onPause' in opts ? opts.onPause : null; + let onResume = opts && 'onResume' in opts ? opts.onResume : null; + let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; + let sync = opts && 'sync' in opts ? opts.sync : false; if (dart.notNull(onListen === null) && dart.notNull(onPause === null) && dart.notNull(onResume === null) && dart.notNull(onCancel === null)) { return dart.as(sync ? new _NoCallbackSyncStreamController() : new _NoCallbackAsyncStreamController(), StreamController$(T)); } return sync ? new _SyncStreamController(onListen, onPause, onResume, onCancel) : new _AsyncStreamController(onListen, onPause, onResume, onCancel); } - StreamController$broadcast(opt$) { - let onListen = opt$ && 'onListen' in opt$ ? opt$.onListen : null; - let onCancel = opt$ && 'onCancel' in opt$ ? opt$.onCancel : null; - let sync = opt$ && 'sync' in opt$ ? opt$.sync : false; + StreamController$broadcast(opts) { + let onListen = opts && 'onListen' in opts ? opts.onListen : null; + let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; + let sync = opts && 'sync' in opts ? opts.sync : false; return sync ? new _SyncBroadcastStreamController(onListen, onCancel) : new _AsyncBroadcastStreamController(onListen, onCancel); } } @@ -2677,8 +2677,8 @@ var async; dart.assert(this[_isAddingStream]); return new core.StateError("Cannot add event while adding a stream"); } - addStream(source, opt$) { - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : true; + addStream(source, opts) { + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : true; if (!dart.notNull(this[_mayAddEvent])) throw this[_badEventState](); if (this[_isCanceled]) @@ -2787,9 +2787,9 @@ var async; result = dart.as(this[_onCancel](), Future); } catch (e) { let s = dart.stackTrace(e); - result = ((_) => { - _._asyncCompleteError(e, s); - return _; + result = ((_$) => { + _$._asyncCompleteError(e, s); + return _$; }).bind(this)(new _Future()); } @@ -2866,11 +2866,11 @@ var async; let _AsyncStreamControllerDispatch = _AsyncStreamControllerDispatch$(dart.dynamic); let _AsyncStreamController$ = dart.generic(function(T) { class _AsyncStreamController extends dart.mixin(_StreamController$(T), _AsyncStreamControllerDispatch$(T)) { - _AsyncStreamController($_onListen, $_onPause, $_onResume, $_onCancel) { - this[_onListen] = $_onListen; - this[_onPause] = $_onPause; - this[_onResume] = $_onResume; - this[_onCancel] = $_onCancel; + _AsyncStreamController(onListen$, onPause$, onResume$, onCancel$) { + this[_onListen] = onListen$; + this[_onPause] = onPause$; + this[_onResume] = onResume$; + this[_onCancel] = onCancel$; super._StreamController(); } } @@ -2879,11 +2879,11 @@ var async; let _AsyncStreamController = _AsyncStreamController$(dart.dynamic); let _SyncStreamController$ = dart.generic(function(T) { class _SyncStreamController extends dart.mixin(_StreamController$(T), _SyncStreamControllerDispatch$(T)) { - _SyncStreamController($_onListen, $_onPause, $_onResume, $_onCancel) { - this[_onListen] = $_onListen; - this[_onPause] = $_onPause; - this[_onResume] = $_onResume; - this[_onCancel] = $_onCancel; + _SyncStreamController(onListen$, onPause$, onResume$, onCancel$) { + this[_onListen] = onListen$; + this[_onPause] = onPause$; + this[_onResume] = onResume$; + this[_onCancel] = onCancel$; super._StreamController(); } } @@ -2926,8 +2926,8 @@ var async; let _target = Symbol('_target'); let _StreamSinkWrapper$ = dart.generic(function(T) { class _StreamSinkWrapper extends core.Object { - _StreamSinkWrapper($_target) { - this[_target] = $_target; + _StreamSinkWrapper(target$) { + this[_target] = target$; } add(data) { this[_target].add(data); @@ -2940,8 +2940,8 @@ var async; close() { return this[_target].close(); } - addStream(source, opt$) { - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : true; + addStream(source, opts) { + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : true; return this[_target].addStream(source, {cancelOnError: cancelOnError}); } get done() { @@ -3014,8 +3014,8 @@ var async; let _isUsed = Symbol('_isUsed'); let _GeneratedStreamImpl$ = dart.generic(function(T) { class _GeneratedStreamImpl extends _StreamImpl$(T) { - _GeneratedStreamImpl($_pending) { - this[_pending] = $_pending; + _GeneratedStreamImpl(pending$) { + this[_pending] = pending$; this[_isUsed] = false; super._StreamImpl(); } @@ -3023,9 +3023,9 @@ var async; if (this[_isUsed]) throw new core.StateError("Stream has already been listened to."); this[_isUsed] = true; - return ((_) => { - _._setPendingEvents(this[_pending]()); - return _; + return ((_$) => { + _$._setPendingEvents(this[_pending]()); + return _$; }).bind(this)(new _BufferingStreamSubscription(onData, onError, onDone, cancelOnError)); } } @@ -3218,8 +3218,8 @@ var async; let _isScheduled = Symbol('_isScheduled'); let _DoneStreamSubscription$ = dart.generic(function(T) { class _DoneStreamSubscription extends core.Object { - _DoneStreamSubscription($_onDone) { - this[_onDone] = $_onDone; + _DoneStreamSubscription(onDone$) { + this[_onDone] = onDone$; this[_zone] = Zone.current; this[_state] = 0; this[_schedule](); @@ -3295,8 +3295,8 @@ var async; let _isSubscriptionPaused = Symbol('_isSubscriptionPaused'); let _AsBroadcastStream$ = dart.generic(function(T) { class _AsBroadcastStream extends Stream$(T) { - _AsBroadcastStream($_source, onListenHandler, onCancelHandler) { - this[_source] = $_source; + _AsBroadcastStream(source$, onListenHandler, onCancelHandler) { + this[_source] = source$; this[_onListenHandler] = dart.closureWrap(Zone.current.registerUnaryCallback(onListenHandler), "(StreamSubscription) → void"); this[_onCancelHandler] = dart.closureWrap(Zone.current.registerUnaryCallback(onCancelHandler), "(StreamSubscription) → void"); this[_zone] = Zone.current; @@ -3308,10 +3308,10 @@ var async; get isBroadcast() { return true; } - listen(onData, opt$) { - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; - let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : null; + listen(onData, opts) { + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; if (dart.notNull(this[_controller] === null) || dart.notNull(this[_controller].isClosed)) { return new _DoneStreamSubscription(onDone); } @@ -3367,8 +3367,8 @@ var async; let _AsBroadcastStream = _AsBroadcastStream$(dart.dynamic); let _BroadcastSubscriptionWrapper$ = dart.generic(function(T) { class _BroadcastSubscriptionWrapper extends core.Object { - _BroadcastSubscriptionWrapper($_stream) { - this[_stream] = $_stream; + _BroadcastSubscriptionWrapper(stream$) { + this[_stream] = stream$; } onData(handleData) { throw new core.UnsupportedError("Cannot change handlers of asBroadcastStream source subscription."); @@ -3403,20 +3403,20 @@ var async; return _BroadcastSubscriptionWrapper; }); let _BroadcastSubscriptionWrapper = _BroadcastSubscriptionWrapper$(dart.dynamic); - let _current = Symbol('_current'); + let _current$ = Symbol('_current'); let _futureOrPrefetch = Symbol('_futureOrPrefetch'); let _clear = Symbol('_clear'); let _StreamIteratorImpl$ = dart.generic(function(T) { class _StreamIteratorImpl extends core.Object { _StreamIteratorImpl(stream) { this[_subscription] = null; - this[_current] = null; + this[_current$] = null; this[_futureOrPrefetch] = null; this[_state] = _StreamIteratorImpl._STATE_FOUND; this[_subscription] = stream.listen(this[_onData], {onError: this[_onError], onDone: this[_onDone], cancelOnError: true}); } get current() { - return this[_current]; + return this[_current$]; } moveNext() { if (this[_state] === _StreamIteratorImpl._STATE_DONE) { @@ -3427,7 +3427,7 @@ var async; } if (this[_state] === _StreamIteratorImpl._STATE_FOUND) { this[_state] = _StreamIteratorImpl._STATE_MOVING; - this[_current] = null; + this[_current$] = null; this[_futureOrPrefetch] = new _Future(); return dart.as(this[_futureOrPrefetch], Future$(core.bool)); } else { @@ -3435,7 +3435,7 @@ var async; switch (this[_state]) { case _StreamIteratorImpl._STATE_EXTRA_DATA: this[_state] = _StreamIteratorImpl._STATE_FOUND; - this[_current] = dart.as(this[_futureOrPrefetch], T); + this[_current$] = dart.as(this[_futureOrPrefetch], T); this[_futureOrPrefetch] = null; this[_subscription].resume(); return new _Future.immediate(true); @@ -3452,7 +3452,7 @@ var async; [_clear]() { this[_subscription] = null; this[_futureOrPrefetch] = null; - this[_current] = null; + this[_current$] = null; this[_state] = _StreamIteratorImpl._STATE_DONE; } cancel() { @@ -3468,7 +3468,7 @@ var async; } [_onData](data) { if (this[_state] === _StreamIteratorImpl._STATE_MOVING) { - this[_current] = data; + this[_current$] = data; let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); this[_futureOrPrefetch] = null; this[_state] = _StreamIteratorImpl._STATE_FOUND; @@ -3568,17 +3568,17 @@ var async; let _handleDone = Symbol('_handleDone'); let _ForwardingStream$ = dart.generic(function(S, T) { class _ForwardingStream extends Stream$(T) { - _ForwardingStream($_source) { - this[_source] = $_source; + _ForwardingStream(source$) { + this[_source] = source$; super.Stream(); } get isBroadcast() { return this[_source].isBroadcast; } - listen(onData, opt$) { - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; - let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : null; + listen(onData, opts) { + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; cancelOnError = core.identical(true, cancelOnError); return this[_createSubscription](onData, onError, onDone, cancelOnError); } @@ -3601,8 +3601,8 @@ var async; let _ForwardingStream = _ForwardingStream$(dart.dynamic, dart.dynamic); let _ForwardingStreamSubscription$ = dart.generic(function(S, T) { class _ForwardingStreamSubscription extends _BufferingStreamSubscription$(T) { - _ForwardingStreamSubscription($_stream, onData, onError, onDone, cancelOnError) { - this[_stream] = $_stream; + _ForwardingStreamSubscription(stream$, onData, onError, onDone, cancelOnError) { + this[_stream] = stream$; this[_subscription] = null; super._BufferingStreamSubscription(onData, onError, onDone, cancelOnError); this[_subscription] = this[_stream][_source].listen(this[_handleData], {onError: this[_handleError], onDone: this[_handleDone]}); @@ -3911,8 +3911,8 @@ var async; let _DistinctStream = _DistinctStream$(dart.dynamic); let _EventSinkWrapper$ = dart.generic(function(T) { class _EventSinkWrapper extends core.Object { - _EventSinkWrapper($_sink) { - this[_sink] = $_sink; + _EventSinkWrapper(sink$) { + this[_sink] = sink$; } add(data) { this[_sink]._add(data); @@ -4019,8 +4019,8 @@ var async; let _sinkMapper = Symbol('_sinkMapper'); let _StreamSinkTransformer$ = dart.generic(function(S, T) { class _StreamSinkTransformer extends core.Object { - _StreamSinkTransformer($_sinkMapper) { - this[_sinkMapper] = $_sinkMapper; + _StreamSinkTransformer(sinkMapper) { + this[_sinkMapper] = sinkMapper; } bind(stream) { return new _BoundSinkStream(stream, this[_sinkMapper]); @@ -4034,15 +4034,15 @@ var async; get isBroadcast() { return this[_stream].isBroadcast; } - _BoundSinkStream($_stream, $_sinkMapper) { - this[_stream] = $_stream; - this[_sinkMapper] = $_sinkMapper; + _BoundSinkStream(stream$, sinkMapper) { + this[_stream] = stream$; + this[_sinkMapper] = sinkMapper; super.Stream(); } - listen(onData, opt$) { - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; - let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : null; + listen(onData, opts) { + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; cancelOnError = core.identical(true, cancelOnError); let subscription = dart.as(new _SinkTransformerStreamSubscription(this[_stream], dart.closureWrap(this[_sinkMapper], "(EventSink) → EventSink"), onData, onError, onDone, cancelOnError), StreamSubscription$(T)); return subscription; @@ -4053,11 +4053,11 @@ var async; let _BoundSinkStream = _BoundSinkStream$(dart.dynamic, dart.dynamic); let _HandlerEventSink$ = dart.generic(function(S, T) { class _HandlerEventSink extends core.Object { - _HandlerEventSink($_handleData, $_handleError, $_handleDone, $_sink) { - this[_handleData] = $_handleData; - this[_handleError] = $_handleError; - this[_handleDone] = $_handleDone; - this[_sink] = $_sink; + _HandlerEventSink(handleData$, handleError$, handleDone$, sink$) { + this[_handleData] = handleData$; + this[_handleError] = handleError$; + this[_handleDone] = handleDone$; + this[_sink] = sink$; } add(data) { return this[_handleData](data, this[_sink]); @@ -4074,15 +4074,15 @@ var async; return _HandlerEventSink; }); let _HandlerEventSink = _HandlerEventSink$(dart.dynamic, dart.dynamic); - let _defaultHandleData = Symbol('_defaultHandleData'); - let _defaultHandleError = Symbol('_defaultHandleError'); - let _defaultHandleDone = Symbol('_defaultHandleDone'); + let _defaultHandleData$ = Symbol('_defaultHandleData'); + let _defaultHandleError$ = Symbol('_defaultHandleError'); + let _defaultHandleDone$ = Symbol('_defaultHandleDone'); let _StreamHandlerTransformer$ = dart.generic(function(S, T) { class _StreamHandlerTransformer extends _StreamSinkTransformer$(S, T) { - _StreamHandlerTransformer(opt$) { - let handleData = opt$ && 'handleData' in opt$ ? opt$.handleData : null; - let handleError = opt$ && 'handleError' in opt$ ? opt$.handleError : null; - let handleDone = opt$ && 'handleDone' in opt$ ? opt$.handleDone : null; + _StreamHandlerTransformer(opts) { + let handleData = opts && 'handleData' in opts ? opts.handleData : null; + let handleError = opts && 'handleError' in opts ? opts.handleError : null; + let handleDone = opts && 'handleDone' in opts ? opts.handleDone : null; super._StreamSinkTransformer(dart.closureWrap((outputSink) => { if (handleData === null) handleData = dart.closureWrap(_defaultHandleData, "(S, EventSink) → void"); @@ -4096,13 +4096,13 @@ var async; bind(stream) { return super.bind(stream); } - static [_defaultHandleData](data, sink) { + static [_defaultHandleData$](data, sink) { sink.add(data); } - static [_defaultHandleError](error, stackTrace, sink) { + static [_defaultHandleError$](error, stackTrace, sink) { sink.addError(error); } - static [_defaultHandleDone](sink) { + static [_defaultHandleDone$](sink) { sink.close(); } } @@ -4112,8 +4112,8 @@ var async; let _transformer = Symbol('_transformer'); let _StreamSubscriptionTransformer$ = dart.generic(function(S, T) { class _StreamSubscriptionTransformer extends core.Object { - _StreamSubscriptionTransformer($_transformer) { - this[_transformer] = $_transformer; + _StreamSubscriptionTransformer(transformer$) { + this[_transformer] = transformer$; } bind(stream) { return new _BoundSubscriptionStream(stream, this[_transformer]); @@ -4124,15 +4124,15 @@ var async; let _StreamSubscriptionTransformer = _StreamSubscriptionTransformer$(dart.dynamic, dart.dynamic); let _BoundSubscriptionStream$ = dart.generic(function(S, T) { class _BoundSubscriptionStream extends Stream$(T) { - _BoundSubscriptionStream($_stream, $_transformer) { - this[_stream] = $_stream; - this[_transformer] = $_transformer; + _BoundSubscriptionStream(stream$, transformer$) { + this[_stream] = stream$; + this[_transformer] = transformer$; super.Stream(); } - listen(onData, opt$) { - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; - let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; - let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError : null; + listen(onData, opts) { + let onError = opts && 'onError' in opts ? opts.onError : null; + let onDone = opts && 'onDone' in opts ? opts.onDone : null; + let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; cancelOnError = core.identical(true, cancelOnError); let result = this[_transformer](this[_stream], cancelOnError); result.onData(onData); @@ -4177,48 +4177,48 @@ var async; } dart.defineNamedConstructor(Timer, 'periodic'); class _ZoneFunction extends core.Object { - _ZoneFunction(zone, function) { + _ZoneFunction(zone, func) { this.zone = zone; - this['function'] = function; + this.function = func; } } class ZoneSpecification extends core.Object { - ZoneSpecification(opt$) { - return new _ZoneSpecification(opt$); - } - ZoneSpecification$from(other, opt$) { - let handleUncaughtError = opt$ && 'handleUncaughtError' in opt$ ? opt$.handleUncaughtError : null; - let run = opt$ && 'run' in opt$ ? opt$.run : null; - let runUnary = opt$ && 'runUnary' in opt$ ? opt$.runUnary : null; - let runBinary = opt$ && 'runBinary' in opt$ ? opt$.runBinary : null; - let registerCallback = opt$ && 'registerCallback' in opt$ ? opt$.registerCallback : null; - let registerUnaryCallback = opt$ && 'registerUnaryCallback' in opt$ ? opt$.registerUnaryCallback : null; - let registerBinaryCallback = opt$ && 'registerBinaryCallback' in opt$ ? opt$.registerBinaryCallback : null; - let errorCallback = opt$ && 'errorCallback' in opt$ ? opt$.errorCallback : null; - let scheduleMicrotask = opt$ && 'scheduleMicrotask' in opt$ ? opt$.scheduleMicrotask : null; - let createTimer = opt$ && 'createTimer' in opt$ ? opt$.createTimer : null; - let createPeriodicTimer = opt$ && 'createPeriodicTimer' in opt$ ? opt$.createPeriodicTimer : null; - let print = opt$ && 'print' in opt$ ? opt$.print : null; - let fork = opt$ && 'fork' in opt$ ? opt$.fork : null; + ZoneSpecification(opts) { + return new _ZoneSpecification(opts); + } + ZoneSpecification$from(other, opts) { + let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.handleUncaughtError : null; + let run = opts && 'run' in opts ? opts.run : null; + let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null; + let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; + let registerCallback = opts && 'registerCallback' in opts ? opts.registerCallback : null; + let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts.registerUnaryCallback : null; + let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? opts.registerBinaryCallback : null; + let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback : null; + let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.scheduleMicrotask : null; + let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null; + let createPeriodicTimer = opts && 'createPeriodicTimer' in opts ? opts.createPeriodicTimer : null; + let print = opts && 'print' in opts ? opts.print : null; + let fork = opts && 'fork' in opts ? opts.fork : null; return new ZoneSpecification({handleUncaughtError: dart.as(handleUncaughtError !== null ? handleUncaughtError : other.handleUncaughtError, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, dynamic, StackTrace) → dynamic")), run: dart.as(run !== null ? run : other.run, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, () → dynamic) → dynamic")), runUnary: dart.as(runUnary !== null ? runUnary : other.runUnary, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, (dynamic) → dynamic, dynamic) → dynamic")), runBinary: dart.as(runBinary !== null ? runBinary : other.runBinary, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dynamic, dynamic, dynamic) → dynamic")), registerCallback: dart.as(registerCallback !== null ? registerCallback : other.registerCallback, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, () → dynamic) → ZoneCallback")), registerUnaryCallback: dart.as(registerUnaryCallback !== null ? registerUnaryCallback : other.registerUnaryCallback, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, (dynamic) → dynamic) → ZoneUnaryCallback")), registerBinaryCallback: dart.as(registerBinaryCallback !== null ? registerBinaryCallback : other.registerBinaryCallback, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dynamic) → ZoneBinaryCallback")), errorCallback: dart.as(errorCallback !== null ? errorCallback : other.errorCallback, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, Object, StackTrace) → AsyncError")), scheduleMicrotask: dart.as(scheduleMicrotask !== null ? scheduleMicrotask : other.scheduleMicrotask, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, () → dynamic) → void")), createTimer: dart.as(createTimer !== null ? createTimer : other.createTimer, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, Duration, () → void) → Timer")), createPeriodicTimer: dart.as(createPeriodicTimer !== null ? createPeriodicTimer : other.createPeriodicTimer, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, Duration, (Timer) → void) → Timer")), print: dart.as(print !== null ? print : other.print, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, String) → void")), fork: dart.as(fork !== null ? fork : other.fork, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, ZoneSpecification, Map) → Zone"))}); } } dart.defineNamedConstructor(ZoneSpecification, 'from'); class _ZoneSpecification extends core.Object { - _ZoneSpecification(opt$) { - let handleUncaughtError = opt$ && 'handleUncaughtError' in opt$ ? opt$.handleUncaughtError : null; - let run = opt$ && 'run' in opt$ ? opt$.run : null; - let runUnary = opt$ && 'runUnary' in opt$ ? opt$.runUnary : null; - let runBinary = opt$ && 'runBinary' in opt$ ? opt$.runBinary : null; - let registerCallback = opt$ && 'registerCallback' in opt$ ? opt$.registerCallback : null; - let registerUnaryCallback = opt$ && 'registerUnaryCallback' in opt$ ? opt$.registerUnaryCallback : null; - let registerBinaryCallback = opt$ && 'registerBinaryCallback' in opt$ ? opt$.registerBinaryCallback : null; - let errorCallback = opt$ && 'errorCallback' in opt$ ? opt$.errorCallback : null; - let scheduleMicrotask = opt$ && 'scheduleMicrotask' in opt$ ? opt$.scheduleMicrotask : null; - let createTimer = opt$ && 'createTimer' in opt$ ? opt$.createTimer : null; - let createPeriodicTimer = opt$ && 'createPeriodicTimer' in opt$ ? opt$.createPeriodicTimer : null; - let print = opt$ && 'print' in opt$ ? opt$.print : null; - let fork = opt$ && 'fork' in opt$ ? opt$.fork : null; + _ZoneSpecification(opts) { + let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.handleUncaughtError : null; + let run = opts && 'run' in opts ? opts.run : null; + let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null; + let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; + let registerCallback = opts && 'registerCallback' in opts ? opts.registerCallback : null; + let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts.registerUnaryCallback : null; + let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? opts.registerBinaryCallback : null; + let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback : null; + let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.scheduleMicrotask : null; + let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null; + let createPeriodicTimer = opts && 'createPeriodicTimer' in opts ? opts.createPeriodicTimer : null; + let print = opts && 'print' in opts ? opts.print : null; + let fork = opts && 'fork' in opts ? opts.fork : null; this.handleUncaughtError = handleUncaughtError; this.run = run; this.runUnary = runUnary; @@ -4253,7 +4253,7 @@ var async; } static [_leave](previous) { dart.assert(previous !== null); - Zone[_current] = previous; + Zone[_current$] = previous; } } dart.defineNamedConstructor(Zone, '_'); @@ -4279,75 +4279,75 @@ var async; let _print = Symbol('_print'); let _fork = Symbol('_fork'); class _ZoneDelegate extends core.Object { - _ZoneDelegate($_delegationTarget) { - this[_delegationTarget] = $_delegationTarget; + _ZoneDelegate(delegationTarget) { + this[_delegationTarget] = delegationTarget; } handleUncaughtError(zone, error, stackTrace) { let implementation = this[_delegationTarget][_handleUncaughtError]; let implZone = implementation.zone; - return dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, error, stackTrace); + return dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, error, stackTrace); } run(zone, f) { let implementation = this[_delegationTarget][_run]; let implZone = implementation.zone; - return dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, f); + return dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, f); } runUnary(zone, f, arg) { let implementation = this[_delegationTarget][_runUnary]; let implZone = implementation.zone; - return dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, f, arg); + return dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, f, arg); } runBinary(zone, f, arg1, arg2) { let implementation = this[_delegationTarget][_runBinary]; let implZone = implementation.zone; - return dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, f, arg1, arg2); + return dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, f, arg1, arg2); } registerCallback(zone, f) { let implementation = this[_delegationTarget][_registerCallback]; let implZone = implementation.zone; - return dart.as(dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, f), ZoneCallback); + return dart.as(dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, f), ZoneCallback); } registerUnaryCallback(zone, f) { let implementation = this[_delegationTarget][_registerUnaryCallback]; let implZone = implementation.zone; - return dart.as(dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, f), ZoneUnaryCallback); + return dart.as(dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, f), ZoneUnaryCallback); } registerBinaryCallback(zone, f) { let implementation = this[_delegationTarget][_registerBinaryCallback]; let implZone = implementation.zone; - return dart.as(dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, f), ZoneBinaryCallback); + return dart.as(dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, f), ZoneBinaryCallback); } errorCallback(zone, error, stackTrace) { let implementation = this[_delegationTarget][_errorCallback]; let implZone = implementation.zone; if (core.identical(implZone, _ROOT_ZONE)) return null; - return dart.as(dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, error, stackTrace), AsyncError); + return dart.as(dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, error, stackTrace), AsyncError); } scheduleMicrotask(zone, f) { let implementation = this[_delegationTarget][_scheduleMicrotask]; let implZone = implementation.zone; - dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, f); + dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, f); } createTimer(zone, duration, f) { let implementation = this[_delegationTarget][_createTimer]; let implZone = implementation.zone; - return dart.as(dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, duration, f), Timer); + return dart.as(dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, duration, f), Timer); } createPeriodicTimer(zone, period, f) { let implementation = this[_delegationTarget][_createPeriodicTimer]; let implZone = implementation.zone; - return dart.as(dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, period, f), Timer); + return dart.as(dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, period, f), Timer); } print(zone, line) { let implementation = this[_delegationTarget][_print]; let implZone = implementation.zone; - dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, line); + dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, line); } fork(zone, specification, zoneValues) { let implementation = this[_delegationTarget][_fork]; let implZone = implementation.zone; - return dart.as(dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZone), zone, specification, zoneValues), Zone); + return dart.as(dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone), zone, specification, zoneValues), Zone); } } class _Zone extends core.Object { @@ -4366,9 +4366,9 @@ var async; this[_delegateCache] = new _ZoneDelegate(this); return this[_delegateCache]; } - _CustomZone(parent, specification, $_map) { + _CustomZone(parent, specification, map) { this.parent = parent; - this[_map] = $_map; + this[_map] = map; this[_runUnary] = null; this[_run] = null; this[_runBinary] = null; @@ -4428,8 +4428,8 @@ var async; } } - bindCallback(f, opt$) { - let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; + bindCallback(f, opts) { + let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; let registered = this.registerCallback(f); if (runGuarded) { return (() => this.runGuarded(registered)).bind(this); @@ -4437,8 +4437,8 @@ var async; return (() => this.run(registered)).bind(this); } } - bindUnaryCallback(f, opt$) { - let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; + bindUnaryCallback(f, opts) { + let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; let registered = this.registerUnaryCallback(f); if (runGuarded) { return ((arg) => this.runUnaryGuarded(registered, arg)).bind(this); @@ -4446,8 +4446,8 @@ var async; return ((arg) => this.runUnary(registered, arg)).bind(this); } } - bindBinaryCallback(f, opt$) { - let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; + bindBinaryCallback(f, opts) { + let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; let registered = this.registerBinaryCallback(f); if (runGuarded) { return ((arg1, arg2) => this.runBinaryGuarded(registered, arg1, arg2)).bind(this); @@ -4473,51 +4473,51 @@ var async; let implementation = this[_handleUncaughtError]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, error, stackTrace); + return dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, error, stackTrace); } - fork(opt$) { - let specification = opt$ && 'specification' in opt$ ? opt$.specification : null; - let zoneValues = opt$ && 'zoneValues' in opt$ ? opt$.zoneValues : null; + fork(opts) { + let specification = opts && 'specification' in opts ? opts.specification : null; + let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; let implementation = this[_fork]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.as(dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, specification, zoneValues), Zone); + return dart.as(dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, specification, zoneValues), Zone); } run(f) { let implementation = this[_run]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, f); + return dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, f); } runUnary(f, arg) { let implementation = this[_runUnary]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, f, arg); + return dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, f, arg); } runBinary(f, arg1, arg2) { let implementation = this[_runBinary]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, f, arg1, arg2); + return dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, f, arg1, arg2); } registerCallback(f) { let implementation = this[_registerCallback]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.as(dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, f), ZoneCallback); + return dart.as(dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, f), ZoneCallback); } registerUnaryCallback(f) { let implementation = this[_registerUnaryCallback]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.as(dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, f), ZoneUnaryCallback); + return dart.as(dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, f), ZoneUnaryCallback); } registerBinaryCallback(f) { let implementation = this[_registerBinaryCallback]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.as(dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, f), ZoneBinaryCallback); + return dart.as(dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, f), ZoneBinaryCallback); } errorCallback(error, stackTrace) { let implementation = this[_errorCallback]; @@ -4526,31 +4526,31 @@ var async; if (core.identical(implementationZone, _ROOT_ZONE)) return null; let parentDelegate = _parentDelegate(dart.as(implementationZone, _Zone)); - return dart.as(dart.dinvokef(implementation['function'], implementationZone, parentDelegate, this, error, stackTrace), AsyncError); + return dart.as(dart.dinvokef(implementation.function, implementationZone, parentDelegate, this, error, stackTrace), AsyncError); } scheduleMicrotask(f) { let implementation = this[_scheduleMicrotask]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, f); + return dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, f); } createTimer(duration, f) { let implementation = this[_createTimer]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.as(dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, duration, f), Timer); + return dart.as(dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, duration, f), Timer); } createPeriodicTimer(duration, f) { let implementation = this[_createPeriodicTimer]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.as(dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, duration, f), Timer); + return dart.as(dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, duration, f), Timer); } print(line) { let implementation = this[_print]; dart.assert(implementation !== null); let parentDelegate = _parentDelegate(implementation.zone); - return dart.dinvokef(implementation['function'], implementation.zone, parentDelegate, this, line); + return dart.dinvokef(implementation.function, implementation.zone, parentDelegate, this, line); } } // Function _rootHandleUncaughtError: (Zone, ZoneDelegate, Zone, dynamic, StackTrace) → void @@ -4561,7 +4561,7 @@ var async; } // Function _rootRun: (Zone, ZoneDelegate, Zone, () → dynamic) → dynamic function _rootRun(self, parent, zone, f) { - if (dart.equals(Zone[_current], zone)) + if (dart.equals(Zone[_current$], zone)) return f(); let old = Zone._enter(zone); try { @@ -4572,7 +4572,7 @@ var async; } // Function _rootRunUnary: (Zone, ZoneDelegate, Zone, (dynamic) → dynamic, dynamic) → dynamic function _rootRunUnary(self, parent, zone, f, arg) { - if (dart.equals(Zone[_current], zone)) + if (dart.equals(Zone[_current$], zone)) return dart.dinvokef(f, arg); let old = Zone._enter(zone); try { @@ -4583,7 +4583,7 @@ var async; } // Function _rootRunBinary: (Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dynamic, dynamic, dynamic) → dynamic function _rootRunBinary(self, parent, zone, f, arg1, arg2) { - if (dart.equals(Zone[_current], zone)) + if (dart.equals(Zone[_current$], zone)) return dart.dinvokef(f, arg1, arg2); let old = Zone._enter(zone); try { @@ -4758,7 +4758,7 @@ var async; } runGuarded(f) { try { - if (core.identical(_ROOT_ZONE, Zone[_current])) { + if (core.identical(_ROOT_ZONE, Zone[_current$])) { return f(); } return _rootRun(null, null, this, f); @@ -4770,7 +4770,7 @@ var async; } runUnaryGuarded(f, arg) { try { - if (core.identical(_ROOT_ZONE, Zone[_current])) { + if (core.identical(_ROOT_ZONE, Zone[_current$])) { return dart.dinvokef(f, arg); } return _rootRunUnary(null, null, this, f, arg); @@ -4782,7 +4782,7 @@ var async; } runBinaryGuarded(f, arg1, arg2) { try { - if (core.identical(_ROOT_ZONE, Zone[_current])) { + if (core.identical(_ROOT_ZONE, Zone[_current$])) { return dart.dinvokef(f, arg1, arg2); } return _rootRunBinary(null, null, this, f, arg1, arg2); @@ -4792,24 +4792,24 @@ var async; } } - bindCallback(f, opt$) { - let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; + bindCallback(f, opts) { + let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; if (runGuarded) { return (() => this.runGuarded(f)).bind(this); } else { return (() => this.run(f)).bind(this); } } - bindUnaryCallback(f, opt$) { - let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; + bindUnaryCallback(f, opts) { + let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; if (runGuarded) { return ((arg) => this.runUnaryGuarded(f, arg)).bind(this); } else { return ((arg) => this.runUnary(f, arg)).bind(this); } } - bindBinaryCallback(f, opt$) { - let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; + bindBinaryCallback(f, opts) { + let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; if (runGuarded) { return ((arg1, arg2) => this.runBinaryGuarded(f, arg1, arg2)).bind(this); } else { @@ -4822,23 +4822,23 @@ var async; handleUncaughtError(error, stackTrace) { return _rootHandleUncaughtError(null, null, this, error, stackTrace); } - fork(opt$) { - let specification = opt$ && 'specification' in opt$ ? opt$.specification : null; - let zoneValues = opt$ && 'zoneValues' in opt$ ? opt$.zoneValues : null; + fork(opts) { + let specification = opts && 'specification' in opts ? opts.specification : null; + let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; return _rootFork(null, null, this, specification, zoneValues); } run(f) { - if (core.identical(Zone[_current], _ROOT_ZONE)) + if (core.identical(Zone[_current$], _ROOT_ZONE)) return f(); return _rootRun(null, null, this, f); } runUnary(f, arg) { - if (core.identical(Zone[_current], _ROOT_ZONE)) + if (core.identical(Zone[_current$], _ROOT_ZONE)) return dart.dinvokef(f, arg); return _rootRunUnary(null, null, this, f, arg); } runBinary(f, arg1, arg2) { - if (core.identical(Zone[_current], _ROOT_ZONE)) + if (core.identical(Zone[_current$], _ROOT_ZONE)) return dart.dinvokef(f, arg1, arg2); return _rootRunBinary(null, null, this, f, arg1, arg2); } @@ -4876,10 +4876,10 @@ var async; }); let _ROOT_ZONE = new _RootZone(); // Function runZoned: (() → dynamic, {zoneValues: Map, zoneSpecification: ZoneSpecification, onError: Function}) → dynamic - function runZoned(body, opt$) { - let zoneValues = opt$ && 'zoneValues' in opt$ ? opt$.zoneValues : null; - let zoneSpecification = opt$ && 'zoneSpecification' in opt$ ? opt$.zoneSpecification : null; - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; + function runZoned(body, opts) { + let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; + let zoneSpecification = opts && 'zoneSpecification' in opts ? opts.zoneSpecification : null; + let onError = opts && 'onError' in opts ? opts.onError : null; let errorHandler = null; if (onError !== null) { errorHandler = (self, parent, zone, error, stackTrace) => { diff --git a/pkg/dev_compiler/lib/runtime/dart/collection.js b/pkg/dev_compiler/lib/runtime/dart/collection.js index a4e55a83d465..9b0eaadf94e9 100644 --- a/pkg/dev_compiler/lib/runtime/dart/collection.js +++ b/pkg/dev_compiler/lib/runtime/dart/collection.js @@ -28,10 +28,10 @@ var collection; } let HashMap$ = dart.generic(function(K, V) { class HashMap extends core.Object { - HashMap(opt$) { - let equals = opt$ && 'equals' in opt$ ? opt$.equals : null; - let hashCode = opt$ && 'hashCode' in opt$ ? opt$.hashCode : null; - let isValidKey = opt$ && 'isValidKey' in opt$ ? opt$.isValidKey : null; + HashMap(opts) { + let equals = opts && 'equals' in opts ? opts.equals : null; + let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; + let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; if (isValidKey === null) { if (hashCode === null) { if (equals === null) { @@ -66,9 +66,9 @@ var collection; }); return result; } - HashMap$fromIterable(iterable, opt$) { - let key = opt$ && 'key' in opt$ ? opt$.key : null; - let value = opt$ && 'value' in opt$ ? opt$.value : null; + HashMap$fromIterable(iterable, opts) { + let key = opts && 'key' in opts ? opts.key : null; + let value = opts && 'value' in opts ? opts.value : null; let map = new HashMap(); Maps._fillMapWithMappedIterable(map, iterable, key, value); return map; @@ -158,15 +158,15 @@ var collection; } return result; } - toList(opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; let result = growable ? ((_) => { _.length = this.length; return _; }).bind(this)(new core.List()) : new core.List(this.length); let i = 0; for (let element of this) - result.set((($tmp) => i = dart.notNull($tmp) + 1, $tmp)(i), element); + result.set(((x) => i = dart.notNull(x$) + 1, x$)(i), element); return result; } map(f) { @@ -275,8 +275,8 @@ var collection; } while (it.moveNext()); return result; } - firstWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + firstWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; for (let element of this) { if (test(element)) return element; @@ -285,8 +285,8 @@ var collection; return orElse(); throw _internal.IterableElementError.noElement(); } - lastWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + lastWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; let result = null; let foundMatching = false; for (let element of this) { @@ -372,10 +372,10 @@ var collection; let _HashSetBase = _HashSetBase$(dart.dynamic); let HashSet$ = dart.generic(function(E) { class HashSet extends core.Object { - HashSet(opt$) { - let equals = opt$ && 'equals' in opt$ ? opt$.equals : null; - let hashCode = opt$ && 'hashCode' in opt$ ? opt$.hashCode : null; - let isValidKey = opt$ && 'isValidKey' in opt$ ? opt$.isValidKey : null; + HashSet(opts) { + let equals = opts && 'equals' in opts ? opts.equals : null; + let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; + let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; if (isValidKey === null) { if (hashCode === null) { if (equals === null) { @@ -488,8 +488,8 @@ var collection; } return false; } - toList(opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; return new core.List.from(this, {growable: growable}); } toSet() { @@ -549,8 +549,8 @@ var collection; throw _internal.IterableElementError.tooMany(); return result; } - firstWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + firstWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; for (let element of this) { if (test(element)) return element; @@ -559,8 +559,8 @@ var collection; return orElse(); throw _internal.IterableElementError.noElement(); } - lastWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + lastWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; let result = null; let foundMatching = false; for (let element of this) { @@ -610,8 +610,8 @@ var collection; return IterableMixin; }); let IterableMixin = IterableMixin$(dart.dynamic); - let _isToStringVisiting = Symbol('_isToStringVisiting'); - let _iterablePartsToStrings = Symbol('_iterablePartsToStrings'); + let _isToStringVisiting$ = Symbol('_isToStringVisiting'); + let _iterablePartsToStrings$ = Symbol('_iterablePartsToStrings'); let IterableBase$ = dart.generic(function(E) { class IterableBase extends core.Object { IterableBase() { @@ -687,8 +687,8 @@ var collection; } return false; } - toList(opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; return new core.List.from(this, {growable: growable}); } toSet() { @@ -748,8 +748,8 @@ var collection; throw _internal.IterableElementError.tooMany(); return result; } - firstWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + firstWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; for (let element of this) { if (test(element)) return element; @@ -758,8 +758,8 @@ var collection; return orElse(); throw _internal.IterableElementError.noElement(); } - lastWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + lastWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; let result = null; let foundMatching = false; for (let element of this) { @@ -849,14 +849,14 @@ var collection; buffer.write(rightDelimiter); return buffer.toString(); } - static [_isToStringVisiting](o) { + static [_isToStringVisiting$](o) { for (let i = 0; dart.notNull(i) < dart.notNull(_toStringVisiting.length); i = dart.notNull(i) + 1) { if (core.identical(o, _toStringVisiting.get(i))) return true; } return false; } - static [_iterablePartsToStrings](iterable, parts) { + static [_iterablePartsToStrings$](iterable, parts) { let LENGTH_LIMIT = 80; let HEAD_COUNT = 3; let TAIL_COUNT = 2; @@ -948,8 +948,8 @@ var collection; let _move = Symbol('_move'); let HasNextIterator$ = dart.generic(function(E) { class HasNextIterator extends core.Object { - HasNextIterator($_iterator) { - this[_iterator] = $_iterator; + HasNextIterator(iterator$) { + this[_iterator] = iterator$; this[_state] = HasNextIterator._NOT_MOVED_YET; } get hasNext() { @@ -981,10 +981,10 @@ var collection; let HasNextIterator = HasNextIterator$(dart.dynamic); let LinkedHashMap$ = dart.generic(function(K, V) { class LinkedHashMap extends core.Object { - LinkedHashMap(opt$) { - let equals = opt$ && 'equals' in opt$ ? opt$.equals : null; - let hashCode = opt$ && 'hashCode' in opt$ ? opt$.hashCode : null; - let isValidKey = opt$ && 'isValidKey' in opt$ ? opt$.isValidKey : null; + LinkedHashMap(opts) { + let equals = opts && 'equals' in opts ? opts.equals : null; + let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; + let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; if (isValidKey === null) { if (hashCode === null) { if (equals === null) { @@ -1019,9 +1019,9 @@ var collection; }); return result; } - LinkedHashMap$fromIterable(iterable, opt$) { - let key = opt$ && 'key' in opt$ ? opt$.key : null; - let value = opt$ && 'value' in opt$ ? opt$.value : null; + LinkedHashMap$fromIterable(iterable, opts) { + let key = opts && 'key' in opts ? opts.key : null; + let value = opts && 'value' in opts ? opts.value : null; let map = new LinkedHashMap(); Maps._fillMapWithMappedIterable(map, iterable, key, value); return map; @@ -1049,10 +1049,10 @@ var collection; let LinkedHashMap = LinkedHashMap$(dart.dynamic, dart.dynamic); let LinkedHashSet$ = dart.generic(function(E) { class LinkedHashSet extends core.Object { - LinkedHashSet(opt$) { - let equals = opt$ && 'equals' in opt$ ? opt$.equals : null; - let hashCode = opt$ && 'hashCode' in opt$ ? opt$.hashCode : null; - let isValidKey = opt$ && 'isValidKey' in opt$ ? opt$.isValidKey : null; + LinkedHashSet(opts) { + let equals = opts && 'equals' in opts ? opts.equals : null; + let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; + let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; if (isValidKey === null) { if (hashCode === null) { if (equals === null) { @@ -1270,7 +1270,7 @@ var collection; return LinkedListEntry; }); let LinkedListEntry = LinkedListEntry$(dart.dynamic); - let _filter = Symbol('_filter'); + let _filter$ = Symbol('_filter'); let ListMixin$ = dart.generic(function(E) { class ListMixin extends core.Object { get iterator() { @@ -1344,8 +1344,8 @@ var collection; } return false; } - firstWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + firstWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; let length = this.length; for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) { let element = this.get(i); @@ -1359,8 +1359,8 @@ var collection; return orElse(); throw _internal.IterableElementError.noElement(); } - lastWhere(test, opt$) { - let orElse = opt$ && 'orElse' in opt$ ? opt$.orElse : null; + lastWhere(test, opts) { + let orElse = opts && 'orElse' in opts ? opts.orElse : null; let length = this.length; for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { let element = this.get(i); @@ -1449,8 +1449,8 @@ var collection; takeWhile(test) { return new _internal.TakeWhileIterable(this, test); } - toList(opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; let result = null; if (growable) { result = ((_) => { @@ -1473,11 +1473,11 @@ var collection; return result; } add(element) { - this.set((($tmp) => this.length = dart.notNull($tmp) + 1, $tmp).bind(this)(this.length), element); + this.set(((x) => this.length = dart.notNull(x$) + 1, x$).bind(this)(this.length), element); } addAll(iterable) { for (let element of iterable) { - this.set((($tmp) => this.length = dart.notNull($tmp) + 1, $tmp).bind(this)(this.length), element); + this.set(((x) => this.length = dart.notNull(x$) + 1, x$).bind(this)(this.length), element); } } remove(element) { @@ -1496,7 +1496,7 @@ var collection; retainWhere(test) { _filter(this, test, true); } - static [_filter](source, test, retainMatching) { + static [_filter$](source, test, retainMatching) { let retained = new List.from([]); let length = source.length; for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) { @@ -1707,7 +1707,7 @@ var collection; this.setRange(index, dart.notNull(index) + dart.notNull(iterable.length), iterable); } else { for (let element of iterable) { - this.set((($tmp) => index = dart.notNull($tmp) + 1, $tmp)(index), element); + this.set(((x) => index = dart.notNull(x$) + 1, x$)(index), element); } } } @@ -1813,8 +1813,8 @@ var collection; let _map = Symbol('_map'); let _MapBaseValueIterable$ = dart.generic(function(V) { class _MapBaseValueIterable extends IterableBase$(V) { - _MapBaseValueIterable($_map) { - this[_map] = $_map; + _MapBaseValueIterable(map$) { + this[_map] = map$; super.IterableBase(); } get length() { @@ -1925,8 +1925,8 @@ var collection; return UnmodifiableMapView; }); let UnmodifiableMapView = UnmodifiableMapView$(dart.dynamic, dart.dynamic); - let _toStringVisiting = Symbol('_toStringVisiting'); - let _id = Symbol('_id'); + let _toStringVisiting$ = Symbol('_toStringVisiting'); + let _id$ = Symbol('_id'); let _fillMapWithMappedIterable = Symbol('_fillMapWithMappedIterable'); let _fillMapWithIterables = Symbol('_fillMapWithIterables'); class Maps extends core.Object { @@ -1982,7 +1982,7 @@ var collection; } let result = new core.StringBuffer(); try { - IterableBase[_toStringVisiting].add(m); + IterableBase[_toStringVisiting$].add(m); result.write('{'); let first = true; m.forEach(((k, v) => { @@ -1996,12 +1996,12 @@ var collection; }).bind(this)); result.write('}'); } finally { - dart.assert(core.identical(IterableBase[_toStringVisiting].last, m)); - IterableBase[_toStringVisiting].removeLast(); + dart.assert(core.identical(IterableBase[_toStringVisiting$].last, m)); + IterableBase[_toStringVisiting$].removeLast(); } return result.toString(); } - static [_id](x) { + static [_id$](x) { return x; } static [_fillMapWithMappedIterable](map, iterable, key, value) { @@ -2171,7 +2171,7 @@ var collection; } return false; } - [_filter](test, removeMatching) { + [_filter$](test, removeMatching) { let entry = this[_sentinel][_next]; while (!dart.notNull(core.identical(entry, this[_sentinel]))) { let next = entry[_next]; @@ -2183,10 +2183,10 @@ var collection; } } removeWhere(test) { - this[_filter](test, true); + this[_filter$](test, true); } retainWhere(test) { - this[_filter](test, false); + this[_filter$](test, false); } get first() { return this[_sentinel][_next].element; @@ -2268,8 +2268,8 @@ var collection; let _remove = Symbol('_remove'); let _filterWhere = Symbol('_filterWhere'); let _grow = Symbol('_grow'); - let _isPowerOf2 = Symbol('_isPowerOf2'); - let _nextPowerOf2 = Symbol('_nextPowerOf2'); + let _isPowerOf2$ = Symbol('_isPowerOf2'); + let _nextPowerOf2$ = Symbol('_nextPowerOf2'); let ListQueue$ = dart.generic(function(E) { class ListQueue extends IterableBase$(E) { ListQueue(initialCapacity) { @@ -2346,8 +2346,8 @@ var collection; core.RangeError.checkValidIndex(index, this); return this[_table].get(dart.notNull(this[_head]) + dart.notNull(index) & dart.notNull(this[_table].length) - 1); } - toList(opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + toList(opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; let list = null; if (growable) { list = ((_) => { @@ -2463,10 +2463,10 @@ var collection; this[_table].set(this[_tail], null); return result; } - static [_isPowerOf2](number) { + static [_isPowerOf2$](number) { return (dart.notNull(number) & dart.notNull(number) - 1) === 0; } - static [_nextPowerOf2](number) { + static [_nextPowerOf2$](number) { dart.assert(dart.notNull(number) > 0); number = (dart.notNull(number) << 1) - 1; for (;;) { @@ -2785,11 +2785,11 @@ var collection; }); return result; } - SplayTreeMap$fromIterable(iterable, opt$) { - let key = opt$ && 'key' in opt$ ? opt$.key : null; - let value = opt$ && 'value' in opt$ ? opt$.value : null; - let compare = opt$ && 'compare' in opt$ ? opt$.compare : null; - let isValidKey = opt$ && 'isValidKey' in opt$ ? opt$.isValidKey : null; + SplayTreeMap$fromIterable(iterable, opts) { + let key = opts && 'key' in opts ? opts.key : null; + let value = opts && 'value' in opts ? opts.value : null; + let compare = opts && 'compare' in opts ? opts.compare : null; + let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; let map = new SplayTreeMap(compare, isValidKey); Maps._fillMapWithMappedIterable(map, iterable, key, value); return map; @@ -3046,8 +3046,8 @@ var collection; let _SplayTreeIterator = _SplayTreeIterator$(dart.dynamic); let _SplayTreeKeyIterable$ = dart.generic(function(K) { class _SplayTreeKeyIterable extends IterableBase$(K) { - _SplayTreeKeyIterable($_tree) { - this[_tree] = $_tree; + _SplayTreeKeyIterable(tree$) { + this[_tree] = tree$; super.IterableBase(); } get length() { @@ -3072,8 +3072,8 @@ var collection; let _SplayTreeKeyIterable = _SplayTreeKeyIterable$(dart.dynamic); let _SplayTreeValueIterable$ = dart.generic(function(K, V) { class _SplayTreeValueIterable extends IterableBase$(V) { - _SplayTreeValueIterable($_map) { - this[_map] = $_map; + _SplayTreeValueIterable(map$) { + this[_map] = map$; super.IterableBase(); } get length() { @@ -3301,13 +3301,13 @@ var collection; let _set = Symbol('_set'); let _computeHashCode = Symbol('_computeHashCode'); let _removeHashTableEntry = Symbol('_removeHashTableEntry'); - let _isStringKey = Symbol('_isStringKey'); - let _isNumericKey = Symbol('_isNumericKey'); - let _hasTableEntry = Symbol('_hasTableEntry'); - let _getTableEntry = Symbol('_getTableEntry'); - let _setTableEntry = Symbol('_setTableEntry'); - let _deleteTableEntry = Symbol('_deleteTableEntry'); - let _newHashTable = Symbol('_newHashTable'); + let _isStringKey$ = Symbol('_isStringKey'); + let _isNumericKey$ = Symbol('_isNumericKey'); + let _hasTableEntry$ = Symbol('_hasTableEntry'); + let _getTableEntry$ = Symbol('_getTableEntry'); + let _setTableEntry$ = Symbol('_setTableEntry'); + let _deleteTableEntry$ = Symbol('_deleteTableEntry'); + let _newHashTable$ = Symbol('_newHashTable'); let _HashMap$ = dart.generic(function(K, V) { class _HashMap extends core.Object { _HashMap() { @@ -3518,31 +3518,31 @@ var collection; return null; } } - static [_isStringKey](key) { + static [_isStringKey$](key) { return dart.notNull(typeof key == string) && dart.notNull(!dart.equals(key, '__proto__')); } - static [_isNumericKey](key) { + static [_isNumericKey$](key) { return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key; } [_computeHashCode](key) { return dart.dload(key, 'hashCode') & 0x3ffffff; } - static [_hasTableEntry](table, key) { + static [_hasTableEntry$](table, key) { let entry = table[key]; return entry !== null; } - static [_getTableEntry](table, key) { + static [_getTableEntry$](table, key) { let entry = table[key]; return entry === table ? null : entry; } - static [_setTableEntry](table, key, value) { + static [_setTableEntry$](table, key, value) { if (value === null) { table[key] = table; } else { table[key] = value; } } - static [_deleteTableEntry](table, key) { + static [_deleteTableEntry$](table, key) { delete table[key]; } [_getBucket](table, key) { @@ -3559,7 +3559,7 @@ var collection; } return -1; } - static [_newHashTable]() { + static [_newHashTable$]() { let table = Object.create(null); let temporaryKey = ''; _setTableEntry(table, temporaryKey, table); @@ -3593,9 +3593,9 @@ var collection; let _hashCode = Symbol('_hashCode'); let _CustomHashMap$ = dart.generic(function(K, V) { class _CustomHashMap extends _HashMap$(K, V) { - _CustomHashMap($_equals, $_hashCode, validKey) { - this[_equals] = $_equals; - this[_hashCode] = $_hashCode; + _CustomHashMap(equals$, hashCode$, validKey) { + this[_equals] = equals$; + this[_hashCode] = hashCode$; this[_validKey] = dart.as(validKey !== null ? validKey : (v) => dart.is(v, K), _Predicate); super._HashMap(); } @@ -3639,8 +3639,8 @@ var collection; let _CustomHashMap = _CustomHashMap$(dart.dynamic, dart.dynamic); let HashMapKeyIterable$ = dart.generic(function(E) { class HashMapKeyIterable extends IterableBase$(E) { - HashMapKeyIterable($_map) { - this[_map] = $_map; + HashMapKeyIterable(map$) { + this[_map] = map$; super.IterableBase(); } get length() { @@ -3671,9 +3671,9 @@ var collection; let _offset = Symbol('_offset'); let HashMapKeyIterator$ = dart.generic(function(E) { class HashMapKeyIterator extends core.Object { - HashMapKeyIterator($_map, $_keys) { - this[_map] = $_map; - this[_keys] = $_keys; + HashMapKeyIterator(map$, keys$) { + this[_map] = map$; + this[_keys] = keys$; this[_offset] = 0; this[_current] = null; } @@ -3923,23 +3923,23 @@ var collection; this[_length] = dart.notNull(this[_length]) - 1; this[_modified](); } - static [_isStringKey](key) { + static [_isStringKey$](key) { return dart.notNull(typeof key == string) && dart.notNull(!dart.equals(key, '__proto__')); } - static [_isNumericKey](key) { + static [_isNumericKey$](key) { return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key; } [_computeHashCode](key) { return dart.dload(key, 'hashCode') & 0x3ffffff; } - static [_getTableEntry](table, key) { + static [_getTableEntry$](table, key) { return table[key]; } - static [_setTableEntry](table, key, value) { + static [_setTableEntry$](table, key, value) { dart.assert(value !== null); table[key] = value; } - static [_deleteTableEntry](table, key) { + static [_deleteTableEntry$](table, key) { delete table[key]; } [_getBucket](table, key) { @@ -3957,7 +3957,7 @@ var collection; } return -1; } - static [_newHashTable]() { + static [_newHashTable$]() { let table = Object.create(null); let temporaryKey = ''; _setTableEntry(table, temporaryKey, table); @@ -3993,9 +3993,9 @@ var collection; let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(dart.dynamic, dart.dynamic); let _LinkedCustomHashMap$ = dart.generic(function(K, V) { class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { - _LinkedCustomHashMap($_equals, $_hashCode, validKey) { - this[_equals] = $_equals; - this[_hashCode] = $_hashCode; + _LinkedCustomHashMap(equals$, hashCode$, validKey) { + this[_equals] = equals$; + this[_hashCode] = hashCode$; this[_validKey] = dart.as(validKey !== null ? validKey : (v) => dart.is(v, K), _Predicate); super._LinkedHashMap(); } @@ -4036,17 +4036,17 @@ var collection; }); let _LinkedCustomHashMap = _LinkedCustomHashMap$(dart.dynamic, dart.dynamic); class LinkedHashMapCell extends core.Object { - LinkedHashMapCell($_key, $_value) { - this[_key] = $_key; - this[_value] = $_value; + LinkedHashMapCell(key$, value$) { + this[_key] = key$; + this[_value] = value$; this[_next] = null; this[_previous] = null; } } let LinkedHashMapKeyIterable$ = dart.generic(function(E) { class LinkedHashMapKeyIterable extends IterableBase$(E) { - LinkedHashMapKeyIterable($_map) { - this[_map] = $_map; + LinkedHashMapKeyIterable(map$) { + this[_map] = map$; super.IterableBase(); } get length() { @@ -4079,9 +4079,9 @@ var collection; let _cell = Symbol('_cell'); let LinkedHashMapKeyIterator$ = dart.generic(function(E) { class LinkedHashMapKeyIterator extends core.Object { - LinkedHashMapKeyIterator($_map, $_modifications) { - this[_map] = $_map; - this[_modifications] = $_modifications; + LinkedHashMapKeyIterator(map$, modifications$) { + this[_map] = map$; + this[_modifications] = modifications$; this[_cell] = null; this[_current] = null; this[_cell] = dart.as(dart.dload(this[_map], '_first'), LinkedHashMapCell); @@ -4109,8 +4109,8 @@ var collection; let _computeElements = Symbol('_computeElements'); let _contains = Symbol('_contains'); let _lookup = Symbol('_lookup'); - let _isStringElement = Symbol('_isStringElement'); - let _isNumericElement = Symbol('_isNumericElement'); + let _isStringElement$ = Symbol('_isStringElement'); + let _isNumericElement$ = Symbol('_isNumericElement'); let _HashSet$ = dart.generic(function(E) { class _HashSet extends _HashSetBase$(E) { _HashSet() { @@ -4296,24 +4296,24 @@ var collection; return false; } } - static [_isStringElement](element) { + static [_isStringElement$](element) { return dart.notNull(typeof element == string) && dart.notNull(!dart.equals(element, '__proto__')); } - static [_isNumericElement](element) { + static [_isNumericElement$](element) { return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff) === element; } [_computeHashCode](element) { return dart.dload(element, 'hashCode') & 0x3ffffff; } - static [_hasTableEntry](table, key) { + static [_hasTableEntry$](table, key) { let entry = table[key]; return entry !== null; } - static [_setTableEntry](table, key, value) { + static [_setTableEntry$](table, key, value) { dart.assert(value !== null); table[key] = value; } - static [_deleteTableEntry](table, key) { + static [_deleteTableEntry$](table, key) { delete table[key]; } [_getBucket](table, element) { @@ -4330,7 +4330,7 @@ var collection; } return -1; } - static [_newHashTable]() { + static [_newHashTable$]() { let table = Object.create(null); let temporaryKey = ''; _setTableEntry(table, temporaryKey, table); @@ -4367,9 +4367,9 @@ var collection; let _hasher = Symbol('_hasher'); let _CustomHashSet$ = dart.generic(function(E) { class _CustomHashSet extends _HashSet$(E) { - _CustomHashSet($_equality, $_hasher, validKey) { - this[_equality] = $_equality; - this[_hasher] = $_hasher; + _CustomHashSet(equality, hasher, validKey) { + this[_equality] = equality; + this[_hasher] = hasher; this[_validKey] = dart.as(validKey !== null ? validKey : (x) => dart.is(x, E), _Predicate); super._HashSet(); } @@ -4413,9 +4413,9 @@ var collection; let _CustomHashSet = _CustomHashSet$(dart.dynamic); let HashSetIterator$ = dart.generic(function(E) { class HashSetIterator extends core.Object { - HashSetIterator($_set, $_elements) { - this[_set] = $_set; - this[_elements] = $_elements; + HashSetIterator(set$, elements$) { + this[_set] = set$; + this[_elements] = elements$; this[_offset] = 0; this[_current] = null; } @@ -4666,23 +4666,23 @@ var collection; this[_length] = dart.notNull(this[_length]) - 1; this[_modified](); } - static [_isStringElement](element) { + static [_isStringElement$](element) { return dart.notNull(typeof element == string) && dart.notNull(!dart.equals(element, '__proto__')); } - static [_isNumericElement](element) { + static [_isNumericElement$](element) { return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff) === element; } [_computeHashCode](element) { return dart.dload(element, 'hashCode') & 0x3ffffff; } - static [_getTableEntry](table, key) { + static [_getTableEntry$](table, key) { return table[key]; } - static [_setTableEntry](table, key, value) { + static [_setTableEntry$](table, key, value) { dart.assert(value !== null); table[key] = value; } - static [_deleteTableEntry](table, key) { + static [_deleteTableEntry$](table, key) { delete table[key]; } [_getBucket](table, element) { @@ -4700,7 +4700,7 @@ var collection; } return -1; } - static [_newHashTable]() { + static [_newHashTable$]() { let table = Object.create(null); let temporaryKey = ''; _setTableEntry(table, temporaryKey, table); @@ -4736,9 +4736,9 @@ var collection; let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(dart.dynamic); let _LinkedCustomHashSet$ = dart.generic(function(E) { class _LinkedCustomHashSet extends _LinkedHashSet$(E) { - _LinkedCustomHashSet($_equality, $_hasher, validKey) { - this[_equality] = $_equality; - this[_hasher] = $_hasher; + _LinkedCustomHashSet(equality, hasher, validKey) { + this[_equality] = equality; + this[_hasher] = hasher; this[_validKey] = dart.as(validKey !== null ? validKey : (x) => dart.is(x, E), _Predicate); super._LinkedHashSet(); } @@ -4796,17 +4796,17 @@ var collection; }); let _LinkedCustomHashSet = _LinkedCustomHashSet$(dart.dynamic); class LinkedHashSetCell extends core.Object { - LinkedHashSetCell($_element) { - this[_element] = $_element; + LinkedHashSetCell(element$) { + this[_element] = element$; this[_next] = null; this[_previous] = null; } } let LinkedHashSetIterator$ = dart.generic(function(E) { class LinkedHashSetIterator extends core.Object { - LinkedHashSetIterator($_set, $_modifications) { - this[_set] = $_set; - this[_modifications] = $_modifications; + LinkedHashSetIterator(set$, modifications$) { + this[_set] = set$; + this[_modifications] = modifications$; this[_cell] = null; this[_current] = null; this[_cell] = dart.as(dart.dload(this[_set], '_first'), LinkedHashSetCell); diff --git a/pkg/dev_compiler/lib/runtime/dart/convert.js b/pkg/dev_compiler/lib/runtime/dart/convert.js index f43fec837b5f..d932ca971b8f 100644 --- a/pkg/dev_compiler/lib/runtime/dart/convert.js +++ b/pkg/dev_compiler/lib/runtime/dart/convert.js @@ -45,16 +45,16 @@ var convert; set _nameToEncoding(_) {} }); class AsciiCodec extends Encoding { - AsciiCodec(opt$) { - let allowInvalid = opt$ && 'allowInvalid' in opt$ ? opt$.allowInvalid : false; + AsciiCodec(opts) { + let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : false; this[_allowInvalid] = allowInvalid; super.Encoding(); } get name() { return "us-ascii"; } - decode(bytes, opt$) { - let allowInvalid = opt$ && 'allowInvalid' in opt$ ? opt$.allowInvalid : null; + decode(bytes, opts) { + let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : null; if (allowInvalid === null) allowInvalid = this[_allowInvalid]; if (allowInvalid) { @@ -89,8 +89,8 @@ var convert; }); let Converter = Converter$(dart.dynamic, dart.dynamic); class _UnicodeSubsetEncoder extends Converter$(core.String, core.List$(core.int)) { - _UnicodeSubsetEncoder($_subsetMask) { - this[_subsetMask] = $_subsetMask; + _UnicodeSubsetEncoder(subsetMask) { + this[_subsetMask] = subsetMask; super.Converter(); } convert(string, start, end) { @@ -143,9 +143,9 @@ var convert; class StringConversionSinkBase extends StringConversionSinkMixin { } class _UnicodeSubsetEncoderSink extends StringConversionSinkBase { - _UnicodeSubsetEncoderSink($_subsetMask, $_sink) { - this[_subsetMask] = $_subsetMask; - this[_sink] = $_sink; + _UnicodeSubsetEncoderSink(subsetMask, sink$) { + this[_subsetMask] = subsetMask; + this[_sink] = sink$; super.StringConversionSinkBase(); } close() { @@ -167,9 +167,9 @@ var convert; } let _convertInvalid = Symbol('_convertInvalid'); class _UnicodeSubsetDecoder extends Converter$(core.List$(core.int), core.String) { - _UnicodeSubsetDecoder($_allowInvalid, $_subsetMask) { - this[_allowInvalid] = $_allowInvalid; - this[_subsetMask] = $_subsetMask; + _UnicodeSubsetDecoder(allowInvalid$, subsetMask) { + this[_allowInvalid] = allowInvalid$; + this[_subsetMask] = subsetMask; super.Converter(); } convert(bytes, start, end) { @@ -208,8 +208,8 @@ var convert; } } class AsciiDecoder extends _UnicodeSubsetDecoder { - AsciiDecoder(opt$) { - let allowInvalid = opt$ && 'allowInvalid' in opt$ ? opt$.allowInvalid : false; + AsciiDecoder(opts) { + let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : false; super._UnicodeSubsetDecoder(allowInvalid, _ASCII_MASK); } startChunkedConversion(sink) { @@ -260,8 +260,8 @@ var convert; } } class _ErrorHandlingAsciiDecoderSink extends ByteConversionSinkBase { - _ErrorHandlingAsciiDecoderSink($_utf8Sink) { - this[_utf8Sink] = $_utf8Sink; + _ErrorHandlingAsciiDecoderSink(utf8Sink) { + this[_utf8Sink] = utf8Sink; super.ByteConversionSinkBase(); } close() { @@ -288,8 +288,8 @@ var convert; } } class _SimpleAsciiDecoderSink extends ByteConversionSinkBase { - _SimpleAsciiDecoderSink($_sink) { - this[_sink] = $_sink; + _SimpleAsciiDecoderSink(sink$) { + this[_sink] = sink$; super.ByteConversionSinkBase(); } close() { @@ -317,8 +317,8 @@ var convert; } } class _ByteAdapterSink extends ByteConversionSinkBase { - _ByteAdapterSink($_sink) { - this[_sink] = $_sink; + _ByteAdapterSink(sink$) { + this[_sink] = sink$; super.ByteConversionSinkBase(); } add(chunk) { @@ -331,7 +331,7 @@ var convert; let _buffer = Symbol('_buffer'); let _callback = Symbol('_callback'); let _bufferIndex = Symbol('_bufferIndex'); - let _roundToPowerOf2 = Symbol('_roundToPowerOf2'); + let _roundToPowerOf2$ = Symbol('_roundToPowerOf2'); class _ByteCallbackSink extends ByteConversionSinkBase { _ByteCallbackSink(callback) { this[_buffer] = new typed_data.Uint8List(_ByteCallbackSink._INITIAL_BUFFER_SIZE); @@ -351,7 +351,7 @@ var convert; this[_buffer].setRange(this[_bufferIndex], dart.notNull(this[_bufferIndex]) + dart.notNull(chunk.length), chunk); this[_bufferIndex] = chunk.length; } - static [_roundToPowerOf2](v) { + static [_roundToPowerOf2$](v) { dart.assert(dart.notNull(v) > 0); v = dart.notNull(v) - 1; v = dart.notNull(v) >> 1; @@ -370,9 +370,9 @@ var convert; let _accumulated = Symbol('_accumulated'); let _SimpleCallbackSink$ = dart.generic(function(T) { class _SimpleCallbackSink extends ChunkedConversionSink$(T) { - _SimpleCallbackSink($_callback) { + _SimpleCallbackSink(callback$) { this[_accumulated] = new List.from([]); - this[_callback] = $_callback; + this[_callback] = callback$; super.ChunkedConversionSink(); } add(chunk) { @@ -387,8 +387,8 @@ var convert; let _SimpleCallbackSink = _SimpleCallbackSink$(dart.dynamic); let _EventSinkAdapter$ = dart.generic(function(T) { class _EventSinkAdapter extends core.Object { - _EventSinkAdapter($_sink) { - this[_sink] = $_sink; + _EventSinkAdapter(sink$) { + this[_sink] = sink$; } add(data) { return this[_sink].add(data); @@ -433,9 +433,9 @@ var convert; get decoder() { return dart.as(this[_second].decoder.fuse(this[_first].decoder), Converter$(T, S)); } - _FusedCodec($_first, $_second) { - this[_first] = $_first; - this[_second] = $_second; + _FusedCodec(first$, second) { + this[_first] = first$; + this[_second] = second; super.Codec(); } } @@ -464,9 +464,9 @@ var convert; let _InvertedCodec = _InvertedCodec$(dart.dynamic, dart.dynamic); let _FusedConverter$ = dart.generic(function(S, M, T) { class _FusedConverter extends Converter$(S, T) { - _FusedConverter($_first, $_second) { - this[_first] = $_first; - this[_second] = $_second; + _FusedConverter(first$, second) { + this[_first] = first$; + this[_second] = second; super.Converter(); } convert(input) { @@ -482,8 +482,8 @@ var convert; let HTML_ESCAPE = new HtmlEscape(); let _name = Symbol('_name'); class HtmlEscapeMode extends core.Object { - HtmlEscapeMode$_($_name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) { - this[_name] = $_name; + HtmlEscapeMode$_(name$, escapeLtGt, escapeQuot, escapeApos, escapeSlash) { + this[_name] = name$; this.escapeLtGt = escapeLtGt; this.escapeQuot = escapeQuot; this.escapeApos = escapeApos; @@ -561,9 +561,9 @@ var convert; } let _escape = Symbol('_escape'); class _HtmlEscapeSink extends StringConversionSinkBase { - _HtmlEscapeSink($_escape, $_sink) { - this[_escape] = $_escape; - this[_sink] = $_sink; + _HtmlEscapeSink(escape, sink$) { + this[_escape] = escape; + this[_sink] = sink$; super.StringConversionSinkBase(); } addSlice(chunk, start, end, isLast) { @@ -581,8 +581,8 @@ var convert; } } class JsonUnsupportedObjectError extends core.Error { - JsonUnsupportedObjectError(unsupportedObject, opt$) { - let cause = opt$ && 'cause' in opt$ ? opt$.cause : null; + JsonUnsupportedObjectError(unsupportedObject, opts) { + let cause = opts && 'cause' in opts ? opts.cause : null; this.unsupportedObject = unsupportedObject; this.cause = cause; super.Error(); @@ -605,38 +605,38 @@ var convert; } let JSON = new JsonCodec(); let _reviver = Symbol('_reviver'); - let _toEncodable = Symbol('_toEncodable'); + let _toEncodable$ = Symbol('_toEncodable'); class JsonCodec extends Codec$(core.Object, core.String) { - JsonCodec(opt$) { - let reviver = opt$ && 'reviver' in opt$ ? opt$.reviver : null; - let toEncodable = opt$ && 'toEncodable' in opt$ ? opt$.toEncodable : null; + JsonCodec(opts) { + let reviver = opts && 'reviver' in opts ? opts.reviver : null; + let toEncodable = opts && 'toEncodable' in opts ? opts.toEncodable : null; this[_reviver] = reviver; - this[_toEncodable] = toEncodable; + this[_toEncodable$] = toEncodable; super.Codec(); } JsonCodec$withReviver(reviver) { this.JsonCodec({reviver: reviver}); } - decode(source, opt$) { - let reviver = opt$ && 'reviver' in opt$ ? opt$.reviver : null; + decode(source, opts) { + let reviver = opts && 'reviver' in opts ? opts.reviver : null; if (reviver === null) reviver = this[_reviver]; if (reviver === null) return this.decoder.convert(source); return new JsonDecoder(reviver).convert(source); } - encode(value, opt$) { - let toEncodable = opt$ && 'toEncodable' in opt$ ? opt$.toEncodable : null; + encode(value, opts) { + let toEncodable = opts && 'toEncodable' in opts ? opts.toEncodable : null; if (toEncodable === null) - toEncodable = this[_toEncodable]; + toEncodable = this[_toEncodable$]; if (toEncodable === null) return this.encoder.convert(value); return new JsonEncoder(dart.closureWrap(toEncodable, "(Object) → Object")).convert(value); } get encoder() { - if (this[_toEncodable] === null) + if (this[_toEncodable$] === null) return new JsonEncoder(); - return new JsonEncoder(dart.closureWrap(this[_toEncodable], "(Object) → Object")); + return new JsonEncoder(dart.closureWrap(this[_toEncodable$], "(Object) → Object")); } get decoder() { if (this[_reviver] === null) @@ -650,33 +650,33 @@ var convert; if (toEncodable === void 0) toEncodable = null; this.indent = null; - this[_toEncodable] = toEncodable; + this[_toEncodable$] = toEncodable; super.Converter(); } JsonEncoder$withIndent(indent, toEncodable) { if (toEncodable === void 0) toEncodable = null; this.indent = indent; - this[_toEncodable] = toEncodable; + this[_toEncodable$] = toEncodable; super.Converter(); } convert(object) { - return _JsonStringStringifier.stringify(object, dart.as(this[_toEncodable], dart.throw_("Unimplemented type (dynamic) → dynamic")), this.indent); + return _JsonStringStringifier.stringify(object, dart.as(this[_toEncodable$], dart.throw_("Unimplemented type (dynamic) → dynamic")), this.indent); } startChunkedConversion(sink) { if (!dart.is(sink, StringConversionSink)) { sink = new StringConversionSink.from(sink); } else if (dart.is(sink, _Utf8EncoderSink)) { - return new _JsonUtf8EncoderSink(sink[_sink], this[_toEncodable], JsonUtf8Encoder._utf8Encode(this.indent), JsonUtf8Encoder.DEFAULT_BUFFER_SIZE); + return new _JsonUtf8EncoderSink(sink[_sink], this[_toEncodable$], JsonUtf8Encoder._utf8Encode(this.indent), JsonUtf8Encoder.DEFAULT_BUFFER_SIZE); } - return new _JsonEncoderSink(dart.as(sink, StringConversionSink), this[_toEncodable], this.indent); + return new _JsonEncoderSink(dart.as(sink, StringConversionSink), this[_toEncodable$], this.indent); } bind(stream) { return dart.as(super.bind(stream), async.Stream$(core.String)); } fuse(other) { if (dart.is(other, Utf8Encoder)) { - return new JsonUtf8Encoder(this.indent, dart.as(this[_toEncodable], dart.throw_("Unimplemented type (Object) → dynamic"))); + return new JsonUtf8Encoder(this.indent, dart.as(this[_toEncodable$], dart.throw_("Unimplemented type (Object) → dynamic"))); } return super.fuse(other); } @@ -684,7 +684,7 @@ var convert; dart.defineNamedConstructor(JsonEncoder, 'withIndent'); let _indent = Symbol('_indent'); let _bufferSize = Symbol('_bufferSize'); - let _utf8Encode = Symbol('_utf8Encode'); + let _utf8Encode$ = Symbol('_utf8Encode'); class JsonUtf8Encoder extends Converter$(core.Object, core.List$(core.int)) { JsonUtf8Encoder(indent, toEncodable, bufferSize) { if (indent === void 0) @@ -694,11 +694,11 @@ var convert; if (bufferSize === void 0) bufferSize = JsonUtf8Encoder.DEFAULT_BUFFER_SIZE; this[_indent] = _utf8Encode(indent); - this[_toEncodable] = toEncodable; + this[_toEncodable$] = toEncodable; this[_bufferSize] = bufferSize; super.Converter(); } - static [_utf8Encode](string) { + static [_utf8Encode$](string) { if (string === null) return null; if (string.isEmpty) @@ -722,7 +722,7 @@ var convert; } bytes.add(chunk); } - _JsonUtf8Stringifier.stringify(object, this[_indent], dart.as(this[_toEncodable], dart.throw_("Unimplemented type (Object) → dynamic")), this[_bufferSize], addChunk); + _JsonUtf8Stringifier.stringify(object, this[_indent], dart.as(this[_toEncodable$], dart.throw_("Unimplemented type (Object) → dynamic")), this[_bufferSize], addChunk); if (bytes.length === 1) return bytes.get(0); let length = 0; @@ -745,7 +745,7 @@ var convert; } else { byteSink = new ByteConversionSink.from(sink); } - return new _JsonUtf8EncoderSink(byteSink, this[_toEncodable], this[_indent], this[_bufferSize]); + return new _JsonUtf8EncoderSink(byteSink, this[_toEncodable$], this[_indent], this[_bufferSize]); } bind(stream) { return dart.as(super.bind(stream), async.Stream$(core.List$(core.int))); @@ -757,10 +757,10 @@ var convert; JsonUtf8Encoder.DEFAULT_BUFFER_SIZE = 256; let _isDone = Symbol('_isDone'); class _JsonEncoderSink extends ChunkedConversionSink$(core.Object) { - _JsonEncoderSink($_sink, $_toEncodable, $_indent) { - this[_sink] = $_sink; - this[_toEncodable] = $_toEncodable; - this[_indent] = $_indent; + _JsonEncoderSink(sink$, toEncodable$, indent$) { + this[_sink] = sink$; + this[_toEncodable$] = toEncodable$; + this[_indent] = indent$; this[_isDone] = false; super.ChunkedConversionSink(); } @@ -770,18 +770,18 @@ var convert; } this[_isDone] = true; let stringSink = this[_sink].asStringSink(); - _JsonStringStringifier.printOn(o, stringSink, dart.as(this[_toEncodable], dart.throw_("Unimplemented type (dynamic) → dynamic")), this[_indent]); + _JsonStringStringifier.printOn(o, stringSink, dart.as(this[_toEncodable$], dart.throw_("Unimplemented type (dynamic) → dynamic")), this[_indent]); stringSink.close(); } close() {} } let _addChunk = Symbol('_addChunk'); class _JsonUtf8EncoderSink extends ChunkedConversionSink$(core.Object) { - _JsonUtf8EncoderSink($_sink, $_toEncodable, $_indent, $_bufferSize) { - this[_sink] = $_sink; - this[_toEncodable] = $_toEncodable; - this[_indent] = $_indent; - this[_bufferSize] = $_bufferSize; + _JsonUtf8EncoderSink(sink$, toEncodable$, indent$, bufferSize$) { + this[_sink] = sink$; + this[_toEncodable$] = toEncodable$; + this[_indent] = indent$; + this[_bufferSize] = bufferSize$; this[_isDone] = false; super.ChunkedConversionSink(); } @@ -793,7 +793,7 @@ var convert; throw new core.StateError("Only one call to add allowed"); } this[_isDone] = true; - _JsonUtf8Stringifier.stringify(object, this[_indent], dart.as(this[_toEncodable], dart.throw_("Unimplemented type (Object) → dynamic")), this[_bufferSize], this[_addChunk]); + _JsonUtf8Stringifier.stringify(object, this[_indent], dart.as(this[_toEncodable$], dart.throw_("Unimplemented type (Object) → dynamic")), this[_bufferSize], this[_addChunk]); this[_sink].close(); } close() { @@ -847,7 +847,7 @@ var convert; class _JsonStringifier extends core.Object { _JsonStringifier(_toEncodable) { this[_seen] = new core.List(); - this[_toEncodable] = dart.as(_toEncodable !== null ? _toEncodable : _defaultToEncodable, core.Function); + this[_toEncodable$] = dart.as(_toEncodable !== null ? _toEncodable : _defaultToEncodable, core.Function); } static hexDigit(x) { return dart.notNull(x) < 10 ? 48 + dart.notNull(x) : 87 + dart.notNull(x); @@ -920,7 +920,7 @@ var convert; return; this[_checkCycle](object); try { - let customJson = dart.dinvokef(this[_toEncodable], object); + let customJson = dart.dinvokef(this[_toEncodable$], object); if (!dart.notNull(this.writeJsonValue(customJson))) { throw new JsonUnsupportedObjectError(object); } @@ -1052,8 +1052,8 @@ var convert; } } class _JsonStringStringifier extends _JsonStringifier { - _JsonStringStringifier($_sink, _toEncodable) { - this[_sink] = $_sink; + _JsonStringStringifier(sink$, _toEncodable) { + this[_sink] = sink$; super._JsonStringifier(dart.as(_toEncodable, dart.throw_("Unimplemented type (Object) → Object"))); } static stringify(object, toEncodable, indent) { @@ -1084,8 +1084,8 @@ var convert; } } class _JsonStringStringifierPretty extends dart.mixin(_JsonStringStringifier, _JsonPrettyPrintMixin) { - _JsonStringStringifierPretty(sink, toEncodable, $_indent) { - this[_indent] = $_indent; + _JsonStringStringifierPretty(sink, toEncodable, indent$) { + this[_indent] = indent$; super._JsonStringStringifier(sink, toEncodable); } writeIndentation(count) { @@ -1185,7 +1185,7 @@ var convert; this.buffer = new typed_data.Uint8List(this.bufferSize); this.index = 0; } - this.buffer.set((($tmp) => this.index = dart.notNull($tmp) + 1, $tmp).bind(this)(this.index), byte); + this.buffer.set(((x) => this.index = dart.notNull(x$) + 1, x$).bind(this)(this.index), byte); } } class _JsonUtf8StringifierPretty extends dart.mixin(_JsonUtf8Stringifier, _JsonPrettyPrintMixin) { @@ -1221,16 +1221,16 @@ var convert; let LATIN1 = new Latin1Codec(); let _LATIN1_MASK = 255; class Latin1Codec extends Encoding { - Latin1Codec(opt$) { - let allowInvalid = opt$ && 'allowInvalid' in opt$ ? opt$.allowInvalid : false; + Latin1Codec(opts) { + let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : false; this[_allowInvalid] = allowInvalid; super.Encoding(); } get name() { return "iso-8859-1"; } - decode(bytes, opt$) { - let allowInvalid = opt$ && 'allowInvalid' in opt$ ? opt$.allowInvalid : null; + decode(bytes, opts) { + let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : null; if (allowInvalid === null) allowInvalid = this[_allowInvalid]; if (allowInvalid) { @@ -1252,8 +1252,8 @@ var convert; } } class Latin1Decoder extends _UnicodeSubsetDecoder { - Latin1Decoder(opt$) { - let allowInvalid = opt$ && 'allowInvalid' in opt$ ? opt$.allowInvalid : false; + Latin1Decoder(opts) { + let allowInvalid = opts && 'allowInvalid' in opts ? opts.allowInvalid : false; super._UnicodeSubsetDecoder(allowInvalid, _LATIN1_MASK); } startChunkedConversion(sink) { @@ -1270,8 +1270,8 @@ var convert; } let _addSliceToSink = Symbol('_addSliceToSink'); class _Latin1DecoderSink extends ByteConversionSinkBase { - _Latin1DecoderSink($_sink) { - this[_sink] = $_sink; + _Latin1DecoderSink(sink$) { + this[_sink] = sink$; super.ByteConversionSinkBase(); } close() { @@ -1341,10 +1341,10 @@ var convert; } } let _carry = Symbol('_carry'); - let _addSlice = Symbol('_addSlice'); + let _addSlice$ = Symbol('_addSlice'); class _LineSplitterSink extends StringConversionSinkBase { - _LineSplitterSink($_sink) { - this[_sink] = $_sink; + _LineSplitterSink(sink$) { + this[_sink] = sink$; this[_carry] = null; super.StringConversionSinkBase(); } @@ -1362,7 +1362,7 @@ var convert; close() { this.addSlice('', 0, 0, true); } - static [_addSlice](chunk, start, end, isLast, adder) { + static [_addSlice$](chunk, start, end, isLast, adder) { let pos = start; while (dart.notNull(pos) < dart.notNull(end)) { let skip = 0; @@ -1423,9 +1423,9 @@ var convert; } dart.defineNamedConstructor(ClosableStringSink, 'fromStringSink'); class _ClosableStringSink extends core.Object { - _ClosableStringSink($_sink, $_callback) { - this[_sink] = $_sink; - this[_callback] = $_callback; + _ClosableStringSink(sink$, callback$) { + this[_sink] = sink$; + this[_callback] = callback$; } close() { return this[_callback](); @@ -1449,8 +1449,8 @@ var convert; } let _flush = Symbol('_flush'); class _StringConversionSinkAsStringSinkAdapter extends core.Object { - _StringConversionSinkAsStringSinkAdapter($_chunkedSink) { - this[_chunkedSink] = $_chunkedSink; + _StringConversionSinkAsStringSinkAdapter(chunkedSink) { + this[_chunkedSink] = chunkedSink; this[_buffer] = new core.StringBuffer(); } close() { @@ -1505,8 +1505,8 @@ var convert; _StringConversionSinkAsStringSinkAdapter._MIN_STRING_SIZE = 16; let _stringSink = Symbol('_stringSink'); class _StringSinkConversionSink extends StringConversionSinkBase { - _StringSinkConversionSink($_stringSink) { - this[_stringSink] = $_stringSink; + _StringSinkConversionSink(stringSink$) { + this[_stringSink] = stringSink$; super.StringConversionSinkBase(); } close() {} @@ -1532,8 +1532,8 @@ var convert; } } class _StringCallbackSink extends _StringSinkConversionSink { - _StringCallbackSink($_callback) { - this[_callback] = $_callback; + _StringCallbackSink(callback$) { + this[_callback] = callback$; super._StringSinkConversionSink(new core.StringBuffer()); } close() { @@ -1547,8 +1547,8 @@ var convert; } } class _StringAdapterSink extends StringConversionSinkBase { - _StringAdapterSink($_sink) { - this[_sink] = $_sink; + _StringAdapterSink(sink$) { + this[_sink] = sink$; super.StringConversionSinkBase(); } add(str) { @@ -1569,8 +1569,8 @@ var convert; } let _decoder = Symbol('_decoder'); class _Utf8StringSinkAdapter extends ByteConversionSink { - _Utf8StringSinkAdapter($_sink, stringSink, allowMalformed) { - this[_sink] = $_sink; + _Utf8StringSinkAdapter(sink$, stringSink, allowMalformed) { + this[_sink] = sink$; this[_decoder] = new _Utf8Decoder(stringSink, allowMalformed); super.ByteConversionSink(); } @@ -1593,8 +1593,8 @@ var convert; _Utf8ConversionSink(sink, allowMalformed) { this[_Utf8ConversionSink$_](sink, new core.StringBuffer(), allowMalformed); } - _Utf8ConversionSink$_($_chunkedSink, stringBuffer, allowMalformed) { - this[_chunkedSink] = $_chunkedSink; + _Utf8ConversionSink$_(chunkedSink, stringBuffer, allowMalformed) { + this[_chunkedSink] = chunkedSink; this[_decoder] = new _Utf8Decoder(stringBuffer, allowMalformed); this[_buffer] = stringBuffer; super.ByteConversionSink(); @@ -1630,16 +1630,16 @@ var convert; let UTF8 = new Utf8Codec(); let _allowMalformed = Symbol('_allowMalformed'); class Utf8Codec extends Encoding { - Utf8Codec(opt$) { - let allowMalformed = opt$ && 'allowMalformed' in opt$ ? opt$.allowMalformed : false; + Utf8Codec(opts) { + let allowMalformed = opts && 'allowMalformed' in opts ? opts.allowMalformed : false; this[_allowMalformed] = allowMalformed; super.Encoding(); } get name() { return "utf-8"; } - decode(codeUnits, opt$) { - let allowMalformed = opt$ && 'allowMalformed' in opt$ ? opt$.allowMalformed : null; + decode(codeUnits, opts) { + let allowMalformed = opts && 'allowMalformed' in opts ? opts.allowMalformed : null; if (allowMalformed === null) allowMalformed = this[_allowMalformed]; return new Utf8Decoder({allowMalformed: allowMalformed}).convert(codeUnits); @@ -1689,7 +1689,7 @@ var convert; } } let _Utf8Encoder$withBufferSize = Symbol('_Utf8Encoder$withBufferSize'); - let _createBuffer = Symbol('_createBuffer'); + let _createBuffer$ = Symbol('_createBuffer'); let _writeSurrogate = Symbol('_writeSurrogate'); let _fillBuffer = Symbol('_fillBuffer'); class _Utf8Encoder extends core.Object { @@ -1701,7 +1701,7 @@ var convert; this[_carry] = 0; this[_bufferIndex] = 0; } - static [_createBuffer](size) { + static [_createBuffer$](size) { return new typed_data.Uint8List(size); } [_writeSurrogate](leadingSurrogate, nextCodeUnit) { @@ -1709,15 +1709,15 @@ var convert; let rune = _combineSurrogatePair(leadingSurrogate, nextCodeUnit); dart.assert(dart.notNull(rune) > dart.notNull(_THREE_BYTE_LIMIT)); dart.assert(dart.notNull(rune) <= dart.notNull(_FOUR_BYTE_LIMIT)); - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 240 | dart.notNull(rune) >> 18); - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 12 & 63); - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 6 & 63); - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 240 | dart.notNull(rune) >> 18); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 12 & 63); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 6 & 63); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63); return true; } else { - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 224 | dart.notNull(leadingSurrogate) >> 12); - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 128 | dart.notNull(leadingSurrogate) >> 6 & 63); - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 128 | dart.notNull(leadingSurrogate) & 63); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 224 | dart.notNull(leadingSurrogate) >> 12); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(leadingSurrogate) >> 6 & 63); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(leadingSurrogate) & 63); return false; } } @@ -1731,7 +1731,7 @@ var convert; if (dart.notNull(codeUnit) <= dart.notNull(_ONE_BYTE_LIMIT)) { if (dart.notNull(this[_bufferIndex]) >= dart.notNull(this[_buffer].length)) break; - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), codeUnit); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), codeUnit); } else if (_isLeadSurrogate(codeUnit)) { if (dart.notNull(this[_bufferIndex]) + 3 >= dart.notNull(this[_buffer].length)) break; @@ -1744,15 +1744,15 @@ var convert; if (dart.notNull(rune) <= dart.notNull(_TWO_BYTE_LIMIT)) { if (dart.notNull(this[_bufferIndex]) + 1 >= dart.notNull(this[_buffer].length)) break; - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 192 | dart.notNull(rune) >> 6); - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 192 | dart.notNull(rune) >> 6); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63); } else { dart.assert(dart.notNull(rune) <= dart.notNull(_THREE_BYTE_LIMIT)); if (dart.notNull(this[_bufferIndex]) + 2 >= dart.notNull(this[_buffer].length)) break; - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 224 | dart.notNull(rune) >> 12); - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 6 & 63); - this[_buffer].set((($tmp) => this[_bufferIndex] = dart.notNull($tmp) + 1, $tmp).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 224 | dart.notNull(rune) >> 12); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 6 & 63); + this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63); } } } @@ -1762,8 +1762,8 @@ var convert; dart.defineNamedConstructor(_Utf8Encoder, 'withBufferSize'); _Utf8Encoder._DEFAULT_BYTE_BUFFER_SIZE = 1024; class _Utf8EncoderSink extends dart.mixin(_Utf8Encoder, StringConversionSinkMixin) { - _Utf8EncoderSink($_sink) { - this[_sink] = $_sink; + _Utf8EncoderSink(sink$) { + this[_sink] = sink$; super._Utf8Encoder(); } close() { @@ -1811,8 +1811,8 @@ var convert; } } class Utf8Decoder extends Converter$(core.List$(core.int), core.String) { - Utf8Decoder(opt$) { - let allowMalformed = opt$ && 'allowMalformed' in opt$ ? opt$.allowMalformed : false; + Utf8Decoder(opts) { + let allowMalformed = opts && 'allowMalformed' in opts ? opts.allowMalformed : false; this[_allowMalformed] = allowMalformed; super.Converter(); } @@ -1877,9 +1877,9 @@ var convert; let _expectedUnits = Symbol('_expectedUnits'); let _extraUnits = Symbol('_extraUnits'); class _Utf8Decoder extends core.Object { - _Utf8Decoder($_stringSink, $_allowMalformed) { - this[_stringSink] = $_stringSink; - this[_allowMalformed] = $_allowMalformed; + _Utf8Decoder(stringSink$, allowMalformed$) { + this[_stringSink] = stringSink$; + this[_allowMalformed] = allowMalformed$; this[_isFirstCharacter] = true; this[_value] = 0; this[_expectedUnits] = 0; @@ -1977,7 +1977,7 @@ var convert; if (i === endIndex) break; } - let unit = codeUnits.get((($tmp) => i = dart.notNull($tmp) + 1, $tmp)(i)); + let unit = codeUnits.get(((x) => i = dart.notNull(x$) + 1, x$)(i)); if (dart.notNull(unit) < 0) { if (!dart.notNull(this[_allowMalformed])) { throw new core.FormatException(`Negative UTF-8 code unit: -0x${(-dart.notNull(unit)).toRadixString(16)}`); @@ -2071,16 +2071,16 @@ var convert; let _process = Symbol('_process'); let _computeKeys = Symbol('_computeKeys'); let _upgrade = Symbol('_upgrade'); - let _hasProperty = Symbol('_hasProperty'); - let _getProperty = Symbol('_getProperty'); - let _setProperty = Symbol('_setProperty'); - let _getPropertyNames = Symbol('_getPropertyNames'); - let _isUnprocessed = Symbol('_isUnprocessed'); - let _newJavaScriptObject = Symbol('_newJavaScriptObject'); + let _hasProperty$ = Symbol('_hasProperty'); + let _getProperty$ = Symbol('_getProperty'); + let _setProperty$ = Symbol('_setProperty'); + let _getPropertyNames$ = Symbol('_getPropertyNames'); + let _isUnprocessed$ = Symbol('_isUnprocessed'); + let _newJavaScriptObject$ = Symbol('_newJavaScriptObject'); class _JsonMap extends core.Object { - _JsonMap($_original) { + _JsonMap(original$) { this[_processed] = _newJavaScriptObject(); - this[_original] = $_original; + this[_original] = original$; this[_data] = null; } get(key) { @@ -2234,29 +2234,29 @@ var convert; let result = _convertJsonToDartLazy(_getProperty(this[_original], key)); return _setProperty(this[_processed], key, result); } - static [_hasProperty](object, key) { + static [_hasProperty$](object, key) { return Object.prototype.hasOwnProperty.call(object, key); } - static [_getProperty](object, key) { + static [_getProperty$](object, key) { return object[key]; } - static [_setProperty](object, key, value) { + static [_setProperty$](object, key, value) { return object[key] = value; } - static [_getPropertyNames](object) { + static [_getPropertyNames$](object) { return dart.as(Object.keys(object), core.List); } - static [_isUnprocessed](object) { + static [_isUnprocessed$](object) { return typeof object == "undefined"; } - static [_newJavaScriptObject]() { + static [_newJavaScriptObject$]() { return Object.create(null); } } let _parent = Symbol('_parent'); class _JsonMapKeyIterable extends _internal.ListIterable { - _JsonMapKeyIterable($_parent) { - this[_parent] = $_parent; + _JsonMapKeyIterable(parent) { + this[_parent] = parent; super.ListIterable(); } get length() { @@ -2273,9 +2273,9 @@ var convert; } } class _JsonDecoderSink extends _StringSinkConversionSink { - _JsonDecoderSink($_reviver, $_sink) { - this[_reviver] = $_reviver; - this[_sink] = $_sink; + _JsonDecoderSink(reviver$, sink$) { + this[_reviver] = reviver$; + this[_sink] = sink$; super._StringSinkConversionSink(new core.StringBuffer()); } close() { diff --git a/pkg/dev_compiler/lib/runtime/dart/core.js b/pkg/dev_compiler/lib/runtime/dart/core.js index 378577226734..d73750389a3d 100644 --- a/pkg/dev_compiler/lib/runtime/dart/core.js +++ b/pkg/dev_compiler/lib/runtime/dart/core.js @@ -46,8 +46,8 @@ var core; } let proxy = new _Proxy(); class bool extends Object { - bool$fromEnvironment(name, opt$) { - let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : false; + bool$fromEnvironment(name, opts) { + let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : false; throw new UnsupportedError('bool.fromEnvironment can only be used as a const constructor'); } toString() { @@ -64,11 +64,11 @@ var core; return Comparable; }); let Comparable = Comparable$(dart.dynamic); - let _fourDigits = dart.JsSymbol('_fourDigits'); - let _sixDigits = dart.JsSymbol('_sixDigits'); - let _threeDigits = dart.JsSymbol('_threeDigits'); - let _twoDigits = dart.JsSymbol('_twoDigits'); - let _brokenDownDateToMillisecondsSinceEpoch = dart.JsSymbol('_brokenDownDateToMillisecondsSinceEpoch'); + let _fourDigits$ = dart.JsSymbol('_fourDigits'); + let _sixDigits$ = dart.JsSymbol('_sixDigits'); + let _threeDigits$ = dart.JsSymbol('_threeDigits'); + let _twoDigits$ = dart.JsSymbol('_twoDigits'); + let _brokenDownDateToMillisecondsSinceEpoch$ = dart.JsSymbol('_brokenDownDateToMillisecondsSinceEpoch'); class DateTime extends Object { DateTime(year, month, day, hour, minute, second, millisecond) { if (month === void 0) @@ -153,8 +153,8 @@ var core; throw new FormatException("Invalid date format", formattedString); } } - DateTime$fromMillisecondsSinceEpoch(millisecondsSinceEpoch, opt$) { - let isUtc = opt$ && 'isUtc' in opt$ ? opt$.isUtc : false; + DateTime$fromMillisecondsSinceEpoch(millisecondsSinceEpoch, opts) { + let isUtc = opts && 'isUtc' in opts ? opts.isUtc : false; this.millisecondsSinceEpoch = millisecondsSinceEpoch; this.isUtc = isUtc; if (dart.notNull(millisecondsSinceEpoch.abs()) > dart.notNull(DateTime._MAX_MILLISECONDS_SINCE_EPOCH)) { @@ -194,7 +194,7 @@ var core; return this; return new DateTime.fromMillisecondsSinceEpoch(this.millisecondsSinceEpoch, {isUtc: true}); } - static [_fourDigits](n) { + static [_fourDigits$](n) { let absN = n.abs(); let sign = dart.notNull(n) < 0 ? "-" : ""; if (dart.notNull(absN) >= 1000) @@ -205,7 +205,7 @@ var core; return `${sign}00${absN}`; return `${sign}000${absN}`; } - static [_sixDigits](n) { + static [_sixDigits$](n) { dart.assert(dart.notNull(n) < -9999 || dart.notNull(n) > 9999); let absN = n.abs(); let sign = dart.notNull(n) < 0 ? "-" : "+"; @@ -213,14 +213,14 @@ var core; return `${sign}${absN}`; return `${sign}0${absN}`; } - static [_threeDigits](n) { + static [_threeDigits$](n) { if (dart.notNull(n) >= 100) return `${n}`; if (dart.notNull(n) >= 10) return `0${n}`; return `00${n}`; } - static [_twoDigits](n) { + static [_twoDigits$](n) { if (dart.notNull(n) >= 10) return `${n}`; return `0${n}`; @@ -274,7 +274,7 @@ var core; this.isUtc = false; this.millisecondsSinceEpoch = _js_helper.Primitives.dateNow(); } - static [_brokenDownDateToMillisecondsSinceEpoch](year, month, day, hour, minute, second, millisecond, isUtc) { + static [_brokenDownDateToMillisecondsSinceEpoch$](year, month, day, hour, minute, second, millisecond, isUtc) { return dart.as(_js_helper.Primitives.valueFromDecomposedDate(year, month, day, hour, minute, second, millisecond, isUtc), int); } get timeZoneName() { @@ -339,8 +339,8 @@ var core; DateTime.DECEMBER = 12; DateTime.MONTHS_PER_YEAR = 12; DateTime._MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000; - let _onParseErrorInt = dart.JsSymbol('_onParseErrorInt'); - let _onParseErrorDouble = dart.JsSymbol('_onParseErrorDouble'); + let _onParseErrorInt$ = dart.JsSymbol('_onParseErrorInt'); + let _onParseErrorDouble$ = dart.JsSymbol('_onParseErrorDouble'); class num extends Object { static parse(input, onError) { if (onError === void 0) @@ -358,11 +358,11 @@ var core; throw new FormatException(input); return onError(input); } - static [_onParseErrorInt](_) { + static [_onParseErrorInt$](_) { _parseError = true; return 0; } - static [_onParseErrorDouble](_) { + static [_onParseErrorDouble$](_) { _parseError = true; return 0.0; } @@ -382,17 +382,17 @@ var core; double.MAX_FINITE = 1.7976931348623157e+308; let _duration = dart.JsSymbol('_duration'); class Duration extends Object { - Duration(opt$) { - let days = opt$ && 'days' in opt$ ? opt$.days : 0; - let hours = opt$ && 'hours' in opt$ ? opt$.hours : 0; - let minutes = opt$ && 'minutes' in opt$ ? opt$.minutes : 0; - let seconds = opt$ && 'seconds' in opt$ ? opt$.seconds : 0; - let milliseconds = opt$ && 'milliseconds' in opt$ ? opt$.milliseconds : 0; - let microseconds = opt$ && 'microseconds' in opt$ ? opt$.microseconds : 0; + Duration(opts) { + let days = opts && 'days' in opts ? opts.days : 0; + let hours = opts && 'hours' in opts ? opts.hours : 0; + let minutes = opts && 'minutes' in opts ? opts.minutes : 0; + let seconds = opts && 'seconds' in opts ? opts.seconds : 0; + let milliseconds = opts && 'milliseconds' in opts ? opts.milliseconds : 0; + let microseconds = opts && 'microseconds' in opts ? opts.microseconds : 0; this.Duration$_microseconds(dart.notNull(days) * dart.notNull(Duration.MICROSECONDS_PER_DAY) + dart.notNull(hours) * dart.notNull(Duration.MICROSECONDS_PER_HOUR) + dart.notNull(minutes) * dart.notNull(Duration.MICROSECONDS_PER_MINUTE) + dart.notNull(seconds) * dart.notNull(Duration.MICROSECONDS_PER_SECOND) + dart.notNull(milliseconds) * dart.notNull(Duration.MICROSECONDS_PER_MILLISECOND) + dart.notNull(microseconds)); } - Duration$_microseconds($_duration) { - this[_duration] = $_duration; + Duration$_microseconds(duration$) { + this[_duration] = duration$; } ['+'](other) { return new Duration._microseconds(dart.notNull(this[_duration]) + dart.notNull(other[_duration])); @@ -505,8 +505,8 @@ var core; Duration.SECONDS_PER_DAY = dart.notNull(Duration.SECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY); Duration.MINUTES_PER_DAY = dart.notNull(Duration.MINUTES_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY); Duration.ZERO = new Duration({seconds: 0}); - let _stringToSafeString = dart.JsSymbol('_stringToSafeString'); - let _objectToString = dart.JsSymbol('_objectToString'); + let _stringToSafeString$ = dart.JsSymbol('_stringToSafeString'); + let _objectToString$ = dart.JsSymbol('_objectToString'); class Error extends Object { Error() { } @@ -519,10 +519,10 @@ var core; } return _objectToString(object); } - static [_stringToSafeString](string) { + static [_stringToSafeString$](string) { return _js_helper.jsonEncodeNative(string); } - static [_objectToString](object) { + static [_objectToString$](object) { return _js_helper.Primitives.objectToString(object); } get stackTrace() { @@ -720,8 +720,8 @@ var core; } let _className = dart.JsSymbol('_className'); class AbstractClassInstantiationError extends Error { - AbstractClassInstantiationError($_className) { - this[_className] = $_className; + AbstractClassInstantiationError(className) { + this[_className] = className; super.Error(); } toString() { @@ -996,7 +996,7 @@ var core; [_getKey]() { let key = dart.as(_js_helper.Primitives.getProperty(this, Expando._KEY_PROPERTY_NAME), String); if (key === null) { - key = `expando$key$${(($tmp) => _keyCount = dart.notNull($tmp) + 1, $tmp)(_keyCount)}`; + key = `expando$key$${((x) => _keyCount = dart.notNull(x$) + 1, x$)(_keyCount)}`; _js_helper.Primitives.setProperty(this, Expando._KEY_PROPERTY_NAME, key); } return key; @@ -1008,14 +1008,14 @@ var core; return Expando; }); let Expando = Expando$(dart.dynamic); - let _toMangledNames = dart.JsSymbol('_toMangledNames'); + let _toMangledNames$ = dart.JsSymbol('_toMangledNames'); class Function extends Object { static apply(f, positionalArguments, namedArguments) { if (namedArguments === void 0) namedArguments = null; return _js_helper.Primitives.applyFunction(f, positionalArguments, namedArguments === null ? null : _toMangledNames(namedArguments)); } - static [_toMangledNames](namedArguments) { + static [_toMangledNames$](namedArguments) { let result = dart.as(dart.map(), Map$(String, dynamic)); namedArguments.forEach(dart.closureWrap((symbol, value) => { result.set(_symbolToString(dart.as(symbol, Symbol)), value); @@ -1032,13 +1032,13 @@ var core; return _js_helper.objectHashCode(object); } class int extends num { - int$fromEnvironment(name, opt$) { - let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : null; + int$fromEnvironment(name, opts) { + let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : null; throw new UnsupportedError('int.fromEnvironment can only be used as a const constructor'); } - static parse(source, opt$) { - let radix = opt$ && 'radix' in opt$ ? opt$.radix : null; - let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; + static parse(source, opts) { + let radix = opts && 'radix' in opts ? opts.radix : null; + let onError = opts && 'onError' in opts ? opts.onError : null; return Number(source); } } @@ -1083,19 +1083,19 @@ var core; let _end = dart.JsSymbol('_end'); let _start = dart.JsSymbol('_start'); let _generator = dart.JsSymbol('_generator'); - let _id = dart.JsSymbol('_id'); + let _id$ = dart.JsSymbol('_id'); let _GeneratorIterable$ = dart.generic(function(E) { class _GeneratorIterable extends collection.IterableBase$(E) { - _GeneratorIterable($_end, generator) { - this[_end] = $_end; + _GeneratorIterable(end$, generator) { + this[_end] = end$; this[_start] = 0; this[_generator] = dart.as(generator !== null ? generator : _id, _Generator); super.IterableBase(); } - _GeneratorIterable$slice($_start, $_end, $_generator) { - this[_start] = $_start; - this[_end] = $_end; - this[_generator] = $_generator; + _GeneratorIterable$slice(start$, end$, generator$) { + this[_start] = start$; + this[_end] = end$; + this[_generator] = generator$; super.IterableBase(); } get iterator() { @@ -1122,7 +1122,7 @@ var core; return this; return new _GeneratorIterable.slice(this[_start], newEnd, this[_generator]); } - static [_id](n) { + static [_id$](n) { return n; } } @@ -1134,10 +1134,10 @@ var core; let _current = dart.JsSymbol('_current'); let _GeneratorIterator$ = dart.generic(function(E) { class _GeneratorIterator extends Object { - _GeneratorIterator($_index, $_end, $_generator) { - this[_index] = $_index; - this[_end] = $_end; - this[_generator] = $_generator; + _GeneratorIterator(index$, end$, generator$) { + this[_index] = index$; + this[_end] = end$; + this[_generator] = generator$; this[_current] = null; } moveNext() { @@ -1188,17 +1188,17 @@ var core; } return dart.as(result, List$(E)); } - List$from(elements, opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + List$from(elements, opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; return null; } - List$generate(length, generator, opt$) { - let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; + List$generate(length, generator, opts) { + let growable = opts && 'growable' in opts ? opts.growable : true; let result = null; if (growable) { - result = ((_) => { - _.length = length; - return _; + result = ((_$) => { + _$.length = length; + return _$; }).bind(this)(new List.from([])); } else { result = new List(length); @@ -1226,8 +1226,8 @@ var core; Map$identity() { return new collection.LinkedHashMap.identity(); } - Map$fromIterable(iterable, opt$) { - return new collection.LinkedHashMap.fromIterable(iterable, opt$); + Map$fromIterable(iterable, opts) { + return new collection.LinkedHashMap.fromIterable(iterable, opts); } Map$fromIterables(keys, values) { return new collection.LinkedHashMap.fromIterables(keys, values); @@ -1263,9 +1263,9 @@ var core; class Match extends Object { } class RegExp extends Object { - RegExp(source, opt$) { - let multiLine = opt$ && 'multiLine' in opt$ ? opt$.multiLine : false; - let caseSensitive = opt$ && 'caseSensitive' in opt$ ? opt$.caseSensitive : true; + RegExp(source, opts) { + let multiLine = opts && 'multiLine' in opts ? opts.multiLine : false; + let caseSensitive = opts && 'caseSensitive' in opts ? opts.caseSensitive : true; return new _js_helper.JSSyntaxRegExp(source, {multiLine: multiLine, caseSensitive: caseSensitive}); } } @@ -1295,8 +1295,8 @@ var core; class StackTrace extends Object { } let _stop = dart.JsSymbol('_stop'); - let _initTicker = dart.JsSymbol('_initTicker'); - let _now = dart.JsSymbol('_now'); + let _initTicker$ = dart.JsSymbol('_initTicker'); + let _now$ = dart.JsSymbol('_now'); class Stopwatch extends Object { get frequency() { return _frequency; @@ -1347,16 +1347,16 @@ var core; get isRunning() { return this[_start] !== null && this[_stop] === null; } - static [_initTicker]() { + static [_initTicker$]() { _js_helper.Primitives.initTicker(); _frequency = _js_helper.Primitives.timerFrequency; } - static [_now]() { + static [_now$]() { return dart.as(dart.dinvoke(_js_helper.Primitives, 'timerTicks'), int); } } Stopwatch._frequency = null; - let _stringFromIterable = dart.JsSymbol('_stringFromIterable'); + let _stringFromIterable$ = dart.JsSymbol('_stringFromIterable'); class String extends Object { String$fromCharCodes(charCodes, start, end) { if (start === void 0) @@ -1384,11 +1384,11 @@ var core; String$fromCharCode(charCode) { return _js_helper.Primitives.stringFromCharCode(charCode); } - String$fromEnvironment(name, opt$) { - let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : null; + String$fromEnvironment(name, opts) { + let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : null; throw new UnsupportedError('String.fromEnvironment can only be used as a const constructor'); } - static [_stringFromIterable](charCodes, start, end) { + static [_stringFromIterable$](charCodes, start, end) { if (dart.notNull(start) < 0) throw new RangeError.range(start, 0, charCodes.length); if (end !== null && dart.notNull(end) < dart.notNull(start)) { @@ -1623,49 +1623,49 @@ var core; let _userInfo = dart.JsSymbol('_userInfo'); let _host = dart.JsSymbol('_host'); let _port = dart.JsSymbol('_port'); - let _defaultPort = dart.JsSymbol('_defaultPort'); + let _defaultPort$ = dart.JsSymbol('_defaultPort'); let _path = dart.JsSymbol('_path'); let _query = dart.JsSymbol('_query'); let _fragment = dart.JsSymbol('_fragment'); - let _fail = dart.JsSymbol('_fail'); + let _fail$ = dart.JsSymbol('_fail'); let _pathSegments = dart.JsSymbol('_pathSegments'); let _queryParameters = dart.JsSymbol('_queryParameters'); - let _makeHttpUri = dart.JsSymbol('_makeHttpUri'); - let _isWindows = dart.JsSymbol('_isWindows'); - let _checkNonWindowsPathReservedCharacters = dart.JsSymbol('_checkNonWindowsPathReservedCharacters'); - let _checkWindowsPathReservedCharacters = dart.JsSymbol('_checkWindowsPathReservedCharacters'); - let _checkWindowsDriveLetter = dart.JsSymbol('_checkWindowsDriveLetter'); - let _makeFileUri = dart.JsSymbol('_makeFileUri'); - let _makeWindowsFileUrl = dart.JsSymbol('_makeWindowsFileUrl'); - let _makePort = dart.JsSymbol('_makePort'); - let _makeHost = dart.JsSymbol('_makeHost'); - let _isRegNameChar = dart.JsSymbol('_isRegNameChar'); - let _normalizeRegName = dart.JsSymbol('_normalizeRegName'); - let _makeScheme = dart.JsSymbol('_makeScheme'); - let _makeUserInfo = dart.JsSymbol('_makeUserInfo'); - let _makePath = dart.JsSymbol('_makePath'); - let _makeQuery = dart.JsSymbol('_makeQuery'); - let _makeFragment = dart.JsSymbol('_makeFragment'); - let _stringOrNullLength = dart.JsSymbol('_stringOrNullLength'); - let _isHexDigit = dart.JsSymbol('_isHexDigit'); - let _hexValue = dart.JsSymbol('_hexValue'); - let _normalizeEscape = dart.JsSymbol('_normalizeEscape'); - let _isUnreservedChar = dart.JsSymbol('_isUnreservedChar'); - let _escapeChar = dart.JsSymbol('_escapeChar'); - let _normalize = dart.JsSymbol('_normalize'); - let _isSchemeCharacter = dart.JsSymbol('_isSchemeCharacter'); - let _isGeneralDelimiter = dart.JsSymbol('_isGeneralDelimiter'); + let _makeHttpUri$ = dart.JsSymbol('_makeHttpUri'); + let _isWindows$ = dart.JsSymbol('_isWindows'); + let _checkNonWindowsPathReservedCharacters$ = dart.JsSymbol('_checkNonWindowsPathReservedCharacters'); + let _checkWindowsPathReservedCharacters$ = dart.JsSymbol('_checkWindowsPathReservedCharacters'); + let _checkWindowsDriveLetter$ = dart.JsSymbol('_checkWindowsDriveLetter'); + let _makeFileUri$ = dart.JsSymbol('_makeFileUri'); + let _makeWindowsFileUrl$ = dart.JsSymbol('_makeWindowsFileUrl'); + let _makePort$ = dart.JsSymbol('_makePort'); + let _makeHost$ = dart.JsSymbol('_makeHost'); + let _isRegNameChar$ = dart.JsSymbol('_isRegNameChar'); + let _normalizeRegName$ = dart.JsSymbol('_normalizeRegName'); + let _makeScheme$ = dart.JsSymbol('_makeScheme'); + let _makeUserInfo$ = dart.JsSymbol('_makeUserInfo'); + let _makePath$ = dart.JsSymbol('_makePath'); + let _makeQuery$ = dart.JsSymbol('_makeQuery'); + let _makeFragment$ = dart.JsSymbol('_makeFragment'); + let _stringOrNullLength$ = dart.JsSymbol('_stringOrNullLength'); + let _isHexDigit$ = dart.JsSymbol('_isHexDigit'); + let _hexValue$ = dart.JsSymbol('_hexValue'); + let _normalizeEscape$ = dart.JsSymbol('_normalizeEscape'); + let _isUnreservedChar$ = dart.JsSymbol('_isUnreservedChar'); + let _escapeChar$ = dart.JsSymbol('_escapeChar'); + let _normalize$ = dart.JsSymbol('_normalize'); + let _isSchemeCharacter$ = dart.JsSymbol('_isSchemeCharacter'); + let _isGeneralDelimiter$ = dart.JsSymbol('_isGeneralDelimiter'); let _merge = dart.JsSymbol('_merge'); let _hasDotSegments = dart.JsSymbol('_hasDotSegments'); let _removeDotSegments = dart.JsSymbol('_removeDotSegments'); let _toWindowsFilePath = dart.JsSymbol('_toWindowsFilePath'); let _toFilePath = dart.JsSymbol('_toFilePath'); let _isPathAbsolute = dart.JsSymbol('_isPathAbsolute'); - let _addIfNonEmpty = dart.JsSymbol('_addIfNonEmpty'); - let _uriEncode = dart.JsSymbol('_uriEncode'); - let _hexCharPairToByte = dart.JsSymbol('_hexCharPairToByte'); - let _uriDecode = dart.JsSymbol('_uriDecode'); - let _isAlphabeticCharacter = dart.JsSymbol('_isAlphabeticCharacter'); + let _addIfNonEmpty$ = dart.JsSymbol('_addIfNonEmpty'); + let _uriEncode$ = dart.JsSymbol('_uriEncode'); + let _hexCharPairToByte$ = dart.JsSymbol('_hexCharPairToByte'); + let _uriDecode$ = dart.JsSymbol('_uriDecode'); + let _isAlphabeticCharacter$ = dart.JsSymbol('_isAlphabeticCharacter'); class Uri extends Object { get authority() { if (!dart.notNull(this.hasAuthority)) @@ -1690,7 +1690,7 @@ var core; return _defaultPort(this.scheme); return this[_port]; } - static [_defaultPort](scheme) { + static [_defaultPort$](scheme) { if (dart.equals(scheme, "http")) return 80; if (dart.equals(scheme, "https")) @@ -1870,30 +1870,30 @@ var core; } return new Uri._internal(scheme, userinfo, host, port, path, query, fragment); } - static [_fail](uri, index, message) { + static [_fail$](uri, index, message) { throw new FormatException(message, uri, index); } - Uri$_internal(scheme, $_userInfo, $_host, $_port, $_path, $_query, $_fragment) { + Uri$_internal(scheme, userInfo$, host$, port$, path$, query$, fragment$) { this.scheme = scheme; - this[_userInfo] = $_userInfo; - this[_host] = $_host; - this[_port] = $_port; - this[_path] = $_path; - this[_query] = $_query; - this[_fragment] = $_fragment; + this[_userInfo] = userInfo$; + this[_host] = host$; + this[_port] = port$; + this[_path] = path$; + this[_query] = query$; + this[_fragment] = fragment$; this[_pathSegments] = null; this[_queryParameters] = null; } - Uri(opt$) { - let scheme = opt$ && 'scheme' in opt$ ? opt$.scheme : ""; - let userInfo = opt$ && 'userInfo' in opt$ ? opt$.userInfo : ""; - let host = opt$ && 'host' in opt$ ? opt$.host : null; - let port = opt$ && 'port' in opt$ ? opt$.port : null; - let path = opt$ && 'path' in opt$ ? opt$.path : null; - let pathSegments = opt$ && 'pathSegments' in opt$ ? opt$.pathSegments : null; - let query = opt$ && 'query' in opt$ ? opt$.query : null; - let queryParameters = opt$ && 'queryParameters' in opt$ ? opt$.queryParameters : null; - let fragment = opt$ && 'fragment' in opt$ ? opt$.fragment : null; + Uri(opts) { + let scheme = opts && 'scheme' in opts ? opts.scheme : ""; + let userInfo = opts && 'userInfo' in opts ? opts.userInfo : ""; + let host = opts && 'host' in opts ? opts.host : null; + let port = opts && 'port' in opts ? opts.port : null; + let path = opts && 'path' in opts ? opts.path : null; + let pathSegments = opts && 'pathSegments' in opts ? opts.pathSegments : null; + let query = opts && 'query' in opts ? opts.query : null; + let queryParameters = opts && 'queryParameters' in opts ? opts.queryParameters : null; + let fragment = opts && 'fragment' in opts ? opts.fragment : null; scheme = _makeScheme(scheme, _stringOrNullLength(scheme)); userInfo = _makeUserInfo(userInfo, 0, _stringOrNullLength(userInfo)); host = _makeHost(host, 0, _stringOrNullLength(host), false); @@ -1920,7 +1920,7 @@ var core; queryParameters = null; return _makeHttpUri("https", authority, unencodedPath, queryParameters); } - static [_makeHttpUri](scheme, authority, unencodedPath, queryParameters) { + static [_makeHttpUri$](scheme, authority, unencodedPath, queryParameters) { let userInfo = ""; let host = null; let port = null; @@ -1963,9 +1963,9 @@ var core; } return new Uri({scheme: scheme, userInfo: userInfo, host: dart.as(host, String), port: dart.as(port, int), pathSegments: unencodedPath.split("/"), queryParameters: queryParameters}); } - Uri$file(path, opt$) { - let windows = opt$ && 'windows' in opt$ ? opt$.windows : null; - windows = windows === null ? Uri[_isWindows] : windows; + Uri$file(path, opts) { + let windows = opts && 'windows' in opts ? opts.windows : null; + windows = windows === null ? Uri[_isWindows$] : windows; return dart.as(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path), Uri); } static get base() { @@ -1974,10 +1974,10 @@ var core; return Uri.parse(uri); throw new UnsupportedError("'Uri.base' is not supported"); } - static get [_isWindows]() { + static get [_isWindows$]() { return false; } - static [_checkNonWindowsPathReservedCharacters](segments, argumentError) { + static [_checkNonWindowsPathReservedCharacters$](segments, argumentError) { segments.forEach(dart.closureWrap((segment) => { if (dart.dinvoke(segment, 'contains', "/")) { if (argumentError) { @@ -1988,7 +1988,7 @@ var core; } }, "(String) → void")); } - static [_checkWindowsPathReservedCharacters](segments, argumentError, firstSegment) { + static [_checkWindowsPathReservedCharacters$](segments, argumentError, firstSegment) { if (firstSegment === void 0) firstSegment = 0; segments.skip(firstSegment).forEach(dart.closureWrap((segment) => { @@ -2001,7 +2001,7 @@ var core; } }, "(String) → void")); } - static [_checkWindowsDriveLetter](charCode, argumentError) { + static [_checkWindowsDriveLetter$](charCode, argumentError) { if (dart.notNull(Uri._UPPER_CASE_A) <= dart.notNull(charCode) && dart.notNull(charCode) <= dart.notNull(Uri._UPPER_CASE_Z) || dart.notNull(Uri._LOWER_CASE_A) <= dart.notNull(charCode) && dart.notNull(charCode) <= dart.notNull(Uri._LOWER_CASE_Z)) { return; } @@ -2011,7 +2011,7 @@ var core; throw new UnsupportedError(String['+']("Illegal drive letter ", new String.fromCharCode(charCode))); } } - static [_makeFileUri](path) { + static [_makeFileUri$](path) { let sep = "/"; if (path.startsWith(sep)) { return new Uri({scheme: "file", pathSegments: path.split(sep)}); @@ -2019,7 +2019,7 @@ var core; return new Uri({pathSegments: path.split(sep)}); } } - static [_makeWindowsFileUrl](path) { + static [_makeWindowsFileUrl$](path) { if (path.startsWith("\\\\?\\")) { if (path.startsWith("\\\\?\\UNC\\")) { path = `\\${path.substring(7)}`; @@ -2061,16 +2061,16 @@ var core; return new Uri({pathSegments: pathSegments}); } } - replace(opt$) { - let scheme = opt$ && 'scheme' in opt$ ? opt$.scheme : null; - let userInfo = opt$ && 'userInfo' in opt$ ? opt$.userInfo : null; - let host = opt$ && 'host' in opt$ ? opt$.host : null; - let port = opt$ && 'port' in opt$ ? opt$.port : null; - let path = opt$ && 'path' in opt$ ? opt$.path : null; - let pathSegments = opt$ && 'pathSegments' in opt$ ? opt$.pathSegments : null; - let query = opt$ && 'query' in opt$ ? opt$.query : null; - let queryParameters = opt$ && 'queryParameters' in opt$ ? opt$.queryParameters : null; - let fragment = opt$ && 'fragment' in opt$ ? opt$.fragment : null; + replace(opts) { + let scheme = opts && 'scheme' in opts ? opts.scheme : null; + let userInfo = opts && 'userInfo' in opts ? opts.userInfo : null; + let host = opts && 'host' in opts ? opts.host : null; + let port = opts && 'port' in opts ? opts.port : null; + let path = opts && 'path' in opts ? opts.path : null; + let pathSegments = opts && 'pathSegments' in opts ? opts.pathSegments : null; + let query = opts && 'query' in opts ? opts.query : null; + let queryParameters = opts && 'queryParameters' in opts ? opts.queryParameters : null; + let fragment = opts && 'fragment' in opts ? opts.fragment : null; let schemeChanged = false; if (scheme !== null) { scheme = _makeScheme(scheme, scheme.length); @@ -2133,12 +2133,12 @@ var core; } return this[_queryParameters]; } - static [_makePort](port, scheme) { + static [_makePort$](port, scheme) { if (port !== null && port === _defaultPort(scheme)) return null; return port; } - static [_makeHost](host, start, end, strictIPv6) { + static [_makeHost$](host, start, end, strictIPv6) { if (host === null) return null; if (start === end) @@ -2160,10 +2160,10 @@ var core; } return _normalizeRegName(host, start, end); } - static [_isRegNameChar](char) { + static [_isRegNameChar$](char) { return dart.notNull(char) < 127 && dart.notNull(!dart.equals(dart.dbinary(Uri._regNameTable.get(dart.notNull(char) >> 4), '&', 1 << (dart.notNull(char) & 15)), 0)); } - static [_normalizeRegName](host, start, end) { + static [_normalizeRegName$](host, start, end) { let buffer = null; let sectionStart = start; let index = start; @@ -2236,7 +2236,7 @@ var core; } return buffer.toString(); } - static [_makeScheme](scheme, end) { + static [_makeScheme$](scheme, end) { if (end === 0) return ""; let firstCodeUnit = scheme.codeUnitAt(0); @@ -2258,12 +2258,12 @@ var core; scheme = scheme.toLowerCase(); return scheme; } - static [_makeUserInfo](userInfo, start, end) { + static [_makeUserInfo$](userInfo, start, end) { if (userInfo === null) return ""; return _normalize(userInfo, start, end, dart.as(Uri._userinfoTable, List$(int))); } - static [_makePath](path, start, end, pathSegments, ensureLeadingSlash, isFile) { + static [_makePath$](path, start, end, pathSegments, ensureLeadingSlash, isFile) { if (dart.notNull(path === null) && dart.notNull(pathSegments === null)) return isFile ? "/" : ""; if (dart.notNull(path !== null) && dart.notNull(pathSegments !== null)) { @@ -2283,7 +2283,7 @@ var core; } return dart.as(result, String); } - static [_makeQuery](query, start, end, queryParameters) { + static [_makeQuery$](query, start, end, queryParameters) { if (dart.notNull(query === null) && dart.notNull(queryParameters === null)) return null; if (dart.notNull(query !== null) && dart.notNull(queryParameters !== null)) { @@ -2306,28 +2306,28 @@ var core; }).bind(this), "(String, String) → void")); return result.toString(); } - static [_makeFragment](fragment, start, end) { + static [_makeFragment$](fragment, start, end) { if (fragment === null) return null; return _normalize(fragment, start, end, dart.as(Uri._queryCharTable, List$(int))); } - static [_stringOrNullLength](s) { + static [_stringOrNullLength$](s) { return s === null ? 0 : s.length; } - static [_isHexDigit](char) { + static [_isHexDigit$](char) { if (dart.notNull(Uri._NINE) >= dart.notNull(char)) return dart.notNull(Uri._ZERO) <= dart.notNull(char); char = 32; return dart.notNull(Uri._LOWER_CASE_A) <= dart.notNull(char) && dart.notNull(Uri._LOWER_CASE_F) >= dart.notNull(char); } - static [_hexValue](char) { + static [_hexValue$](char) { dart.assert(_isHexDigit(char)); if (dart.notNull(Uri._NINE) >= dart.notNull(char)) return dart.notNull(char) - dart.notNull(Uri._ZERO); char = 32; return dart.notNull(char) - (dart.notNull(Uri._LOWER_CASE_A) - 10); } - static [_normalizeEscape](source, index, lowerCase) { + static [_normalizeEscape$](source, index, lowerCase) { dart.assert(source.codeUnitAt(index) === Uri._PERCENT); if (dart.notNull(index) + 2 >= dart.notNull(source.length)) { return "%"; @@ -2349,10 +2349,10 @@ var core; } return null; } - static [_isUnreservedChar](ch) { + static [_isUnreservedChar$](ch) { return dart.notNull(ch) < 127 && dart.notNull(!dart.equals(dart.dbinary(Uri._unreservedTable.get(dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0)); } - static [_escapeChar](char) { + static [_escapeChar$](char) { dart.assert(dart.dbinary(char, '<=', 1114111)); let hexDigits = "0123456789ABCDEF"; let codeUnits = null; @@ -2385,7 +2385,7 @@ var core; } return new String.fromCharCodes(dart.as(codeUnits, Iterable$(int))); } - static [_normalize](component, start, end, charTable) { + static [_normalize$](component, start, end, charTable) { let buffer = null; let sectionStart = start; let index = start; @@ -2439,10 +2439,10 @@ var core; } return buffer.toString(); } - static [_isSchemeCharacter](ch) { + static [_isSchemeCharacter$](ch) { return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dbinary(Uri._schemeTable.get(dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0)); } - static [_isGeneralDelimiter](ch) { + static [_isGeneralDelimiter$](ch) { return dart.notNull(ch) <= dart.notNull(Uri._RIGHT_BRACKET) && dart.notNull(!dart.equals(dart.dbinary(Uri._genDelimitersTable.get(dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0)); } get isAbsolute() { @@ -2577,8 +2577,8 @@ var core; return `${this.scheme}://${this[_host]}`; return `${this.scheme}://${this[_host]}:${this[_port]}`; } - toFilePath(opt$) { - let windows = opt$ && 'windows' in opt$ ? opt$.windows : null; + toFilePath(opts) { + let windows = opts && 'windows' in opts ? opts.windows : null; if (dart.notNull(!dart.equals(this.scheme, "")) && dart.notNull(!dart.equals(this.scheme, "file"))) { throw new UnsupportedError(`Cannot extract a file path from a ${this.scheme} URI`); } @@ -2674,7 +2674,7 @@ var core; } return combine(this.scheme, combine(this.userInfo, combine(this.host, combine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1))))))); } - static [_addIfNonEmpty](sb, test, first, second) { + static [_addIfNonEmpty$](sb, test, first, second) { if (!dart.equals("", test)) { sb.write(first); sb.write(second); @@ -2683,15 +2683,15 @@ var core; static encodeComponent(component) { return _uriEncode(dart.as(Uri._unreserved2396Table, List$(int)), component); } - static encodeQueryComponent(component, opt$) { - let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; + static encodeQueryComponent(component, opts) { + let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; return _uriEncode(dart.as(Uri._unreservedTable, List$(int)), component, {encoding: encoding, spaceToPlus: true}); } static decodeComponent(encodedComponent) { return _uriDecode(encodedComponent); } - static decodeQueryComponent(encodedComponent, opt$) { - let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; + static decodeQueryComponent(encodedComponent, opts) { + let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; return _uriDecode(encodedComponent, {plusToSpace: true, encoding: encoding}); } static encodeFull(uri) { @@ -2700,8 +2700,8 @@ var core; static decodeFull(uri) { return _uriDecode(uri); } - static splitQueryString(query, opt$) { - let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; + static splitQueryString(query, opts) { + let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; return dart.as(query.split("&").fold(dart.map(), dart.closureWrap((map, element) => { let index = dart.as(dart.dinvoke(element, 'indexOf', "="), int); if (index === -1) { @@ -2830,9 +2830,9 @@ var core; } return dart.as(bytes, List$(int)); } - static [_uriEncode](canonicalTable, text, opt$) { - let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; - let spaceToPlus = opt$ && 'spaceToPlus' in opt$ ? opt$.spaceToPlus : false; + static [_uriEncode$](canonicalTable, text, opts) { + let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; + let spaceToPlus = opts && 'spaceToPlus' in opts ? opts.spaceToPlus : false; // Function byteToHex: (dynamic, dynamic) → dynamic function byteToHex(byte, buffer) { let hex = '0123456789ABCDEF'; @@ -2854,7 +2854,7 @@ var core; } return result.toString(); } - static [_hexCharPairToByte](s, pos) { + static [_hexCharPairToByte$](s, pos) { let byte = 0; for (let i = 0; dart.notNull(i) < 2; i = dart.notNull(i) + 1) { let charCode = s.codeUnitAt(dart.notNull(pos) + dart.notNull(i)); @@ -2871,9 +2871,9 @@ var core; } return byte; } - static [_uriDecode](text, opt$) { - let plusToSpace = opt$ && 'plusToSpace' in opt$ ? opt$.plusToSpace : false; - let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; + static [_uriDecode$](text, opts) { + let plusToSpace = opts && 'plusToSpace' in opts ? opts.plusToSpace : false; + let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; let simple = true; for (let i = 0; dart.notNull(i) < dart.notNull(text.length) && dart.notNull(simple); i = dart.notNull(i) + 1) { let codeUnit = text.codeUnitAt(i); @@ -2908,7 +2908,7 @@ var core; } return encoding.decode(bytes); } - static [_isAlphabeticCharacter](codeUnit) { + static [_isAlphabeticCharacter$](codeUnit) { return dart.notNull(codeUnit) >= dart.notNull(Uri._LOWER_CASE_A) && dart.notNull(codeUnit) <= dart.notNull(Uri._LOWER_CASE_Z) || dart.notNull(codeUnit) >= dart.notNull(Uri._UPPER_CASE_A) && dart.notNull(codeUnit) <= dart.notNull(Uri._UPPER_CASE_Z); } } diff --git a/pkg/dev_compiler/lib/runtime/dart/isolate.js b/pkg/dev_compiler/lib/runtime/dart/isolate.js index e35d63fa3e9a..c265704d4b3b 100644 --- a/pkg/dev_compiler/lib/runtime/dart/isolate.js +++ b/pkg/dev_compiler/lib/runtime/dart/isolate.js @@ -16,9 +16,9 @@ var isolate; } let _pause = Symbol('_pause'); class Isolate extends core.Object { - Isolate(controlPort, opt$) { - let pauseCapability = opt$ && 'pauseCapability' in opt$ ? opt$.pauseCapability : null; - let terminateCapability = opt$ && 'terminateCapability' in opt$ ? opt$.terminateCapability : null; + Isolate(controlPort, opts) { + let pauseCapability = opts && 'pauseCapability' in opts ? opts.pauseCapability : null; + let terminateCapability = opts && 'terminateCapability' in opts ? opts.terminateCapability : null; this.controlPort = controlPort; this.pauseCapability = pauseCapability; this.terminateCapability = terminateCapability; @@ -26,8 +26,8 @@ var isolate; static get current() { return _currentIsolateCache; } - static spawn(entryPoint, message, opt$) { - let paused = opt$ && 'paused' in opt$ ? opt$.paused : false; + static spawn(entryPoint, message, opts) { + let paused = opts && 'paused' in opts ? opts.paused : false; try { return dart.as(_isolate_helper.IsolateNatives.spawnFunction(entryPoint, message, paused).then(dart.closureWrap((msg) => new Isolate(dart.as(dart.dindex(msg, 1), SendPort), {pauseCapability: dart.as(dart.dindex(msg, 2), Capability), terminateCapability: dart.as(dart.dindex(msg, 3), Capability)}), "(List) → dynamic")), async.Future$(Isolate)); } catch (e) { @@ -36,9 +36,9 @@ var isolate; } } - static spawnUri(uri, args, message, opt$) { - let paused = opt$ && 'paused' in opt$ ? opt$.paused : false; - let packageRoot = opt$ && 'packageRoot' in opt$ ? opt$.packageRoot : null; + static spawnUri(uri, args, message, opts) { + let paused = opts && 'paused' in opts ? opts.paused : false; + let packageRoot = opts && 'packageRoot' in opts ? opts.packageRoot : null; if (packageRoot !== null) throw new core.UnimplementedError("packageRoot"); try { @@ -193,8 +193,8 @@ var isolate; } let _trace = Symbol('_trace'); class _RemoteStackTrace extends core.Object { - _RemoteStackTrace($_trace) { - this[_trace] = $_trace; + _RemoteStackTrace(trace) { + this[_trace] = trace; } toString() { return this[_trace]; diff --git a/pkg/dev_compiler/lib/runtime/dart/typed_data.js b/pkg/dev_compiler/lib/runtime/dart/typed_data.js index 5143b2ec21fd..e724ce86d0ef 100644 --- a/pkg/dev_compiler/lib/runtime/dart/typed_data.js +++ b/pkg/dev_compiler/lib/runtime/dart/typed_data.js @@ -7,8 +7,8 @@ var typed_data; } let _littleEndian = Symbol('_littleEndian'); class Endianness extends core.Object { - Endianness$_($_littleEndian) { - this[_littleEndian] = $_littleEndian; + Endianness$_(littleEndian) { + this[_littleEndian] = littleEndian; } } dart.defineNamedConstructor(Endianness, '_'); diff --git a/pkg/dev_compiler/lib/src/codegen/js_codegen.dart b/pkg/dev_compiler/lib/src/codegen/js_codegen.dart index 0e589ab808dc..3cba7a75f96f 100644 --- a/pkg/dev_compiler/lib/src/codegen/js_codegen.dart +++ b/pkg/dev_compiler/lib/src/codegen/js_codegen.dart @@ -29,7 +29,9 @@ import 'package:dev_compiler/src/info.dart'; import 'package:dev_compiler/src/options.dart'; import 'package:dev_compiler/src/report.dart'; import 'package:dev_compiler/src/utils.dart'; + import 'code_generator.dart'; +import 'js_names.dart'; bool _isAnnotationType(Annotation m, String name) => m.name.name == name; @@ -53,7 +55,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { /// The variable for the target of the current `..` cascade expression. SimpleIdentifier _cascadeTarget; /// The variable for the current catch clause - String _catchParameter; + SimpleIdentifier _catchParameter; ClassDeclaration currentClass; ConstantEvaluator _constEvaluator; @@ -78,6 +80,13 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { LibraryElement get currentLibrary => libraryInfo.library; + /// The name for the library's exports inside itself. + /// This much be a constant because we interpolate it into template strings, + /// and otherwise it would break caching for them. + /// `exports` was chosen as the most similar to ES module patterns. + final JSTemporary _exportsVar = new JSTemporary('exports'); + final JSTemporary _namedArgTemp = new JSTemporary('opts'); + JS.Program emitLibrary(LibraryUnit library) { var jsDefaultValue = '{}'; var unit = library.library; @@ -113,7 +122,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { // TODO(jmesserly): make these immutable in JS? for (var name in _exports) { - body.add(js.statement('$_EXPORTS.# = #;', [name, name])); + body.add(js.statement('#.# = #;', [_exportsVar, name, name])); } var name = jsLibraryName(libraryInfo.library); @@ -121,13 +130,18 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { var defaultValue = js.call(jsDefaultValue); return new JS.Program([ js.statement('var #;', name), - js.statement("(function($_EXPORTS) { 'use strict'; #; })(# || (# = #));", - [body, name, name, defaultValue]) + js.statement("(function(#) { 'use strict'; #; })(# || (# = #));", [ + _exportsVar, + body, + name, + name, + defaultValue + ]) ]); } - JS.Statement _initPrivateSymbol(String name) => - js.statement('let # = $_SYMBOL(#);', [name, js.string(name, "'")]); + JS.Statement _initPrivateSymbol(String name) => js.statement( + 'let # = $_SYMBOL(#);', [new JSTemporary(name), js.string(name, "'")]); // TODO(jmesserly): this is a temporary workaround for `Symbol` in core, // until we have better name tracking. @@ -315,7 +329,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { var target = genericName; if (_needQualifiedName(classElem)) { - target = js.call('#.#', [_EXPORTS, genericName]); + target = js.call('#.#', [_exportsVar, genericName]); } genericInst = js.call('#(#)', [target, dynamicArgs]); } @@ -329,7 +343,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { return js.statement( '{ #; dart.defineLazyClassGeneric(#, #, { get: # }); }', [ genericDef, - _EXPORTS, + _exportsVar, js.string(name, "'"), genericName ]); @@ -337,7 +351,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { return js.statement( 'dart.defineLazyClass(#, { get #() { #; return #; } });', [ - _EXPORTS, + _exportsVar, _propertyName(name), body, name @@ -561,7 +575,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { } } } - var lazy = _emitLazyFields(name, lazyStatics); + var lazy = _emitLazyFields(new JS.Identifier(name), lazyStatics); if (lazy != null) body.add(lazy); return _statement(body); } @@ -801,9 +815,12 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { var name = param.identifier.name; if (param.kind == ParameterKind.NAMED) { - body.add(js.statement('let # = opt\$ && # in opt\$ ? opt\$.# : #;', [ + body.add(js.statement('let # = # && # in # ? #.# : #;', [ name, + _namedArgTemp, js.string(name, "'"), + _namedArgTemp, + _namedArgTemp, name, _defaultParamValue(param), ])); @@ -934,8 +951,13 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { } else if (variable is ConstFieldElementImpl) { var className = (variable.enclosingElement as ClassElement).name; return js.call('#.#', [className, name]); - } else if (e is ParameterElement && e.isInitializingFormal) { - name = _fieldParameterName(name); + } else if (e is ParameterElement && e.isInitializingFormal && e.isPrivate) { + /// Rename private names so they don't shadow the private field symbol. + /// The renamer would handle this, but it would prefer to rename the + /// temporary used for the private symbol. Instead rename the parameter. + return new JSTemporary('${name.substring(1)}'); + } else if (_isTemporary(e)) { + return new JSTemporary(e.name); } return new JS.Identifier(name); } @@ -1162,7 +1184,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { var result = []; for (FormalParameter param in node.parameters) { if (param.kind == ParameterKind.NAMED) { - result.add(new JS.Identifier(r'opt$')); + result.add(_namedArgTemp); break; } result.add(_visit(param)); @@ -1265,13 +1287,13 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { } void _flushLazyFields(List body) { - var code = _emitLazyFields(_EXPORTS, _lazyFields); + var code = _emitLazyFields(_exportsVar, _lazyFields); if (code != null) body.add(code); _lazyFields.clear(); } JS.Statement _emitLazyFields( - String objExpr, List fields) { + JS.Expression objExpr, List fields) { if (fields.isEmpty) return null; var methods = []; @@ -1294,8 +1316,10 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { void _flushLibraryProperties(List body) { if (_properties.isEmpty) return; - body.add(js.statement('dart.copyProperties($_EXPORTS, { # });', - [_properties.map(_emitTopLevelProperty)])); + body.add(js.statement('dart.copyProperties(#, { # });', [ + _exportsVar, + _properties.map(_emitTopLevelProperty) + ])); _properties.clear(); } @@ -1466,17 +1490,26 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { // TODO(jmesserly, vsm): Refactor this logic. SimpleIdentifier _createTemporary(String name, DartType type) { + // We use an invalid source location to signal that this is a temporary. + // See [_isTemporary]. + // TODO(jmesserly): alternatives are + // * (ab)use Element.isSynthetic, which isn't currently used for + // LocalVariableElementImpl, so we could repurpose to mean "temp". + // * add a new property to LocalVariableElementImpl. + // * create a new subtype of LocalVariableElementImpl to mark a temp. var id = - new SimpleIdentifier(new StringToken(TokenType.IDENTIFIER, name, 0)); + new SimpleIdentifier(new StringToken(TokenType.IDENTIFIER, name, -1)); id.staticElement = new LocalVariableElementImpl.forNode(id); id.staticType = type; return id; } + bool _isTemporary(Element node) => node.nameOffset == -1; + JS.Expression _emitPostfixIncrement(Expression expr, Token op) { var type = rules.getStaticType(expr); assert(type != null); - var tmp = _createTemporary('\$tmp', type); + var tmp = _createTemporary('x', type); // Increment and write var one = AstBuilder.integerLiteral(1); @@ -1588,20 +1621,16 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { // remains valid in an expression context. // TODO(jmesserly): need a better way to handle temps. // TODO(jmesserly): special case for parent is ExpressionStatement? - _cascadeTarget = - new SimpleIdentifier(new StringToken(TokenType.IDENTIFIER, '_', 0)); - _cascadeTarget.staticElement = - new LocalVariableElementImpl.forNode(_cascadeTarget); - _cascadeTarget.staticType = node.target.staticType; + _cascadeTarget = _createTemporary('_', node.target.staticType); var body = _visitList(node.cascadeSections); if (node.parent is! ExpressionStatement) { - body.add(js.statement('return #;', _cascadeTarget.name)); + body.add(js.statement('return #;', _visit(_cascadeTarget))); } var bindThis = _maybeBindThis(node.cascadeSections); result = js.call('((#) => { # })$bindThis(#)', [ - _cascadeTarget.name, + _visit(_cascadeTarget), body, _visit(node.target) ]); @@ -1638,15 +1667,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { @override visitFormalParameter(FormalParameter node) => - new JS.Identifier(node.identifier.name); - - @override - visitFieldFormalParameter(FieldFormalParameter node) => - new JS.Identifier(_fieldParameterName(node.identifier.name)); - - /// Rename private names so they don't shadow the private field symbol. - // TODO(jmesserly): replace this ad-hoc rename with a general strategy. - _fieldParameterName(name) => name.startsWith('_') ? '\$$name' : name; + visitSimpleIdentifier(node.identifier); @override JS.This visitThisExpression(ThisExpression node) => new JS.This(); @@ -1719,9 +1740,9 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { @override visitRethrowExpression(RethrowExpression node) { if (node.parent is ExpressionStatement) { - return js.statement('throw #;', _catchParameter); + return js.statement('throw #;', _visit(_catchParameter)); } else { - return js.call('dart.throw_(#)', _catchParameter); + return js.call('dart.throw_(#)', _visit(_catchParameter)); } } @@ -1782,21 +1803,34 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { // TODO(jmesserly): need a better way to get a temporary variable. // This could incorrectly shadow a user's name. var savedCatch = _catchParameter; - _catchParameter = '\$e'; if (clauses.length == 1) { // Special case for a single catch. - var clause = clauses.single; - if (clause.exceptionParameter != null) { - _catchParameter = clause.exceptionParameter.name; - } + _catchParameter = clauses.single.exceptionParameter; + } else { + _catchParameter = _createTemporary('e', rules.provider.dynamicType); + } + + JS.Statement catchBody = null; + for (var clause in clauses.reversed) { + catchBody = _catchClauseGuard(clause, catchBody); } - var catchVarDecl = new JS.Identifier(_catchParameter); - var catchBody = new JS.Block(_visitList(clauses)); + var catchVarDecl = _visit(_catchParameter); _catchParameter = savedCatch; + return new JS.Catch(catchVarDecl, new JS.Block([catchBody])); + } + + JS.Statement _catchClauseGuard(CatchClause clause, JS.Statement otherwise) { + var then = visitCatchClause(clause); + + // Discard following clauses, if any, as they are unreachable. + if (clause.exceptionType == null) return then; - return new JS.Catch(catchVarDecl, catchBody); + return new JS.If(js.call('dart.is(#, #)', [ + _visit(_catchParameter), + _emitTypeName(clause.exceptionType.type), + ]), then, otherwise); } JS.Statement _statement(Iterable stmts) { @@ -1807,6 +1841,8 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { return new JS.Block(s); } + /// Visits the catch clause body. This skips the exception type guard, if any. + /// That is handled in [_visitCatch]. @override JS.Statement visitCatchClause(CatchClause node) { var body = []; @@ -1814,11 +1850,10 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { var savedCatch = _catchParameter; if (node.catchKeyword != null) { var name = node.exceptionParameter; - if (name != null && name.name != _catchParameter) { - var decl = new JS.Identifier(name.name); - decl.sourceInformation = name; - body.add(js.statement('let # = #;', [decl, _catchParameter])); - _catchParameter = name.name; + if (name != null && name != _catchParameter) { + body.add(js.statement( + 'let # = #;', [_visit(name), _visit(_catchParameter)])); + _catchParameter = name; } if (node.stackTraceParameter != null) { var stackVar = node.stackTraceParameter.name; @@ -1829,15 +1864,6 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { body.add(_visit(node.body)); _catchParameter = savedCatch; - - if (node.exceptionType != null) { - return js.statement('if (dart.is(#, #)) #;', [ - _catchParameter, - _emitTypeName(node.exceptionType.type), - _statement(body) - ]); - } - return _statement(body); } @@ -2071,7 +2097,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { JS.Expression _jsMemberName(String name, {bool unary: false}) { if (name.startsWith('_')) { if (_privateNames.add(name)) _pendingPrivateNames.add(name); - return new JS.Identifier(name); + return new JSTemporary(name); } if (name == '[]') { name = 'get'; @@ -2092,9 +2118,9 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { /// Choose a canonical name from the library element. /// This never uses the library's name (the identifier in the `library` /// declaration) as it doesn't have any meaningful rules enforced. - String _libraryName(LibraryElement library) { - if (library == libraryInfo.library) return _EXPORTS; - return jsLibraryName(library); + JS.Identifier _libraryName(LibraryElement library) { + if (library == libraryInfo.library) return _exportsVar; + return new JS.Identifier(jsLibraryName(library)); } String _maybeBindThis(node) { @@ -2105,12 +2131,6 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor { return visitor._bindThis ? '.bind(this)' : ''; } - /// The name for the library's exports inside itself. - /// This much be a constant because we interpolate it into template strings, - /// and otherwise it would break caching for them. - /// `exports` was chosen as the most similar to ES module patterns. - static const String _EXPORTS = 'exports'; - static bool _needsImplicitThis(Element e) => e is PropertyAccessorElement && !e.variable.isStatic || e is ClassMemberElement && !e.isStatic && e is! ConstructorElement; @@ -2218,8 +2238,8 @@ class JSGenerator extends CodeGenerator { } void _writeNode(JS.JavaScriptPrintingContext context, JS.Node node) { - var opts = new JS.JavaScriptPrintingOptions(avoidKeywordsInIdentifiers: true); - node.accept(new JS.Printer(opts, context)); + var opts = new JS.JavaScriptPrintingOptions(allowKeywordsInProperties: true); + node.accept(new JS.Printer(opts, context, localNamer: new JSNamer(node))); } /// This is a debugging helper to print a JS node. diff --git a/pkg/dev_compiler/lib/src/codegen/js_names.dart b/pkg/dev_compiler/lib/src/codegen/js_names.dart new file mode 100644 index 000000000000..58d750718a41 --- /dev/null +++ b/pkg/dev_compiler/lib/src/codegen/js_names.dart @@ -0,0 +1,81 @@ +// Copyright (c) 2015, 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. + +library dev_compiler.src.codegen.js_names; + +import 'package:dev_compiler/src/js/js_ast.dart'; +import 'package:dev_compiler/src/js/keywords.dart'; + +/// Marker subclass for temporary variables. +/// We treat these as being in a different scope from other identifiers, and +/// rename them so they don't collide. See [JSNamer]. +// TODO(jmesserly): move into js_ast? add a boolean to Identifier? +class JSTemporary extends Identifier { + JSTemporary(String name) : super(name); +} + +/// This class has two purposes: +/// * rename JS identifiers to avoid keywords. +/// * rename temporary variables to avoid colliding with user-specified names. +/// +/// We use a very simple algorithm: +/// * collect all names +/// * visit the tree, choosing unique names for things we need to rename +/// +/// We assume the scoping is already correct (if the isTemporary bit is +/// considered as part of the name), so we can do both of these renames +/// globally, with no regard to where the name was declared or which precise +/// identifier it was bound to. +// TODO(jmesserly): some future transforms, like ES6->5, might want a name bound +// tree, but we can defer that until needed. +class JSNamer extends LocalNamer { + final usedNames = new Set(); + final renames = new Map(); + + JSNamer(Node node) { + node.accept(new _NameCollector(usedNames)); + } + + String getName(Identifier node) { + var name = node.name; + if (node is JSTemporary) { + return _rename(name, valid: true); + } else if (isJsKeyword(name)) { + return _rename(name, valid: false); + } + return name; + } + + String _rename(String name, {bool valid}) { + var candidate = renames[name]; + if (candidate != null) return candidate; + + // Try to use the temp's name, otherwise rename. + if (valid && usedNames.add(name)) { + candidate = name; + } else { + // This assumes that collisions are rare, hence linear search. + // If collisions become common we need a better search. + // TODO(jmesserly): what's the most readable scheme here? Maybe 1-letter + // names in some cases? + candidate = name == 'function' ? 'func' : '${name}\$'; + for (int i = 0; !usedNames.add(candidate); i++) { + candidate = '${name}\$$i'; + } + } + return renames[name] = candidate; + } + + void enterScope(Node node) {} + void leaveScope() {} +} + +/// Collects all names used in the visited tree. +class _NameCollector extends BaseVisitor { + final Set names; + _NameCollector(this.names); + visitIdentifier(Identifier node) { + if (node is! JSTemporary) names.add(node.name); + } +} diff --git a/pkg/dev_compiler/lib/src/js/js_ast.dart b/pkg/dev_compiler/lib/src/js/js_ast.dart index 121ac7f8e4c6..ee8289ecf2df 100644 --- a/pkg/dev_compiler/lib/src/js/js_ast.dart +++ b/pkg/dev_compiler/lib/src/js/js_ast.dart @@ -6,7 +6,6 @@ library js_ast; import 'precedence.dart'; import 'characters.dart' as charCodes; -import 'keywords.dart'; part 'nodes.dart'; part 'builder.dart'; diff --git a/pkg/dev_compiler/lib/src/js/printer.dart b/pkg/dev_compiler/lib/src/js/printer.dart index 0e92ed5e224e..90cba8e47206 100644 --- a/pkg/dev_compiler/lib/src/js/printer.dart +++ b/pkg/dev_compiler/lib/src/js/printer.dart @@ -9,13 +9,17 @@ class JavaScriptPrintingOptions { final bool shouldCompressOutput; final bool minifyLocalVariables; final bool preferSemicolonToNewlineInMinifiedOutput; - final bool avoidKeywordsInIdentifiers; + + + /// True to allow keywords in properties, such as `obj.var` or `obj.function` + /// Modern JS engines support this. + final bool allowKeywordsInProperties; JavaScriptPrintingOptions( {this.shouldCompressOutput: false, this.minifyLocalVariables: false, this.preferSemicolonToNewlineInMinifiedOutput: false, - this.avoidKeywordsInIdentifiers: false}); + this.allowKeywordsInProperties: false}); } @@ -68,17 +72,18 @@ class Printer implements NodeVisitor { static final expressionContinuationRegExp = new RegExp(r'^[-+([]'); Printer(JavaScriptPrintingOptions options, - JavaScriptPrintingContext context) + JavaScriptPrintingContext context, + {LocalNamer localNamer}) : options = options, context = context, shouldCompressOutput = options.shouldCompressOutput, danglingElseVisitor = new DanglingElseVisitor(context), - localNamer = determineRenamer(options.shouldCompressOutput, - options.minifyLocalVariables); + localNamer = determineRenamer(localNamer, options); - static LocalNamer determineRenamer(bool shouldCompressOutput, - bool allowVariableMinification) { - return (shouldCompressOutput && allowVariableMinification) + static LocalNamer determineRenamer(LocalNamer localNamer, + JavaScriptPrintingOptions options) { + if (localNamer != null) return localNamer; + return (options.shouldCompressOutput && options.minifyLocalVariables) ? new MinifyRenamer() : new IdentityNamer(); } @@ -778,8 +783,8 @@ class Printer implements NodeVisitor { out("super"); } - visitIdentifier(Identifier param) { - out(localNamer.getName(param.name)); + visitIdentifier(Identifier node) { + out(localNamer.getName(node)); } bool isDigit(int charCode) { @@ -801,14 +806,10 @@ class Printer implements NodeVisitor { } } - if (options.avoidKeywordsInIdentifiers) { - return !isJsKeyword(field.substring(1, field.length - 1)); - } else { - // TODO(floitsch): normally we should also check that the field is not a - // reserved word. We don't generate fields with reserved word names except - // for 'super'. - return field != '"super"'; - } + // TODO(floitsch): normally we should also check that the field is not a + // reserved word. We don't generate fields with reserved word names except + // for 'super'. + return options.allowKeywordsInProperties || field != '"super"'; } visitAccess(PropertyAccess access) { @@ -1241,14 +1242,14 @@ class DanglingElseVisitor extends BaseVisitor { abstract class LocalNamer { - String getName(String oldName); + String getName(Identifier node); void enterScope(Node node); void leaveScope(); } class IdentityNamer implements LocalNamer { - String getName(String oldName) => oldName; + String getName(Identifier node) => node.name; void enterScope(Node node) {} void leaveScope() {} } @@ -1277,7 +1278,8 @@ class MinifyRenamer implements LocalNamer { parameterNumber = parameterNumberStack.removeLast(); } - String getName(String oldName) { + String getName(Identifier node) { + String oldName = node.name; // Go from inner scope to outer looking for mapping of name. for (int i = maps.length - 1; i >= 0; i--) { var map = maps[i]; diff --git a/pkg/dev_compiler/test/codegen/expect/constructors.js b/pkg/dev_compiler/test/codegen/expect/constructors.js index 2b1df9b0cf0c..853a29316f27 100644 --- a/pkg/dev_compiler/test/codegen/expect/constructors.js +++ b/pkg/dev_compiler/test/codegen/expect/constructors.js @@ -42,8 +42,8 @@ var constructors; } } class H extends core.Object { - H(opt$) { - let p1 = opt$ && 'p1' in opt$ ? opt$.p1 : null; + H(opts) { + let p1 = opts && 'p1' in opts ? opts.p1 : null; } } class I extends core.Object { diff --git a/pkg/dev_compiler/test/codegen/expect/methods.js b/pkg/dev_compiler/test/codegen/expect/methods.js index ea96ac0df6e3..3fe7d7e5f013 100644 --- a/pkg/dev_compiler/test/codegen/expect/methods.js +++ b/pkg/dev_compiler/test/codegen/expect/methods.js @@ -22,12 +22,12 @@ var methods; b = 0; return b; } - w(a, opt$) { - let b = opt$ && 'b' in opt$ ? opt$.b : null; + w(a, opts) { + let b = opts && 'b' in opts ? opts.b : null; return dart.notNull(a) + dart.notNull(b); } - ww(a, opt$) { - let b = opt$ && 'b' in opt$ ? opt$.b : 0; + ww(a, opts) { + let b = opts && 'b' in opts ? opts.b : 0; return dart.notNull(a) + dart.notNull(b); } get a() { diff --git a/pkg/dev_compiler/test/codegen/expect/names.js b/pkg/dev_compiler/test/codegen/expect/names.js new file mode 100644 index 000000000000..ac268d4e3510 --- /dev/null +++ b/pkg/dev_compiler/test/codegen/expect/names.js @@ -0,0 +1,24 @@ +var names; +(function(exports) { + 'use strict'; + exports.exports = 42; + let _foo$ = Symbol('_foo'); + class Foo extends core.Object { + [_foo$]() { + return 123; + } + } + // Function _foo: () → dynamic + function _foo() { + return 456; + } + // Function main: () → dynamic + function main() { + core.print(exports.exports); + core.print(new Foo()._foo()); + core.print(_foo()); + } + // Exports: + exports.Foo = Foo; + exports.main = main; +})(names || (names = {})); diff --git a/pkg/dev_compiler/test/codegen/expect/names.txt b/pkg/dev_compiler/test/codegen/expect/names.txt new file mode 100644 index 000000000000..90fba0c957a4 --- /dev/null +++ b/pkg/dev_compiler/test/codegen/expect/names.txt @@ -0,0 +1 @@ +// Messages from compiling names.dart diff --git a/pkg/dev_compiler/test/codegen/expect/server_mode/html_input.html b/pkg/dev_compiler/test/codegen/expect/server_mode/html_input.html index 11f6e7f70c3e..7f6507583038 100644 --- a/pkg/dev_compiler/test/codegen/expect/server_mode/html_input.html +++ b/pkg/dev_compiler/test/codegen/expect/server_mode/html_input.html @@ -1,7 +1,7 @@ - + diff --git a/pkg/dev_compiler/test/codegen/expect/sunflower/dom.js b/pkg/dev_compiler/test/codegen/expect/sunflower/dom.js index ea7f264505db..62d83cdbe913 100644 --- a/pkg/dev_compiler/test/codegen/expect/sunflower/dom.js +++ b/pkg/dev_compiler/test/codegen/expect/sunflower/dom.js @@ -2,8 +2,8 @@ var dom; (function(exports) { 'use strict'; class JsName extends core.Object { - JsName(opt$) { - let name = opt$ && 'name' in opt$ ? opt$.name : null; + JsName(opts) { + let name = opts && 'name' in opts ? opts.name : null; this.name = name; } } diff --git a/pkg/dev_compiler/test/codegen/expect/try_catch.js b/pkg/dev_compiler/test/codegen/expect/try_catch.js index 9ad17ef3a632..8a5d5b8c48a6 100644 --- a/pkg/dev_compiler/test/codegen/expect/try_catch.js +++ b/pkg/dev_compiler/test/codegen/expect/try_catch.js @@ -1,21 +1,39 @@ var try_catch; (function(exports) { 'use strict'; - // Function main: () → dynamic - function main() { + // Function foo: () → dynamic + function foo() { try { throw "hi there"; - } catch ($e) { - if (dart.is($e, core.String)) { - let e = $e; + } catch (e$) { + if (dart.is(e$, core.String)) { + let e = e$; + let t = dart.stackTrace(e); + } else { + let e = e$; let t = dart.stackTrace(e); + throw e; } - let e = $e; + } + + } + // Function bar: () → dynamic + function bar() { + try { + throw "hi there"; + } catch (e$) { + let e = e$; let t = dart.stackTrace(e); - throw e; } } + // Function main: () → dynamic + function main() { + foo(); + bar(); + } // Exports: + exports.foo = foo; + exports.bar = bar; exports.main = main; })(try_catch || (try_catch = {})); diff --git a/pkg/dev_compiler/test/codegen/names.dart b/pkg/dev_compiler/test/codegen/names.dart new file mode 100644 index 000000000000..127655eb2429 --- /dev/null +++ b/pkg/dev_compiler/test/codegen/names.dart @@ -0,0 +1,17 @@ +// Copyright (c) 2015, 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. + +var exports = 42; + +class Foo { + _foo() => 123; +} + +_foo() => 456; + +main() { + print(exports); + print(new Foo()._foo()); + print(_foo()); +} diff --git a/pkg/dev_compiler/test/codegen/try_catch.dart b/pkg/dev_compiler/test/codegen/try_catch.dart index c67493f9c19e..844d7f24d1e5 100644 --- a/pkg/dev_compiler/test/codegen/try_catch.dart +++ b/pkg/dev_compiler/test/codegen/try_catch.dart @@ -1,4 +1,8 @@ -main() { +// Copyright (c) 2015, 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. + +foo() { try { throw "hi there"; } on String catch (e, t) { @@ -6,4 +10,16 @@ main() { rethrow; } } - +bar() { + try { + throw "hi there"; + } catch (e, t) { + } on String catch (e, t) { + // unreachable + rethrow; + } +} +main() { + foo(); + bar(); +}