| OLD | NEW |
| 1 dart_library.library('dart/_js_helper', null, /* Imports */[ | 1 dart_library.library('dart/_js_helper', null, /* Imports */[ |
| 2 "dart/_runtime", | 2 "dart/_runtime", |
| 3 'dart/core', | 3 'dart/core', |
| 4 'dart/collection', | 4 'dart/collection', |
| 5 'dart/_interceptors', | 5 'dart/_interceptors', |
| 6 'dart/_foreign_helper' | 6 'dart/_foreign_helper' |
| 7 ], /* Lazy imports */[ | 7 ], /* Lazy imports */[ |
| 8 ], function(exports, dart, core, collection, _interceptors, _foreign_helper) { | 8 ], function(exports, dart, core, collection, _interceptors, _foreign_helper) { |
| 9 'use strict'; | 9 'use strict'; |
| 10 let dartx = dart.dartx; | 10 let dartx = dart.dartx; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 SupportJsExtensionMethods() { | 43 SupportJsExtensionMethods() { |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 dart.setSignature(SupportJsExtensionMethods, { | 46 dart.setSignature(SupportJsExtensionMethods, { |
| 47 constructors: () => ({SupportJsExtensionMethods: [SupportJsExtensionMethods,
[]]}) | 47 constructors: () => ({SupportJsExtensionMethods: [SupportJsExtensionMethods,
[]]}) |
| 48 }); | 48 }); |
| 49 function defineProperty(obj, property, value) { | 49 function defineProperty(obj, property, value) { |
| 50 Object.defineProperty(obj, property, {value: value, enumerable: false, writa
ble: true, configurable: true}); | 50 Object.defineProperty(obj, property, {value: value, enumerable: false, writa
ble: true, configurable: true}); |
| 51 } | 51 } |
| 52 dart.fn(defineProperty, dart.void, [dart.dynamic, core.String, dart.dynamic]); | 52 dart.fn(defineProperty, dart.void, [dart.dynamic, core.String, dart.dynamic]); |
| 53 let _nativeRegExp = Symbol('_nativeRegExp'); | 53 const _nativeRegExp = Symbol('_nativeRegExp'); |
| 54 function regExpGetNative(regexp) { | 54 function regExpGetNative(regexp) { |
| 55 return regexp[_nativeRegExp]; | 55 return regexp[_nativeRegExp]; |
| 56 } | 56 } |
| 57 dart.fn(regExpGetNative, () => dart.definiteFunctionType(dart.dynamic, [JSSynt
axRegExp])); | 57 dart.fn(regExpGetNative, () => dart.definiteFunctionType(dart.dynamic, [JSSynt
axRegExp])); |
| 58 let _nativeGlobalVersion = Symbol('_nativeGlobalVersion'); | 58 const _nativeGlobalVersion = Symbol('_nativeGlobalVersion'); |
| 59 function regExpGetGlobalNative(regexp) { | 59 function regExpGetGlobalNative(regexp) { |
| 60 let nativeRegexp = regexp[_nativeGlobalVersion]; | 60 let nativeRegexp = regexp[_nativeGlobalVersion]; |
| 61 nativeRegexp.lastIndex = 0; | 61 nativeRegexp.lastIndex = 0; |
| 62 return nativeRegexp; | 62 return nativeRegexp; |
| 63 } | 63 } |
| 64 dart.fn(regExpGetGlobalNative, () => dart.definiteFunctionType(dart.dynamic, [
JSSyntaxRegExp])); | 64 dart.fn(regExpGetGlobalNative, () => dart.definiteFunctionType(dart.dynamic, [
JSSyntaxRegExp])); |
| 65 let _nativeAnchoredVersion = Symbol('_nativeAnchoredVersion'); | 65 const _nativeAnchoredVersion = Symbol('_nativeAnchoredVersion'); |
| 66 function regExpCaptureCount(regexp) { | 66 function regExpCaptureCount(regexp) { |
| 67 let nativeAnchoredRegExp = regexp[_nativeAnchoredVersion]; | 67 let nativeAnchoredRegExp = regexp[_nativeAnchoredVersion]; |
| 68 let match = nativeAnchoredRegExp.exec(''); | 68 let match = nativeAnchoredRegExp.exec(''); |
| 69 return dart.as(dart.dsend(dart.dload(match, 'length'), '-', 2), core.int); | 69 return dart.as(dart.dsend(dart.dload(match, 'length'), '-', 2), core.int); |
| 70 } | 70 } |
| 71 dart.fn(regExpCaptureCount, () => dart.definiteFunctionType(core.int, [JSSynta
xRegExp])); | 71 dart.fn(regExpCaptureCount, () => dart.definiteFunctionType(core.int, [JSSynta
xRegExp])); |
| 72 let _nativeGlobalRegExp = Symbol('_nativeGlobalRegExp'); | 72 const _nativeGlobalRegExp = Symbol('_nativeGlobalRegExp'); |
| 73 let _nativeAnchoredRegExp = Symbol('_nativeAnchoredRegExp'); | 73 const _nativeAnchoredRegExp = Symbol('_nativeAnchoredRegExp'); |
| 74 let _isMultiLine = Symbol('_isMultiLine'); | 74 const _isMultiLine = Symbol('_isMultiLine'); |
| 75 let _isCaseSensitive = Symbol('_isCaseSensitive'); | 75 const _isCaseSensitive = Symbol('_isCaseSensitive'); |
| 76 let _execGlobal = Symbol('_execGlobal'); | 76 const _execGlobal = Symbol('_execGlobal'); |
| 77 let _execAnchored = Symbol('_execAnchored'); | 77 const _execAnchored = Symbol('_execAnchored'); |
| 78 class JSSyntaxRegExp extends core.Object { | 78 class JSSyntaxRegExp extends core.Object { |
| 79 toString() { | 79 toString() { |
| 80 return `RegExp/${this.pattern}/`; | 80 return `RegExp/${this.pattern}/`; |
| 81 } | 81 } |
| 82 JSSyntaxRegExp(source, opts) { | 82 JSSyntaxRegExp(source, opts) { |
| 83 let multiLine = opts && 'multiLine' in opts ? opts.multiLine : false; | 83 let multiLine = opts && 'multiLine' in opts ? opts.multiLine : false; |
| 84 let caseSensitive = opts && 'caseSensitive' in opts ? opts.caseSensitive :
true; | 84 let caseSensitive = opts && 'caseSensitive' in opts ? opts.caseSensitive :
true; |
| 85 this.pattern = source; | 85 this.pattern = source; |
| 86 this[_nativeRegExp] = JSSyntaxRegExp.makeNative(source, multiLine, caseSen
sitive, false); | 86 this[_nativeRegExp] = JSSyntaxRegExp.makeNative(source, multiLine, caseSen
sitive, false); |
| 87 this[_nativeGlobalRegExp] = null; | 87 this[_nativeGlobalRegExp] = null; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 stringMatch: [core.String, [core.String]], | 189 stringMatch: [core.String, [core.String]], |
| 190 allMatches: [core.Iterable$(core.Match), [core.String], [core.int]], | 190 allMatches: [core.Iterable$(core.Match), [core.String], [core.int]], |
| 191 [_execGlobal]: [core.Match, [core.String, core.int]], | 191 [_execGlobal]: [core.Match, [core.String, core.int]], |
| 192 [_execAnchored]: [core.Match, [core.String, core.int]], | 192 [_execAnchored]: [core.Match, [core.String, core.int]], |
| 193 matchAsPrefix: [core.Match, [core.String], [core.int]] | 193 matchAsPrefix: [core.Match, [core.String], [core.int]] |
| 194 }), | 194 }), |
| 195 statics: () => ({makeNative: [dart.dynamic, [core.String, core.bool, core.bo
ol, core.bool]]}), | 195 statics: () => ({makeNative: [dart.dynamic, [core.String, core.bool, core.bo
ol, core.bool]]}), |
| 196 names: ['makeNative'] | 196 names: ['makeNative'] |
| 197 }); | 197 }); |
| 198 dart.defineExtensionMembers(JSSyntaxRegExp, ['allMatches', 'matchAsPrefix']); | 198 dart.defineExtensionMembers(JSSyntaxRegExp, ['allMatches', 'matchAsPrefix']); |
| 199 let _match = Symbol('_match'); | 199 const _match = Symbol('_match'); |
| 200 class _MatchImplementation extends core.Object { | 200 class _MatchImplementation extends core.Object { |
| 201 _MatchImplementation(pattern, match) { | 201 _MatchImplementation(pattern, match) { |
| 202 this.pattern = pattern; | 202 this.pattern = pattern; |
| 203 this[_match] = match; | 203 this[_match] = match; |
| 204 dart.assert(typeof this[_match].input == 'string'); | 204 dart.assert(typeof this[_match].input == 'string'); |
| 205 dart.assert(typeof this[_match].index == 'number'); | 205 dart.assert(typeof this[_match].index == 'number'); |
| 206 } | 206 } |
| 207 get input() { | 207 get input() { |
| 208 return this[_match].input; | 208 return this[_match].input; |
| 209 } | 209 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 232 } | 232 } |
| 233 _MatchImplementation[dart.implements] = () => [core.Match]; | 233 _MatchImplementation[dart.implements] = () => [core.Match]; |
| 234 dart.setSignature(_MatchImplementation, { | 234 dart.setSignature(_MatchImplementation, { |
| 235 constructors: () => ({_MatchImplementation: [_MatchImplementation, [core.Pat
tern, core.List$(core.String)]]}), | 235 constructors: () => ({_MatchImplementation: [_MatchImplementation, [core.Pat
tern, core.List$(core.String)]]}), |
| 236 methods: () => ({ | 236 methods: () => ({ |
| 237 group: [core.String, [core.int]], | 237 group: [core.String, [core.int]], |
| 238 get: [core.String, [core.int]], | 238 get: [core.String, [core.int]], |
| 239 groups: [core.List$(core.String), [core.List$(core.int)]] | 239 groups: [core.List$(core.String), [core.List$(core.int)]] |
| 240 }) | 240 }) |
| 241 }); | 241 }); |
| 242 let _re = Symbol('_re'); | 242 const _re = Symbol('_re'); |
| 243 let _string = Symbol('_string'); | 243 const _string = Symbol('_string'); |
| 244 let _start = Symbol('_start'); | 244 const _start = Symbol('_start'); |
| 245 class _AllMatchesIterable extends collection.IterableBase$(core.Match) { | 245 class _AllMatchesIterable extends collection.IterableBase$(core.Match) { |
| 246 _AllMatchesIterable(re, string, start) { | 246 _AllMatchesIterable(re, string, start) { |
| 247 this[_re] = re; | 247 this[_re] = re; |
| 248 this[_string] = string; | 248 this[_string] = string; |
| 249 this[_start] = start; | 249 this[_start] = start; |
| 250 super.IterableBase(); | 250 super.IterableBase(); |
| 251 } | 251 } |
| 252 get iterator() { | 252 get iterator() { |
| 253 return new _AllMatchesIterator(this[_re], this[_string], this[_start]); | 253 return new _AllMatchesIterator(this[_re], this[_string], this[_start]); |
| 254 } | 254 } |
| 255 } | 255 } |
| 256 dart.setSignature(_AllMatchesIterable, { | 256 dart.setSignature(_AllMatchesIterable, { |
| 257 constructors: () => ({_AllMatchesIterable: [_AllMatchesIterable, [JSSyntaxRe
gExp, core.String, core.int]]}) | 257 constructors: () => ({_AllMatchesIterable: [_AllMatchesIterable, [JSSyntaxRe
gExp, core.String, core.int]]}) |
| 258 }); | 258 }); |
| 259 dart.defineExtensionMembers(_AllMatchesIterable, ['iterator']); | 259 dart.defineExtensionMembers(_AllMatchesIterable, ['iterator']); |
| 260 let _regExp = Symbol('_regExp'); | 260 const _regExp = Symbol('_regExp'); |
| 261 let _nextIndex = Symbol('_nextIndex'); | 261 const _nextIndex = Symbol('_nextIndex'); |
| 262 let _current = Symbol('_current'); | 262 const _current = Symbol('_current'); |
| 263 class _AllMatchesIterator extends core.Object { | 263 class _AllMatchesIterator extends core.Object { |
| 264 _AllMatchesIterator(regExp, string, nextIndex) { | 264 _AllMatchesIterator(regExp, string, nextIndex) { |
| 265 this[_regExp] = regExp; | 265 this[_regExp] = regExp; |
| 266 this[_string] = string; | 266 this[_string] = string; |
| 267 this[_nextIndex] = nextIndex; | 267 this[_nextIndex] = nextIndex; |
| 268 this[_current] = null; | 268 this[_current] = null; |
| 269 } | 269 } |
| 270 get current() { | 270 get current() { |
| 271 return this[_current]; | 271 return this[_current]; |
| 272 } | 272 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 dart.fn(stringReplaceJS); | 377 dart.fn(stringReplaceJS); |
| 378 function stringReplaceFirstRE(receiver, regexp, to, startIndex) { | 378 function stringReplaceFirstRE(receiver, regexp, to, startIndex) { |
| 379 let match = dart.dsend(regexp, _execGlobal, receiver, startIndex); | 379 let match = dart.dsend(regexp, _execGlobal, receiver, startIndex); |
| 380 if (match == null) | 380 if (match == null) |
| 381 return receiver; | 381 return receiver; |
| 382 let start = dart.dload(match, 'start'); | 382 let start = dart.dload(match, 'start'); |
| 383 let end = dart.dload(match, 'end'); | 383 let end = dart.dload(match, 'end'); |
| 384 return `${dart.dsend(receiver, 'substring', 0, start)}${to}${dart.dsend(rece
iver, 'substring', end)}`; | 384 return `${dart.dsend(receiver, 'substring', 0, start)}${to}${dart.dsend(rece
iver, 'substring', end)}`; |
| 385 } | 385 } |
| 386 dart.fn(stringReplaceFirstRE); | 386 dart.fn(stringReplaceFirstRE); |
| 387 let ESCAPE_REGEXP = '[[\\]{}()*+?.\\\\^$|]'; | 387 const ESCAPE_REGEXP = '[[\\]{}()*+?.\\\\^$|]'; |
| 388 function stringReplaceAllUnchecked(receiver, from, to) { | 388 function stringReplaceAllUnchecked(receiver, from, to) { |
| 389 checkString(to); | 389 checkString(to); |
| 390 if (typeof from == 'string') { | 390 if (typeof from == 'string') { |
| 391 if (dart.equals(from, "")) { | 391 if (dart.equals(from, "")) { |
| 392 if (dart.equals(receiver, "")) { | 392 if (dart.equals(receiver, "")) { |
| 393 return to; | 393 return to; |
| 394 } else { | 394 } else { |
| 395 let result = new core.StringBuffer(); | 395 let result = new core.StringBuffer(); |
| 396 let length = dart.as(dart.dload(receiver, 'length'), core.int); | 396 let length = dart.as(dart.dload(receiver, 'length'), core.int); |
| 397 result.write(to); | 397 result.write(to); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 return dart.is(value, _interceptors.JSArray); | 529 return dart.is(value, _interceptors.JSArray); |
| 530 } | 530 } |
| 531 dart.fn(isJsArray, core.bool, [dart.dynamic]); | 531 dart.fn(isJsArray, core.bool, [dart.dynamic]); |
| 532 class _Patch extends core.Object { | 532 class _Patch extends core.Object { |
| 533 _Patch() { | 533 _Patch() { |
| 534 } | 534 } |
| 535 } | 535 } |
| 536 dart.setSignature(_Patch, { | 536 dart.setSignature(_Patch, { |
| 537 constructors: () => ({_Patch: [_Patch, []]}) | 537 constructors: () => ({_Patch: [_Patch, []]}) |
| 538 }); | 538 }); |
| 539 let patch = dart.const(new _Patch()); | 539 const patch = dart.const(new _Patch()); |
| 540 class InternalMap extends core.Object {} | 540 class InternalMap extends core.Object {} |
| 541 class Primitives extends core.Object { | 541 class Primitives extends core.Object { |
| 542 static initializeStatics(id) { | 542 static initializeStatics(id) { |
| 543 Primitives.mirrorFunctionCacheName = dart.notNull(Primitives.mirrorFunctio
nCacheName) + `_${id}`; | 543 Primitives.mirrorFunctionCacheName = dart.notNull(Primitives.mirrorFunctio
nCacheName) + `_${id}`; |
| 544 Primitives.mirrorInvokeCacheName = dart.notNull(Primitives.mirrorInvokeCac
heName) + `_${id}`; | 544 Primitives.mirrorInvokeCacheName = dart.notNull(Primitives.mirrorInvokeCac
heName) + `_${id}`; |
| 545 } | 545 } |
| 546 static objectHashCode(object) { | 546 static objectHashCode(object) { |
| 547 let hash = dart.as(object.$identityHash, core.int); | 547 let hash = dart.as(object.$identityHash, core.int); |
| 548 if (hash == null) { | 548 if (hash == null) { |
| 549 hash = Math.random() * 0x3fffffff | 0; | 549 hash = Math.random() * 0x3fffffff | 0; |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 } | 914 } |
| 915 dart.fn(checkString); | 915 dart.fn(checkString); |
| 916 function throwRuntimeError(message) { | 916 function throwRuntimeError(message) { |
| 917 dart.throw(new RuntimeError(message)); | 917 dart.throw(new RuntimeError(message)); |
| 918 } | 918 } |
| 919 dart.fn(throwRuntimeError); | 919 dart.fn(throwRuntimeError); |
| 920 function throwAbstractClassInstantiationError(className) { | 920 function throwAbstractClassInstantiationError(className) { |
| 921 dart.throw(new core.AbstractClassInstantiationError(dart.as(className, core.
String))); | 921 dart.throw(new core.AbstractClassInstantiationError(dart.as(className, core.
String))); |
| 922 } | 922 } |
| 923 dart.fn(throwAbstractClassInstantiationError); | 923 dart.fn(throwAbstractClassInstantiationError); |
| 924 let _message = Symbol('_message'); | 924 const _message = Symbol('_message'); |
| 925 let _method = Symbol('_method'); | 925 const _method = Symbol('_method'); |
| 926 class NullError extends core.Error { | 926 class NullError extends core.Error { |
| 927 NullError(message, match) { | 927 NullError(message, match) { |
| 928 this[_message] = message; | 928 this[_message] = message; |
| 929 this[_method] = match == null ? null : dart.as(match.method, core.String); | 929 this[_method] = match == null ? null : dart.as(match.method, core.String); |
| 930 super.Error(); | 930 super.Error(); |
| 931 } | 931 } |
| 932 toString() { | 932 toString() { |
| 933 if (this[_method] == null) | 933 if (this[_method] == null) |
| 934 return `NullError: ${this[_message]}`; | 934 return `NullError: ${this[_message]}`; |
| 935 return `NullError: Cannot call "${this[_method]}" on null`; | 935 return `NullError: Cannot call "${this[_method]}" on null`; |
| 936 } | 936 } |
| 937 } | 937 } |
| 938 NullError[dart.implements] = () => [core.NoSuchMethodError]; | 938 NullError[dart.implements] = () => [core.NoSuchMethodError]; |
| 939 dart.setSignature(NullError, { | 939 dart.setSignature(NullError, { |
| 940 constructors: () => ({NullError: [NullError, [core.String, dart.dynamic]]}) | 940 constructors: () => ({NullError: [NullError, [core.String, dart.dynamic]]}) |
| 941 }); | 941 }); |
| 942 let _receiver = Symbol('_receiver'); | 942 const _receiver = Symbol('_receiver'); |
| 943 class JsNoSuchMethodError extends core.Error { | 943 class JsNoSuchMethodError extends core.Error { |
| 944 JsNoSuchMethodError(message, match) { | 944 JsNoSuchMethodError(message, match) { |
| 945 this[_message] = message; | 945 this[_message] = message; |
| 946 this[_method] = match == null ? null : dart.as(match.method, core.String); | 946 this[_method] = match == null ? null : dart.as(match.method, core.String); |
| 947 this[_receiver] = match == null ? null : dart.as(match.receiver, core.Stri
ng); | 947 this[_receiver] = match == null ? null : dart.as(match.receiver, core.Stri
ng); |
| 948 super.Error(); | 948 super.Error(); |
| 949 } | 949 } |
| 950 toString() { | 950 toString() { |
| 951 if (this[_method] == null) | 951 if (this[_method] == null) |
| 952 return `NoSuchMethodError: ${this[_message]}`; | 952 return `NoSuchMethodError: ${this[_message]}`; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 969 return dart.notNull(this[_message][dartx.isEmpty]) ? 'Error' : `Error: ${t
his[_message]}`; | 969 return dart.notNull(this[_message][dartx.isEmpty]) ? 'Error' : `Error: ${t
his[_message]}`; |
| 970 } | 970 } |
| 971 } | 971 } |
| 972 dart.setSignature(UnknownJsTypeError, { | 972 dart.setSignature(UnknownJsTypeError, { |
| 973 constructors: () => ({UnknownJsTypeError: [UnknownJsTypeError, [core.String]
]}) | 973 constructors: () => ({UnknownJsTypeError: [UnknownJsTypeError, [core.String]
]}) |
| 974 }); | 974 }); |
| 975 function getTraceFromException(exception) { | 975 function getTraceFromException(exception) { |
| 976 return new _StackTrace(exception); | 976 return new _StackTrace(exception); |
| 977 } | 977 } |
| 978 dart.fn(getTraceFromException, core.StackTrace, [dart.dynamic]); | 978 dart.fn(getTraceFromException, core.StackTrace, [dart.dynamic]); |
| 979 let _exception = Symbol('_exception'); | 979 const _exception = Symbol('_exception'); |
| 980 let _trace = Symbol('_trace'); | 980 const _trace = Symbol('_trace'); |
| 981 class _StackTrace extends core.Object { | 981 class _StackTrace extends core.Object { |
| 982 _StackTrace(exception) { | 982 _StackTrace(exception) { |
| 983 this[_exception] = exception; | 983 this[_exception] = exception; |
| 984 this[_trace] = null; | 984 this[_trace] = null; |
| 985 } | 985 } |
| 986 toString() { | 986 toString() { |
| 987 if (this[_trace] != null) | 987 if (this[_trace] != null) |
| 988 return this[_trace]; | 988 return this[_trace]; |
| 989 let trace = null; | 989 let trace = null; |
| 990 if (typeof this[_exception] === "object") { | 990 if (typeof this[_exception] === "object") { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 function random64() { | 1121 function random64() { |
| 1122 let int32a = Math.random() * 0x100000000 >>> 0; | 1122 let int32a = Math.random() * 0x100000000 >>> 0; |
| 1123 let int32b = Math.random() * 0x100000000 >>> 0; | 1123 let int32b = Math.random() * 0x100000000 >>> 0; |
| 1124 return dart.notNull(int32a) + dart.notNull(int32b) * 4294967296; | 1124 return dart.notNull(int32a) + dart.notNull(int32b) * 4294967296; |
| 1125 } | 1125 } |
| 1126 dart.fn(random64, core.int, []); | 1126 dart.fn(random64, core.int, []); |
| 1127 function jsonEncodeNative(string) { | 1127 function jsonEncodeNative(string) { |
| 1128 return JSON.stringify(string); | 1128 return JSON.stringify(string); |
| 1129 } | 1129 } |
| 1130 dart.fn(jsonEncodeNative, core.String, [core.String]); | 1130 dart.fn(jsonEncodeNative, core.String, [core.String]); |
| 1131 let _jsIterator = Symbol('_jsIterator'); | 1131 const _jsIterator = Symbol('_jsIterator'); |
| 1132 let SyncIterator$ = dart.generic(function(E) { | 1132 const SyncIterator$ = dart.generic(function(E) { |
| 1133 class SyncIterator extends core.Object { | 1133 class SyncIterator extends core.Object { |
| 1134 SyncIterator(jsIterator) { | 1134 SyncIterator(jsIterator) { |
| 1135 this[_jsIterator] = jsIterator; | 1135 this[_jsIterator] = jsIterator; |
| 1136 this[_current] = null; | 1136 this[_current] = null; |
| 1137 } | 1137 } |
| 1138 get current() { | 1138 get current() { |
| 1139 return this[_current]; | 1139 return this[_current]; |
| 1140 } | 1140 } |
| 1141 moveNext() { | 1141 moveNext() { |
| 1142 let ret = this[_jsIterator].next(); | 1142 let ret = this[_jsIterator].next(); |
| 1143 this[_current] = dart.as(ret.value, E); | 1143 this[_current] = dart.as(ret.value, E); |
| 1144 return !ret.done; | 1144 return !ret.done; |
| 1145 } | 1145 } |
| 1146 } | 1146 } |
| 1147 SyncIterator[dart.implements] = () => [core.Iterator$(E)]; | 1147 SyncIterator[dart.implements] = () => [core.Iterator$(E)]; |
| 1148 dart.setSignature(SyncIterator, { | 1148 dart.setSignature(SyncIterator, { |
| 1149 constructors: () => ({SyncIterator: [SyncIterator$(E), [dart.dynamic]]}), | 1149 constructors: () => ({SyncIterator: [SyncIterator$(E), [dart.dynamic]]}), |
| 1150 methods: () => ({moveNext: [core.bool, []]}) | 1150 methods: () => ({moveNext: [core.bool, []]}) |
| 1151 }); | 1151 }); |
| 1152 return SyncIterator; | 1152 return SyncIterator; |
| 1153 }); | 1153 }); |
| 1154 let SyncIterator = SyncIterator$(); | 1154 let SyncIterator = SyncIterator$(); |
| 1155 let _generator = Symbol('_generator'); | 1155 const _generator = Symbol('_generator'); |
| 1156 let _args = Symbol('_args'); | 1156 const _args = Symbol('_args'); |
| 1157 let SyncIterable$ = dart.generic(function(E) { | 1157 const SyncIterable$ = dart.generic(function(E) { |
| 1158 class SyncIterable extends collection.IterableBase$(E) { | 1158 class SyncIterable extends collection.IterableBase$(E) { |
| 1159 SyncIterable(generator, args) { | 1159 SyncIterable(generator, args) { |
| 1160 this[_generator] = generator; | 1160 this[_generator] = generator; |
| 1161 this[_args] = args; | 1161 this[_args] = args; |
| 1162 super.IterableBase(); | 1162 super.IterableBase(); |
| 1163 } | 1163 } |
| 1164 [_jsIterator]() { | 1164 [_jsIterator]() { |
| 1165 return this[_generator](...this[_args]); | 1165 return this[_generator](...this[_args]); |
| 1166 } | 1166 } |
| 1167 get iterator() { | 1167 get iterator() { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 exports.CastErrorImplementation = CastErrorImplementation; | 1232 exports.CastErrorImplementation = CastErrorImplementation; |
| 1233 exports.FallThroughErrorImplementation = FallThroughErrorImplementation; | 1233 exports.FallThroughErrorImplementation = FallThroughErrorImplementation; |
| 1234 exports.RuntimeError = RuntimeError; | 1234 exports.RuntimeError = RuntimeError; |
| 1235 exports.random64 = random64; | 1235 exports.random64 = random64; |
| 1236 exports.jsonEncodeNative = jsonEncodeNative; | 1236 exports.jsonEncodeNative = jsonEncodeNative; |
| 1237 exports.SyncIterator$ = SyncIterator$; | 1237 exports.SyncIterator$ = SyncIterator$; |
| 1238 exports.SyncIterator = SyncIterator; | 1238 exports.SyncIterator = SyncIterator; |
| 1239 exports.SyncIterable$ = SyncIterable$; | 1239 exports.SyncIterable$ = SyncIterable$; |
| 1240 exports.SyncIterable = SyncIterable; | 1240 exports.SyncIterable = SyncIterable; |
| 1241 }); | 1241 }); |
| OLD | NEW |