OLD | NEW |
1 dart_library.library('dart/convert', null, /* Imports */[ | 1 dart_library.library('dart/convert', null, /* Imports */[ |
2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
3 'dart/core', | 3 'dart/core', |
4 'dart/async', | 4 'dart/async', |
5 'dart/typed_data', | 5 'dart/typed_data', |
6 'dart/_internal', | 6 'dart/_internal', |
7 'dart/collection' | 7 'dart/collection' |
8 ], /* Lazy imports */[ | 8 ], /* Lazy imports */[ |
9 ], function(exports, dart, core, async, typed_data, _internal, collection) { | 9 ], function(exports, dart, core, async, typed_data, _internal, collection) { |
10 'use strict'; | 10 'use strict'; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 fuse(other) { | 103 fuse(other) { |
104 dart.as(other, Converter$(T, dart.dynamic)); | 104 dart.as(other, Converter$(T, dart.dynamic)); |
105 return new (_FusedConverter$(S, T, dart.dynamic))(this, other); | 105 return new (_FusedConverter$(S, T, dart.dynamic))(this, other); |
106 } | 106 } |
107 startChunkedConversion(sink) { | 107 startChunkedConversion(sink) { |
108 dart.as(sink, core.Sink$(T)); | 108 dart.as(sink, core.Sink$(T)); |
109 dart.throw(new core.UnsupportedError(`This converter does not support ch
unked conversions: ${this}`)); | 109 dart.throw(new core.UnsupportedError(`This converter does not support ch
unked conversions: ${this}`)); |
110 } | 110 } |
111 bind(source) { | 111 bind(source) { |
112 dart.as(source, async.Stream$(S)); | 112 dart.as(source, async.Stream$(S)); |
113 return async.Stream$(T).eventTransformed(source, dart.fn(sink => new _Co
nverterStreamEventSink(this, sink), _ConverterStreamEventSink, [async.EventSink]
)); | 113 return async.Stream$(T).eventTransformed(source, dart.fn((sink => new _C
onverterStreamEventSink(this, sink)).bind(this), _ConverterStreamEventSink, [asy
nc.EventSink])); |
114 } | 114 } |
115 } | 115 } |
116 Converter[dart.implements] = () => [async.StreamTransformer$(S, T)]; | 116 Converter[dart.implements] = () => [async.StreamTransformer$(S, T)]; |
117 dart.setSignature(Converter, { | 117 dart.setSignature(Converter, { |
118 constructors: () => ({Converter: [Converter$(S, T), []]}), | 118 constructors: () => ({Converter: [Converter$(S, T), []]}), |
119 methods: () => ({ | 119 methods: () => ({ |
120 fuse: [Converter$(S, dart.dynamic), [Converter$(T, dart.dynamic)]], | 120 fuse: [Converter$(S, dart.dynamic), [Converter$(T, dart.dynamic)]], |
121 startChunkedConversion: [ChunkedConversionSink, [core.Sink$(T)]], | 121 startChunkedConversion: [ChunkedConversionSink, [core.Sink$(T)]], |
122 bind: [async.Stream$(T), [async.Stream$(S)]] | 122 bind: [async.Stream$(T), [async.Stream$(S)]] |
123 }) | 123 }) |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 for (let i = 1; dart.notNull(i) < dart.notNull(list[dartx.length]); i =
dart.notNull(i) + 1) { | 1246 for (let i = 1; dart.notNull(i) < dart.notNull(list[dartx.length]); i =
dart.notNull(i) + 1) { |
1247 this.writeString(','); | 1247 this.writeString(','); |
1248 this.writeObject(list[dartx.get](i)); | 1248 this.writeObject(list[dartx.get](i)); |
1249 } | 1249 } |
1250 } | 1250 } |
1251 this.writeString(']'); | 1251 this.writeString(']'); |
1252 } | 1252 } |
1253 writeMap(map) { | 1253 writeMap(map) { |
1254 this.writeString('{'); | 1254 this.writeString('{'); |
1255 let separator = '"'; | 1255 let separator = '"'; |
1256 map.forEach(dart.fn((key, value) => { | 1256 map.forEach(dart.fn(((key, value) => { |
1257 this.writeString(separator); | 1257 this.writeString(separator); |
1258 separator = ',"'; | 1258 separator = ',"'; |
1259 this.writeStringContent(key); | 1259 this.writeStringContent(key); |
1260 this.writeString('":'); | 1260 this.writeString('":'); |
1261 this.writeObject(value); | 1261 this.writeObject(value); |
1262 }, dart.dynamic, [core.String, dart.dynamic])); | 1262 }).bind(this), dart.dynamic, [core.String, dart.dynamic])); |
1263 this.writeString('}'); | 1263 this.writeString('}'); |
1264 } | 1264 } |
1265 } | 1265 } |
1266 dart.setSignature(_JsonStringifier, { | 1266 dart.setSignature(_JsonStringifier, { |
1267 constructors: () => ({_JsonStringifier: [_JsonStringifier, [dart.functionTyp
e(core.Object, [core.Object])]]}), | 1267 constructors: () => ({_JsonStringifier: [_JsonStringifier, [dart.functionTyp
e(core.Object, [core.Object])]]}), |
1268 methods: () => ({ | 1268 methods: () => ({ |
1269 writeStringContent: [dart.void, [core.String]], | 1269 writeStringContent: [dart.void, [core.String]], |
1270 [_checkCycle]: [dart.void, [dart.dynamic]], | 1270 [_checkCycle]: [dart.void, [dart.dynamic]], |
1271 [_removeSeen]: [dart.void, [dart.dynamic]], | 1271 [_removeSeen]: [dart.void, [dart.dynamic]], |
1272 writeObject: [dart.void, [dart.dynamic]], | 1272 writeObject: [dart.void, [dart.dynamic]], |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 this.writeString(']'); | 1315 this.writeString(']'); |
1316 } | 1316 } |
1317 } | 1317 } |
1318 writeMap(map) { | 1318 writeMap(map) { |
1319 if (dart.notNull(map.isEmpty)) { | 1319 if (dart.notNull(map.isEmpty)) { |
1320 this.writeString('{}'); | 1320 this.writeString('{}'); |
1321 } else { | 1321 } else { |
1322 this.writeString('{\n'); | 1322 this.writeString('{\n'); |
1323 this[_indentLevel] = dart.notNull(this[_indentLevel]) + 1; | 1323 this[_indentLevel] = dart.notNull(this[_indentLevel]) + 1; |
1324 let first = true; | 1324 let first = true; |
1325 map.forEach(dart.fn((key, value) => { | 1325 map.forEach(dart.fn(((key, value) => { |
1326 if (!dart.notNull(first)) { | 1326 if (!dart.notNull(first)) { |
1327 this.writeString(",\n"); | 1327 this.writeString(",\n"); |
1328 } | 1328 } |
1329 this.writeIndentation(this[_indentLevel]); | 1329 this.writeIndentation(this[_indentLevel]); |
1330 this.writeString('"'); | 1330 this.writeString('"'); |
1331 this.writeStringContent(key); | 1331 this.writeStringContent(key); |
1332 this.writeString('": '); | 1332 this.writeString('": '); |
1333 this.writeObject(value); | 1333 this.writeObject(value); |
1334 first = false; | 1334 first = false; |
1335 }, dart.dynamic, [core.String, core.Object])); | 1335 }).bind(this), dart.dynamic, [core.String, core.Object])); |
1336 this.writeString('\n'); | 1336 this.writeString('\n'); |
1337 this[_indentLevel] = dart.notNull(this[_indentLevel]) - 1; | 1337 this[_indentLevel] = dart.notNull(this[_indentLevel]) - 1; |
1338 this.writeIndentation(this[_indentLevel]); | 1338 this.writeIndentation(this[_indentLevel]); |
1339 this.writeString('}'); | 1339 this.writeString('}'); |
1340 } | 1340 } |
1341 } | 1341 } |
1342 } | 1342 } |
1343 _JsonPrettyPrintMixin[dart.implements] = () => [_JsonStringifier]; | 1343 _JsonPrettyPrintMixin[dart.implements] = () => [_JsonStringifier]; |
1344 dart.setSignature(_JsonPrettyPrintMixin, { | 1344 dart.setSignature(_JsonPrettyPrintMixin, { |
1345 methods: () => ({ | 1345 methods: () => ({ |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1496 dart.assert(dart.notNull(byte) <= 255); | 1496 dart.assert(dart.notNull(byte) <= 255); |
1497 if (this.index == this.buffer.length) { | 1497 if (this.index == this.buffer.length) { |
1498 dart.dcall(this.addChunk, this.buffer, 0, this.index); | 1498 dart.dcall(this.addChunk, this.buffer, 0, this.index); |
1499 this.buffer = typed_data.Uint8List.new(this.bufferSize); | 1499 this.buffer = typed_data.Uint8List.new(this.bufferSize); |
1500 this.index = 0; | 1500 this.index = 0; |
1501 } | 1501 } |
1502 this.buffer.set((() => { | 1502 this.buffer.set((() => { |
1503 let x = this.index; | 1503 let x = this.index; |
1504 this.index = dart.notNull(x) + 1; | 1504 this.index = dart.notNull(x) + 1; |
1505 return x; | 1505 return x; |
1506 })(), byte); | 1506 }).bind(this)(), byte); |
1507 } | 1507 } |
1508 } | 1508 } |
1509 dart.setSignature(_JsonUtf8Stringifier, { | 1509 dart.setSignature(_JsonUtf8Stringifier, { |
1510 constructors: () => ({_JsonUtf8Stringifier: [_JsonUtf8Stringifier, [dart.dyn
amic, core.int, core.Function]]}), | 1510 constructors: () => ({_JsonUtf8Stringifier: [_JsonUtf8Stringifier, [dart.dyn
amic, core.int, core.Function]]}), |
1511 methods: () => ({ | 1511 methods: () => ({ |
1512 flush: [dart.void, []], | 1512 flush: [dart.void, []], |
1513 writeNumber: [dart.void, [core.num]], | 1513 writeNumber: [dart.void, [core.num]], |
1514 writeAsciiString: [dart.void, [core.String]], | 1514 writeAsciiString: [dart.void, [core.String]], |
1515 writeString: [dart.void, [core.String]], | 1515 writeString: [dart.void, [core.String]], |
1516 writeStringSlice: [dart.void, [core.String, core.int, core.int]], | 1516 writeStringSlice: [dart.void, [core.String, core.int, core.int]], |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2156 } | 2156 } |
2157 [_writeSurrogate](leadingSurrogate, nextCodeUnit) { | 2157 [_writeSurrogate](leadingSurrogate, nextCodeUnit) { |
2158 if (dart.notNull(_isTailSurrogate(nextCodeUnit))) { | 2158 if (dart.notNull(_isTailSurrogate(nextCodeUnit))) { |
2159 let rune = _combineSurrogatePair(leadingSurrogate, nextCodeUnit); | 2159 let rune = _combineSurrogatePair(leadingSurrogate, nextCodeUnit); |
2160 dart.assert(dart.notNull(rune) > dart.notNull(_THREE_BYTE_LIMIT)); | 2160 dart.assert(dart.notNull(rune) > dart.notNull(_THREE_BYTE_LIMIT)); |
2161 dart.assert(dart.notNull(rune) <= dart.notNull(_FOUR_BYTE_LIMIT)); | 2161 dart.assert(dart.notNull(rune) <= dart.notNull(_FOUR_BYTE_LIMIT)); |
2162 this[_buffer][dartx.set]((() => { | 2162 this[_buffer][dartx.set]((() => { |
2163 let x = this[_bufferIndex]; | 2163 let x = this[_bufferIndex]; |
2164 this[_bufferIndex] = dart.notNull(x) + 1; | 2164 this[_bufferIndex] = dart.notNull(x) + 1; |
2165 return x; | 2165 return x; |
2166 })(), 240 | dart.notNull(rune) >> 18); | 2166 }).bind(this)(), 240 | dart.notNull(rune) >> 18); |
2167 this[_buffer][dartx.set]((() => { | 2167 this[_buffer][dartx.set]((() => { |
2168 let x = this[_bufferIndex]; | 2168 let x = this[_bufferIndex]; |
2169 this[_bufferIndex] = dart.notNull(x) + 1; | 2169 this[_bufferIndex] = dart.notNull(x) + 1; |
2170 return x; | 2170 return x; |
2171 })(), 128 | dart.notNull(rune) >> 12 & 63); | 2171 }).bind(this)(), 128 | dart.notNull(rune) >> 12 & 63); |
2172 this[_buffer][dartx.set]((() => { | 2172 this[_buffer][dartx.set]((() => { |
2173 let x = this[_bufferIndex]; | 2173 let x = this[_bufferIndex]; |
2174 this[_bufferIndex] = dart.notNull(x) + 1; | 2174 this[_bufferIndex] = dart.notNull(x) + 1; |
2175 return x; | 2175 return x; |
2176 })(), 128 | dart.notNull(rune) >> 6 & 63); | 2176 }).bind(this)(), 128 | dart.notNull(rune) >> 6 & 63); |
2177 this[_buffer][dartx.set]((() => { | 2177 this[_buffer][dartx.set]((() => { |
2178 let x = this[_bufferIndex]; | 2178 let x = this[_bufferIndex]; |
2179 this[_bufferIndex] = dart.notNull(x) + 1; | 2179 this[_bufferIndex] = dart.notNull(x) + 1; |
2180 return x; | 2180 return x; |
2181 })(), 128 | dart.notNull(rune) & 63); | 2181 }).bind(this)(), 128 | dart.notNull(rune) & 63); |
2182 return true; | 2182 return true; |
2183 } else { | 2183 } else { |
2184 this[_buffer][dartx.set]((() => { | 2184 this[_buffer][dartx.set]((() => { |
2185 let x = this[_bufferIndex]; | 2185 let x = this[_bufferIndex]; |
2186 this[_bufferIndex] = dart.notNull(x) + 1; | 2186 this[_bufferIndex] = dart.notNull(x) + 1; |
2187 return x; | 2187 return x; |
2188 })(), 224 | dart.notNull(leadingSurrogate) >> 12); | 2188 }).bind(this)(), 224 | dart.notNull(leadingSurrogate) >> 12); |
2189 this[_buffer][dartx.set]((() => { | 2189 this[_buffer][dartx.set]((() => { |
2190 let x = this[_bufferIndex]; | 2190 let x = this[_bufferIndex]; |
2191 this[_bufferIndex] = dart.notNull(x) + 1; | 2191 this[_bufferIndex] = dart.notNull(x) + 1; |
2192 return x; | 2192 return x; |
2193 })(), 128 | dart.notNull(leadingSurrogate) >> 6 & 63); | 2193 }).bind(this)(), 128 | dart.notNull(leadingSurrogate) >> 6 & 63); |
2194 this[_buffer][dartx.set]((() => { | 2194 this[_buffer][dartx.set]((() => { |
2195 let x = this[_bufferIndex]; | 2195 let x = this[_bufferIndex]; |
2196 this[_bufferIndex] = dart.notNull(x) + 1; | 2196 this[_bufferIndex] = dart.notNull(x) + 1; |
2197 return x; | 2197 return x; |
2198 })(), 128 | dart.notNull(leadingSurrogate) & 63); | 2198 }).bind(this)(), 128 | dart.notNull(leadingSurrogate) & 63); |
2199 return false; | 2199 return false; |
2200 } | 2200 } |
2201 } | 2201 } |
2202 [_fillBuffer](str, start, end) { | 2202 [_fillBuffer](str, start, end) { |
2203 if (start != end && dart.notNull(_isLeadSurrogate(str[dartx.codeUnitAt](da
rt.notNull(end) - 1)))) { | 2203 if (start != end && dart.notNull(_isLeadSurrogate(str[dartx.codeUnitAt](da
rt.notNull(end) - 1)))) { |
2204 end = dart.notNull(end) - 1; | 2204 end = dart.notNull(end) - 1; |
2205 } | 2205 } |
2206 let stringIndex = null; | 2206 let stringIndex = null; |
2207 for (stringIndex = start; dart.notNull(stringIndex) < dart.notNull(end); s
tringIndex = dart.notNull(stringIndex) + 1) { | 2207 for (stringIndex = start; dart.notNull(stringIndex) < dart.notNull(end); s
tringIndex = dart.notNull(stringIndex) + 1) { |
2208 let codeUnit = str[dartx.codeUnitAt](stringIndex); | 2208 let codeUnit = str[dartx.codeUnitAt](stringIndex); |
2209 if (dart.notNull(codeUnit) <= dart.notNull(_ONE_BYTE_LIMIT)) { | 2209 if (dart.notNull(codeUnit) <= dart.notNull(_ONE_BYTE_LIMIT)) { |
2210 if (dart.notNull(this[_bufferIndex]) >= dart.notNull(this[_buffer][dar
tx.length])) | 2210 if (dart.notNull(this[_bufferIndex]) >= dart.notNull(this[_buffer][dar
tx.length])) |
2211 break; | 2211 break; |
2212 this[_buffer][dartx.set]((() => { | 2212 this[_buffer][dartx.set]((() => { |
2213 let x = this[_bufferIndex]; | 2213 let x = this[_bufferIndex]; |
2214 this[_bufferIndex] = dart.notNull(x) + 1; | 2214 this[_bufferIndex] = dart.notNull(x) + 1; |
2215 return x; | 2215 return x; |
2216 })(), codeUnit); | 2216 }).bind(this)(), codeUnit); |
2217 } else if (dart.notNull(_isLeadSurrogate(codeUnit))) { | 2217 } else if (dart.notNull(_isLeadSurrogate(codeUnit))) { |
2218 if (dart.notNull(this[_bufferIndex]) + 3 >= dart.notNull(this[_buffer]
[dartx.length])) | 2218 if (dart.notNull(this[_bufferIndex]) + 3 >= dart.notNull(this[_buffer]
[dartx.length])) |
2219 break; | 2219 break; |
2220 let nextCodeUnit = str[dartx.codeUnitAt](dart.notNull(stringIndex) + 1
); | 2220 let nextCodeUnit = str[dartx.codeUnitAt](dart.notNull(stringIndex) + 1
); |
2221 let wasCombined = this[_writeSurrogate](codeUnit, nextCodeUnit); | 2221 let wasCombined = this[_writeSurrogate](codeUnit, nextCodeUnit); |
2222 if (dart.notNull(wasCombined)) { | 2222 if (dart.notNull(wasCombined)) { |
2223 stringIndex = dart.notNull(stringIndex) + 1; | 2223 stringIndex = dart.notNull(stringIndex) + 1; |
2224 } | 2224 } |
2225 } else { | 2225 } else { |
2226 let rune = codeUnit; | 2226 let rune = codeUnit; |
2227 if (dart.notNull(rune) <= dart.notNull(_TWO_BYTE_LIMIT)) { | 2227 if (dart.notNull(rune) <= dart.notNull(_TWO_BYTE_LIMIT)) { |
2228 if (dart.notNull(this[_bufferIndex]) + 1 >= dart.notNull(this[_buffe
r][dartx.length])) | 2228 if (dart.notNull(this[_bufferIndex]) + 1 >= dart.notNull(this[_buffe
r][dartx.length])) |
2229 break; | 2229 break; |
2230 this[_buffer][dartx.set]((() => { | 2230 this[_buffer][dartx.set]((() => { |
2231 let x = this[_bufferIndex]; | 2231 let x = this[_bufferIndex]; |
2232 this[_bufferIndex] = dart.notNull(x) + 1; | 2232 this[_bufferIndex] = dart.notNull(x) + 1; |
2233 return x; | 2233 return x; |
2234 })(), 192 | dart.notNull(rune) >> 6); | 2234 }).bind(this)(), 192 | dart.notNull(rune) >> 6); |
2235 this[_buffer][dartx.set]((() => { | 2235 this[_buffer][dartx.set]((() => { |
2236 let x = this[_bufferIndex]; | 2236 let x = this[_bufferIndex]; |
2237 this[_bufferIndex] = dart.notNull(x) + 1; | 2237 this[_bufferIndex] = dart.notNull(x) + 1; |
2238 return x; | 2238 return x; |
2239 })(), 128 | dart.notNull(rune) & 63); | 2239 }).bind(this)(), 128 | dart.notNull(rune) & 63); |
2240 } else { | 2240 } else { |
2241 dart.assert(dart.notNull(rune) <= dart.notNull(_THREE_BYTE_LIMIT)); | 2241 dart.assert(dart.notNull(rune) <= dart.notNull(_THREE_BYTE_LIMIT)); |
2242 if (dart.notNull(this[_bufferIndex]) + 2 >= dart.notNull(this[_buffe
r][dartx.length])) | 2242 if (dart.notNull(this[_bufferIndex]) + 2 >= dart.notNull(this[_buffe
r][dartx.length])) |
2243 break; | 2243 break; |
2244 this[_buffer][dartx.set]((() => { | 2244 this[_buffer][dartx.set]((() => { |
2245 let x = this[_bufferIndex]; | 2245 let x = this[_bufferIndex]; |
2246 this[_bufferIndex] = dart.notNull(x) + 1; | 2246 this[_bufferIndex] = dart.notNull(x) + 1; |
2247 return x; | 2247 return x; |
2248 })(), 224 | dart.notNull(rune) >> 12); | 2248 }).bind(this)(), 224 | dart.notNull(rune) >> 12); |
2249 this[_buffer][dartx.set]((() => { | 2249 this[_buffer][dartx.set]((() => { |
2250 let x = this[_bufferIndex]; | 2250 let x = this[_bufferIndex]; |
2251 this[_bufferIndex] = dart.notNull(x) + 1; | 2251 this[_bufferIndex] = dart.notNull(x) + 1; |
2252 return x; | 2252 return x; |
2253 })(), 128 | dart.notNull(rune) >> 6 & 63); | 2253 }).bind(this)(), 128 | dart.notNull(rune) >> 6 & 63); |
2254 this[_buffer][dartx.set]((() => { | 2254 this[_buffer][dartx.set]((() => { |
2255 let x = this[_bufferIndex]; | 2255 let x = this[_bufferIndex]; |
2256 this[_bufferIndex] = dart.notNull(x) + 1; | 2256 this[_bufferIndex] = dart.notNull(x) + 1; |
2257 return x; | 2257 return x; |
2258 })(), 128 | dart.notNull(rune) & 63); | 2258 }).bind(this)(), 128 | dart.notNull(rune) & 63); |
2259 } | 2259 } |
2260 } | 2260 } |
2261 } | 2261 } |
2262 return stringIndex; | 2262 return stringIndex; |
2263 } | 2263 } |
2264 } | 2264 } |
2265 dart.defineNamedConstructor(_Utf8Encoder, 'withBufferSize'); | 2265 dart.defineNamedConstructor(_Utf8Encoder, 'withBufferSize'); |
2266 dart.setSignature(_Utf8Encoder, { | 2266 dart.setSignature(_Utf8Encoder, { |
2267 constructors: () => ({ | 2267 constructors: () => ({ |
2268 _Utf8Encoder: [_Utf8Encoder, []], | 2268 _Utf8Encoder: [_Utf8Encoder, []], |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2643 return dart.notNull(this.length) > 0; | 2643 return dart.notNull(this.length) > 0; |
2644 } | 2644 } |
2645 get keys() { | 2645 get keys() { |
2646 if (dart.notNull(this[_isUpgraded])) | 2646 if (dart.notNull(this[_isUpgraded])) |
2647 return this[_upgradedMap].keys; | 2647 return this[_upgradedMap].keys; |
2648 return new _JsonMapKeyIterable(this); | 2648 return new _JsonMapKeyIterable(this); |
2649 } | 2649 } |
2650 get values() { | 2650 get values() { |
2651 if (dart.notNull(this[_isUpgraded])) | 2651 if (dart.notNull(this[_isUpgraded])) |
2652 return this[_upgradedMap].values; | 2652 return this[_upgradedMap].values; |
2653 return _internal.MappedIterable.new(this[_computeKeys](), dart.fn(each =>
this.get(each))); | 2653 return _internal.MappedIterable.new(this[_computeKeys](), dart.fn((each =>
this.get(each)).bind(this))); |
2654 } | 2654 } |
2655 set(key, value) { | 2655 set(key, value) { |
2656 if (dart.notNull(this[_isUpgraded])) { | 2656 if (dart.notNull(this[_isUpgraded])) { |
2657 this[_upgradedMap].set(key, value); | 2657 this[_upgradedMap].set(key, value); |
2658 } else if (dart.notNull(this.containsKey(key))) { | 2658 } else if (dart.notNull(this.containsKey(key))) { |
2659 let processed = this[_processed]; | 2659 let processed = this[_processed]; |
2660 _JsonMap._setProperty(processed, dart.as(key, core.String), value); | 2660 _JsonMap._setProperty(processed, dart.as(key, core.String), value); |
2661 let original = this[_original]; | 2661 let original = this[_original]; |
2662 if (!dart.notNull(core.identical(original, processed))) { | 2662 if (!dart.notNull(core.identical(original, processed))) { |
2663 _JsonMap._setProperty(original, dart.as(key, core.String), null); | 2663 _JsonMap._setProperty(original, dart.as(key, core.String), null); |
2664 } | 2664 } |
2665 } else { | 2665 } else { |
2666 this[_upgrade]().set(key, value); | 2666 this[_upgrade]().set(key, value); |
2667 } | 2667 } |
2668 } | 2668 } |
2669 addAll(other) { | 2669 addAll(other) { |
2670 other.forEach(dart.fn((key, value) => { | 2670 other.forEach(dart.fn(((key, value) => { |
2671 this.set(key, value); | 2671 this.set(key, value); |
2672 })); | 2672 }).bind(this))); |
2673 } | 2673 } |
2674 containsValue(value) { | 2674 containsValue(value) { |
2675 if (dart.notNull(this[_isUpgraded])) | 2675 if (dart.notNull(this[_isUpgraded])) |
2676 return this[_upgradedMap].containsValue(value); | 2676 return this[_upgradedMap].containsValue(value); |
2677 let keys = this[_computeKeys](); | 2677 let keys = this[_computeKeys](); |
2678 for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = da
rt.notNull(i) + 1) { | 2678 for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = da
rt.notNull(i) + 1) { |
2679 let key = keys[dartx.get](i); | 2679 let key = keys[dartx.get](i); |
2680 if (dart.equals(this.get(key), value)) | 2680 if (dart.equals(this.get(key), value)) |
2681 return true; | 2681 return true; |
2682 } | 2682 } |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2894 exports.LineSplitter = LineSplitter; | 2894 exports.LineSplitter = LineSplitter; |
2895 exports.StringConversionSink = StringConversionSink; | 2895 exports.StringConversionSink = StringConversionSink; |
2896 exports.ClosableStringSink = ClosableStringSink; | 2896 exports.ClosableStringSink = ClosableStringSink; |
2897 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; | 2897 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; |
2898 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; | 2898 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; |
2899 exports.Utf8Codec = Utf8Codec; | 2899 exports.Utf8Codec = Utf8Codec; |
2900 exports.UTF8 = UTF8; | 2900 exports.UTF8 = UTF8; |
2901 exports.Utf8Encoder = Utf8Encoder; | 2901 exports.Utf8Encoder = Utf8Encoder; |
2902 exports.Utf8Decoder = Utf8Decoder; | 2902 exports.Utf8Decoder = Utf8Decoder; |
2903 }); | 2903 }); |
OLD | NEW |