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

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

Issue 1649583002: allow JS builtin to be typed as needed (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
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 2639 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 } 2650 }
2651 } 2651 }
2652 toString() { 2652 toString() {
2653 return collection.Maps.mapToString(this); 2653 return collection.Maps.mapToString(this);
2654 } 2654 }
2655 get [_isUpgraded]() { 2655 get [_isUpgraded]() {
2656 return this[_processed] == null; 2656 return this[_processed] == null;
2657 } 2657 }
2658 get [_upgradedMap]() { 2658 get [_upgradedMap]() {
2659 dart.assert(this[_isUpgraded]); 2659 dart.assert(this[_isUpgraded]);
2660 return dart.as(this[_data], core.Map); 2660 return this[_data];
2661 } 2661 }
2662 [_computeKeys]() { 2662 [_computeKeys]() {
2663 dart.assert(!dart.notNull(this[_isUpgraded])); 2663 dart.assert(!dart.notNull(this[_isUpgraded]));
2664 let keys = dart.as(this[_data], core.List); 2664 let keys = dart.as(this[_data], core.List);
2665 if (keys == null) { 2665 if (keys == null) {
2666 keys = this[_data] = _JsonMap._getPropertyNames(this[_original]); 2666 keys = this[_data] = _JsonMap._getPropertyNames(this[_original]);
2667 } 2667 }
2668 return dart.as(keys, core.List$(core.String)); 2668 return keys;
2669 } 2669 }
2670 [_upgrade]() { 2670 [_upgrade]() {
2671 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap]; 2671 if (dart.notNull(this[_isUpgraded])) return this[_upgradedMap];
2672 let result = dart.map(); 2672 let result = dart.map();
2673 let keys = this[_computeKeys](); 2673 let keys = this[_computeKeys]();
2674 for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = da rt.notNull(i) + 1) { 2674 for (let i = 0; dart.notNull(i) < dart.notNull(keys[dartx.length]); i = da rt.notNull(i) + 1) {
2675 let key = keys[dartx.get](i); 2675 let key = keys[dartx.get](i);
2676 result.set(key, this.get(key)); 2676 result.set(key, this.get(key));
2677 } 2677 }
2678 if (dart.notNull(keys[dartx.isEmpty])) { 2678 if (dart.notNull(keys[dartx.isEmpty])) {
(...skipping 14 matching lines...) Expand all
2693 static _hasProperty(object, key) { 2693 static _hasProperty(object, key) {
2694 return Object.prototype.hasOwnProperty.call(object, key); 2694 return Object.prototype.hasOwnProperty.call(object, key);
2695 } 2695 }
2696 static _getProperty(object, key) { 2696 static _getProperty(object, key) {
2697 return object[key]; 2697 return object[key];
2698 } 2698 }
2699 static _setProperty(object, key, value) { 2699 static _setProperty(object, key, value) {
2700 return object[key] = value; 2700 return object[key] = value;
2701 } 2701 }
2702 static _getPropertyNames(object) { 2702 static _getPropertyNames(object) {
2703 return dart.as(Object.keys(object), core.List); 2703 return Object.keys(object);
2704 } 2704 }
2705 static _isUnprocessed(object) { 2705 static _isUnprocessed(object) {
2706 return typeof object == "undefined"; 2706 return typeof object == "undefined";
2707 } 2707 }
2708 static _newJavaScriptObject() { 2708 static _newJavaScriptObject() {
2709 return Object.create(null); 2709 return Object.create(null);
2710 } 2710 }
2711 } 2711 }
2712 _JsonMap[dart.implements] = () => [collection.LinkedHashMap]; 2712 _JsonMap[dart.implements] = () => [collection.LinkedHashMap];
2713 dart.setSignature(_JsonMap, { 2713 dart.setSignature(_JsonMap, {
(...skipping 98 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

Powered by Google App Engine
This is Rietveld 408576698