Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: lib/runtime/dart/convert.js

Issue 1643523008: fix #43, remove => workaround (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/html.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('dart/convert', null, /* Imports */[ 1 dart_library.library('dart/convert', null, /* Imports */[
2 'dart/_runtime', 2 'dart/_runtime',
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 fuse(other) { 107 fuse(other) {
108 dart.as(other, Converter$(T, dart.dynamic)); 108 dart.as(other, Converter$(T, dart.dynamic));
109 return new (_FusedConverter$(S, T, dart.dynamic))(this, other); 109 return new (_FusedConverter$(S, T, dart.dynamic))(this, other);
110 } 110 }
111 startChunkedConversion(sink) { 111 startChunkedConversion(sink) {
112 dart.as(sink, core.Sink$(T)); 112 dart.as(sink, core.Sink$(T));
113 dart.throw(new core.UnsupportedError(`This converter does not support ch unked conversions: ${this}`)); 113 dart.throw(new core.UnsupportedError(`This converter does not support ch unked conversions: ${this}`));
114 } 114 }
115 bind(source) { 115 bind(source) {
116 dart.as(source, async.Stream$(S)); 116 dart.as(source, async.Stream$(S));
117 return async.Stream$(T).eventTransformed(source, dart.fn((sink => new _C onverterStreamEventSink(this, sink)).bind(this), _ConverterStreamEventSink, [asy nc.EventSink])); 117 return async.Stream$(T).eventTransformed(source, dart.fn(sink => new _Co nverterStreamEventSink(this, sink), _ConverterStreamEventSink, [async.EventSink] ));
118 } 118 }
119 } 119 }
120 Converter[dart.implements] = () => [async.StreamTransformer$(S, T)]; 120 Converter[dart.implements] = () => [async.StreamTransformer$(S, T)];
121 dart.setSignature(Converter, { 121 dart.setSignature(Converter, {
122 constructors: () => ({Converter: [Converter$(S, T), []]}), 122 constructors: () => ({Converter: [Converter$(S, T), []]}),
123 methods: () => ({ 123 methods: () => ({
124 fuse: [Converter$(S, dart.dynamic), [Converter$(T, dart.dynamic)]], 124 fuse: [Converter$(S, dart.dynamic), [Converter$(T, dart.dynamic)]],
125 startChunkedConversion: [ChunkedConversionSink, [core.Sink$(T)]], 125 startChunkedConversion: [ChunkedConversionSink, [core.Sink$(T)]],
126 bind: [async.Stream$(T), [async.Stream$(S)]] 126 bind: [async.Stream$(T), [async.Stream$(S)]]
127 }) 127 })
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 for (let i = 1; i < dart.notNull(list[dartx.length]); i++) { 1211 for (let i = 1; i < dart.notNull(list[dartx.length]); i++) {
1212 this.writeString(','); 1212 this.writeString(',');
1213 this.writeObject(list[dartx.get](i)); 1213 this.writeObject(list[dartx.get](i));
1214 } 1214 }
1215 } 1215 }
1216 this.writeString(']'); 1216 this.writeString(']');
1217 } 1217 }
1218 writeMap(map) { 1218 writeMap(map) {
1219 this.writeString('{'); 1219 this.writeString('{');
1220 let separator = '"'; 1220 let separator = '"';
1221 map.forEach(dart.fn(((key, value) => { 1221 map.forEach(dart.fn((key, value) => {
1222 this.writeString(separator); 1222 this.writeString(separator);
1223 separator = ',"'; 1223 separator = ',"';
1224 this.writeStringContent(key); 1224 this.writeStringContent(key);
1225 this.writeString('":'); 1225 this.writeString('":');
1226 this.writeObject(value); 1226 this.writeObject(value);
1227 }).bind(this), dart.void, [core.String, core.Object])); 1227 }, dart.void, [core.String, core.Object]));
1228 this.writeString('}'); 1228 this.writeString('}');
1229 } 1229 }
1230 } 1230 }
1231 dart.setSignature(_JsonStringifier, { 1231 dart.setSignature(_JsonStringifier, {
1232 constructors: () => ({_JsonStringifier: [_JsonStringifier, [dart.functionTyp e(core.Object, [core.Object])]]}), 1232 constructors: () => ({_JsonStringifier: [_JsonStringifier, [dart.functionTyp e(core.Object, [core.Object])]]}),
1233 methods: () => ({ 1233 methods: () => ({
1234 writeStringContent: [dart.void, [core.String]], 1234 writeStringContent: [dart.void, [core.String]],
1235 [_checkCycle]: [dart.void, [dart.dynamic]], 1235 [_checkCycle]: [dart.void, [dart.dynamic]],
1236 [_removeSeen]: [dart.void, [dart.dynamic]], 1236 [_removeSeen]: [dart.void, [dart.dynamic]],
1237 writeObject: [dart.void, [dart.dynamic]], 1237 writeObject: [dart.void, [dart.dynamic]],
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 this.writeString(']'); 1280 this.writeString(']');
1281 } 1281 }
1282 } 1282 }
1283 writeMap(map) { 1283 writeMap(map) {
1284 if (dart.notNull(map.isEmpty)) { 1284 if (dart.notNull(map.isEmpty)) {
1285 this.writeString('{}'); 1285 this.writeString('{}');
1286 } else { 1286 } else {
1287 this.writeString('{\n'); 1287 this.writeString('{\n');
1288 this[_indentLevel] = dart.notNull(this[_indentLevel]) + 1; 1288 this[_indentLevel] = dart.notNull(this[_indentLevel]) + 1;
1289 let first = true; 1289 let first = true;
1290 map.forEach(dart.fn(((key, value) => { 1290 map.forEach(dart.fn((key, value) => {
1291 if (!first) { 1291 if (!first) {
1292 this.writeString(",\n"); 1292 this.writeString(",\n");
1293 } 1293 }
1294 this.writeIndentation(this[_indentLevel]); 1294 this.writeIndentation(this[_indentLevel]);
1295 this.writeString('"'); 1295 this.writeString('"');
1296 this.writeStringContent(key); 1296 this.writeStringContent(key);
1297 this.writeString('": '); 1297 this.writeString('": ');
1298 this.writeObject(value); 1298 this.writeObject(value);
1299 first = false; 1299 first = false;
1300 }).bind(this), dart.void, [core.String, core.Object])); 1300 }, dart.void, [core.String, core.Object]));
1301 this.writeString('\n'); 1301 this.writeString('\n');
1302 this[_indentLevel] = dart.notNull(this[_indentLevel]) - 1; 1302 this[_indentLevel] = dart.notNull(this[_indentLevel]) - 1;
1303 this.writeIndentation(this[_indentLevel]); 1303 this.writeIndentation(this[_indentLevel]);
1304 this.writeString('}'); 1304 this.writeString('}');
1305 } 1305 }
1306 } 1306 }
1307 } 1307 }
1308 _JsonPrettyPrintMixin[dart.implements] = () => [_JsonStringifier]; 1308 _JsonPrettyPrintMixin[dart.implements] = () => [_JsonStringifier];
1309 dart.setSignature(_JsonPrettyPrintMixin, { 1309 dart.setSignature(_JsonPrettyPrintMixin, {
1310 methods: () => ({ 1310 methods: () => ({
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 dart.assert(dart.notNull(byte) <= 255); 1461 dart.assert(dart.notNull(byte) <= 255);
1462 if (this.index == this.buffer.length) { 1462 if (this.index == this.buffer.length) {
1463 dart.dcall(this.addChunk, this.buffer, 0, this.index); 1463 dart.dcall(this.addChunk, this.buffer, 0, this.index);
1464 this.buffer = typed_data.Uint8List.new(this.bufferSize); 1464 this.buffer = typed_data.Uint8List.new(this.bufferSize);
1465 this.index = 0; 1465 this.index = 0;
1466 } 1466 }
1467 this.buffer.set((() => { 1467 this.buffer.set((() => {
1468 let x = this.index; 1468 let x = this.index;
1469 this.index = dart.notNull(x) + 1; 1469 this.index = dart.notNull(x) + 1;
1470 return x; 1470 return x;
1471 }).bind(this)(), byte); 1471 })(), byte);
1472 } 1472 }
1473 } 1473 }
1474 dart.setSignature(_JsonUtf8Stringifier, { 1474 dart.setSignature(_JsonUtf8Stringifier, {
1475 constructors: () => ({_JsonUtf8Stringifier: [_JsonUtf8Stringifier, [dart.dyn amic, core.int, core.Function]]}), 1475 constructors: () => ({_JsonUtf8Stringifier: [_JsonUtf8Stringifier, [dart.dyn amic, core.int, core.Function]]}),
1476 methods: () => ({ 1476 methods: () => ({
1477 flush: [dart.void, []], 1477 flush: [dart.void, []],
1478 writeNumber: [dart.void, [core.num]], 1478 writeNumber: [dart.void, [core.num]],
1479 writeAsciiString: [dart.void, [core.String]], 1479 writeAsciiString: [dart.void, [core.String]],
1480 writeString: [dart.void, [core.String]], 1480 writeString: [dart.void, [core.String]],
1481 writeStringSlice: [dart.void, [core.String, core.int, core.int]], 1481 writeStringSlice: [dart.void, [core.String, core.int, core.int]],
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 } 2096 }
2097 [_writeSurrogate](leadingSurrogate, nextCodeUnit) { 2097 [_writeSurrogate](leadingSurrogate, nextCodeUnit) {
2098 if (dart.notNull(_isTailSurrogate(nextCodeUnit))) { 2098 if (dart.notNull(_isTailSurrogate(nextCodeUnit))) {
2099 let rune = _combineSurrogatePair(leadingSurrogate, nextCodeUnit); 2099 let rune = _combineSurrogatePair(leadingSurrogate, nextCodeUnit);
2100 dart.assert(dart.notNull(rune) > dart.notNull(_THREE_BYTE_LIMIT)); 2100 dart.assert(dart.notNull(rune) > dart.notNull(_THREE_BYTE_LIMIT));
2101 dart.assert(dart.notNull(rune) <= dart.notNull(_FOUR_BYTE_LIMIT)); 2101 dart.assert(dart.notNull(rune) <= dart.notNull(_FOUR_BYTE_LIMIT));
2102 this[_buffer][dartx.set]((() => { 2102 this[_buffer][dartx.set]((() => {
2103 let x = this[_bufferIndex]; 2103 let x = this[_bufferIndex];
2104 this[_bufferIndex] = dart.notNull(x) + 1; 2104 this[_bufferIndex] = dart.notNull(x) + 1;
2105 return x; 2105 return x;
2106 }).bind(this)(), 240 | dart.notNull(rune) >> 18); 2106 })(), 240 | dart.notNull(rune) >> 18);
2107 this[_buffer][dartx.set]((() => { 2107 this[_buffer][dartx.set]((() => {
2108 let x = this[_bufferIndex]; 2108 let x = this[_bufferIndex];
2109 this[_bufferIndex] = dart.notNull(x) + 1; 2109 this[_bufferIndex] = dart.notNull(x) + 1;
2110 return x; 2110 return x;
2111 }).bind(this)(), 128 | dart.notNull(rune) >> 12 & 63); 2111 })(), 128 | dart.notNull(rune) >> 12 & 63);
2112 this[_buffer][dartx.set]((() => { 2112 this[_buffer][dartx.set]((() => {
2113 let x = this[_bufferIndex]; 2113 let x = this[_bufferIndex];
2114 this[_bufferIndex] = dart.notNull(x) + 1; 2114 this[_bufferIndex] = dart.notNull(x) + 1;
2115 return x; 2115 return x;
2116 }).bind(this)(), 128 | dart.notNull(rune) >> 6 & 63); 2116 })(), 128 | dart.notNull(rune) >> 6 & 63);
2117 this[_buffer][dartx.set]((() => { 2117 this[_buffer][dartx.set]((() => {
2118 let x = this[_bufferIndex]; 2118 let x = this[_bufferIndex];
2119 this[_bufferIndex] = dart.notNull(x) + 1; 2119 this[_bufferIndex] = dart.notNull(x) + 1;
2120 return x; 2120 return x;
2121 }).bind(this)(), 128 | dart.notNull(rune) & 63); 2121 })(), 128 | dart.notNull(rune) & 63);
2122 return true; 2122 return true;
2123 } else { 2123 } else {
2124 this[_buffer][dartx.set]((() => { 2124 this[_buffer][dartx.set]((() => {
2125 let x = this[_bufferIndex]; 2125 let x = this[_bufferIndex];
2126 this[_bufferIndex] = dart.notNull(x) + 1; 2126 this[_bufferIndex] = dart.notNull(x) + 1;
2127 return x; 2127 return x;
2128 }).bind(this)(), 224 | dart.notNull(leadingSurrogate) >> 12); 2128 })(), 224 | dart.notNull(leadingSurrogate) >> 12);
2129 this[_buffer][dartx.set]((() => { 2129 this[_buffer][dartx.set]((() => {
2130 let x = this[_bufferIndex]; 2130 let x = this[_bufferIndex];
2131 this[_bufferIndex] = dart.notNull(x) + 1; 2131 this[_bufferIndex] = dart.notNull(x) + 1;
2132 return x; 2132 return x;
2133 }).bind(this)(), 128 | dart.notNull(leadingSurrogate) >> 6 & 63); 2133 })(), 128 | dart.notNull(leadingSurrogate) >> 6 & 63);
2134 this[_buffer][dartx.set]((() => { 2134 this[_buffer][dartx.set]((() => {
2135 let x = this[_bufferIndex]; 2135 let x = this[_bufferIndex];
2136 this[_bufferIndex] = dart.notNull(x) + 1; 2136 this[_bufferIndex] = dart.notNull(x) + 1;
2137 return x; 2137 return x;
2138 }).bind(this)(), 128 | dart.notNull(leadingSurrogate) & 63); 2138 })(), 128 | dart.notNull(leadingSurrogate) & 63);
2139 return false; 2139 return false;
2140 } 2140 }
2141 } 2141 }
2142 [_fillBuffer](str, start, end) { 2142 [_fillBuffer](str, start, end) {
2143 if (start != end && dart.notNull(_isLeadSurrogate(str[dartx.codeUnitAt](da rt.notNull(end) - 1)))) { 2143 if (start != end && dart.notNull(_isLeadSurrogate(str[dartx.codeUnitAt](da rt.notNull(end) - 1)))) {
2144 end = dart.notNull(end) - 1; 2144 end = dart.notNull(end) - 1;
2145 } 2145 }
2146 let stringIndex = null; 2146 let stringIndex = null;
2147 for (stringIndex = start; dart.notNull(stringIndex) < dart.notNull(end); s tringIndex = dart.notNull(stringIndex) + 1) { 2147 for (stringIndex = start; dart.notNull(stringIndex) < dart.notNull(end); s tringIndex = dart.notNull(stringIndex) + 1) {
2148 let codeUnit = str[dartx.codeUnitAt](stringIndex); 2148 let codeUnit = str[dartx.codeUnitAt](stringIndex);
2149 if (dart.notNull(codeUnit) <= dart.notNull(_ONE_BYTE_LIMIT)) { 2149 if (dart.notNull(codeUnit) <= dart.notNull(_ONE_BYTE_LIMIT)) {
2150 if (dart.notNull(this[_bufferIndex]) >= dart.notNull(this[_buffer][dar tx.length])) break; 2150 if (dart.notNull(this[_bufferIndex]) >= dart.notNull(this[_buffer][dar tx.length])) break;
2151 this[_buffer][dartx.set]((() => { 2151 this[_buffer][dartx.set]((() => {
2152 let x = this[_bufferIndex]; 2152 let x = this[_bufferIndex];
2153 this[_bufferIndex] = dart.notNull(x) + 1; 2153 this[_bufferIndex] = dart.notNull(x) + 1;
2154 return x; 2154 return x;
2155 }).bind(this)(), codeUnit); 2155 })(), codeUnit);
2156 } else if (dart.notNull(_isLeadSurrogate(codeUnit))) { 2156 } else if (dart.notNull(_isLeadSurrogate(codeUnit))) {
2157 if (dart.notNull(this[_bufferIndex]) + 3 >= dart.notNull(this[_buffer] [dartx.length])) break; 2157 if (dart.notNull(this[_bufferIndex]) + 3 >= dart.notNull(this[_buffer] [dartx.length])) break;
2158 let nextCodeUnit = str[dartx.codeUnitAt](dart.notNull(stringIndex) + 1 ); 2158 let nextCodeUnit = str[dartx.codeUnitAt](dart.notNull(stringIndex) + 1 );
2159 let wasCombined = this[_writeSurrogate](codeUnit, nextCodeUnit); 2159 let wasCombined = this[_writeSurrogate](codeUnit, nextCodeUnit);
2160 if (dart.notNull(wasCombined)) { 2160 if (dart.notNull(wasCombined)) {
2161 stringIndex = dart.notNull(stringIndex) + 1; 2161 stringIndex = dart.notNull(stringIndex) + 1;
2162 } 2162 }
2163 } else { 2163 } else {
2164 let rune = codeUnit; 2164 let rune = codeUnit;
2165 if (dart.notNull(rune) <= dart.notNull(_TWO_BYTE_LIMIT)) { 2165 if (dart.notNull(rune) <= dart.notNull(_TWO_BYTE_LIMIT)) {
2166 if (dart.notNull(this[_bufferIndex]) + 1 >= dart.notNull(this[_buffe r][dartx.length])) break; 2166 if (dart.notNull(this[_bufferIndex]) + 1 >= dart.notNull(this[_buffe r][dartx.length])) break;
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 }).bind(this)(), 192 | dart.notNull(rune) >> 6); 2171 })(), 192 | dart.notNull(rune) >> 6);
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 }).bind(this)(), 128 | dart.notNull(rune) & 63); 2176 })(), 128 | dart.notNull(rune) & 63);
2177 } else { 2177 } else {
2178 dart.assert(dart.notNull(rune) <= dart.notNull(_THREE_BYTE_LIMIT)); 2178 dart.assert(dart.notNull(rune) <= dart.notNull(_THREE_BYTE_LIMIT));
2179 if (dart.notNull(this[_bufferIndex]) + 2 >= dart.notNull(this[_buffe r][dartx.length])) break; 2179 if (dart.notNull(this[_bufferIndex]) + 2 >= dart.notNull(this[_buffe r][dartx.length])) break;
2180 this[_buffer][dartx.set]((() => { 2180 this[_buffer][dartx.set]((() => {
2181 let x = this[_bufferIndex]; 2181 let x = this[_bufferIndex];
2182 this[_bufferIndex] = dart.notNull(x) + 1; 2182 this[_bufferIndex] = dart.notNull(x) + 1;
2183 return x; 2183 return x;
2184 }).bind(this)(), 224 | dart.notNull(rune) >> 12); 2184 })(), 224 | dart.notNull(rune) >> 12);
2185 this[_buffer][dartx.set]((() => { 2185 this[_buffer][dartx.set]((() => {
2186 let x = this[_bufferIndex]; 2186 let x = this[_bufferIndex];
2187 this[_bufferIndex] = dart.notNull(x) + 1; 2187 this[_bufferIndex] = dart.notNull(x) + 1;
2188 return x; 2188 return x;
2189 }).bind(this)(), 128 | dart.notNull(rune) >> 6 & 63); 2189 })(), 128 | dart.notNull(rune) >> 6 & 63);
2190 this[_buffer][dartx.set]((() => { 2190 this[_buffer][dartx.set]((() => {
2191 let x = this[_bufferIndex]; 2191 let x = this[_bufferIndex];
2192 this[_bufferIndex] = dart.notNull(x) + 1; 2192 this[_bufferIndex] = dart.notNull(x) + 1;
2193 return x; 2193 return x;
2194 }).bind(this)(), 128 | dart.notNull(rune) & 63); 2194 })(), 128 | dart.notNull(rune) & 63);
2195 } 2195 }
2196 } 2196 }
2197 } 2197 }
2198 return stringIndex; 2198 return stringIndex;
2199 } 2199 }
2200 } 2200 }
2201 dart.defineNamedConstructor(_Utf8Encoder, 'withBufferSize'); 2201 dart.defineNamedConstructor(_Utf8Encoder, 'withBufferSize');
2202 dart.setSignature(_Utf8Encoder, { 2202 dart.setSignature(_Utf8Encoder, {
2203 constructors: () => ({ 2203 constructors: () => ({
2204 _Utf8Encoder: [_Utf8Encoder, []], 2204 _Utf8Encoder: [_Utf8Encoder, []],
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2569 } 2569 }
2570 get isNotEmpty() { 2570 get isNotEmpty() {
2571 return dart.notNull(this.length) > 0; 2571 return dart.notNull(this.length) > 0;
2572 } 2572 }
2573 get keys() { 2573 get keys() {
2574 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap].keys; 2574 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap].keys;
2575 return new _JsonMapKeyIterable(this); 2575 return new _JsonMapKeyIterable(this);
2576 } 2576 }
2577 get values() { 2577 get values() {
2578 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap].values; 2578 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap].values;
2579 return _internal.MappedIterable.new(this[_computeKeys](), dart.fn((each => this.get(each)).bind(this))); 2579 return _internal.MappedIterable.new(this[_computeKeys](), dart.fn(each => this.get(each)));
2580 } 2580 }
2581 set(key, value) { 2581 set(key, value) {
2582 if (dart.notNull(this[_isUpgraded])) { 2582 if (dart.notNull(this[_isUpgraded])) {
2583 this[_upgradedMap].set(key, value); 2583 this[_upgradedMap].set(key, value);
2584 } else if (dart.notNull(this.containsKey(key))) { 2584 } else if (dart.notNull(this.containsKey(key))) {
2585 let processed = this[_processed]; 2585 let processed = this[_processed];
2586 _JsonMap._setProperty(processed, dart.as(key, core.String), value); 2586 _JsonMap._setProperty(processed, dart.as(key, core.String), value);
2587 let original = this[_original]; 2587 let original = this[_original];
2588 if (!dart.notNull(core.identical(original, processed))) { 2588 if (!dart.notNull(core.identical(original, processed))) {
2589 _JsonMap._setProperty(original, dart.as(key, core.String), null); 2589 _JsonMap._setProperty(original, dart.as(key, core.String), null);
2590 } 2590 }
2591 } else { 2591 } else {
2592 this[_upgrade]().set(key, value); 2592 this[_upgrade]().set(key, value);
2593 } 2593 }
2594 return value; 2594 return value;
2595 } 2595 }
2596 addAll(other) { 2596 addAll(other) {
2597 other.forEach(dart.fn(((key, value) => { 2597 other.forEach(dart.fn((key, value) => {
2598 this.set(key, value); 2598 this.set(key, value);
2599 }).bind(this), dart.void, [dart.dynamic, dart.dynamic])); 2599 }, dart.void, [dart.dynamic, dart.dynamic]));
2600 } 2600 }
2601 containsValue(value) { 2601 containsValue(value) {
2602 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap].containsVal ue(value); 2602 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap].containsVal ue(value);
2603 let keys = this[_computeKeys](); 2603 let keys = this[_computeKeys]();
2604 for (let i = 0; i < dart.notNull(keys[dartx.length]); i++) { 2604 for (let i = 0; i < dart.notNull(keys[dartx.length]); i++) {
2605 let key = keys[dartx.get](i); 2605 let key = keys[dartx.get](i);
2606 if (dart.equals(this.get(key), value)) return true; 2606 if (dart.equals(this.get(key), value)) return true;
2607 } 2607 }
2608 return false; 2608 return false;
2609 } 2609 }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2812 exports.LineSplitter = LineSplitter; 2812 exports.LineSplitter = LineSplitter;
2813 exports.StringConversionSink = StringConversionSink; 2813 exports.StringConversionSink = StringConversionSink;
2814 exports.ClosableStringSink = ClosableStringSink; 2814 exports.ClosableStringSink = ClosableStringSink;
2815 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E; 2815 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E;
2816 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; 2816 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE;
2817 exports.Utf8Codec = Utf8Codec; 2817 exports.Utf8Codec = Utf8Codec;
2818 exports.UTF8 = UTF8; 2818 exports.UTF8 = UTF8;
2819 exports.Utf8Encoder = Utf8Encoder; 2819 exports.Utf8Encoder = Utf8Encoder;
2820 exports.Utf8Decoder = Utf8Decoder; 2820 exports.Utf8Decoder = Utf8Decoder;
2821 }); 2821 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/html.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698