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

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

Issue 1554683002: Update to latest analyzer (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 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/core.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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 dart.setSignature(AsciiDecoder, { 290 dart.setSignature(AsciiDecoder, {
291 constructors: () => ({AsciiDecoder: [AsciiDecoder, [], {allowInvalid: core.b ool}]}), 291 constructors: () => ({AsciiDecoder: [AsciiDecoder, [], {allowInvalid: core.b ool}]}),
292 methods: () => ({startChunkedConversion: [ByteConversionSink, [core.Sink$(co re.String)]]}) 292 methods: () => ({startChunkedConversion: [ByteConversionSink, [core.Sink$(co re.String)]]})
293 }); 293 });
294 const ChunkedConversionSink$ = dart.generic(function(T) { 294 const ChunkedConversionSink$ = dart.generic(function(T) {
295 class ChunkedConversionSink extends core.Object { 295 class ChunkedConversionSink extends core.Object {
296 ChunkedConversionSink() { 296 ChunkedConversionSink() {
297 } 297 }
298 static withCallback(callback) { 298 static withCallback(callback) {
299 return new _SimpleCallbackSink(callback); 299 return new (_SimpleCallbackSink$(T))(callback);
300 } 300 }
301 } 301 }
302 ChunkedConversionSink[dart.implements] = () => [core.Sink$(T)]; 302 ChunkedConversionSink[dart.implements] = () => [core.Sink$(T)];
303 dart.setSignature(ChunkedConversionSink, { 303 dart.setSignature(ChunkedConversionSink, {
304 constructors: () => ({ 304 constructors: () => ({
305 ChunkedConversionSink: [ChunkedConversionSink$(T), []], 305 ChunkedConversionSink: [ChunkedConversionSink$(T), []],
306 withCallback: [ChunkedConversionSink$(T), [dart.functionType(dart.void, [core.List$(T)])]] 306 withCallback: [ChunkedConversionSink$(T), [dart.functionType(dart.void, [core.List$(T)])]]
307 }) 307 })
308 }); 308 });
309 return ChunkedConversionSink; 309 return ChunkedConversionSink;
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 } 1209 }
1210 writeMap(map) { 1210 writeMap(map) {
1211 this.writeString('{'); 1211 this.writeString('{');
1212 let separator = '"'; 1212 let separator = '"';
1213 map.forEach(dart.fn(((key, value) => { 1213 map.forEach(dart.fn(((key, value) => {
1214 this.writeString(separator); 1214 this.writeString(separator);
1215 separator = ',"'; 1215 separator = ',"';
1216 this.writeStringContent(key); 1216 this.writeStringContent(key);
1217 this.writeString('":'); 1217 this.writeString('":');
1218 this.writeObject(value); 1218 this.writeObject(value);
1219 }).bind(this), dart.dynamic, [core.String, dart.dynamic])); 1219 }).bind(this), dart.void, [core.String, core.Object]));
1220 this.writeString('}'); 1220 this.writeString('}');
1221 } 1221 }
1222 } 1222 }
1223 dart.setSignature(_JsonStringifier, { 1223 dart.setSignature(_JsonStringifier, {
1224 constructors: () => ({_JsonStringifier: [_JsonStringifier, [dart.functionTyp e(core.Object, [core.Object])]]}), 1224 constructors: () => ({_JsonStringifier: [_JsonStringifier, [dart.functionTyp e(core.Object, [core.Object])]]}),
1225 methods: () => ({ 1225 methods: () => ({
1226 writeStringContent: [dart.void, [core.String]], 1226 writeStringContent: [dart.void, [core.String]],
1227 [_checkCycle]: [dart.void, [dart.dynamic]], 1227 [_checkCycle]: [dart.void, [dart.dynamic]],
1228 [_removeSeen]: [dart.void, [dart.dynamic]], 1228 [_removeSeen]: [dart.void, [dart.dynamic]],
1229 writeObject: [dart.void, [dart.dynamic]], 1229 writeObject: [dart.void, [dart.dynamic]],
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 map.forEach(dart.fn(((key, value) => { 1282 map.forEach(dart.fn(((key, value) => {
1283 if (!dart.notNull(first)) { 1283 if (!dart.notNull(first)) {
1284 this.writeString(",\n"); 1284 this.writeString(",\n");
1285 } 1285 }
1286 this.writeIndentation(this[_indentLevel]); 1286 this.writeIndentation(this[_indentLevel]);
1287 this.writeString('"'); 1287 this.writeString('"');
1288 this.writeStringContent(key); 1288 this.writeStringContent(key);
1289 this.writeString('": '); 1289 this.writeString('": ');
1290 this.writeObject(value); 1290 this.writeObject(value);
1291 first = false; 1291 first = false;
1292 }).bind(this), dart.dynamic, [core.String, core.Object])); 1292 }).bind(this), dart.void, [core.String, core.Object]));
1293 this.writeString('\n'); 1293 this.writeString('\n');
1294 this[_indentLevel] = dart.notNull(this[_indentLevel]) - 1; 1294 this[_indentLevel] = dart.notNull(this[_indentLevel]) - 1;
1295 this.writeIndentation(this[_indentLevel]); 1295 this.writeIndentation(this[_indentLevel]);
1296 this.writeString('}'); 1296 this.writeString('}');
1297 } 1297 }
1298 } 1298 }
1299 } 1299 }
1300 _JsonPrettyPrintMixin[dart.implements] = () => [_JsonStringifier]; 1300 _JsonPrettyPrintMixin[dart.implements] = () => [_JsonStringifier];
1301 dart.setSignature(_JsonPrettyPrintMixin, { 1301 dart.setSignature(_JsonPrettyPrintMixin, {
1302 methods: () => ({ 1302 methods: () => ({
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2581 _JsonMap._setProperty(original, dart.as(key, core.String), null); 2581 _JsonMap._setProperty(original, dart.as(key, core.String), null);
2582 } 2582 }
2583 } else { 2583 } else {
2584 this[_upgrade]().set(key, value); 2584 this[_upgrade]().set(key, value);
2585 } 2585 }
2586 return value; 2586 return value;
2587 } 2587 }
2588 addAll(other) { 2588 addAll(other) {
2589 other.forEach(dart.fn(((key, value) => { 2589 other.forEach(dart.fn(((key, value) => {
2590 this.set(key, value); 2590 this.set(key, value);
2591 }).bind(this))); 2591 }).bind(this), dart.void, [dart.dynamic, dart.dynamic]));
2592 } 2592 }
2593 containsValue(value) { 2593 containsValue(value) {
2594 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap].containsVal ue(value); 2594 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap].containsVal ue(value);
2595 let keys = this[_computeKeys](); 2595 let keys = this[_computeKeys]();
2596 for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = da rt.notNull(i) + 1) { 2596 for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = da rt.notNull(i) + 1) {
2597 let key = keys[dartx.get](i); 2597 let key = keys[dartx.get](i);
2598 if (dart.equals(this.get(key), value)) return true; 2598 if (dart.equals(this.get(key), value)) return true;
2599 } 2599 }
2600 return false; 2600 return false;
2601 } 2601 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 const _parent = Symbol('_parent'); 2731 const _parent = Symbol('_parent');
2732 class _JsonMapKeyIterable extends _internal.ListIterable { 2732 class _JsonMapKeyIterable extends _internal.ListIterable {
2733 _JsonMapKeyIterable(parent) { 2733 _JsonMapKeyIterable(parent) {
2734 this[_parent] = parent; 2734 this[_parent] = parent;
2735 super.ListIterable(); 2735 super.ListIterable();
2736 } 2736 }
2737 get length() { 2737 get length() {
2738 return this[_parent].length; 2738 return this[_parent].length;
2739 } 2739 }
2740 elementAt(index) { 2740 elementAt(index) {
2741 return dart.notNull(this[_parent][_isUpgraded]) ? dart.as(this[_parent].ke ys[dartx.elementAt](index), core.String) : this[_parent][_computeKeys]()[dartx.g et](index); 2741 return dart.as(dart.notNull(this[_parent][_isUpgraded]) ? this[_parent].ke ys[dartx.elementAt](index) : this[_parent][_computeKeys]()[dartx.get](index), co re.String);
2742 } 2742 }
2743 get iterator() { 2743 get iterator() {
2744 return dart.notNull(this[_parent][_isUpgraded]) ? this[_parent].keys[dartx .iterator] : this[_parent][_computeKeys]()[dartx.iterator]; 2744 return dart.as(dart.notNull(this[_parent][_isUpgraded]) ? this[_parent].ke ys[dartx.iterator] : this[_parent][_computeKeys]()[dartx.iterator], core.Iterato r);
2745 } 2745 }
2746 contains(key) { 2746 contains(key) {
2747 return this[_parent].containsKey(key); 2747 return this[_parent].containsKey(key);
2748 } 2748 }
2749 } 2749 }
2750 dart.setSignature(_JsonMapKeyIterable, { 2750 dart.setSignature(_JsonMapKeyIterable, {
2751 constructors: () => ({_JsonMapKeyIterable: [_JsonMapKeyIterable, [_JsonMap]] }), 2751 constructors: () => ({_JsonMapKeyIterable: [_JsonMapKeyIterable, [_JsonMap]] }),
2752 methods: () => ({elementAt: [core.String, [core.int]]}) 2752 methods: () => ({elementAt: [core.String, [core.int]]})
2753 }); 2753 });
2754 dart.defineExtensionMembers(_JsonMapKeyIterable, ['elementAt', 'contains', 'le ngth', 'iterator']); 2754 dart.defineExtensionMembers(_JsonMapKeyIterable, ['elementAt', 'contains', 'le ngth', 'iterator']);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 exports.LineSplitter = LineSplitter; 2804 exports.LineSplitter = LineSplitter;
2805 exports.StringConversionSink = StringConversionSink; 2805 exports.StringConversionSink = StringConversionSink;
2806 exports.ClosableStringSink = ClosableStringSink; 2806 exports.ClosableStringSink = ClosableStringSink;
2807 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E; 2807 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E;
2808 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; 2808 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE;
2809 exports.Utf8Codec = Utf8Codec; 2809 exports.Utf8Codec = Utf8Codec;
2810 exports.UTF8 = UTF8; 2810 exports.UTF8 = UTF8;
2811 exports.Utf8Encoder = Utf8Encoder; 2811 exports.Utf8Encoder = Utf8Encoder;
2812 exports.Utf8Decoder = Utf8Decoder; 2812 exports.Utf8Decoder = Utf8Decoder;
2813 }); 2813 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698