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

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

Issue 1757343002: upgrade to latest analyzer (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/isolate.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('dart/js', null, /* Imports */[ 1 dart_library.library('dart/js', null, /* Imports */[
2 'dart/_runtime', 2 'dart/_runtime',
3 'dart/core', 3 'dart/core',
4 'dart/collection', 4 'dart/collection',
5 'dart/_js_helper' 5 'dart/_js_helper'
6 ], /* Lazy imports */[ 6 ], /* Lazy imports */[
7 ], function(exports, dart, core, collection, _js_helper) { 7 ], function(exports, dart, core, collection, _js_helper) {
8 'use strict'; 8 'use strict';
9 let dartx = dart.dartx; 9 let dartx = dart.dartx;
10 const _global = dart.global; 10 const _global = dart.global;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 if (typeof len === "number" && len >>> 0 === len) { 219 if (typeof len === "number" && len >>> 0 === len) {
220 return len; 220 return len;
221 } 221 }
222 dart.throw(new core.StateError('Bad JsArray length')); 222 dart.throw(new core.StateError('Bad JsArray length'));
223 } 223 }
224 set length(length) { 224 set length(length) {
225 super.set('length', length); 225 super.set('length', length);
226 } 226 }
227 add(value) { 227 add(value) {
228 dart.as(value, E); 228 dart.as(value, E);
229 this.callMethod('push', [value]); 229 this.callMethod('push', dart.list([value], E));
230 } 230 }
231 addAll(iterable) { 231 addAll(iterable) {
232 dart.as(iterable, core.Iterable$(E)); 232 dart.as(iterable, core.Iterable$(E));
233 let list = iterable instanceof Array ? iterable : core.List.from(iterabl e); 233 let list = iterable instanceof Array ? iterable : core.List.from(iterabl e);
234 this.callMethod('push', dart.as(list, core.List)); 234 this.callMethod('push', dart.as(list, core.List));
235 } 235 }
236 insert(index, element) { 236 insert(index, element) {
237 dart.as(element, E); 237 dart.as(element, E);
238 this[_checkInsertIndex](index); 238 this[_checkInsertIndex](index);
239 this.callMethod('splice', [index, 0, element]); 239 this.callMethod('splice', dart.list([index, 0, element], core.Object));
240 } 240 }
241 removeAt(index) { 241 removeAt(index) {
242 this[_checkIndex](index); 242 this[_checkIndex](index);
243 return dart.as(dart.dindex(this.callMethod('splice', [index, 1]), 0), E) ; 243 return dart.as(dart.dindex(this.callMethod('splice', dart.list([index, 1 ], core.int)), 0), E);
244 } 244 }
245 removeLast() { 245 removeLast() {
246 if (this.length == 0) dart.throw(new core.RangeError(-1)); 246 if (this.length == 0) dart.throw(new core.RangeError(-1));
247 return dart.as(this.callMethod('pop'), E); 247 return dart.as(this.callMethod('pop'), E);
248 } 248 }
249 removeRange(start, end) { 249 removeRange(start, end) {
250 JsArray$()._checkRange(start, end, this.length); 250 JsArray$()._checkRange(start, end, this.length);
251 this.callMethod('splice', [start, dart.notNull(end) - dart.notNull(start )]); 251 this.callMethod('splice', dart.list([start, dart.notNull(end) - dart.not Null(start)], core.int));
252 } 252 }
253 setRange(start, end, iterable, skipCount) { 253 setRange(start, end, iterable, skipCount) {
254 dart.as(iterable, core.Iterable$(E)); 254 dart.as(iterable, core.Iterable$(E));
255 if (skipCount === void 0) skipCount = 0; 255 if (skipCount === void 0) skipCount = 0;
256 JsArray$()._checkRange(start, end, this.length); 256 JsArray$()._checkRange(start, end, this.length);
257 let length = dart.notNull(end) - dart.notNull(start); 257 let length = dart.notNull(end) - dart.notNull(start);
258 if (length == 0) return; 258 if (length == 0) return;
259 if (dart.notNull(skipCount) < 0) dart.throw(new core.ArgumentError(skipC ount)); 259 if (dart.notNull(skipCount) < 0) dart.throw(new core.ArgumentError(skipC ount));
260 let args = [start, length]; 260 let args = dart.list([start, length], core.int);
261 args[dartx.addAll](iterable[dartx.skip](skipCount)[dartx.take](length)); 261 args[dartx.addAll](iterable[dartx.skip](skipCount)[dartx.take](length));
262 this.callMethod('splice', args); 262 this.callMethod('splice', args);
263 } 263 }
264 sort(compare) { 264 sort(compare) {
265 if (compare === void 0) compare = null; 265 if (compare === void 0) compare = null;
266 dart.as(compare, dart.functionType(core.int, [E, E])); 266 dart.as(compare, dart.functionType(core.int, [E, E]));
267 this.callMethod('sort', compare == null ? [] : [compare]); 267 this.callMethod('sort', dart.as(compare == null ? [] : dart.list([compar e], dart.functionType(core.int, [E, E])), core.List));
268 } 268 }
269 } 269 }
270 dart.defineNamedConstructor(JsArray, 'from'); 270 dart.defineNamedConstructor(JsArray, 'from');
271 dart.defineNamedConstructor(JsArray, '_fromJs'); 271 dart.defineNamedConstructor(JsArray, '_fromJs');
272 dart.setSignature(JsArray, { 272 dart.setSignature(JsArray, {
273 constructors: () => ({ 273 constructors: () => ({
274 JsArray: [JsArray$(E), []], 274 JsArray: [JsArray$(E), []],
275 from: [JsArray$(E), [core.Iterable$(E)]], 275 from: [JsArray$(E), [core.Iterable$(E)]],
276 _fromJs: [JsArray$(E), [dart.dynamic]] 276 _fromJs: [JsArray$(E), [dart.dynamic]]
277 }), 277 }),
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 dart.fn(allowInteropCaptureThis, core.Function, [core.Function]); 405 dart.fn(allowInteropCaptureThis, core.Function, [core.Function]);
406 // Exports: 406 // Exports:
407 exports.JsObject = JsObject; 407 exports.JsObject = JsObject;
408 exports.JsFunction = JsFunction; 408 exports.JsFunction = JsFunction;
409 exports.JsArray$ = JsArray$; 409 exports.JsArray$ = JsArray$;
410 exports.JsArray = JsArray; 410 exports.JsArray = JsArray;
411 exports.allowInterop = allowInterop; 411 exports.allowInterop = allowInterop;
412 exports.allowInteropCaptureThis = allowInteropCaptureThis; 412 exports.allowInteropCaptureThis = allowInteropCaptureThis;
413 }); 413 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/isolate.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698