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

Unified Diff: lib/runtime/dart/_internal.js

Issue 1680263002: Support for dart:typed_data (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Address comments, rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/runtime/dart/_native_typed_data.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_internal.js
diff --git a/lib/runtime/dart/_internal.js b/lib/runtime/dart/_internal.js
index 4d761a9939a1c4f312aa0949617393b2526cdd41..f773eb973799d570a089415a7dd3b8b319d9a344 100644
--- a/lib/runtime/dart/_internal.js
+++ b/lib/runtime/dart/_internal.js
@@ -1525,68 +1525,83 @@ dart_library.library('dart/_internal', null, /* Imports */[
});
let __CastType2 = __CastType2$();
const FixedLengthListMixin$ = dart.generic(function(E) {
+ dart.defineExtensionNames([
+ 'length',
+ 'add',
+ 'insert',
+ 'insertAll',
+ 'addAll',
+ 'remove',
+ 'removeWhere',
+ 'retainWhere',
+ 'clear',
+ 'removeAt',
+ 'removeLast',
+ 'removeRange',
+ 'replaceRange'
+ ]);
class FixedLengthListMixin extends core.Object {
- set length(newLength) {
+ set [dartx.length](newLength) {
dart.throw(new core.UnsupportedError("Cannot change the length of a fixed-length list"));
}
- add(value) {
+ [dartx.add](value) {
dart.as(value, E);
dart.throw(new core.UnsupportedError("Cannot add to a fixed-length list"));
}
- insert(index, value) {
+ [dartx.insert](index, value) {
dart.as(value, E);
dart.throw(new core.UnsupportedError("Cannot add to a fixed-length list"));
}
- insertAll(at, iterable) {
+ [dartx.insertAll](at, iterable) {
dart.as(iterable, core.Iterable$(E));
dart.throw(new core.UnsupportedError("Cannot add to a fixed-length list"));
}
- addAll(iterable) {
+ [dartx.addAll](iterable) {
dart.as(iterable, core.Iterable$(E));
dart.throw(new core.UnsupportedError("Cannot add to a fixed-length list"));
}
- remove(element) {
+ [dartx.remove](element) {
dart.throw(new core.UnsupportedError("Cannot remove from a fixed-length list"));
}
- removeWhere(test) {
+ [dartx.removeWhere](test) {
dart.as(test, dart.functionType(core.bool, [E]));
dart.throw(new core.UnsupportedError("Cannot remove from a fixed-length list"));
}
- retainWhere(test) {
+ [dartx.retainWhere](test) {
dart.as(test, dart.functionType(core.bool, [E]));
dart.throw(new core.UnsupportedError("Cannot remove from a fixed-length list"));
}
- clear() {
+ [dartx.clear]() {
dart.throw(new core.UnsupportedError("Cannot clear a fixed-length list"));
}
- removeAt(index) {
+ [dartx.removeAt](index) {
dart.throw(new core.UnsupportedError("Cannot remove from a fixed-length list"));
}
- removeLast() {
+ [dartx.removeLast]() {
dart.throw(new core.UnsupportedError("Cannot remove from a fixed-length list"));
}
- removeRange(start, end) {
+ [dartx.removeRange](start, end) {
dart.throw(new core.UnsupportedError("Cannot remove from a fixed-length list"));
}
- replaceRange(start, end, iterable) {
+ [dartx.replaceRange](start, end, iterable) {
dart.as(iterable, core.Iterable$(E));
dart.throw(new core.UnsupportedError("Cannot remove from a fixed-length list"));
}
}
dart.setSignature(FixedLengthListMixin, {
methods: () => ({
- add: [dart.void, [E]],
- insert: [dart.void, [core.int, E]],
- insertAll: [dart.void, [core.int, core.Iterable$(E)]],
- addAll: [dart.void, [core.Iterable$(E)]],
- remove: [core.bool, [core.Object]],
- removeWhere: [dart.void, [dart.functionType(core.bool, [E])]],
- retainWhere: [dart.void, [dart.functionType(core.bool, [E])]],
- clear: [dart.void, []],
- removeAt: [E, [core.int]],
- removeLast: [E, []],
- removeRange: [dart.void, [core.int, core.int]],
- replaceRange: [dart.void, [core.int, core.int, core.Iterable$(E)]]
+ [dartx.add]: [dart.void, [E]],
+ [dartx.insert]: [dart.void, [core.int, E]],
+ [dartx.insertAll]: [dart.void, [core.int, core.Iterable$(E)]],
+ [dartx.addAll]: [dart.void, [core.Iterable$(E)]],
+ [dartx.remove]: [core.bool, [core.Object]],
+ [dartx.removeWhere]: [dart.void, [dart.functionType(core.bool, [E])]],
+ [dartx.retainWhere]: [dart.void, [dart.functionType(core.bool, [E])]],
+ [dartx.clear]: [dart.void, []],
+ [dartx.removeAt]: [E, [core.int]],
+ [dartx.removeLast]: [E, []],
+ [dartx.removeRange]: [dart.void, [core.int, core.int]],
+ [dartx.replaceRange]: [dart.void, [core.int, core.int, core.Iterable$(E)]]
})
});
return FixedLengthListMixin;
« no previous file with comments | « no previous file | lib/runtime/dart/_native_typed_data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698