diff --git a/pkg/dev_compiler/lib/runtime/dart/js.js b/pkg/dev_compiler/lib/runtime/dart/js.js new file mode 100644 index 000000000000..1fcd9518a3fb --- /dev/null +++ b/pkg/dev_compiler/lib/runtime/dart/js.js @@ -0,0 +1,452 @@ +dart_library.library('dart/js', null, /* Imports */[ + "dart_runtime/dart", + 'dart/_foreign_helper', + 'dart/core', + 'dart/collection', + 'dart/typed_data', + 'dart/_js_helper' +], /* Lazy imports */[ +], function(exports, dart, _foreign_helper, core, collection, typed_data, _js_helper) { + 'use strict'; + let dartx = dart.dartx; + dart.defineLazyProperties(exports, { + get context() { + return _wrapToDart(self); + } + }); + function _convertDartFunction(f, opts) { + let captureThis = opts && 'captureThis' in opts ? opts.captureThis : false; + return function(_call, f, captureThis) { + return function() { + return _call(f, captureThis, this, Array.prototype.slice.apply(arguments$)); + }; + }(_foreign_helper.DART_CLOSURE_TO_JS(_callDartFunction), f, captureThis); + } + dart.fn(_convertDartFunction, core.Object, [core.Function], {captureThis: core.bool}); + function _callDartFunction(callback, captureThis, self, arguments$) { + if (dart.notNull(captureThis)) { + let _ = [self]; + _[dartx.addAll](arguments$); + arguments$ = _; + } + let dartArgs = core.List.from(arguments$[dartx.map](_convertToDart)); + return _convertToJS(core.Function.apply(dart.as(callback, core.Function), dartArgs)); + } + dart.fn(_callDartFunction, core.Object, [core.Object, core.bool, core.Object, core.List]); + let _jsObject = Symbol('_jsObject'); + class JsObject extends core.Object { + _fromJs(jsObject) { + this[_jsObject] = jsObject; + dart.assert(this[_jsObject] != null); + } + static new(constructor, arguments$) { + if (arguments$ === void 0) + arguments$ = null; + let constr = _convertToJS(constructor); + if (arguments$ == null) { + return _wrapToDart(new constr()); + } + let args = [null]; + args[dartx.addAll](arguments$[dartx.map](_convertToJS)); + let factoryFunction = constr.bind.apply(constr, args); + String(factoryFunction); + let jsObj = new factoryFunction(); + return _wrapToDart(jsObj); + } + static fromBrowserObject(object) { + if (dart.is(object, core.num) || typeof object == 'string' || typeof object == 'boolean' || object == null) { + throw new core.ArgumentError("object cannot be a num, string, bool, or null"); + } + return _wrapToDart(_convertToJS(object)); + } + static jsify(object) { + if (!dart.is(object, core.Map) && !dart.is(object, core.Iterable)) { + throw new core.ArgumentError("object must be a Map or Iterable"); + } + return _wrapToDart(JsObject._convertDataTree(object)); + } + static _convertDataTree(data) { + let _convertedObjects = collection.HashMap.identity(); + let _convert = o => { + if (dart.notNull(_convertedObjects.containsKey(o))) { + return _convertedObjects.get(o); + } + if (dart.is(o, core.Map)) { + let convertedMap = {}; + _convertedObjects.set(o, convertedMap); + for (let key of dart.as(dart.dload(o, 'keys'), core.Iterable)) { + convertedMap[key] = _convert(dart.dindex(o, key)); + } + return convertedMap; + } else if (dart.is(o, core.Iterable)) { + let convertedList = []; + _convertedObjects.set(o, convertedList); + convertedList[dartx.addAll](dart.as(dart.dsend(o, 'map', _convert), core.Iterable)); + return convertedList; + } else { + return _convertToJS(o); + } + }; + dart.fn(_convert); + return _convert(data); + } + get(property) { + if (!(typeof property == 'string') && !dart.is(property, core.num)) { + throw new core.ArgumentError("property is not a String or num"); + } + return _convertToDart(this[_jsObject][property]); + } + set(property, value) { + if (!(typeof property == 'string') && !dart.is(property, core.num)) { + throw new core.ArgumentError("property is not a String or num"); + } + this[_jsObject][property] = _convertToJS(value); + } + get hashCode() { + return 0; + } + ['=='](other) { + return dart.is(other, JsObject) && this[_jsObject] === dart.dload(other, _jsObject); + } + hasProperty(property) { + if (!(typeof property == 'string') && !dart.is(property, core.num)) { + throw new core.ArgumentError("property is not a String or num"); + } + return property in this[_jsObject]; + } + deleteProperty(property) { + if (!(typeof property == 'string') && !dart.is(property, core.num)) { + throw new core.ArgumentError("property is not a String or num"); + } + delete this[_jsObject][property]; + } + instanceof(type) { + return this[_jsObject] instanceof _convertToJS(type); + } + toString() { + try { + return String(this[_jsObject]); + } catch (e) { + return super.toString(); + } + + } + callMethod(method, args) { + if (args === void 0) + args = null; + if (!(typeof method == 'string') && !dart.is(method, core.num)) { + throw new core.ArgumentError("method is not a String or num"); + } + return _convertToDart(this[_jsObject][method].apply(this[_jsObject], args == null ? null : core.List.from(args[dartx.map](_convertToJS)))); + } + } + dart.defineNamedConstructor(JsObject, '_fromJs'); + dart.setSignature(JsObject, { + constructors: () => ({ + _fromJs: [JsObject, [core.Object]], + new: [JsObject, [JsFunction], [core.List]], + fromBrowserObject: [JsObject, [core.Object]], + jsify: [JsObject, [core.Object]] + }), + methods: () => ({ + get: [core.Object, [core.Object]], + set: [core.Object, [core.Object, core.Object]], + hasProperty: [core.bool, [core.Object]], + deleteProperty: [dart.void, [core.Object]], + instanceof: [core.bool, [JsFunction]], + callMethod: [core.Object, [core.Object], [core.List]] + }), + statics: () => ({_convertDataTree: [core.Object, [core.Object]]}), + names: ['_convertDataTree'] + }); + class JsFunction extends JsObject { + static withThis(f) { + let jsFunc = _convertDartFunction(f, {captureThis: true}); + return new JsFunction._fromJs(jsFunc); + } + _fromJs(jsObject) { + super._fromJs(jsObject); + } + apply(args, opts) { + let thisArg = opts && 'thisArg' in opts ? opts.thisArg : null; + return _convertToDart(this[_jsObject].apply(_convertToJS(thisArg), args == null ? null : core.List.from(args[dartx.map](_convertToJS)))); + } + } + dart.defineNamedConstructor(JsFunction, '_fromJs'); + dart.setSignature(JsFunction, { + constructors: () => ({ + withThis: [JsFunction, [core.Function]], + _fromJs: [JsFunction, [core.Object]] + }), + methods: () => ({apply: [core.Object, [core.List], {thisArg: core.Object}]}) + }); + let _checkIndex = Symbol('_checkIndex'); + let _checkInsertIndex = Symbol('_checkInsertIndex'); + let JsArray$ = dart.generic(function(E) { + class JsArray extends dart.mixin(JsObject, collection.ListMixin$(E)) { + JsArray() { + super._fromJs([]); + } + from(other) { + super._fromJs((() => { + let _ = []; + _[dartx.addAll](other[dartx.map](dart.as(_convertToJS, __CastType0))); + return _; + })()); + } + _fromJs(jsObject) { + super._fromJs(jsObject); + } + [_checkIndex](index) { + if (typeof index == 'number' && (dart.notNull(index) < 0 || dart.notNull(index) >= dart.notNull(this.length))) { + throw new core.RangeError.range(index, 0, this.length); + } + } + [_checkInsertIndex](index) { + if (typeof index == 'number' && (dart.notNull(index) < 0 || dart.notNull(index) >= dart.notNull(this.length) + 1)) { + throw new core.RangeError.range(index, 0, this.length); + } + } + static _checkRange(start, end, length) { + if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(length)) { + throw new core.RangeError.range(start, 0, length); + } + if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dart.notNull(length)) { + throw new core.RangeError.range(end, start, length); + } + } + get(index) { + if (dart.is(index, core.num) && dart.equals(index, dart.dsend(index, 'toInt'))) { + this[_checkIndex](dart.as(index, core.int)); + } + return dart.as(super.get(index), E); + } + set(index, value) { + dart.as(value, E); + if (dart.is(index, core.num) && dart.equals(index, dart.dsend(index, 'toInt'))) { + this[_checkIndex](dart.as(index, core.int)); + } + super.set(index, value); + } + get length() { + let len = this[_jsObject].length; + if (typeof len === "number" && len >>> 0 === len) { + return len; + } + throw new core.StateError('Bad JsArray length'); + } + set length(length) { + super.set('length', length); + } + add(value) { + dart.as(value, E); + this.callMethod('push', [value]); + } + addAll(iterable) { + dart.as(iterable, core.Iterable$(E)); + let list = iterable instanceof Array ? iterable : core.List.from(iterable); + this.callMethod('push', dart.as(list, core.List)); + } + insert(index, element) { + dart.as(element, E); + this[_checkInsertIndex](index); + this.callMethod('splice', [index, 0, element]); + } + removeAt(index) { + this[_checkIndex](index); + return dart.as(dart.dindex(this.callMethod('splice', [index, 1]), 0), E); + } + removeLast() { + if (this.length == 0) + throw new core.RangeError(-1); + return dart.as(this.callMethod('pop'), E); + } + removeRange(start, end) { + JsArray$()._checkRange(start, end, this.length); + this.callMethod('splice', [start, dart.notNull(end) - dart.notNull(start)]); + } + setRange(start, end, iterable, skipCount) { + dart.as(iterable, core.Iterable$(E)); + if (skipCount === void 0) + skipCount = 0; + JsArray$()._checkRange(start, end, length); + let length = dart.notNull(end) - dart.notNull(start); + if (length == 0) + return; + if (dart.notNull(skipCount) < 0) + throw new core.ArgumentError(skipCount); + let args = [start, length]; + args[dartx.addAll](iterable[dartx.skip](skipCount)[dartx.take](length)); + this.callMethod('splice', args); + } + sort(compare) { + if (compare === void 0) + compare = null; + dart.as(compare, dart.functionType(core.int, [E, E])); + this.callMethod('sort', compare == null ? [] : [compare]); + } + } + dart.defineNamedConstructor(JsArray, 'from'); + dart.defineNamedConstructor(JsArray, '_fromJs'); + dart.setSignature(JsArray, { + constructors: () => ({ + JsArray: [JsArray$(E), []], + from: [JsArray$(E), [core.Iterable$(E)]], + _fromJs: [JsArray$(E), [core.Object]] + }), + methods: () => ({ + [_checkIndex]: [core.Object, [core.int]], + [_checkInsertIndex]: [core.Object, [core.int]], + get: [E, [core.Object]], + set: [dart.void, [core.Object, E]], + add: [dart.void, [E]], + addAll: [dart.void, [core.Iterable$(E)]], + insert: [dart.void, [core.int, E]], + removeAt: [E, [core.int]], + removeLast: [E, []], + setRange: [dart.void, [core.int, core.int, core.Iterable$(E)], [core.int]], + sort: [dart.void, [], [dart.functionType(core.int, [E, E])]] + }), + statics: () => ({_checkRange: [core.Object, [core.int, core.int, core.int]]}), + names: ['_checkRange'] + }); + dart.defineExtensionMembers(JsArray, [ + 'get', + 'set', + 'add', + 'addAll', + 'insert', + 'removeAt', + 'removeLast', + 'removeRange', + 'setRange', + 'sort', + 'length', + 'length' + ]); + return JsArray; + }); + let JsArray = JsArray$(); + let _JS_OBJECT_PROPERTY_NAME = '_$dart_jsObject'; + let _JS_FUNCTION_PROPERTY_NAME = '$dart_jsFunction'; + dart.defineLazyProperties(exports, { + get _DART_OBJECT_PROPERTY_NAME() { + return dart.as(dart.dcall(/* Unimplemented unknown name */getIsolateAffinityTag, '_$dart_dartObject'), core.String); + }, + get _DART_CLOSURE_PROPERTY_NAME() { + return dart.as(dart.dcall(/* Unimplemented unknown name */getIsolateAffinityTag, '_$dart_dartClosure'), core.String); + } + }); + function _defineProperty(o, name, value) { + if (dart.notNull(_isExtensible(o)) && !dart.notNull(_hasOwnProperty(o, name))) { + try { + Object.defineProperty(o, name, {value: value}); + return true; + } catch (e) { + } + + } + return false; + } + dart.fn(_defineProperty, core.bool, [core.Object, core.String, core.Object]); + function _hasOwnProperty(o, name) { + return Object.prototype.hasOwnProperty.call(o, name); + } + dart.fn(_hasOwnProperty, core.bool, [core.Object, core.String]); + function _isExtensible(o) { + return Object.isExtensible(o); + } + dart.fn(_isExtensible, core.bool, [core.Object]); + function _getOwnProperty(o, name) { + if (dart.notNull(_hasOwnProperty(o, name))) { + return o[name]; + } + return null; + } + dart.fn(_getOwnProperty, core.Object, [core.Object, core.String]); + function _isLocalObject(o) { + return o instanceof Object; + } + dart.fn(_isLocalObject, core.bool, [core.Object]); + dart.defineLazyProperties(exports, { + get _dartProxyCtor() { + return function DartObject(o) { + this.o = o; + }; + } + }); + function _convertToJS(o) { + if (o == null || typeof o == 'string' || dart.is(o, core.num) || typeof o == 'boolean') { + return o; + } else if (dart.is(o, core.Object) || dart.is(o, core.Object) || dart.is(o, core.Object) || dart.is(o, core.Object) || dart.is(o, core.Object) || dart.is(o, typed_data.TypedData) || dart.is(o, core.Object)) { + return o; + } else if (dart.is(o, core.DateTime)) { + return _js_helper.Primitives.lazyAsJsDate(o); + } else if (dart.is(o, JsObject)) { + return dart.dload(o, _jsObject); + } else if (dart.is(o, core.Function)) { + return _getJsProxy(o, _JS_FUNCTION_PROPERTY_NAME, dart.fn(o => { + let jsFunction = _convertDartFunction(dart.as(o, core.Function)); + _defineProperty(jsFunction, exports._DART_CLOSURE_PROPERTY_NAME, o); + return jsFunction; + })); + } else { + let ctor = exports._dartProxyCtor; + return _getJsProxy(o, _JS_OBJECT_PROPERTY_NAME, dart.fn(o => new ctor(o))); + } + } + dart.fn(_convertToJS); + function _getJsProxy(o, propertyName, createProxy) { + let jsProxy = _getOwnProperty(o, propertyName); + if (jsProxy == null) { + jsProxy = dart.dcall(createProxy, o); + _defineProperty(o, propertyName, jsProxy); + } + return jsProxy; + } + dart.fn(_getJsProxy, core.Object, [core.Object, core.String, dart.functionType(core.Object, [dart.bottom])]); + function _convertToDart(o) { + if (o == null || typeof o == "string" || typeof o == "number" || typeof o == "boolean") { + return o; + } else if (dart.notNull(_isLocalObject(o)) && (dart.is(o, core.Object) || dart.is(o, core.Object) || dart.is(o, core.Object) || dart.is(o, core.Object) || dart.is(o, core.Object) || dart.is(o, typed_data.TypedData) || dart.is(o, core.Object))) { + return o; + } else if (o instanceof Date) { + let ms = o.getTime(); + return new core.DateTime.fromMillisecondsSinceEpoch(ms); + } else if (o.constructor === exports._dartProxyCtor) { + return o.o; + } else { + return _wrapToDart(o); + } + } + dart.fn(_convertToDart, core.Object, [core.Object]); + function _wrapToDart(o) { + if (typeof o == "function") { + return dart.as(_getDartProxy(o, exports._DART_CLOSURE_PROPERTY_NAME, dart.fn(o => new JsFunction._fromJs(o), JsFunction, [core.Object])), JsObject); + } else if (o instanceof Array) { + return dart.as(_getDartProxy(o, exports._DART_OBJECT_PROPERTY_NAME, dart.fn(o => new JsArray._fromJs(o), JsArray, [core.Object])), JsObject); + } else { + return dart.as(_getDartProxy(o, exports._DART_OBJECT_PROPERTY_NAME, dart.fn(o => new JsObject._fromJs(o), JsObject, [core.Object])), JsObject); + } + } + dart.fn(_wrapToDart, JsObject, [core.Object]); + function _getDartProxy(o, propertyName, createProxy) { + let dartProxy = _getOwnProperty(o, propertyName); + if (dartProxy == null || !dart.notNull(_isLocalObject(o))) { + dartProxy = dart.dcall(createProxy, o); + _defineProperty(o, propertyName, dartProxy); + } + return dartProxy; + } + dart.fn(_getDartProxy, core.Object, [core.Object, core.String, dart.functionType(core.Object, [dart.bottom])]); + let __CastType0$ = dart.generic(function(E) { + let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.Object, [E])); + return __CastType0; + }); + let __CastType0 = __CastType0$(); + // Exports: + exports.JsObject = JsObject; + exports.JsFunction = JsFunction; + exports.JsArray$ = JsArray$; + exports.JsArray = JsArray; +}); diff --git a/pkg/dev_compiler/lib/src/analysis_context.dart b/pkg/dev_compiler/lib/src/analysis_context.dart index b41c79248c08..e323783f9b04 100644 --- a/pkg/dev_compiler/lib/src/analysis_context.dart +++ b/pkg/dev_compiler/lib/src/analysis_context.dart @@ -74,8 +74,9 @@ DartUriResolver createMockSdkResolver(Map mockSources) => new MockDartSdk(mockSources, reportMissing: true).resolver; /// Creates a [DartUriResolver] that uses the SDK at the given [sdkPath]. -DartUriResolver createSdkPathResolver(String sdkPath) => - new DartUriResolver(new DirectoryBasedDartSdk(new JavaFile(sdkPath))); +DartUriResolver createSdkPathResolver(String sdkPath) => new DartUriResolver( + new DirectoryBasedDartSdk( + new JavaFile(sdkPath), /*useDart2jsPaths:*/ true)); UriResolver _createImplicitEntryResolver(SourceResolverOptions options) { var entry = path.absolute(SourceResolverOptions.implicitHtmlFile); diff --git a/pkg/dev_compiler/tool/build_sdk.sh b/pkg/dev_compiler/tool/build_sdk.sh index 9d5078ee981c..b473350bc957 100755 --- a/pkg/dev_compiler/tool/build_sdk.sh +++ b/pkg/dev_compiler/tool/build_sdk.sh @@ -12,9 +12,11 @@ if [[ -d lib/runtime/dart ]] ; then rm -r lib/runtime/dart fi -# TODO(jmesserly): for now we're suppressing errors in SDK compilation +# TODO(jmesserly): this builds dart:js, which pulls in dart:core and many others +# transitively. Ideally we could pass them explicitly, though: +# https://github.com/dart-lang/dev_compiler/issues/219 dart -c bin/devc.dart --no-source-maps --sdk-check --force-compile -l warning \ - --dart-sdk tool/generated_sdk -o lib/runtime/ dart:core \ + --dart-sdk tool/generated_sdk -o lib/runtime/ dart:js \ > tool/generated_sdk/sdk_errors.txt || true if [[ ! -f lib/runtime/dart/core.js ]] ; then diff --git a/pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart b/pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart new file mode 100644 index 000000000000..6de50320ae1f --- /dev/null +++ b/pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart @@ -0,0 +1,593 @@ +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/** + * Support for interoperating with JavaScript. + * + * This library provides access to JavaScript objects from Dart, allowing + * Dart code to get and set properties, and call methods of JavaScript objects + * and invoke JavaScript functions. The library takes care of converting + * between Dart and JavaScript objects where possible, or providing proxies if + * conversion isn't possible. + * + * This library does not yet make Dart objects usable from JavaScript, their + * methods and proeprties are not accessible, though it does allow Dart + * functions to be passed into and called from JavaScript. + * + * [JsObject] is the core type and represents a proxy of a JavaScript object. + * JsObject gives access to the underlying JavaScript objects properties and + * methods. `JsObject`s can be acquired by calls to JavaScript, or they can be + * created from proxies to JavaScript constructors. + * + * The top-level getter [context] provides a [JsObject] that represents the + * global object in JavaScript, usually `window`. + * + * The following example shows an alert dialog via a JavaScript call to the + * global function `alert()`: + * + * import 'dart:js'; + * + * main() => context.callMethod('alert', ['Hello from Dart!']); + * + * This example shows how to create a [JsObject] from a JavaScript constructor + * and access its properties: + * + * import 'dart:js'; + * + * main() { + * var object = new JsObject(context['Object']); + * object['greeting'] = 'Hello'; + * object['greet'] = (name) => "${object['greeting']} $name"; + * var message = object.callMethod('greet', ['JavaScript']); + * context['console'].callMethod('log', [message]); + * } + * + * ## Proxying and automatic conversion + * + * When setting properties on a JsObject or passing arguments to a Javascript + * method or function, Dart objects are automatically converted or proxied to + * JavaScript objects. When accessing JavaScript properties, or when a Dart + * closure is invoked from JavaScript, the JavaScript objects are also + * converted to Dart. + * + * Functions and closures are proxied in such a way that they are callable. A + * Dart closure assigned to a JavaScript property is proxied by a function in + * JavaScript. A JavaScript function accessed from Dart is proxied by a + * [JsFunction], which has a [apply] method to invoke it. + * + * The following types are transferred directly and not proxied: + * + * * "Basic" types: `null`, `bool`, `num`, `String`, `DateTime` + * * `Blob` + * * `Event` + * * `HtmlCollection` + * * `ImageData` + * * `KeyRange` + * * `Node` + * * `NodeList` + * * `TypedData`, including its subclasses like `Int32List`, but _not_ + * `ByteBuffer` + * * `Window` + * + * ## Converting collections with JsObject.jsify() + * + * To create a JavaScript collection from a Dart collection use the + * [JsObject.jsify] constructor, which converts Dart [Map]s and [Iterable]s + * into JavaScript Objects and Arrays. + * + * The following expression creats a new JavaScript object with the properties + * `a` and `b` defined: + * + * var jsMap = new JsObject.jsify({'a': 1, 'b': 2}); + * + * This expression creates a JavaScript array: + * + * var jsArray = new JsObject.jsify([1, 2, 3]); + */ +library dart.js; + +import 'dart:html' show Blob, Event, ImageData, Node, Window; +import 'dart:collection' show HashMap, ListMixin; +import 'dart:indexed_db' show KeyRange; +import 'dart:typed_data' show TypedData; + +import 'dart:_foreign_helper' show JS, DART_CLOSURE_TO_JS; +import 'dart:_interceptors' show JavaScriptObject, UnknownJavaScriptObject; +import 'dart:_js_helper' show Primitives, convertDartClosureToJS, + getIsolateAffinityTag; + +final JsObject context = _wrapToDart(JS('', 'self')); + +_convertDartFunction(Function f, {bool captureThis: false}) { + return JS('', + 'function(_call, f, captureThis) {' + 'return function() {' + 'return _call(f, captureThis, this, ' + 'Array.prototype.slice.apply(arguments));' + '}' + '}(#, #, #)', DART_CLOSURE_TO_JS(_callDartFunction), f, captureThis); +} + +_callDartFunction(callback, bool captureThis, self, List arguments) { + if (captureThis) { + arguments = [self]..addAll(arguments); + } + var dartArgs = new List.from(arguments.map(_convertToDart)); + return _convertToJS(Function.apply(callback, dartArgs)); +} + +/** + * Proxies a JavaScript object to Dart. + * + * The properties of the JavaScript object are accessible via the `[]` and + * `[]=` operators. Methods are callable via [callMethod]. + */ +class JsObject { + // The wrapped JS object. + final dynamic _jsObject; + + // This shoud only be called from _wrapToDart + JsObject._fromJs(this._jsObject) { + assert(_jsObject != null); + } + + /** + * Constructs a new JavaScript object from [constructor] and returns a proxy + * to it. + */ + factory JsObject(JsFunction constructor, [List arguments]) { + var constr = _convertToJS(constructor); + if (arguments == null) { + return _wrapToDart(JS('', 'new #()', constr)); + } + // The following code solves the problem of invoking a JavaScript + // constructor with an unknown number arguments. + // First bind the constructor to the argument list using bind.apply(). + // The first argument to bind() is the binding of 'this', so add 'null' to + // the arguments list passed to apply(). + // After that, use the JavaScript 'new' operator which overrides any binding + // of 'this' with the new instance. + var args = [null]..addAll(arguments.map(_convertToJS)); + var factoryFunction = JS('', '#.bind.apply(#, #)', constr, constr, args); + // Without this line, calling factoryFunction as a constructor throws + JS('String', 'String(#)', factoryFunction); + // This could return an UnknownJavaScriptObject, or a native + // object for which there is an interceptor + var jsObj = JS('JavaScriptObject', 'new #()', factoryFunction); + + return _wrapToDart(jsObj); + } + + /** + * Constructs a [JsObject] that proxies a native Dart object; _for expert use + * only_. + * + * Use this constructor only if you wish to get access to JavaScript + * properties attached to a browser host object, such as a Node or Blob, that + * is normally automatically converted into a native Dart object. + * + * An exception will be thrown if [object] either is `null` or has the type + * `bool`, `num`, or `String`. + */ + factory JsObject.fromBrowserObject(object) { + if (object is num || object is String || object is bool || object == null) { + throw new ArgumentError( + "object cannot be a num, string, bool, or null"); + } + return _wrapToDart(_convertToJS(object)); + } + + /** + * Recursively converts a JSON-like collection of Dart objects to a + * collection of JavaScript objects and returns a [JsObject] proxy to it. + * + * [object] must be a [Map] or [Iterable], the contents of which are also + * converted. Maps and Iterables are copied to a new JavaScript object. + * Primitives and other transferrable values are directly converted to their + * JavaScript type, and all other objects are proxied. + */ + factory JsObject.jsify(object) { + if ((object is! Map) && (object is! Iterable)) { + throw new ArgumentError("object must be a Map or Iterable"); + } + return _wrapToDart(_convertDataTree(object)); + } + + static _convertDataTree(data) { + var _convertedObjects = new HashMap.identity(); + + _convert(o) { + if (_convertedObjects.containsKey(o)) { + return _convertedObjects[o]; + } + if (o is Map) { + final convertedMap = JS('=Object', '{}'); + _convertedObjects[o] = convertedMap; + for (var key in o.keys) { + JS('=Object', '#[#]=#', convertedMap, key, _convert(o[key])); + } + return convertedMap; + } else if (o is Iterable) { + var convertedList = []; + _convertedObjects[o] = convertedList; + convertedList.addAll(o.map(_convert)); + return convertedList; + } else { + return _convertToJS(o); + } + } + + return _convert(data); + } + + /** + * Returns the value associated with [property] from the proxied JavaScript + * object. + * + * The type of [property] must be either [String] or [num]. + */ + dynamic operator[](property) { + if (property is! String && property is! num) { + throw new ArgumentError("property is not a String or num"); + } + return _convertToDart(JS('', '#[#]', _jsObject, property)); + } + + /** + * Sets the value associated with [property] on the proxied JavaScript + * object. + * + * The type of [property] must be either [String] or [num]. + */ + operator[]=(property, value) { + if (property is! String && property is! num) { + throw new ArgumentError("property is not a String or num"); + } + JS('', '#[#]=#', _jsObject, property, _convertToJS(value)); + } + + int get hashCode => 0; + + bool operator==(other) => other is JsObject && + JS('bool', '# === #', _jsObject, other._jsObject); + + /** + * Returns `true` if the JavaScript object contains the specified property + * either directly or though its prototype chain. + * + * This is the equivalent of the `in` operator in JavaScript. + */ + bool hasProperty(property) { + if (property is! String && property is! num) { + throw new ArgumentError("property is not a String or num"); + } + return JS('bool', '# in #', property, _jsObject); + } + + /** + * Removes [property] from the JavaScript object. + * + * This is the equivalent of the `delete` operator in JavaScript. + */ + void deleteProperty(property) { + if (property is! String && property is! num) { + throw new ArgumentError("property is not a String or num"); + } + JS('bool', 'delete #[#]', _jsObject, property); + } + + /** + * Returns `true` if the JavaScript object has [type] in its prototype chain. + * + * This is the equivalent of the `instanceof` operator in JavaScript. + */ + bool instanceof(JsFunction type) { + return JS('bool', '# instanceof #', _jsObject, _convertToJS(type)); + } + + /** + * Returns the result of the JavaScript objects `toString` method. + */ + String toString() { + try { + return JS('String', 'String(#)', _jsObject); + } catch(e) { + return super.toString(); + } + } + + /** + * Calls [method] on the JavaScript object with the arguments [args] and + * returns the result. + * + * The type of [method] must be either [String] or [num]. + */ + dynamic callMethod(method, [List args]) { + if (method is! String && method is! num) { + throw new ArgumentError("method is not a String or num"); + } + return _convertToDart(JS('', '#[#].apply(#, #)', _jsObject, method, + _jsObject, + args == null ? null : new List.from(args.map(_convertToJS)))); + } +} + +/** + * Proxies a JavaScript Function object. + */ +class JsFunction extends JsObject { + + /** + * Returns a [JsFunction] that captures its 'this' binding and calls [f] + * with the value of this passed as the first argument. + */ + factory JsFunction.withThis(Function f) { + var jsFunc = _convertDartFunction(f, captureThis: true); + return new JsFunction._fromJs(jsFunc); + } + + JsFunction._fromJs(jsObject) : super._fromJs(jsObject); + + /** + * Invokes the JavaScript function with arguments [args]. If [thisArg] is + * supplied it is the value of `this` for the invocation. + */ + dynamic apply(List args, { thisArg }) => + _convertToDart(JS('', '#.apply(#, #)', _jsObject, + _convertToJS(thisArg), + args == null ? null : new List.from(args.map(_convertToJS)))); +} + +/** + * A [List] that proxies a JavaScript array. + */ +class JsArray extends JsObject with ListMixin { + + /** + * Creates a new JavaScript array. + */ + JsArray() : super._fromJs([]); + + /** + * Creates a new JavaScript array and initializes it to the contents of + * [other]. + */ + JsArray.from(Iterable other) + : super._fromJs([]..addAll(other.map(_convertToJS))); + + JsArray._fromJs(jsObject) : super._fromJs(jsObject); + + _checkIndex(int index) { + if (index is int && (index < 0 || index >= length)) { + throw new RangeError.range(index, 0, length); + } + } + + _checkInsertIndex(int index) { + if (index is int && (index < 0 || index >= length + 1)) { + throw new RangeError.range(index, 0, length); + } + } + + static _checkRange(int start, int end, int length) { + if (start < 0 || start > length) { + throw new RangeError.range(start, 0, length); + } + if (end < start || end > length) { + throw new RangeError.range(end, start, length); + } + } + + // Methods required by ListMixin + + E operator [](index) { + // TODO(justinfagnani): fix the semantics for non-ints + // dartbug.com/14605 + if (index is num && index == index.toInt()) { + _checkIndex(index); + } + return super[index]; + } + + void operator []=(index, E value) { + // TODO(justinfagnani): fix the semantics for non-ints + // dartbug.com/14605 + if (index is num && index == index.toInt()) { + _checkIndex(index); + } + super[index] = value; + } + + int get length { + // Check the length honours the List contract. + var len = JS('', '#.length', _jsObject); + // JavaScript arrays have lengths which are unsigned 32-bit integers. + if (JS('bool', 'typeof # === "number" && (# >>> 0) === #', len, len, len)) { + return JS('int', '#', len); + } + throw new StateError('Bad JsArray length'); + } + + void set length(int length) { super['length'] = length; } + + + // Methods overriden for better performance + + void add(E value) { + callMethod('push', [value]); + } + + void addAll(Iterable iterable) { + var list = (JS('bool', '# instanceof Array', iterable)) + ? iterable + : new List.from(iterable); + callMethod('push', list); + } + + void insert(int index, E element) { + _checkInsertIndex(index); + callMethod('splice', [index, 0, element]); + } + + E removeAt(int index) { + _checkIndex(index); + return callMethod('splice', [index, 1])[0]; + } + + E removeLast() { + if (length == 0) throw new RangeError(-1); + return callMethod('pop'); + } + + void removeRange(int start, int end) { + _checkRange(start, end, length); + callMethod('splice', [start, end - start]); + } + + void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { + _checkRange(start, end, length); + int length = end - start; + if (length == 0) return; + if (skipCount < 0) throw new ArgumentError(skipCount); + var args = [start, length]..addAll(iterable.skip(skipCount).take(length)); + callMethod('splice', args); + } + + void sort([int compare(E a, E b)]) { + // Note: arr.sort(null) is a type error in FF + callMethod('sort', compare == null ? [] : [compare]); + } +} + +// property added to a Dart object referencing its JS-side DartObject proxy +final String _DART_OBJECT_PROPERTY_NAME = + getIsolateAffinityTag(r'_$dart_dartObject'); +final String _DART_CLOSURE_PROPERTY_NAME = + getIsolateAffinityTag(r'_$dart_dartClosure'); + +// property added to a JS object referencing its Dart-side JsObject proxy +const _JS_OBJECT_PROPERTY_NAME = r'_$dart_jsObject'; +const _JS_FUNCTION_PROPERTY_NAME = r'$dart_jsFunction'; + +bool _defineProperty(o, String name, value) { + if (_isExtensible(o) && + // TODO(ahe): Calling _hasOwnProperty to work around + // https://code.google.com/p/dart/issues/detail?id=21331. + !_hasOwnProperty(o, name)) { + try { + JS('void', 'Object.defineProperty(#, #, { value: #})', o, name, value); + return true; + } catch (e) { + // object is native and lies about being extensible + // see https://bugzilla.mozilla.org/show_bug.cgi?id=775185 + } + } + return false; +} + +bool _hasOwnProperty(o, String name) { + return JS('bool', 'Object.prototype.hasOwnProperty.call(#, #)', o, name); +} + +bool _isExtensible(o) => JS('bool', 'Object.isExtensible(#)', o); + +Object _getOwnProperty(o, String name) { + if (_hasOwnProperty(o, name)) { + return JS('', '#[#]', o, name); + } + return null; +} + +bool _isLocalObject(o) => JS('bool', '# instanceof Object', o); + +// The shared constructor function for proxies to Dart objects in JavaScript. +final _dartProxyCtor = JS('', 'function DartObject(o) { this.o = o; }'); + +dynamic _convertToJS(dynamic o) { + // Note: we don't write `if (o == null) return null;` to make sure dart2js + // doesn't convert `return null;` into `return;` (which would make `null` be + // `undefined` in Javascprit). See dartbug.com/20305 for details. + if (o == null || o is String || o is num || o is bool) { + return o; + } else if (o is Blob || o is Event || o is KeyRange || o is ImageData + || o is Node || o is TypedData || o is Window) { + return o; + } else if (o is DateTime) { + return Primitives.lazyAsJsDate(o); + } else if (o is JsObject) { + return o._jsObject; + } else if (o is Function) { + return _getJsProxy(o, _JS_FUNCTION_PROPERTY_NAME, (o) { + var jsFunction = _convertDartFunction(o); + // set a property on the JS closure referencing the Dart closure + _defineProperty(jsFunction, _DART_CLOSURE_PROPERTY_NAME, o); + return jsFunction; + }); + } else { + var ctor = _dartProxyCtor; + return _getJsProxy(o, _JS_OBJECT_PROPERTY_NAME, + (o) => JS('', 'new #(#)', ctor, o)); + } +} + +Object _getJsProxy(o, String propertyName, createProxy(o)) { + var jsProxy = _getOwnProperty(o, propertyName); + if (jsProxy == null) { + jsProxy = createProxy(o); + _defineProperty(o, propertyName, jsProxy); + } + return jsProxy; +} + +// converts a Dart object to a reference to a native JS object +// which might be a DartObject JS->Dart proxy +Object _convertToDart(o) { + if (JS('bool', '# == null', o) || + JS('bool', 'typeof # == "string"', o) || + JS('bool', 'typeof # == "number"', o) || + JS('bool', 'typeof # == "boolean"', o)) { + return o; + } else if (_isLocalObject(o) + && (o is Blob || o is Event || o is KeyRange || o is ImageData + || o is Node || o is TypedData || o is Window)) { + // long line: dart2js doesn't allow string concatenation in the JS() form + return JS('Blob|Event|KeyRange|ImageData|Node|TypedData|Window', '#', o); + } else if (JS('bool', '# instanceof Date', o)) { + var ms = JS('num', '#.getTime()', o); + return new DateTime.fromMillisecondsSinceEpoch(ms); + } else if (JS('bool', '#.constructor === #', o, _dartProxyCtor)) { + return JS('', '#.o', o); + } else { + return _wrapToDart(o); + } +} + +JsObject _wrapToDart(o) { + if (JS('bool', 'typeof # == "function"', o)) { + return _getDartProxy(o, _DART_CLOSURE_PROPERTY_NAME, + (o) => new JsFunction._fromJs(o)); + } else if (JS('bool', '# instanceof Array', o)) { + return _getDartProxy(o, _DART_OBJECT_PROPERTY_NAME, + (o) => new JsArray._fromJs(o)); + } else { + return _getDartProxy(o, _DART_OBJECT_PROPERTY_NAME, + (o) => new JsObject._fromJs(o)); + } +} + +Object _getDartProxy(o, String propertyName, createProxy(o)) { + var dartProxy = _getOwnProperty(o, propertyName); + // Temporary fix for dartbug.com/15193 + // In some cases it's possible to see a JavaScript object that + // came from a different context and was previously proxied to + // Dart in that context. The JS object will have a cached proxy + // but it won't be a valid Dart object in this context. + // For now we throw away the cached proxy, but we should be able + // to cache proxies from multiple JS contexts and Dart isolates. + if (dartProxy == null || !_isLocalObject(o)) { + dartProxy = createProxy(o); + _defineProperty(o, propertyName, dartProxy); + } + return dartProxy; +} diff --git a/pkg/dev_compiler/tool/sdk_expected_errors.txt b/pkg/dev_compiler/tool/sdk_expected_errors.txt index 975d4b1191f9..8417abfd3fee 100644 --- a/pkg/dev_compiler/tool/sdk_expected_errors.txt +++ b/pkg/dev_compiler/tool/sdk_expected_errors.txt @@ -1,3 +1,117 @@ +severe: line 90, column 1 of dart:js: [Message] File dart:html not found +import 'dart:html' show Blob, Event, ImageData, Node, Window; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +severe: line 92, column 1 of dart:js: [Message] File dart:indexed_db not found +import 'dart:indexed_db' show KeyRange; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 426, column 16 of dart:math: [DownCastImplicit] rnd32.remainder(max) (num) will need runtime check to cast to type int + result = rnd32.remainder(max); // % max; + ^^^^^^^^^^^^^^^^^^^^ +warning: line 37, column 25 of dart:math/point.dart: [DownCastComposite] x + other.x (num) will need runtime check to cast to type T + return new Point(x + other.x, y + other.y); + ^^^^^^^^^^^ +warning: line 37, column 38 of dart:math/point.dart: [DownCastComposite] y + other.y (num) will need runtime check to cast to type T + return new Point(x + other.x, y + other.y); + ^^^^^^^^^^^ +warning: line 46, column 25 of dart:math/point.dart: [DownCastComposite] x - other.x (num) will need runtime check to cast to type T + return new Point(x - other.x, y - other.y); + ^^^^^^^^^^^ +warning: line 46, column 38 of dart:math/point.dart: [DownCastComposite] y - other.y (num) will need runtime check to cast to type T + return new Point(x - other.x, y - other.y); + ^^^^^^^^^^^ +warning: line 59, column 25 of dart:math/point.dart: [DownCastComposite] x * factor (num) will need runtime check to cast to type T + return new Point(x * factor, y * factor); + ^^^^^^^^^^ +warning: line 59, column 37 of dart:math/point.dart: [DownCastComposite] y * factor (num) will need runtime check to cast to type T + return new Point(x * factor, y * factor); + ^^^^^^^^^^ +warning: line 86, column 12 of dart:math/point.dart: [DownCastComposite] dx * dx + dy * dy (num) will need runtime check to cast to type T + return dx * dx + dy * dy; + ^^^^^^^^^^^^^^^^^ +warning: line 33, column 18 of dart:math/rectangle.dart: [DownCastComposite] left + width (num) will need runtime check to cast to type T + T get right => left + width; + ^^^^^^^^^^^^ +warning: line 35, column 19 of dart:math/rectangle.dart: [DownCastComposite] top + height (num) will need runtime check to cast to type T + T get bottom => top + height; + ^^^^^^^^^^^^ +warning: line 68, column 33 of dart:math/rectangle.dart: [DownCastComposite] x0 (num) will need runtime check to cast to type T + return new Rectangle(x0, y0, x1 - x0, y1 - y0); + ^^ +warning: line 68, column 37 of dart:math/rectangle.dart: [DownCastComposite] y0 (num) will need runtime check to cast to type T + return new Rectangle(x0, y0, x1 - x0, y1 - y0); + ^^ +warning: line 68, column 41 of dart:math/rectangle.dart: [DownCastComposite] x1 - x0 (num) will need runtime check to cast to type T + return new Rectangle(x0, y0, x1 - x0, y1 - y0); + ^^^^^^^ +warning: line 68, column 50 of dart:math/rectangle.dart: [DownCastComposite] y1 - y0 (num) will need runtime check to cast to type T + return new Rectangle(x0, y0, x1 - x0, y1 - y0); + ^^^^^^^ +warning: line 95, column 29 of dart:math/rectangle.dart: [DownCastComposite] left (num) will need runtime check to cast to type T + return new Rectangle(left, top, right - left, bottom - top); + ^^^^ +warning: line 95, column 35 of dart:math/rectangle.dart: [DownCastComposite] top (num) will need runtime check to cast to type T + return new Rectangle(left, top, right - left, bottom - top); + ^^^ +warning: line 95, column 40 of dart:math/rectangle.dart: [DownCastComposite] right - left (num) will need runtime check to cast to type T + return new Rectangle(left, top, right - left, bottom - top); + ^^^^^^^^^^^^ +warning: line 95, column 54 of dart:math/rectangle.dart: [DownCastComposite] bottom - top (num) will need runtime check to cast to type T + return new Rectangle(left, top, right - left, bottom - top); + ^^^^^^^^^^^^ +warning: line 119, column 41 of dart:math/rectangle.dart: [DownCastComposite] this.left + this.width (num) will need runtime check to cast to type T + Point get topRight => new Point(this.left + this.width, this.top); + ^^^^^^^^^^^^^^^^^^^^^^ +warning: line 120, column 44 of dart:math/rectangle.dart: [DownCastComposite] this.left + this.width (num) will need runtime check to cast to type T + Point get bottomRight => new Point(this.left + this.width, + ^^^^^^^^^^^^^^^^^^^^^^ +warning: line 121, column 7 of dart:math/rectangle.dart: [DownCastComposite] this.top + this.height (num) will need runtime check to cast to type T + this.top + this.height); + ^^^^^^^^^^^^^^^^^^^^^^ +warning: line 123, column 7 of dart:math/rectangle.dart: [DownCastComposite] this.top + this.height (num) will need runtime check to cast to type T + this.top + this.height); + ^^^^^^^^^^^^^^^^^^^^^^ +warning: line 151, column 22 of dart:math/rectangle.dart: [DownCastComposite] (width < 0) ? -width * 0 : width (dynamic) will need runtime check to cast to type T + : this.width = (width < 0) ? -width * 0 : width, // Inline _clampToZero. + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 152, column 23 of dart:math/rectangle.dart: [DownCastComposite] (height < 0) ? -height * 0 : height (dynamic) will need runtime check to cast to type T + this.height = (height < 0) ? -height * 0 : height; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 167, column 14 of dart:math/rectangle.dart: [DownCastComposite] min(a.x, b.x) (num) will need runtime check to cast to type T + T left = min(a.x, b.x); + ^^^^^^^^^^^^^ +warning: line 168, column 15 of dart:math/rectangle.dart: [DownCastComposite] max(a.x, b.x) - left (num) will need runtime check to cast to type T + T width = max(a.x, b.x) - left; + ^^^^^^^^^^^^^^^^^^^^ +warning: line 169, column 13 of dart:math/rectangle.dart: [DownCastComposite] min(a.y, b.y) (num) will need runtime check to cast to type T + T top = min(a.y, b.y); + ^^^^^^^^^^^^^ +warning: line 170, column 16 of dart:math/rectangle.dart: [DownCastComposite] max(a.y, b.y) - top (num) will need runtime check to cast to type T + T height = max(a.y, b.y) - top; + ^^^^^^^^^^^^^^^^^^^ +warning: line 212, column 23 of dart:math/rectangle.dart: [DownCastComposite] (width < 0) ? _clampToZero(width) : width (dynamic) will need runtime check to cast to type T + : this._width = (width < 0) ? _clampToZero(width) : width, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 213, column 24 of dart:math/rectangle.dart: [DownCastComposite] (height < 0) ? _clampToZero(height) : height (dynamic) will need runtime check to cast to type T + this._height = (height < 0) ? _clampToZero(height) : height; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 228, column 14 of dart:math/rectangle.dart: [DownCastComposite] min(a.x, b.x) (num) will need runtime check to cast to type T + T left = min(a.x, b.x); + ^^^^^^^^^^^^^ +warning: line 229, column 15 of dart:math/rectangle.dart: [DownCastComposite] max(a.x, b.x) - left (num) will need runtime check to cast to type T + T width = max(a.x, b.x) - left; + ^^^^^^^^^^^^^^^^^^^^ +warning: line 230, column 13 of dart:math/rectangle.dart: [DownCastComposite] min(a.y, b.y) (num) will need runtime check to cast to type T + T top = min(a.y, b.y); + ^^^^^^^^^^^^^ +warning: line 231, column 16 of dart:math/rectangle.dart: [DownCastComposite] max(a.y, b.y) - top (num) will need runtime check to cast to type T + T height = max(a.y, b.y) - top; + ^^^^^^^^^^^^^^^^^^^ +warning: line 247, column 28 of dart:math/rectangle.dart: [DownCastComposite] _clampToZero(width) (num) will need runtime check to cast to type T + if (width < 0) width = _clampToZero(width); + ^^^^^^^^^^^^^^^^^^^ +warning: line 263, column 30 of dart:math/rectangle.dart: [DownCastComposite] _clampToZero(height) (num) will need runtime check to cast to type T + if (height < 0) height = _clampToZero(height); + ^^^^^^^^^^^^^^^^^^^^ warning: line 80, column 12 of dart:_interceptors/js_array.dart: [DownCastComposite] JS('var', r'#.pop()', this) (dynamic) will need runtime check to cast to type E return JS('var', r'#.pop()', this); ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -136,566 +250,92 @@ warning: line 152, column 43 of dart:_js_helper/regexp_helper.dart: [DownCastCom warning: line 137, column 23 of dart:_js_helper/string_helper.dart: [DownCastComposite] pattern.allMatches(receiver) (dynamic) will need runtime check to cast to type Iterable for (Match match in pattern.allMatches(receiver)) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 426, column 16 of dart:math: [DownCastImplicit] rnd32.remainder(max) (num) will need runtime check to cast to type int - result = rnd32.remainder(max); // % max; - ^^^^^^^^^^^^^^^^^^^^ -warning: line 37, column 25 of dart:math/point.dart: [DownCastComposite] x + other.x (num) will need runtime check to cast to type T - return new Point(x + other.x, y + other.y); - ^^^^^^^^^^^ -warning: line 37, column 38 of dart:math/point.dart: [DownCastComposite] y + other.y (num) will need runtime check to cast to type T - return new Point(x + other.x, y + other.y); - ^^^^^^^^^^^ -warning: line 46, column 25 of dart:math/point.dart: [DownCastComposite] x - other.x (num) will need runtime check to cast to type T - return new Point(x - other.x, y - other.y); - ^^^^^^^^^^^ -warning: line 46, column 38 of dart:math/point.dart: [DownCastComposite] y - other.y (num) will need runtime check to cast to type T - return new Point(x - other.x, y - other.y); - ^^^^^^^^^^^ -warning: line 59, column 25 of dart:math/point.dart: [DownCastComposite] x * factor (num) will need runtime check to cast to type T - return new Point(x * factor, y * factor); - ^^^^^^^^^^ -warning: line 59, column 37 of dart:math/point.dart: [DownCastComposite] y * factor (num) will need runtime check to cast to type T - return new Point(x * factor, y * factor); - ^^^^^^^^^^ -warning: line 86, column 12 of dart:math/point.dart: [DownCastComposite] dx * dx + dy * dy (num) will need runtime check to cast to type T - return dx * dx + dy * dy; - ^^^^^^^^^^^^^^^^^ -warning: line 33, column 18 of dart:math/rectangle.dart: [DownCastComposite] left + width (num) will need runtime check to cast to type T - T get right => left + width; - ^^^^^^^^^^^^ -warning: line 35, column 19 of dart:math/rectangle.dart: [DownCastComposite] top + height (num) will need runtime check to cast to type T - T get bottom => top + height; - ^^^^^^^^^^^^ -warning: line 68, column 33 of dart:math/rectangle.dart: [DownCastComposite] x0 (num) will need runtime check to cast to type T - return new Rectangle(x0, y0, x1 - x0, y1 - y0); - ^^ -warning: line 68, column 37 of dart:math/rectangle.dart: [DownCastComposite] y0 (num) will need runtime check to cast to type T - return new Rectangle(x0, y0, x1 - x0, y1 - y0); - ^^ -warning: line 68, column 41 of dart:math/rectangle.dart: [DownCastComposite] x1 - x0 (num) will need runtime check to cast to type T - return new Rectangle(x0, y0, x1 - x0, y1 - y0); - ^^^^^^^ -warning: line 68, column 50 of dart:math/rectangle.dart: [DownCastComposite] y1 - y0 (num) will need runtime check to cast to type T - return new Rectangle(x0, y0, x1 - x0, y1 - y0); - ^^^^^^^ -warning: line 95, column 29 of dart:math/rectangle.dart: [DownCastComposite] left (num) will need runtime check to cast to type T - return new Rectangle(left, top, right - left, bottom - top); - ^^^^ -warning: line 95, column 35 of dart:math/rectangle.dart: [DownCastComposite] top (num) will need runtime check to cast to type T - return new Rectangle(left, top, right - left, bottom - top); - ^^^ -warning: line 95, column 40 of dart:math/rectangle.dart: [DownCastComposite] right - left (num) will need runtime check to cast to type T - return new Rectangle(left, top, right - left, bottom - top); - ^^^^^^^^^^^^ -warning: line 95, column 54 of dart:math/rectangle.dart: [DownCastComposite] bottom - top (num) will need runtime check to cast to type T - return new Rectangle(left, top, right - left, bottom - top); - ^^^^^^^^^^^^ -warning: line 119, column 41 of dart:math/rectangle.dart: [DownCastComposite] this.left + this.width (num) will need runtime check to cast to type T - Point get topRight => new Point(this.left + this.width, this.top); - ^^^^^^^^^^^^^^^^^^^^^^ -warning: line 120, column 44 of dart:math/rectangle.dart: [DownCastComposite] this.left + this.width (num) will need runtime check to cast to type T - Point get bottomRight => new Point(this.left + this.width, - ^^^^^^^^^^^^^^^^^^^^^^ -warning: line 121, column 7 of dart:math/rectangle.dart: [DownCastComposite] this.top + this.height (num) will need runtime check to cast to type T - this.top + this.height); - ^^^^^^^^^^^^^^^^^^^^^^ -warning: line 123, column 7 of dart:math/rectangle.dart: [DownCastComposite] this.top + this.height (num) will need runtime check to cast to type T - this.top + this.height); - ^^^^^^^^^^^^^^^^^^^^^^ -warning: line 151, column 22 of dart:math/rectangle.dart: [DownCastComposite] (width < 0) ? -width * 0 : width (dynamic) will need runtime check to cast to type T - : this.width = (width < 0) ? -width * 0 : width, // Inline _clampToZero. - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 152, column 23 of dart:math/rectangle.dart: [DownCastComposite] (height < 0) ? -height * 0 : height (dynamic) will need runtime check to cast to type T - this.height = (height < 0) ? -height * 0 : height; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 167, column 14 of dart:math/rectangle.dart: [DownCastComposite] min(a.x, b.x) (num) will need runtime check to cast to type T - T left = min(a.x, b.x); - ^^^^^^^^^^^^^ -warning: line 168, column 15 of dart:math/rectangle.dart: [DownCastComposite] max(a.x, b.x) - left (num) will need runtime check to cast to type T - T width = max(a.x, b.x) - left; - ^^^^^^^^^^^^^^^^^^^^ -warning: line 169, column 13 of dart:math/rectangle.dart: [DownCastComposite] min(a.y, b.y) (num) will need runtime check to cast to type T - T top = min(a.y, b.y); - ^^^^^^^^^^^^^ -warning: line 170, column 16 of dart:math/rectangle.dart: [DownCastComposite] max(a.y, b.y) - top (num) will need runtime check to cast to type T - T height = max(a.y, b.y) - top; - ^^^^^^^^^^^^^^^^^^^ -warning: line 212, column 23 of dart:math/rectangle.dart: [DownCastComposite] (width < 0) ? _clampToZero(width) : width (dynamic) will need runtime check to cast to type T - : this._width = (width < 0) ? _clampToZero(width) : width, - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 213, column 24 of dart:math/rectangle.dart: [DownCastComposite] (height < 0) ? _clampToZero(height) : height (dynamic) will need runtime check to cast to type T - this._height = (height < 0) ? _clampToZero(height) : height; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 228, column 14 of dart:math/rectangle.dart: [DownCastComposite] min(a.x, b.x) (num) will need runtime check to cast to type T - T left = min(a.x, b.x); - ^^^^^^^^^^^^^ -warning: line 229, column 15 of dart:math/rectangle.dart: [DownCastComposite] max(a.x, b.x) - left (num) will need runtime check to cast to type T - T width = max(a.x, b.x) - left; - ^^^^^^^^^^^^^^^^^^^^ -warning: line 230, column 13 of dart:math/rectangle.dart: [DownCastComposite] min(a.y, b.y) (num) will need runtime check to cast to type T - T top = min(a.y, b.y); - ^^^^^^^^^^^^^ -warning: line 231, column 16 of dart:math/rectangle.dart: [DownCastComposite] max(a.y, b.y) - top (num) will need runtime check to cast to type T - T height = max(a.y, b.y) - top; - ^^^^^^^^^^^^^^^^^^^ -warning: line 247, column 28 of dart:math/rectangle.dart: [DownCastComposite] _clampToZero(width) (num) will need runtime check to cast to type T - if (width < 0) width = _clampToZero(width); - ^^^^^^^^^^^^^^^^^^^ -warning: line 263, column 30 of dart:math/rectangle.dart: [DownCastComposite] _clampToZero(height) (num) will need runtime check to cast to type T - if (height < 0) height = _clampToZero(height); - ^^^^^^^^^^^^^^^^^^^^ -warning: line 310, column 12 of dart:_internal/iterable.dart: [DownCastComposite] result (List) will need runtime check to cast to type List - return result; - ^^^^^^ -warning: line 357, column 39 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable - return new MappedIterable._(iterable, function); - ^^^^^^^^ -warning: line 378, column 17 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable - : super._(iterable, function); - ^^^^^^^^ -warning: line 454, column 76 of dart:_internal/iterable.dart: [DownCastComposite] _f ((dynamic) → Iterable) will need runtime check to cast to type (S) → Iterable - Iterator get iterator => new ExpandIterator(_iterable.iterator, _f); - ^^ -warning: line 481, column 29 of dart:_internal/iterable.dart: [DownCastComposite] _f(_iterator.current).iterator (Iterator) will need runtime check to cast to type Iterator - _currentExpansion = _f(_iterator.current).iterator; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 961, column 33 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable - return new WhereIterable(iterable, f); - ^^^^^^^^ -warning: line 961, column 43 of dart:_internal/iterable.dart: [DownCastComposite] f ((dynamic) → bool) will need runtime check to cast to type (T) → bool - return new WhereIterable(iterable, f); - ^ -warning: line 978, column 35 of dart:_internal/iterable.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable - return new SubListIterable(list, 0, n); - ^^^^ -warning: line 983, column 37 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable - return new TakeWhileIterable(iterable, test); - ^^^^^^^^ -warning: line 983, column 47 of dart:_internal/iterable.dart: [DownCastComposite] test ((dynamic) → bool) will need runtime check to cast to type (T) → bool - return new TakeWhileIterable(iterable, test); - ^^^^ -warning: line 988, column 35 of dart:_internal/iterable.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable - return new SubListIterable(list, n, null); - ^^^^ -warning: line 993, column 37 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable - return new SkipWhileIterable(iterable, test); - ^^^^^^^^ -warning: line 993, column 47 of dart:_internal/iterable.dart: [DownCastComposite] test ((dynamic) → bool) will need runtime check to cast to type (T) → bool - return new SkipWhileIterable(iterable, test); - ^^^^ -warning: line 997, column 40 of dart:_internal/iterable.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable - return new ReversedListIterable(list); - ^^^^ -warning: line 1033, column 35 of dart:_internal/iterable.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable - return new SubListIterable(list, start, end); - ^^^^ -warning: line 1115, column 31 of dart:_internal/iterable.dart: [DownCastComposite] l (List) will need runtime check to cast to type List - return new ListMapView(l); - ^ -warning: line 251, column 59 of dart:_internal/list.dart: [DownCastImplicit] key (Object) will need runtime check to cast to type int - E operator[] (Object key) => containsKey(key) ? _values[key] : null; - ^^^ -warning: line 179, column 12 of dart:collection: [DownCastComposite] JS('var', '#.splice(#, 2)[1]', bucket, index) (dynamic) will need runtime check to cast to type V - return JS('var', '#.splice(#, 2)[1]', bucket, index); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 193, column 14 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K - action(key, this[key]); - ^^^ -warning: line 261, column 17 of dart:collection: [DownCastComposite] _getTableEntry(table, key) (dynamic) will need runtime check to cast to type V - V value = _getTableEntry(table, key); - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -severe: line 372, column 61 of dart:collection: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type K - : _validKey = (validKey != null) ? validKey : ((v) => v is K); - ^^^^^^ -warning: line 397, column 49 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K - return JS('int', '# & 0x3ffffff', _hashCode(key)); - ^^^ -warning: line 404, column 19 of dart:collection: [DownCastComposite] JS('var', '#[#]', bucket, i) (dynamic) will need runtime check to cast to type K - if (_equals(JS('var', '#[#]', bucket, i), key)) return i; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 404, column 49 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K - if (_equals(JS('var', '#[#]', bucket, i), key)) return i; - ^^^ -warning: line 430, column 9 of dart:collection: [DownCastComposite] JS('var', '#[#]', keys, i) (dynamic) will need runtime check to cast to type E - f(JS('var', '#[#]', keys, i)); - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 456, column 18 of dart:collection: [DownCastComposite] JS('var', '#[#]', keys, offset) (dynamic) will need runtime check to cast to type E - _current = JS('var', '#[#]', keys, offset); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 561, column 12 of dart:collection: [DownCastComposite] cell._value (dynamic) will need runtime check to cast to type V - return cell._value; - ^^^^^^^^^^^ -warning: line 627, column 12 of dart:collection: [DownCastComposite] cell._value (dynamic) will need runtime check to cast to type V - return cell._value; - ^^^^^^^^^^^ -warning: line 642, column 14 of dart:collection: [DownCastComposite] cell._key (dynamic) will need runtime check to cast to type K - action(cell._key, cell._value); - ^^^^^^^^^ -warning: line 642, column 25 of dart:collection: [DownCastComposite] cell._value (dynamic) will need runtime check to cast to type V - action(cell._key, cell._value); - ^^^^^^^^^^^ -warning: line 665, column 12 of dart:collection: [DownCastComposite] cell._value (dynamic) will need runtime check to cast to type V - return cell._value; - ^^^^^^^^^^^ -severe: line 795, column 61 of dart:collection: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type K - : _validKey = (validKey != null) ? validKey : ((v) => v is K); - ^^^^^^ -warning: line 820, column 49 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K - return JS('int', '# & 0x3ffffff', _hashCode(key)); - ^^^ -warning: line 828, column 19 of dart:collection: [DownCastComposite] cell._key (dynamic) will need runtime check to cast to type K - if (_equals(cell._key, key)) return i; - ^^^^^^^^^ -warning: line 828, column 30 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K - if (_equals(cell._key, key)) return i; - ^^^ -warning: line 862, column 9 of dart:collection: [DownCastComposite] cell._key (dynamic) will need runtime check to cast to type E - f(cell._key); - ^^^^^^^^^ -warning: line 889, column 18 of dart:collection: [DownCastComposite] _cell._key (dynamic) will need runtime check to cast to type E - _current = _cell._key; - ^^^^^^^^^^ -warning: line 951, column 14 of dart:collection: [DownCastComposite] this.contains(object) ? object : null (Object) will need runtime check to cast to type E - return this.contains(object) ? object : null; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 962, column 12 of dart:collection: [DownCastComposite] bucket[index] (dynamic) will need runtime check to cast to type E - return bucket[index]; - ^^^^^^^^^^^^^ -severe: line 1194, column 61 of dart:collection: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type E - : _validKey = (validKey != null) ? validKey : ((x) => x is E); - ^^^^^^ -warning: line 1202, column 21 of dart:collection: [DownCastComposite] JS('var', '#[#]', bucket, i) (dynamic) will need runtime check to cast to type E - if (_equality(JS('var', '#[#]', bucket, i), element)) return i; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 1202, column 51 of dart:collection: [DownCastComposite] element (dynamic) will need runtime check to cast to type E - if (_equality(JS('var', '#[#]', bucket, i), element)) return i; - ^^^^^^^ -warning: line 1212, column 47 of dart:collection: [DownCastComposite] element (dynamic) will need runtime check to cast to type E - return JS('int', '# & 0x3ffffff', _hasher(element)); - ^^^^^^^ -warning: line 1251, column 18 of dart:collection: [DownCastComposite] JS('var', '#[#]', elements, offset) (dynamic) will need runtime check to cast to type E - _current = JS('var', '#[#]', elements, offset); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 1328, column 14 of dart:collection: [DownCastComposite] this.contains(object) ? object : null (Object) will need runtime check to cast to type E - return this.contains(object) ? object : null; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 1340, column 12 of dart:collection: [DownCastComposite] bucket[index]._element (dynamic) will need runtime check to cast to type E - return bucket[index]._element; - ^^^^^^^^^^^^^^^^^^^^^^ -warning: line 1347, column 14 of dart:collection: [DownCastComposite] cell._element (dynamic) will need runtime check to cast to type E - action(cell._element); - ^^^^^^^^^^^^^ -warning: line 1357, column 12 of dart:collection: [DownCastComposite] _first._element (dynamic) will need runtime check to cast to type E - return _first._element; - ^^^^^^^^^^^^^^^ -warning: line 1362, column 12 of dart:collection: [DownCastComposite] _last._element (dynamic) will need runtime check to cast to type E - return _last._element; - ^^^^^^^^^^^^^^ -warning: line 1431, column 19 of dart:collection: [DownCastComposite] cell._element (dynamic) will need runtime check to cast to type E - E element = cell._element; - ^^^^^^^^^^^^^ -severe: line 1596, column 61 of dart:collection: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type E - : _validKey = (validKey != null) ? validKey : ((x) => x is E); - ^^^^^^ -warning: line 1606, column 21 of dart:collection: [DownCastComposite] cell._element (dynamic) will need runtime check to cast to type E - if (_equality(cell._element, element)) return i; - ^^^^^^^^^^^^^ -warning: line 1606, column 36 of dart:collection: [DownCastComposite] element (dynamic) will need runtime check to cast to type E - if (_equality(cell._element, element)) return i; - ^^^^^^^ -warning: line 1616, column 47 of dart:collection: [DownCastComposite] element (dynamic) will need runtime check to cast to type E - return JS('int', '# & 0x3ffffff', _hasher(element)); - ^^^^^^^ -warning: line 1678, column 18 of dart:collection: [DownCastComposite] _cell._element (dynamic) will need runtime check to cast to type E - _current = _cell._element; - ^^^^^^^^^^^^^^ -warning: line 112, column 40 of dart:collection/hash_map.dart: [DownCastComposite] v (dynamic) will need runtime check to cast to type V - other.forEach((k, v) { result[k] = v; }); - ^ -warning: line 112, column 35 of dart:collection/hash_map.dart: [DownCastComposite] k (dynamic) will need runtime check to cast to type K - other.forEach((k, v) { result[k] = v; }); - ^ -warning: line 128, column 17 of dart:collection/hash_set.dart: [DownCastComposite] elements (Iterable) will need runtime check to cast to type Iterable - for (E e in elements) result.add(e); - ^^^^^^^^ -warning: line 33, column 16 of dart:collection/iterator.dart: [DownCastComposite] _iterator.current (dynamic) will need runtime check to cast to type E - E result = _iterator.current; - ^^^^^^^^^^^^^^^^^ -warning: line 99, column 40 of dart:collection/linked_hash_map.dart: [DownCastComposite] v (dynamic) will need runtime check to cast to type V - other.forEach((k, v) { result[k] = v; }); - ^ -warning: line 99, column 35 of dart:collection/linked_hash_map.dart: [DownCastComposite] k (dynamic) will need runtime check to cast to type K - other.forEach((k, v) { result[k] = v; }); - ^ -warning: line 142, column 12 of dart:collection/linked_hash_map.dart: [DownCastComposite] fillLiteralMap(keyValuePairs, new _LinkedHashMap()) (dynamic) will need runtime check to cast to type LinkedHashMap - return fillLiteralMap(keyValuePairs, new _LinkedHashMap()); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 65, column 56 of dart:collection/linked_list.dart: [DownCastComposite] entry (dynamic) will need runtime check to cast to type E - entries.forEach((entry) => _insertAfter(_previous, entry)); - ^^^^^ -warning: line 93, column 17 of dart:collection/linked_list.dart: [DownCastComposite] next (_LinkedListLink) will need runtime check to cast to type E - E entry = next; - ^^^^ -warning: line 105, column 12 of dart:collection/linked_list.dart: [DownCastComposite] _next (_LinkedListLink) will need runtime check to cast to type E - return _next; - ^^^^^ -warning: line 112, column 12 of dart:collection/linked_list.dart: [DownCastComposite] _previous (_LinkedListLink) will need runtime check to cast to type E - return _previous; - ^^^^^^^^^ -warning: line 122, column 12 of dart:collection/linked_list.dart: [DownCastComposite] _next (_LinkedListLink) will need runtime check to cast to type E - return _next; - ^^^^^ -warning: line 134, column 14 of dart:collection/linked_list.dart: [DownCastComposite] current (_LinkedListLink) will need runtime check to cast to type E - action(current); - ^^^^^^^ -warning: line 192, column 16 of dart:collection/linked_list.dart: [DownCastComposite] _next (_LinkedListLink) will need runtime check to cast to type E - _current = _next; - ^^^^^ -warning: line 249, column 16 of dart:collection/linked_list.dart: [DownCastComposite] _next (_LinkedListLink) will need runtime check to cast to type E - E result = _next; - ^^^^^ -warning: line 365, column 19 of dart:collection/list.dart: [DownCastImplicit] iterable (Iterable) will need runtime check to cast to type List - otherList = iterable; - ^^^^^^^^ -warning: line 377, column 27 of dart:collection/list.dart: [DownCastComposite] otherList[otherStart + i] (dynamic) will need runtime check to cast to type E - this[start + i] = otherList[otherStart + i]; - ^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 381, column 27 of dart:collection/list.dart: [DownCastComposite] otherList[otherStart + i] (dynamic) will need runtime check to cast to type E - this[start + i] = otherList[otherStart + i]; - ^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 122, column 18 of dart:collection/maps.dart: [DownCastComposite] _map[_map.keys.first] (dynamic) will need runtime check to cast to type V - V get first => _map[_map.keys.first]; - ^^^^^^^^^^^^^^^^^^^^^ -warning: line 123, column 19 of dart:collection/maps.dart: [DownCastComposite] _map[_map.keys.single] (dynamic) will need runtime check to cast to type V - V get single => _map[_map.keys.single]; - ^^^^^^^^^^^^^^^^^^^^^^ -warning: line 124, column 17 of dart:collection/maps.dart: [DownCastComposite] _map[_map.keys.last] (dynamic) will need runtime check to cast to type V - V get last => _map[_map.keys.last]; - ^^^^^^^^^^^^^^^^^^^^ -warning: line 144, column 18 of dart:collection/maps.dart: [DownCastComposite] _map[_keys.current] (dynamic) will need runtime check to cast to type V - _current = _map[_keys.current]; - ^^^^^^^^^^^^^^^^^^^ -warning: line 208, column 23 of dart:collection/queue.dart: [DownCastComposite] elements (Iterable) will need runtime check to cast to type Iterable - for (final E e in elements) { - ^^^^^^^^ -warning: line 211, column 12 of dart:collection/queue.dart: [DownCastComposite] list (Queue) will need runtime check to cast to type DoubleLinkedQueue - return list; - ^^^^ -warning: line 402, column 40 of dart:collection/queue.dart: [DownCastComposite] sourceList (List) will need runtime check to cast to type Iterable - queue._table.setRange(0, length, sourceList, 0); - ^^^^^^^^^^ -warning: line 411, column 31 of dart:collection/queue.dart: [DownCastComposite] elements (Iterable) will need runtime check to cast to type Iterable - for (final E element in elements) { - ^^^^^^^^ -warning: line 480, column 52 of dart:collection/queue.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable - _table.setRange(length, length + addCount, list, 0); - ^^^^ -warning: line 486, column 52 of dart:collection/queue.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable - _table.setRange(_tail, _tail + addCount, list, 0); - ^^^^ -warning: line 490, column 52 of dart:collection/queue.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable - _table.setRange(_tail, _tail + endSpace, list, 0); - ^^^^ -warning: line 491, column 40 of dart:collection/queue.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable - _table.setRange(0, preSpace, list, endSpace); - ^^^^ -warning: line 738, column 16 of dart:collection/queue.dart: [DownCastComposite] _queue._table[_position] (dynamic) will need runtime check to cast to type E - _current = _queue._table[_position]; - ^^^^^^^^^^^^^^^^^^^^^^^^ -severe: line 610, column 60 of dart:collection/splay_tree.dart: [AnalyzerError] The getter '_validKey' is not defined for the class '_SplayTree' - new SplayTreeSet(setOrMap._comparator, setOrMap._validKey); - ^^^^^^^^^ -severe: line 610, column 38 of dart:collection/splay_tree.dart: [AnalyzerError] The getter '_comparator' is not defined for the class '_SplayTree' - new SplayTreeSet(setOrMap._comparator, setOrMap._validKey); - ^^^^^^^^^^^ -warning: line 151, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] current (_SplayTreeNode) will need runtime check to cast to type _SplayTreeNode - return current; - ^^^^^^^ -warning: line 167, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] current (_SplayTreeNode) will need runtime check to cast to type _SplayTreeNode - return current; - ^^^^^^^ -warning: line 265, column 23 of dart:collection/splay_tree.dart: [DownCastComposite] (compare == null) ? Comparable.compare : compare (dynamic) will need runtime check to cast to type (K, K) → int - : _comparator = (compare == null) ? Comparable.compare : compare, - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -severe: line 266, column 65 of dart:collection/splay_tree.dart: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type K - _validKey = (isValidKey != null) ? isValidKey : ((v) => v is K); - ^^^^^^ -warning: line 275, column 40 of dart:collection/splay_tree.dart: [DownCastComposite] v (dynamic) will need runtime check to cast to type V - other.forEach((k, v) { result[k] = v; }); - ^ -warning: line 275, column 35 of dart:collection/splay_tree.dart: [DownCastComposite] k (dynamic) will need runtime check to cast to type K - other.forEach((k, v) { result[k] = v; }); - ^ -warning: line 328, column 25 of dart:collection/splay_tree.dart: [DownCastComposite] key (Object) will need runtime check to cast to type K - int comp = _splay(key); - ^^^ -warning: line 331, column 16 of dart:collection/splay_tree.dart: [DownCastComposite] mapRoot.value (dynamic) will need runtime check to cast to type V - return mapRoot.value; - ^^^^^^^^^^^^^ -warning: line 339, column 41 of dart:collection/splay_tree.dart: [DownCastComposite] key (Object) will need runtime check to cast to type K - _SplayTreeMapNode mapRoot = _remove(key); - ^^^ -warning: line 340, column 33 of dart:collection/splay_tree.dart: [DownCastComposite] mapRoot.value (dynamic) will need runtime check to cast to type V - if (mapRoot != null) return mapRoot.value; - ^^^^^^^^^^^^^ -warning: line 363, column 14 of dart:collection/splay_tree.dart: [DownCastComposite] mapRoot.value (dynamic) will need runtime check to cast to type V - return mapRoot.value; - ^^^^^^^^^^^^^ -warning: line 394, column 38 of dart:collection/splay_tree.dart: [DownCastComposite] nodes.current (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode - _SplayTreeMapNode node = nodes.current; - ^^^^^^^^^^^^^ -warning: line 408, column 37 of dart:collection/splay_tree.dart: [DownCastComposite] key (Object) will need runtime check to cast to type K - return _validKey(key) && _splay(key) == 0; - ^^^ -warning: line 420, column 41 of dart:collection/splay_tree.dart: [DownCastImplicit] node.right (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode - if (node.right != null && visit(node.right)) return true; - ^^^^^^^^^^ -warning: line 421, column 16 of dart:collection/splay_tree.dart: [DownCastImplicit] node.left (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode - node = node.left; - ^^^^^^^^^ -warning: line 425, column 18 of dart:collection/splay_tree.dart: [DownCastImplicit] _root (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode - return visit(_root); - ^^^^^ -warning: line 441, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] _first.key (dynamic) will need runtime check to cast to type K - return _first.key; - ^^^^^^^^^^ -warning: line 449, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] _last.key (dynamic) will need runtime check to cast to type K - return _last.key; - ^^^^^^^^^ -warning: line 545, column 22 of dart:collection/splay_tree.dart: [DownCastImplicit] _currentNode (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode - return _getValue(_currentNode); - ^^^^^^^^^^^^ -warning: line 610, column 29 of dart:collection/splay_tree.dart: [DownCastComposite] setOrMap._comparator (dynamic) will need runtime check to cast to type (K, K) → int - new SplayTreeSet(setOrMap._comparator, setOrMap._validKey); - ^^^^^^^^^^^^^^^^^^^^ -warning: line 610, column 51 of dart:collection/splay_tree.dart: [DownCastComposite] setOrMap._validKey (dynamic) will need runtime check to cast to type (Object) → bool - new SplayTreeSet(setOrMap._comparator, setOrMap._validKey); - ^^^^^^^^^^^^^^^^^^ -warning: line 628, column 39 of dart:collection/splay_tree.dart: [DownCastComposite] node.key (dynamic) will need runtime check to cast to type K - K _getValue(_SplayTreeNode node) => node.key; - ^^^^^^^^ -warning: line 633, column 42 of dart:collection/splay_tree.dart: [DownCastComposite] node.value (dynamic) will need runtime check to cast to type V - V _getValue(_SplayTreeMapNode node) => node.value; - ^^^^^^^^^^ -warning: line 641, column 55 of dart:collection/splay_tree.dart: [DownCastComposite] node (_SplayTreeNode) will need runtime check to cast to type _SplayTreeNode - _SplayTreeNode _getValue(_SplayTreeNode node) => node; - ^^^^ -warning: line 691, column 23 of dart:collection/splay_tree.dart: [DownCastComposite] (compare == null) ? Comparable.compare : compare (dynamic) will need runtime check to cast to type (E, E) → int - : _comparator = (compare == null) ? Comparable.compare : compare, - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -severe: line 692, column 65 of dart:collection/splay_tree.dart: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type E - _validKey = (isValidKey != null) ? isValidKey : ((v) => v is E); - ^^^^^^ -warning: line 705, column 29 of dart:collection/splay_tree.dart: [DownCastComposite] elements (Iterable) will need runtime check to cast to type Iterable - for (final E element in elements) { - ^^^^^^^^ -warning: line 723, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] _first.key (dynamic) will need runtime check to cast to type E - return _first.key; - ^^^^^^^^^^ -warning: line 728, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] _last.key (dynamic) will need runtime check to cast to type E - return _last.key; - ^^^^^^^^^ -warning: line 739, column 40 of dart:collection/splay_tree.dart: [DownCastComposite] object (Object) will need runtime check to cast to type E - return _validKey(object) && _splay(object) == 0; - ^^^^^^ -warning: line 751, column 20 of dart:collection/splay_tree.dart: [DownCastComposite] object (Object) will need runtime check to cast to type E - return _remove(object) != null; - ^^^^^^ -warning: line 765, column 39 of dart:collection/splay_tree.dart: [DownCastComposite] element (Object) will need runtime check to cast to type E - if (_validKey(element)) _remove(element); - ^^^^^^^ -warning: line 779, column 39 of dart:collection/splay_tree.dart: [DownCastComposite] object (Object) will need runtime check to cast to type E - if (_validKey(object) && _splay(object) == 0) retainSet.add(_root.key); - ^^^^^^ -warning: line 791, column 23 of dart:collection/splay_tree.dart: [DownCastComposite] object (Object) will need runtime check to cast to type E - int comp = _splay(object); - ^^^^^^ -warning: line 168, column 14 of dart:isolate: [DownCastComposite] IsolateNatives.spawnFunction(entryPoint, message, paused).then((msg) => new Isolate(msg[1], pauseCapability: msg[2], terminateCapability: msg[3])) (Future) will need runtime check to cast to type Future - return IsolateNatives.spawnFunction(entryPoint, message, paused) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 234, column 14 of dart:isolate: [DownCastComposite] IsolateNatives.spawnUri(uri, args, message, paused).then((msg) => new Isolate(msg[1], pauseCapability: msg[2], terminateCapability: msg[3])) (Future) will need runtime check to cast to type Future - return IsolateNatives.spawnUri(uri, args, message, paused) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -severe: line 452, column 28 of dart:_native_typed_data: [AnalyzerError] The getter 'length' is not defined for the class 'NativeTypedData' - if (length == list.length) { - ^^^^^^ -warning: line 201, column 9 of dart:_native_typed_data: [DownCastImplicit] _storage.sublist(start * 4, end * 4) (List) will need runtime check to cast to type NativeFloat32List - _storage.sublist(start * 4, end * 4)); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 311, column 9 of dart:_native_typed_data: [DownCastImplicit] _storage.sublist(start * 4, end * 4) (List) will need runtime check to cast to type Int32List - _storage.sublist(start * 4, end * 4)); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 415, column 9 of dart:_native_typed_data: [DownCastImplicit] _storage.sublist(start * 2, end * 2) (List) will need runtime check to cast to type NativeFloat64List - _storage.sublist(start * 2, end * 2)); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 1106, column 12 of dart:_native_typed_data: [DownCastImplicit] length == null ? _create2(buffer, offsetInBytes) : _create3(buffer, offsetInBytes, length) (Int8List) will need runtime check to cast to type NativeInt8List - return length == null - ^^^^^^^^^^^^^^^ -warning: line 576, column 29 of dart:_isolate_helper: [DownCastComposite] doneHandlers (dynamic) will need runtime check to cast to type Iterable - for (SendPort port in doneHandlers) { - ^^^^^^^^^^^^ -warning: line 835, column 37 of dart:_isolate_helper: [DownCastComposite] args (dynamic) will need runtime check to cast to type List - _startIsolate(entryPoint, args, message, - ^^^^ -warning: line 882, column 11 of dart:_isolate_helper: [DownCastComposite] msg['args'] (dynamic) will need runtime check to cast to type List - msg['args'], msg['msg'], - ^^^^^^^^^^^ -warning: line 89, column 38 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] indexable (JSIndexable) will need runtime check to cast to type JSArray - List serialized = serializeArray(indexable); - ^^^^^^^^^ -warning: line 120, column 24 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] serializeTearOff (Function) will need runtime check to cast to type (dynamic) → dynamic - x.keys.map(serializeTearOff).toList(), - ^^^^^^^^^^^^^^^^ -warning: line 121, column 26 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] serializeTearOff (Function) will need runtime check to cast to type (dynamic) → dynamic - x.values.map(serializeTearOff).toList()]; - ^^^^^^^^^^^^^^^^ -warning: line 172, column 52 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] fields (List) will need runtime check to cast to type JSArray - return ['dart', classId, serializeArrayInPlace(fields)]; - ^^^^^^ -warning: line 250, column 58 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] result (List) will need runtime check to cast to type JSArray - return new JSArray.markFixed(deserializeArrayInPlace(result)); - ^^^^^^ -warning: line 258, column 61 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] result (List) will need runtime check to cast to type JSArray - return new JSArray.markGrowable(deserializeArrayInPlace(result)); - ^^^^^^ -warning: line 266, column 36 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] result (List) will need runtime check to cast to type JSArray - return deserializeArrayInPlace(result); - ^^^^^^ -warning: line 275, column 58 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] result (List) will need runtime check to cast to type JSArray - return new JSArray.markFixed(deserializeArrayInPlace(result)); - ^^^^^^ -warning: line 357, column 29 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] fields (List) will need runtime check to cast to type JSArray - deserializeArrayInPlace(fields); - ^^^^^^ -warning: line 20, column 39 of dart:async/async_error.dart: [DownCastImplicit] errorHandler (Function) will need runtime check to cast to type (dynamic) → dynamic - return zone.registerUnaryCallback(errorHandler); - ^^^^^^^^^^^^ -severe: line 211, column 38 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The getter '_next' is not defined for the class 'StreamSubscription' - assert(!identical(subscription._next, subscription)); - ^^^^^ -severe: line 209, column 20 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The method '_setRemoveAfterFiring' is not defined for the class 'StreamSubscription' - subscription._setRemoveAfterFiring(); - ^^^^^^^^^^^^^^^^^^^^^ -severe: line 207, column 36 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The getter '_next' is not defined for the class 'StreamSubscription' - assert(!identical(subscription._next, subscription)); - ^^^^^ -severe: line 208, column 22 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The getter '_isFiring' is not defined for the class 'StreamSubscription' - if (subscription._isFiring) { - ^^^^^^^^^ -severe: line 206, column 32 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The getter '_next' is not defined for the class 'StreamSubscription' - if (identical(subscription._next, subscription)) return null; - ^^^^^ -warning: line 8, column 67 of dart:async/broadcast_stream_controller.dart: [DownCastComposite] controller (_StreamControllerLifecycle) will need runtime check to cast to type _StreamControllerLifecycle - _BroadcastStream(_StreamControllerLifecycle controller) : super(controller); - ^^^^^^^^^^ -warning: line 36, column 15 of dart:async/broadcast_stream_controller.dart: [DownCastComposite] controller (_StreamControllerLifecycle) will need runtime check to cast to type _StreamControllerLifecycle - : super(controller, onData, onError, onDone, cancelOnError) { - ^^^^^^^^^^ -warning: line 40, column 52 of dart:async/broadcast_stream_controller.dart: [DownCastComposite] super._controller (_StreamControllerLifecycle) will need runtime check to cast to type _BroadcastStreamController - _BroadcastStreamController get _controller => super._controller; - ^^^^^^^^^^^^^^^^^ -warning: line 196, column 18 of dart:async/broadcast_stream_controller.dart: [DownCastComposite] subscription (StreamSubscription) will need runtime check to cast to type _BroadcastSubscription - _addListener(subscription); +warning: line 168, column 14 of dart:isolate: [DownCastComposite] IsolateNatives.spawnFunction(entryPoint, message, paused).then((msg) => new Isolate(msg[1], pauseCapability: msg[2], terminateCapability: msg[3])) (Future) will need runtime check to cast to type Future + return IsolateNatives.spawnFunction(entryPoint, message, paused) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 234, column 14 of dart:isolate: [DownCastComposite] IsolateNatives.spawnUri(uri, args, message, paused).then((msg) => new Isolate(msg[1], pauseCapability: msg[2], terminateCapability: msg[3])) (Future) will need runtime check to cast to type Future + return IsolateNatives.spawnUri(uri, args, message, paused) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +severe: line 452, column 28 of dart:_native_typed_data: [AnalyzerError] The getter 'length' is not defined for the class 'NativeTypedData' + if (length == list.length) { + ^^^^^^ +warning: line 201, column 9 of dart:_native_typed_data: [DownCastImplicit] _storage.sublist(start * 4, end * 4) (List) will need runtime check to cast to type NativeFloat32List + _storage.sublist(start * 4, end * 4)); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 311, column 9 of dart:_native_typed_data: [DownCastImplicit] _storage.sublist(start * 4, end * 4) (List) will need runtime check to cast to type Int32List + _storage.sublist(start * 4, end * 4)); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 415, column 9 of dart:_native_typed_data: [DownCastImplicit] _storage.sublist(start * 2, end * 2) (List) will need runtime check to cast to type NativeFloat64List + _storage.sublist(start * 2, end * 2)); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 1106, column 12 of dart:_native_typed_data: [DownCastImplicit] length == null ? _create2(buffer, offsetInBytes) : _create3(buffer, offsetInBytes, length) (Int8List) will need runtime check to cast to type NativeInt8List + return length == null + ^^^^^^^^^^^^^^^ +warning: line 576, column 29 of dart:_isolate_helper: [DownCastComposite] doneHandlers (dynamic) will need runtime check to cast to type Iterable + for (SendPort port in doneHandlers) { + ^^^^^^^^^^^^ +warning: line 835, column 37 of dart:_isolate_helper: [DownCastComposite] args (dynamic) will need runtime check to cast to type List + _startIsolate(entryPoint, args, message, + ^^^^ +warning: line 882, column 11 of dart:_isolate_helper: [DownCastComposite] msg['args'] (dynamic) will need runtime check to cast to type List + msg['args'], msg['msg'], + ^^^^^^^^^^^ +warning: line 89, column 38 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] indexable (JSIndexable) will need runtime check to cast to type JSArray + List serialized = serializeArray(indexable); + ^^^^^^^^^ +warning: line 120, column 24 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] serializeTearOff (Function) will need runtime check to cast to type (dynamic) → dynamic + x.keys.map(serializeTearOff).toList(), + ^^^^^^^^^^^^^^^^ +warning: line 121, column 26 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] serializeTearOff (Function) will need runtime check to cast to type (dynamic) → dynamic + x.values.map(serializeTearOff).toList()]; + ^^^^^^^^^^^^^^^^ +warning: line 172, column 52 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] fields (List) will need runtime check to cast to type JSArray + return ['dart', classId, serializeArrayInPlace(fields)]; + ^^^^^^ +warning: line 250, column 58 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] result (List) will need runtime check to cast to type JSArray + return new JSArray.markFixed(deserializeArrayInPlace(result)); + ^^^^^^ +warning: line 258, column 61 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] result (List) will need runtime check to cast to type JSArray + return new JSArray.markGrowable(deserializeArrayInPlace(result)); + ^^^^^^ +warning: line 266, column 36 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] result (List) will need runtime check to cast to type JSArray + return deserializeArrayInPlace(result); + ^^^^^^ +warning: line 275, column 58 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] result (List) will need runtime check to cast to type JSArray + return new JSArray.markFixed(deserializeArrayInPlace(result)); + ^^^^^^ +warning: line 357, column 29 of dart:_isolate_helper/isolate_serialization.dart: [DownCastImplicit] fields (List) will need runtime check to cast to type JSArray + deserializeArrayInPlace(fields); + ^^^^^^ +warning: line 20, column 39 of dart:async/async_error.dart: [DownCastImplicit] errorHandler (Function) will need runtime check to cast to type (dynamic) → dynamic + return zone.registerUnaryCallback(errorHandler); + ^^^^^^^^^^^^ +severe: line 211, column 38 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The getter '_next' is not defined for the class 'StreamSubscription' + assert(!identical(subscription._next, subscription)); + ^^^^^ +severe: line 209, column 20 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The method '_setRemoveAfterFiring' is not defined for the class 'StreamSubscription' + subscription._setRemoveAfterFiring(); + ^^^^^^^^^^^^^^^^^^^^^ +severe: line 207, column 36 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The getter '_next' is not defined for the class 'StreamSubscription' + assert(!identical(subscription._next, subscription)); + ^^^^^ +severe: line 208, column 22 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The getter '_isFiring' is not defined for the class 'StreamSubscription' + if (subscription._isFiring) { + ^^^^^^^^^ +severe: line 206, column 32 of dart:async/broadcast_stream_controller.dart: [AnalyzerError] The getter '_next' is not defined for the class 'StreamSubscription' + if (identical(subscription._next, subscription)) return null; + ^^^^^ +warning: line 8, column 67 of dart:async/broadcast_stream_controller.dart: [DownCastComposite] controller (_StreamControllerLifecycle) will need runtime check to cast to type _StreamControllerLifecycle + _BroadcastStream(_StreamControllerLifecycle controller) : super(controller); + ^^^^^^^^^^ +warning: line 36, column 15 of dart:async/broadcast_stream_controller.dart: [DownCastComposite] controller (_StreamControllerLifecycle) will need runtime check to cast to type _StreamControllerLifecycle + : super(controller, onData, onError, onDone, cancelOnError) { + ^^^^^^^^^^ +warning: line 40, column 52 of dart:async/broadcast_stream_controller.dart: [DownCastComposite] super._controller (_StreamControllerLifecycle) will need runtime check to cast to type _BroadcastStreamController + _BroadcastStreamController get _controller => super._controller; + ^^^^^^^^^^^^^^^^^ +warning: line 196, column 18 of dart:async/broadcast_stream_controller.dart: [DownCastComposite] subscription (StreamSubscription) will need runtime check to cast to type _BroadcastSubscription + _addListener(subscription); ^^^^^^^^^^^^ warning: line 201, column 12 of dart:async/broadcast_stream_controller.dart: [DownCastComposite] subscription (StreamSubscription) will need runtime check to cast to type StreamSubscription return subscription; @@ -1033,45 +673,489 @@ warning: line 753, column 22 of dart:core/string.dart: [DownCastImplicit] _curre warning: line 94, column 12 of dart:core/uri.dart: [DownCastImplicit] _port (num) will need runtime check to cast to type int return _port; ^^^^^ -warning: line 893, column 14 of dart:core/uri.dart: [DownCastImplicit] this._port (num) will need runtime check to cast to type int - port = this._port; - ^^^^^^^^^^ -warning: line 1131, column 45 of dart:core/uri.dart: [DownCastComposite] _userinfoTable (List) will need runtime check to cast to type List - return _normalize(userInfo, start, end, _userinfoTable); - ^^^^^^^^^^^^^^ -warning: line 1144, column 45 of dart:core/uri.dart: [DownCastComposite] _pathCharOrSlashTable (List) will need runtime check to cast to type List - result = _normalize(path, start, end, _pathCharOrSlashTable); - ^^^^^^^^^^^^^^^^^^^^^ -warning: line 1146, column 51 of dart:core/uri.dart: [DownCastComposite] _pathCharTable (List) will need runtime check to cast to type List - result = pathSegments.map((s) => _uriEncode(_pathCharTable, s)).join("/"); - ^^^^^^^^^^^^^^ -warning: line 1163, column 61 of dart:core/uri.dart: [DownCastComposite] _queryCharTable (List) will need runtime check to cast to type List - if (query != null) return _normalize(query, start, end, _queryCharTable); - ^^^^^^^^^^^^^^^ -warning: line 1183, column 45 of dart:core/uri.dart: [DownCastComposite] _queryCharTable (List) will need runtime check to cast to type List - return _normalize(fragment, start, end, _queryCharTable); - ^^^^^^^^^^^^^^^ -warning: line 1278, column 37 of dart:core/uri.dart: [DownCastComposite] codeUnits (List) will need runtime check to cast to type Iterable - return new String.fromCharCodes(codeUnits); - ^^^^^^^^^ -warning: line 1494, column 22 of dart:core/uri.dart: [DownCastImplicit] this._port (num) will need runtime check to cast to type int - targetPort = this._port; - ^^^^^^^^^^ -warning: line 1754, column 23 of dart:core/uri.dart: [DownCastComposite] _unreserved2396Table (List) will need runtime check to cast to type List - return _uriEncode(_unreserved2396Table, component); - ^^^^^^^^^^^^^^^^^^^^ -warning: line 1793, column 9 of dart:core/uri.dart: [DownCastComposite] _unreservedTable (List) will need runtime check to cast to type List - _unreservedTable, component, encoding: encoding, spaceToPlus: true); - ^^^^^^^^^^^^^^^^ -warning: line 1837, column 23 of dart:core/uri.dart: [DownCastComposite] _encodeFullTable (List) will need runtime check to cast to type List - return _uriEncode(_encodeFullTable, uri); - ^^^^^^^^^^^^^^^^ -warning: line 1869, column 12 of dart:core/uri.dart: [DownCastComposite] query.split("&").fold({}, (map, element) {int index = element.indexOf("="); if (index == -1) {if (element != "") {map[decodeQueryComponent(element, encoding: encoding)] = "";}} else if (index != 0) {var key = element.substring(0, index); var value = element.substring(index + 1); map[Uri.decodeQueryComponent(key, encoding: encoding)] = decodeQueryComponent(value, encoding: encoding);} return map;}) (dynamic) will need runtime check to cast to type Map - return query.split("&").fold({}, (map, element) { - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: line 1901, column 12 of dart:core/uri.dart: [DownCastComposite] bytes.map((byteString) {int byte = int.parse(byteString); if (byte < 0 || byte > 255) {error('each part must be in the range of `0..255`');} return byte;}).toList() (List) will need runtime check to cast to type List - return bytes - ^^^^^^ -warning: line 2023, column 12 of dart:core/uri.dart: [DownCastComposite] bytes (List) will need runtime check to cast to type List - return bytes; +warning: line 893, column 14 of dart:core/uri.dart: [DownCastImplicit] this._port (num) will need runtime check to cast to type int + port = this._port; + ^^^^^^^^^^ +warning: line 1131, column 45 of dart:core/uri.dart: [DownCastComposite] _userinfoTable (List) will need runtime check to cast to type List + return _normalize(userInfo, start, end, _userinfoTable); + ^^^^^^^^^^^^^^ +warning: line 1144, column 45 of dart:core/uri.dart: [DownCastComposite] _pathCharOrSlashTable (List) will need runtime check to cast to type List + result = _normalize(path, start, end, _pathCharOrSlashTable); + ^^^^^^^^^^^^^^^^^^^^^ +warning: line 1146, column 51 of dart:core/uri.dart: [DownCastComposite] _pathCharTable (List) will need runtime check to cast to type List + result = pathSegments.map((s) => _uriEncode(_pathCharTable, s)).join("/"); + ^^^^^^^^^^^^^^ +warning: line 1163, column 61 of dart:core/uri.dart: [DownCastComposite] _queryCharTable (List) will need runtime check to cast to type List + if (query != null) return _normalize(query, start, end, _queryCharTable); + ^^^^^^^^^^^^^^^ +warning: line 1183, column 45 of dart:core/uri.dart: [DownCastComposite] _queryCharTable (List) will need runtime check to cast to type List + return _normalize(fragment, start, end, _queryCharTable); + ^^^^^^^^^^^^^^^ +warning: line 1278, column 37 of dart:core/uri.dart: [DownCastComposite] codeUnits (List) will need runtime check to cast to type Iterable + return new String.fromCharCodes(codeUnits); + ^^^^^^^^^ +warning: line 1494, column 22 of dart:core/uri.dart: [DownCastImplicit] this._port (num) will need runtime check to cast to type int + targetPort = this._port; + ^^^^^^^^^^ +warning: line 1754, column 23 of dart:core/uri.dart: [DownCastComposite] _unreserved2396Table (List) will need runtime check to cast to type List + return _uriEncode(_unreserved2396Table, component); + ^^^^^^^^^^^^^^^^^^^^ +warning: line 1793, column 9 of dart:core/uri.dart: [DownCastComposite] _unreservedTable (List) will need runtime check to cast to type List + _unreservedTable, component, encoding: encoding, spaceToPlus: true); + ^^^^^^^^^^^^^^^^ +warning: line 1837, column 23 of dart:core/uri.dart: [DownCastComposite] _encodeFullTable (List) will need runtime check to cast to type List + return _uriEncode(_encodeFullTable, uri); + ^^^^^^^^^^^^^^^^ +warning: line 1869, column 12 of dart:core/uri.dart: [DownCastComposite] query.split("&").fold({}, (map, element) {int index = element.indexOf("="); if (index == -1) {if (element != "") {map[decodeQueryComponent(element, encoding: encoding)] = "";}} else if (index != 0) {var key = element.substring(0, index); var value = element.substring(index + 1); map[Uri.decodeQueryComponent(key, encoding: encoding)] = decodeQueryComponent(value, encoding: encoding);} return map;}) (dynamic) will need runtime check to cast to type Map + return query.split("&").fold({}, (map, element) { + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 1901, column 12 of dart:core/uri.dart: [DownCastComposite] bytes.map((byteString) {int byte = int.parse(byteString); if (byte < 0 || byte > 255) {error('each part must be in the range of `0..255`');} return byte;}).toList() (List) will need runtime check to cast to type List + return bytes + ^^^^^^ +warning: line 2023, column 12 of dart:core/uri.dart: [DownCastComposite] bytes (List) will need runtime check to cast to type List + return bytes; + ^^^^^ +warning: line 310, column 12 of dart:_internal/iterable.dart: [DownCastComposite] result (List) will need runtime check to cast to type List + return result; + ^^^^^^ +warning: line 357, column 39 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable + return new MappedIterable._(iterable, function); + ^^^^^^^^ +warning: line 378, column 17 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable + : super._(iterable, function); + ^^^^^^^^ +warning: line 454, column 76 of dart:_internal/iterable.dart: [DownCastComposite] _f ((dynamic) → Iterable) will need runtime check to cast to type (S) → Iterable + Iterator get iterator => new ExpandIterator(_iterable.iterator, _f); + ^^ +warning: line 481, column 29 of dart:_internal/iterable.dart: [DownCastComposite] _f(_iterator.current).iterator (Iterator) will need runtime check to cast to type Iterator + _currentExpansion = _f(_iterator.current).iterator; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 961, column 33 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable + return new WhereIterable(iterable, f); + ^^^^^^^^ +warning: line 961, column 43 of dart:_internal/iterable.dart: [DownCastComposite] f ((dynamic) → bool) will need runtime check to cast to type (T) → bool + return new WhereIterable(iterable, f); + ^ +warning: line 978, column 35 of dart:_internal/iterable.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable + return new SubListIterable(list, 0, n); + ^^^^ +warning: line 983, column 37 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable + return new TakeWhileIterable(iterable, test); + ^^^^^^^^ +warning: line 983, column 47 of dart:_internal/iterable.dart: [DownCastComposite] test ((dynamic) → bool) will need runtime check to cast to type (T) → bool + return new TakeWhileIterable(iterable, test); + ^^^^ +warning: line 988, column 35 of dart:_internal/iterable.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable + return new SubListIterable(list, n, null); + ^^^^ +warning: line 993, column 37 of dart:_internal/iterable.dart: [DownCastComposite] iterable (Iterable) will need runtime check to cast to type Iterable + return new SkipWhileIterable(iterable, test); + ^^^^^^^^ +warning: line 993, column 47 of dart:_internal/iterable.dart: [DownCastComposite] test ((dynamic) → bool) will need runtime check to cast to type (T) → bool + return new SkipWhileIterable(iterable, test); + ^^^^ +warning: line 997, column 40 of dart:_internal/iterable.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable + return new ReversedListIterable(list); + ^^^^ +warning: line 1033, column 35 of dart:_internal/iterable.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable + return new SubListIterable(list, start, end); + ^^^^ +warning: line 1115, column 31 of dart:_internal/iterable.dart: [DownCastComposite] l (List) will need runtime check to cast to type List + return new ListMapView(l); + ^ +warning: line 251, column 59 of dart:_internal/list.dart: [DownCastImplicit] key (Object) will need runtime check to cast to type int + E operator[] (Object key) => containsKey(key) ? _values[key] : null; + ^^^ +warning: line 179, column 12 of dart:collection: [DownCastComposite] JS('var', '#.splice(#, 2)[1]', bucket, index) (dynamic) will need runtime check to cast to type V + return JS('var', '#.splice(#, 2)[1]', bucket, index); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 193, column 14 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K + action(key, this[key]); + ^^^ +warning: line 261, column 17 of dart:collection: [DownCastComposite] _getTableEntry(table, key) (dynamic) will need runtime check to cast to type V + V value = _getTableEntry(table, key); + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +severe: line 372, column 61 of dart:collection: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type K + : _validKey = (validKey != null) ? validKey : ((v) => v is K); + ^^^^^^ +warning: line 397, column 49 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K + return JS('int', '# & 0x3ffffff', _hashCode(key)); + ^^^ +warning: line 404, column 19 of dart:collection: [DownCastComposite] JS('var', '#[#]', bucket, i) (dynamic) will need runtime check to cast to type K + if (_equals(JS('var', '#[#]', bucket, i), key)) return i; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 404, column 49 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K + if (_equals(JS('var', '#[#]', bucket, i), key)) return i; + ^^^ +warning: line 430, column 9 of dart:collection: [DownCastComposite] JS('var', '#[#]', keys, i) (dynamic) will need runtime check to cast to type E + f(JS('var', '#[#]', keys, i)); + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 456, column 18 of dart:collection: [DownCastComposite] JS('var', '#[#]', keys, offset) (dynamic) will need runtime check to cast to type E + _current = JS('var', '#[#]', keys, offset); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 561, column 12 of dart:collection: [DownCastComposite] cell._value (dynamic) will need runtime check to cast to type V + return cell._value; + ^^^^^^^^^^^ +warning: line 627, column 12 of dart:collection: [DownCastComposite] cell._value (dynamic) will need runtime check to cast to type V + return cell._value; + ^^^^^^^^^^^ +warning: line 642, column 14 of dart:collection: [DownCastComposite] cell._key (dynamic) will need runtime check to cast to type K + action(cell._key, cell._value); + ^^^^^^^^^ +warning: line 642, column 25 of dart:collection: [DownCastComposite] cell._value (dynamic) will need runtime check to cast to type V + action(cell._key, cell._value); + ^^^^^^^^^^^ +warning: line 665, column 12 of dart:collection: [DownCastComposite] cell._value (dynamic) will need runtime check to cast to type V + return cell._value; + ^^^^^^^^^^^ +severe: line 795, column 61 of dart:collection: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type K + : _validKey = (validKey != null) ? validKey : ((v) => v is K); + ^^^^^^ +warning: line 820, column 49 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K + return JS('int', '# & 0x3ffffff', _hashCode(key)); + ^^^ +warning: line 828, column 19 of dart:collection: [DownCastComposite] cell._key (dynamic) will need runtime check to cast to type K + if (_equals(cell._key, key)) return i; + ^^^^^^^^^ +warning: line 828, column 30 of dart:collection: [DownCastComposite] key (dynamic) will need runtime check to cast to type K + if (_equals(cell._key, key)) return i; + ^^^ +warning: line 862, column 9 of dart:collection: [DownCastComposite] cell._key (dynamic) will need runtime check to cast to type E + f(cell._key); + ^^^^^^^^^ +warning: line 889, column 18 of dart:collection: [DownCastComposite] _cell._key (dynamic) will need runtime check to cast to type E + _current = _cell._key; + ^^^^^^^^^^ +warning: line 951, column 14 of dart:collection: [DownCastComposite] this.contains(object) ? object : null (Object) will need runtime check to cast to type E + return this.contains(object) ? object : null; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 962, column 12 of dart:collection: [DownCastComposite] bucket[index] (dynamic) will need runtime check to cast to type E + return bucket[index]; + ^^^^^^^^^^^^^ +severe: line 1194, column 61 of dart:collection: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type E + : _validKey = (validKey != null) ? validKey : ((x) => x is E); + ^^^^^^ +warning: line 1202, column 21 of dart:collection: [DownCastComposite] JS('var', '#[#]', bucket, i) (dynamic) will need runtime check to cast to type E + if (_equality(JS('var', '#[#]', bucket, i), element)) return i; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 1202, column 51 of dart:collection: [DownCastComposite] element (dynamic) will need runtime check to cast to type E + if (_equality(JS('var', '#[#]', bucket, i), element)) return i; + ^^^^^^^ +warning: line 1212, column 47 of dart:collection: [DownCastComposite] element (dynamic) will need runtime check to cast to type E + return JS('int', '# & 0x3ffffff', _hasher(element)); + ^^^^^^^ +warning: line 1251, column 18 of dart:collection: [DownCastComposite] JS('var', '#[#]', elements, offset) (dynamic) will need runtime check to cast to type E + _current = JS('var', '#[#]', elements, offset); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 1328, column 14 of dart:collection: [DownCastComposite] this.contains(object) ? object : null (Object) will need runtime check to cast to type E + return this.contains(object) ? object : null; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 1340, column 12 of dart:collection: [DownCastComposite] bucket[index]._element (dynamic) will need runtime check to cast to type E + return bucket[index]._element; + ^^^^^^^^^^^^^^^^^^^^^^ +warning: line 1347, column 14 of dart:collection: [DownCastComposite] cell._element (dynamic) will need runtime check to cast to type E + action(cell._element); + ^^^^^^^^^^^^^ +warning: line 1357, column 12 of dart:collection: [DownCastComposite] _first._element (dynamic) will need runtime check to cast to type E + return _first._element; + ^^^^^^^^^^^^^^^ +warning: line 1362, column 12 of dart:collection: [DownCastComposite] _last._element (dynamic) will need runtime check to cast to type E + return _last._element; + ^^^^^^^^^^^^^^ +warning: line 1431, column 19 of dart:collection: [DownCastComposite] cell._element (dynamic) will need runtime check to cast to type E + E element = cell._element; + ^^^^^^^^^^^^^ +severe: line 1596, column 61 of dart:collection: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type E + : _validKey = (validKey != null) ? validKey : ((x) => x is E); + ^^^^^^ +warning: line 1606, column 21 of dart:collection: [DownCastComposite] cell._element (dynamic) will need runtime check to cast to type E + if (_equality(cell._element, element)) return i; + ^^^^^^^^^^^^^ +warning: line 1606, column 36 of dart:collection: [DownCastComposite] element (dynamic) will need runtime check to cast to type E + if (_equality(cell._element, element)) return i; + ^^^^^^^ +warning: line 1616, column 47 of dart:collection: [DownCastComposite] element (dynamic) will need runtime check to cast to type E + return JS('int', '# & 0x3ffffff', _hasher(element)); + ^^^^^^^ +warning: line 1678, column 18 of dart:collection: [DownCastComposite] _cell._element (dynamic) will need runtime check to cast to type E + _current = _cell._element; + ^^^^^^^^^^^^^^ +warning: line 112, column 40 of dart:collection/hash_map.dart: [DownCastComposite] v (dynamic) will need runtime check to cast to type V + other.forEach((k, v) { result[k] = v; }); + ^ +warning: line 112, column 35 of dart:collection/hash_map.dart: [DownCastComposite] k (dynamic) will need runtime check to cast to type K + other.forEach((k, v) { result[k] = v; }); + ^ +warning: line 128, column 17 of dart:collection/hash_set.dart: [DownCastComposite] elements (Iterable) will need runtime check to cast to type Iterable + for (E e in elements) result.add(e); + ^^^^^^^^ +warning: line 33, column 16 of dart:collection/iterator.dart: [DownCastComposite] _iterator.current (dynamic) will need runtime check to cast to type E + E result = _iterator.current; + ^^^^^^^^^^^^^^^^^ +warning: line 99, column 40 of dart:collection/linked_hash_map.dart: [DownCastComposite] v (dynamic) will need runtime check to cast to type V + other.forEach((k, v) { result[k] = v; }); + ^ +warning: line 99, column 35 of dart:collection/linked_hash_map.dart: [DownCastComposite] k (dynamic) will need runtime check to cast to type K + other.forEach((k, v) { result[k] = v; }); + ^ +warning: line 142, column 12 of dart:collection/linked_hash_map.dart: [DownCastComposite] fillLiteralMap(keyValuePairs, new _LinkedHashMap()) (dynamic) will need runtime check to cast to type LinkedHashMap + return fillLiteralMap(keyValuePairs, new _LinkedHashMap()); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 65, column 56 of dart:collection/linked_list.dart: [DownCastComposite] entry (dynamic) will need runtime check to cast to type E + entries.forEach((entry) => _insertAfter(_previous, entry)); + ^^^^^ +warning: line 93, column 17 of dart:collection/linked_list.dart: [DownCastComposite] next (_LinkedListLink) will need runtime check to cast to type E + E entry = next; + ^^^^ +warning: line 105, column 12 of dart:collection/linked_list.dart: [DownCastComposite] _next (_LinkedListLink) will need runtime check to cast to type E + return _next; + ^^^^^ +warning: line 112, column 12 of dart:collection/linked_list.dart: [DownCastComposite] _previous (_LinkedListLink) will need runtime check to cast to type E + return _previous; + ^^^^^^^^^ +warning: line 122, column 12 of dart:collection/linked_list.dart: [DownCastComposite] _next (_LinkedListLink) will need runtime check to cast to type E + return _next; ^^^^^ +warning: line 134, column 14 of dart:collection/linked_list.dart: [DownCastComposite] current (_LinkedListLink) will need runtime check to cast to type E + action(current); + ^^^^^^^ +warning: line 192, column 16 of dart:collection/linked_list.dart: [DownCastComposite] _next (_LinkedListLink) will need runtime check to cast to type E + _current = _next; + ^^^^^ +warning: line 249, column 16 of dart:collection/linked_list.dart: [DownCastComposite] _next (_LinkedListLink) will need runtime check to cast to type E + E result = _next; + ^^^^^ +warning: line 365, column 19 of dart:collection/list.dart: [DownCastImplicit] iterable (Iterable) will need runtime check to cast to type List + otherList = iterable; + ^^^^^^^^ +warning: line 377, column 27 of dart:collection/list.dart: [DownCastComposite] otherList[otherStart + i] (dynamic) will need runtime check to cast to type E + this[start + i] = otherList[otherStart + i]; + ^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 381, column 27 of dart:collection/list.dart: [DownCastComposite] otherList[otherStart + i] (dynamic) will need runtime check to cast to type E + this[start + i] = otherList[otherStart + i]; + ^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 122, column 18 of dart:collection/maps.dart: [DownCastComposite] _map[_map.keys.first] (dynamic) will need runtime check to cast to type V + V get first => _map[_map.keys.first]; + ^^^^^^^^^^^^^^^^^^^^^ +warning: line 123, column 19 of dart:collection/maps.dart: [DownCastComposite] _map[_map.keys.single] (dynamic) will need runtime check to cast to type V + V get single => _map[_map.keys.single]; + ^^^^^^^^^^^^^^^^^^^^^^ +warning: line 124, column 17 of dart:collection/maps.dart: [DownCastComposite] _map[_map.keys.last] (dynamic) will need runtime check to cast to type V + V get last => _map[_map.keys.last]; + ^^^^^^^^^^^^^^^^^^^^ +warning: line 144, column 18 of dart:collection/maps.dart: [DownCastComposite] _map[_keys.current] (dynamic) will need runtime check to cast to type V + _current = _map[_keys.current]; + ^^^^^^^^^^^^^^^^^^^ +warning: line 208, column 23 of dart:collection/queue.dart: [DownCastComposite] elements (Iterable) will need runtime check to cast to type Iterable + for (final E e in elements) { + ^^^^^^^^ +warning: line 211, column 12 of dart:collection/queue.dart: [DownCastComposite] list (Queue) will need runtime check to cast to type DoubleLinkedQueue + return list; + ^^^^ +warning: line 402, column 40 of dart:collection/queue.dart: [DownCastComposite] sourceList (List) will need runtime check to cast to type Iterable + queue._table.setRange(0, length, sourceList, 0); + ^^^^^^^^^^ +warning: line 411, column 31 of dart:collection/queue.dart: [DownCastComposite] elements (Iterable) will need runtime check to cast to type Iterable + for (final E element in elements) { + ^^^^^^^^ +warning: line 480, column 52 of dart:collection/queue.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable + _table.setRange(length, length + addCount, list, 0); + ^^^^ +warning: line 486, column 52 of dart:collection/queue.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable + _table.setRange(_tail, _tail + addCount, list, 0); + ^^^^ +warning: line 490, column 52 of dart:collection/queue.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable + _table.setRange(_tail, _tail + endSpace, list, 0); + ^^^^ +warning: line 491, column 40 of dart:collection/queue.dart: [DownCastComposite] list (List) will need runtime check to cast to type Iterable + _table.setRange(0, preSpace, list, endSpace); + ^^^^ +warning: line 738, column 16 of dart:collection/queue.dart: [DownCastComposite] _queue._table[_position] (dynamic) will need runtime check to cast to type E + _current = _queue._table[_position]; + ^^^^^^^^^^^^^^^^^^^^^^^^ +severe: line 610, column 60 of dart:collection/splay_tree.dart: [AnalyzerError] The getter '_validKey' is not defined for the class '_SplayTree' + new SplayTreeSet(setOrMap._comparator, setOrMap._validKey); + ^^^^^^^^^ +severe: line 610, column 38 of dart:collection/splay_tree.dart: [AnalyzerError] The getter '_comparator' is not defined for the class '_SplayTree' + new SplayTreeSet(setOrMap._comparator, setOrMap._validKey); + ^^^^^^^^^^^ +warning: line 151, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] current (_SplayTreeNode) will need runtime check to cast to type _SplayTreeNode + return current; + ^^^^^^^ +warning: line 167, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] current (_SplayTreeNode) will need runtime check to cast to type _SplayTreeNode + return current; + ^^^^^^^ +warning: line 265, column 23 of dart:collection/splay_tree.dart: [DownCastComposite] (compare == null) ? Comparable.compare : compare (dynamic) will need runtime check to cast to type (K, K) → int + : _comparator = (compare == null) ? Comparable.compare : compare, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +severe: line 266, column 65 of dart:collection/splay_tree.dart: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type K + _validKey = (isValidKey != null) ? isValidKey : ((v) => v is K); + ^^^^^^ +warning: line 275, column 40 of dart:collection/splay_tree.dart: [DownCastComposite] v (dynamic) will need runtime check to cast to type V + other.forEach((k, v) { result[k] = v; }); + ^ +warning: line 275, column 35 of dart:collection/splay_tree.dart: [DownCastComposite] k (dynamic) will need runtime check to cast to type K + other.forEach((k, v) { result[k] = v; }); + ^ +warning: line 328, column 25 of dart:collection/splay_tree.dart: [DownCastComposite] key (Object) will need runtime check to cast to type K + int comp = _splay(key); + ^^^ +warning: line 331, column 16 of dart:collection/splay_tree.dart: [DownCastComposite] mapRoot.value (dynamic) will need runtime check to cast to type V + return mapRoot.value; + ^^^^^^^^^^^^^ +warning: line 339, column 41 of dart:collection/splay_tree.dart: [DownCastComposite] key (Object) will need runtime check to cast to type K + _SplayTreeMapNode mapRoot = _remove(key); + ^^^ +warning: line 340, column 33 of dart:collection/splay_tree.dart: [DownCastComposite] mapRoot.value (dynamic) will need runtime check to cast to type V + if (mapRoot != null) return mapRoot.value; + ^^^^^^^^^^^^^ +warning: line 363, column 14 of dart:collection/splay_tree.dart: [DownCastComposite] mapRoot.value (dynamic) will need runtime check to cast to type V + return mapRoot.value; + ^^^^^^^^^^^^^ +warning: line 394, column 38 of dart:collection/splay_tree.dart: [DownCastComposite] nodes.current (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode + _SplayTreeMapNode node = nodes.current; + ^^^^^^^^^^^^^ +warning: line 408, column 37 of dart:collection/splay_tree.dart: [DownCastComposite] key (Object) will need runtime check to cast to type K + return _validKey(key) && _splay(key) == 0; + ^^^ +warning: line 420, column 41 of dart:collection/splay_tree.dart: [DownCastImplicit] node.right (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode + if (node.right != null && visit(node.right)) return true; + ^^^^^^^^^^ +warning: line 421, column 16 of dart:collection/splay_tree.dart: [DownCastImplicit] node.left (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode + node = node.left; + ^^^^^^^^^ +warning: line 425, column 18 of dart:collection/splay_tree.dart: [DownCastImplicit] _root (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode + return visit(_root); + ^^^^^ +warning: line 441, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] _first.key (dynamic) will need runtime check to cast to type K + return _first.key; + ^^^^^^^^^^ +warning: line 449, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] _last.key (dynamic) will need runtime check to cast to type K + return _last.key; + ^^^^^^^^^ +warning: line 545, column 22 of dart:collection/splay_tree.dart: [DownCastImplicit] _currentNode (_SplayTreeNode) will need runtime check to cast to type _SplayTreeMapNode + return _getValue(_currentNode); + ^^^^^^^^^^^^ +warning: line 610, column 29 of dart:collection/splay_tree.dart: [DownCastComposite] setOrMap._comparator (dynamic) will need runtime check to cast to type (K, K) → int + new SplayTreeSet(setOrMap._comparator, setOrMap._validKey); + ^^^^^^^^^^^^^^^^^^^^ +warning: line 610, column 51 of dart:collection/splay_tree.dart: [DownCastComposite] setOrMap._validKey (dynamic) will need runtime check to cast to type (Object) → bool + new SplayTreeSet(setOrMap._comparator, setOrMap._validKey); + ^^^^^^^^^^^^^^^^^^ +warning: line 628, column 39 of dart:collection/splay_tree.dart: [DownCastComposite] node.key (dynamic) will need runtime check to cast to type K + K _getValue(_SplayTreeNode node) => node.key; + ^^^^^^^^ +warning: line 633, column 42 of dart:collection/splay_tree.dart: [DownCastComposite] node.value (dynamic) will need runtime check to cast to type V + V _getValue(_SplayTreeMapNode node) => node.value; + ^^^^^^^^^^ +warning: line 641, column 55 of dart:collection/splay_tree.dart: [DownCastComposite] node (_SplayTreeNode) will need runtime check to cast to type _SplayTreeNode + _SplayTreeNode _getValue(_SplayTreeNode node) => node; + ^^^^ +warning: line 691, column 23 of dart:collection/splay_tree.dart: [DownCastComposite] (compare == null) ? Comparable.compare : compare (dynamic) will need runtime check to cast to type (E, E) → int + : _comparator = (compare == null) ? Comparable.compare : compare, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +severe: line 692, column 65 of dart:collection/splay_tree.dart: [InvalidRuntimeCheckError] Invalid runtime check on non-ground type E + _validKey = (isValidKey != null) ? isValidKey : ((v) => v is E); + ^^^^^^ +warning: line 705, column 29 of dart:collection/splay_tree.dart: [DownCastComposite] elements (Iterable) will need runtime check to cast to type Iterable + for (final E element in elements) { + ^^^^^^^^ +warning: line 723, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] _first.key (dynamic) will need runtime check to cast to type E + return _first.key; + ^^^^^^^^^^ +warning: line 728, column 12 of dart:collection/splay_tree.dart: [DownCastComposite] _last.key (dynamic) will need runtime check to cast to type E + return _last.key; + ^^^^^^^^^ +warning: line 739, column 40 of dart:collection/splay_tree.dart: [DownCastComposite] object (Object) will need runtime check to cast to type E + return _validKey(object) && _splay(object) == 0; + ^^^^^^ +warning: line 751, column 20 of dart:collection/splay_tree.dart: [DownCastComposite] object (Object) will need runtime check to cast to type E + return _remove(object) != null; + ^^^^^^ +warning: line 765, column 39 of dart:collection/splay_tree.dart: [DownCastComposite] element (Object) will need runtime check to cast to type E + if (_validKey(element)) _remove(element); + ^^^^^^^ +warning: line 779, column 39 of dart:collection/splay_tree.dart: [DownCastComposite] object (Object) will need runtime check to cast to type E + if (_validKey(object) && _splay(object) == 0) retainSet.add(_root.key); + ^^^^^^ +warning: line 791, column 23 of dart:collection/splay_tree.dart: [DownCastComposite] object (Object) will need runtime check to cast to type E + int comp = _splay(object); + ^^^^^^ +severe: line 514, column 46 of dart:js: [AnalyzerError] The name 'Window' is not defined and cannot be used in an 'is' expression + || o is Node || o is TypedData || o is Window) { + ^^^^^^ +severe: line 553, column 46 of dart:js: [AnalyzerError] The name 'Window' is not defined and cannot be used in an 'is' expression + || o is Node || o is TypedData || o is Window)) { + ^^^^^^ +severe: line 467, column 5 of dart:js: [AnalyzerError] Undefined name 'getIsolateAffinityTag' + getIsolateAffinityTag(r'_$dart_dartClosure'); + ^^^^^^^^^^^^^^^^^^^^^ +severe: line 552, column 60 of dart:js: [AnalyzerError] The name 'ImageData' is not defined and cannot be used in an 'is' expression + && (o is Blob || o is Event || o is KeyRange || o is ImageData + ^^^^^^^^^ +severe: line 513, column 63 of dart:js: [AnalyzerError] The name 'ImageData' is not defined and cannot be used in an 'is' expression + } else if (o is Blob || o is Event || o is KeyRange || o is ImageData + ^^^^^^^^^ +severe: line 465, column 5 of dart:js: [AnalyzerError] Undefined name 'getIsolateAffinityTag' + getIsolateAffinityTag(r'_$dart_dartObject'); + ^^^^^^^^^^^^^^^^^^^^^ +severe: line 514, column 15 of dart:js: [AnalyzerError] The name 'Node' is not defined and cannot be used in an 'is' expression + || o is Node || o is TypedData || o is Window) { + ^^^^ +severe: line 553, column 15 of dart:js: [AnalyzerError] The name 'Node' is not defined and cannot be used in an 'is' expression + || o is Node || o is TypedData || o is Window)) { + ^^^^ +severe: line 513, column 32 of dart:js: [AnalyzerError] The name 'Event' is not defined and cannot be used in an 'is' expression + } else if (o is Blob || o is Event || o is KeyRange || o is ImageData + ^^^^^ +severe: line 552, column 29 of dart:js: [AnalyzerError] The name 'Event' is not defined and cannot be used in an 'is' expression + && (o is Blob || o is Event || o is KeyRange || o is ImageData + ^^^^^ +warning: line 449, column 29 of dart:js: [AnalyzerError] Local variables cannot be referenced before they are declared + _checkRange(start, end, length); + ^^^^^^ +severe: line 465, column 5 of dart:js: [AnalyzerError] The function 'getIsolateAffinityTag' is not defined + getIsolateAffinityTag(r'_$dart_dartObject'); + ^^^^^^^^^^^^^^^^^^^^^ +severe: line 552, column 43 of dart:js: [AnalyzerError] The name 'KeyRange' is not defined and cannot be used in an 'is' expression + && (o is Blob || o is Event || o is KeyRange || o is ImageData + ^^^^^^^^ +severe: line 513, column 46 of dart:js: [AnalyzerError] The name 'KeyRange' is not defined and cannot be used in an 'is' expression + } else if (o is Blob || o is Event || o is KeyRange || o is ImageData + ^^^^^^^^ +severe: line 467, column 5 of dart:js: [AnalyzerError] The function 'getIsolateAffinityTag' is not defined + getIsolateAffinityTag(r'_$dart_dartClosure'); + ^^^^^^^^^^^^^^^^^^^^^ +severe: line 552, column 16 of dart:js: [AnalyzerError] The name 'Blob' is not defined and cannot be used in an 'is' expression + && (o is Blob || o is Event || o is KeyRange || o is ImageData + ^^^^ +severe: line 513, column 19 of dart:js: [AnalyzerError] The name 'Blob' is not defined and cannot be used in an 'is' expression + } else if (o is Blob || o is Event || o is KeyRange || o is ImageData + ^^^^ +warning: line 357, column 44 of dart:js: [DownCastComposite] _convertToJS ((dynamic) → dynamic) will need runtime check to cast to type (E) → dynamic + : super._fromJs([]..addAll(other.map(_convertToJS))); + ^^^^^^^^^^^^ +warning: line 390, column 12 of dart:js: [DownCastComposite] super[index] (dynamic) will need runtime check to cast to type E + return super[index]; + ^^^^^^^^^^^^ +warning: line 425, column 24 of dart:js: [DownCastImplicit] list (Object) will need runtime check to cast to type List + callMethod('push', list); + ^^^^ +warning: line 435, column 12 of dart:js: [DownCastComposite] callMethod('splice', [index, 1])[0] (dynamic) will need runtime check to cast to type E + return callMethod('splice', [index, 1])[0]; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 440, column 12 of dart:js: [DownCastComposite] callMethod('pop') (dynamic) will need runtime check to cast to type E + return callMethod('pop'); + ^^^^^^^^^^^^^^^^^ +warning: line 558, column 52 of dart:js: [DownCastImplicit] ms (num) will need runtime check to cast to type int + return new DateTime.fromMillisecondsSinceEpoch(ms); + ^^ +warning: line 568, column 12 of dart:js: [DownCastImplicit] _getDartProxy(o, _DART_CLOSURE_PROPERTY_NAME, (o) => new JsFunction._fromJs(o)) (Object) will need runtime check to cast to type JsObject + return _getDartProxy(o, _DART_CLOSURE_PROPERTY_NAME, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 571, column 12 of dart:js: [DownCastImplicit] _getDartProxy(o, _DART_OBJECT_PROPERTY_NAME, (o) => new JsArray._fromJs(o)) (Object) will need runtime check to cast to type JsObject + return _getDartProxy(o, _DART_OBJECT_PROPERTY_NAME, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +warning: line 574, column 12 of dart:js: [DownCastImplicit] _getDartProxy(o, _DART_OBJECT_PROPERTY_NAME, (o) => new JsObject._fromJs(o)) (Object) will need runtime check to cast to type JsObject + return _getDartProxy(o, _DART_OBJECT_PROPERTY_NAME, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^