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

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

Issue 1152583002: Add constructors to signatures (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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
Index: lib/runtime/dart/typed_data.js
diff --git a/lib/runtime/dart/typed_data.js b/lib/runtime/dart/typed_data.js
index 7294ab1497dfe6db6a6adbaac314bf97b5eac79b..72118c3944a674d14bd53c2caaefed05c63d1630 100644
--- a/lib/runtime/dart/typed_data.js
+++ b/lib/runtime/dart/typed_data.js
@@ -12,6 +12,9 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
}
}
dart.defineNamedConstructor(Endianness, '_');
+ dart.setSignature(Endianness, {
+ constructors: () => ({_: [Endianness, [core.bool]]})
+ });
Endianness.BIG_ENDIAN = dart.const(new Endianness._(false));
Endianness.LITTLE_ENDIAN = dart.const(new Endianness._(true));
dart.defineLazyProperties(Endianness, {
@@ -33,6 +36,12 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
}
ByteData[dart.implements] = () => [TypedData];
dart.defineNamedConstructor(ByteData, 'view');
+ dart.setSignature(ByteData, {
+ constructors: () => ({
+ ByteData: [ByteData, [core.int]],
+ view: [ByteData, [ByteBuffer], [core.int, core.int]]
+ })
+ });
class Int8List extends core.Object {
Int8List(length) {
return new _native_typed_data.NativeInt8List(length);
@@ -51,6 +60,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Int8List[dart.implements] = () => [core.List$(core.int), TypedData];
dart.defineNamedConstructor(Int8List, 'fromList');
dart.defineNamedConstructor(Int8List, 'view');
+ dart.setSignature(Int8List, {
+ constructors: () => ({
+ Int8List: [Int8List, [core.int]],
+ fromList: [Int8List, [core.List$(core.int)]],
+ view: [Int8List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Int8List.BYTES_PER_ELEMENT = 1;
class Uint8List extends core.Object {
Uint8List(length) {
@@ -70,6 +86,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Uint8List[dart.implements] = () => [core.List$(core.int), TypedData];
dart.defineNamedConstructor(Uint8List, 'fromList');
dart.defineNamedConstructor(Uint8List, 'view');
+ dart.setSignature(Uint8List, {
+ constructors: () => ({
+ Uint8List: [Uint8List, [core.int]],
+ fromList: [Uint8List, [core.List$(core.int)]],
+ view: [Uint8List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Uint8List.BYTES_PER_ELEMENT = 1;
class Uint8ClampedList extends core.Object {
Uint8ClampedList(length) {
@@ -89,6 +112,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Uint8ClampedList[dart.implements] = () => [core.List$(core.int), TypedData];
dart.defineNamedConstructor(Uint8ClampedList, 'fromList');
dart.defineNamedConstructor(Uint8ClampedList, 'view');
+ dart.setSignature(Uint8ClampedList, {
+ constructors: () => ({
+ Uint8ClampedList: [Uint8ClampedList, [core.int]],
+ fromList: [Uint8ClampedList, [core.List$(core.int)]],
+ view: [Uint8ClampedList, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Uint8ClampedList.BYTES_PER_ELEMENT = 1;
class Int16List extends core.Object {
Int16List(length) {
@@ -108,6 +138,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Int16List[dart.implements] = () => [core.List$(core.int), TypedData];
dart.defineNamedConstructor(Int16List, 'fromList');
dart.defineNamedConstructor(Int16List, 'view');
+ dart.setSignature(Int16List, {
+ constructors: () => ({
+ Int16List: [Int16List, [core.int]],
+ fromList: [Int16List, [core.List$(core.int)]],
+ view: [Int16List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Int16List.BYTES_PER_ELEMENT = 2;
class Uint16List extends core.Object {
Uint16List(length) {
@@ -127,6 +164,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Uint16List[dart.implements] = () => [core.List$(core.int), TypedData];
dart.defineNamedConstructor(Uint16List, 'fromList');
dart.defineNamedConstructor(Uint16List, 'view');
+ dart.setSignature(Uint16List, {
+ constructors: () => ({
+ Uint16List: [Uint16List, [core.int]],
+ fromList: [Uint16List, [core.List$(core.int)]],
+ view: [Uint16List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Uint16List.BYTES_PER_ELEMENT = 2;
class Int32List extends core.Object {
Int32List(length) {
@@ -146,6 +190,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Int32List[dart.implements] = () => [core.List$(core.int), TypedData];
dart.defineNamedConstructor(Int32List, 'fromList');
dart.defineNamedConstructor(Int32List, 'view');
+ dart.setSignature(Int32List, {
+ constructors: () => ({
+ Int32List: [Int32List, [core.int]],
+ fromList: [Int32List, [core.List$(core.int)]],
+ view: [Int32List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Int32List.BYTES_PER_ELEMENT = 4;
class Uint32List extends core.Object {
Uint32List(length) {
@@ -165,6 +216,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Uint32List[dart.implements] = () => [core.List$(core.int), TypedData];
dart.defineNamedConstructor(Uint32List, 'fromList');
dart.defineNamedConstructor(Uint32List, 'view');
+ dart.setSignature(Uint32List, {
+ constructors: () => ({
+ Uint32List: [Uint32List, [core.int]],
+ fromList: [Uint32List, [core.List$(core.int)]],
+ view: [Uint32List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Uint32List.BYTES_PER_ELEMENT = 4;
class Int64List extends core.Object {
Int64List(length) {
@@ -184,6 +242,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Int64List[dart.implements] = () => [core.List$(core.int), TypedData];
dart.defineNamedConstructor(Int64List, 'fromList');
dart.defineNamedConstructor(Int64List, 'view');
+ dart.setSignature(Int64List, {
+ constructors: () => ({
+ Int64List: [Int64List, [core.int]],
+ fromList: [Int64List, [core.List$(core.int)]],
+ view: [Int64List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Int64List.BYTES_PER_ELEMENT = 8;
class Uint64List extends core.Object {
Uint64List(length) {
@@ -203,6 +268,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Uint64List[dart.implements] = () => [core.List$(core.int), TypedData];
dart.defineNamedConstructor(Uint64List, 'fromList');
dart.defineNamedConstructor(Uint64List, 'view');
+ dart.setSignature(Uint64List, {
+ constructors: () => ({
+ Uint64List: [Uint64List, [core.int]],
+ fromList: [Uint64List, [core.List$(core.int)]],
+ view: [Uint64List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Uint64List.BYTES_PER_ELEMENT = 8;
class Float32List extends core.Object {
Float32List(length) {
@@ -222,6 +294,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Float32List[dart.implements] = () => [core.List$(core.double), TypedData];
dart.defineNamedConstructor(Float32List, 'fromList');
dart.defineNamedConstructor(Float32List, 'view');
+ dart.setSignature(Float32List, {
+ constructors: () => ({
+ Float32List: [Float32List, [core.int]],
+ fromList: [Float32List, [core.List$(core.double)]],
+ view: [Float32List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Float32List.BYTES_PER_ELEMENT = 4;
class Float64List extends core.Object {
Float64List(length) {
@@ -241,6 +320,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Float64List[dart.implements] = () => [core.List$(core.double), TypedData];
dart.defineNamedConstructor(Float64List, 'fromList');
dart.defineNamedConstructor(Float64List, 'view');
+ dart.setSignature(Float64List, {
+ constructors: () => ({
+ Float64List: [Float64List, [core.int]],
+ fromList: [Float64List, [core.List$(core.double)]],
+ view: [Float64List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Float64List.BYTES_PER_ELEMENT = 8;
class Float32x4List extends core.Object {
Float32x4List(length) {
@@ -260,6 +346,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Float32x4List[dart.implements] = () => [core.List$(Float32x4), TypedData];
dart.defineNamedConstructor(Float32x4List, 'fromList');
dart.defineNamedConstructor(Float32x4List, 'view');
+ dart.setSignature(Float32x4List, {
+ constructors: () => ({
+ Float32x4List: [Float32x4List, [core.int]],
+ fromList: [Float32x4List, [core.List$(Float32x4)]],
+ view: [Float32x4List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Float32x4List.BYTES_PER_ELEMENT = 16;
class Int32x4List extends core.Object {
Int32x4List(length) {
@@ -279,6 +372,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Int32x4List[dart.implements] = () => [core.List$(Int32x4), TypedData];
dart.defineNamedConstructor(Int32x4List, 'fromList');
dart.defineNamedConstructor(Int32x4List, 'view');
+ dart.setSignature(Int32x4List, {
+ constructors: () => ({
+ Int32x4List: [Int32x4List, [core.int]],
+ fromList: [Int32x4List, [core.List$(Int32x4)]],
+ view: [Int32x4List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Int32x4List.BYTES_PER_ELEMENT = 16;
class Float64x2List extends core.Object {
Float64x2List(length) {
@@ -298,6 +398,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
Float64x2List[dart.implements] = () => [core.List$(Float64x2), TypedData];
dart.defineNamedConstructor(Float64x2List, 'fromList');
dart.defineNamedConstructor(Float64x2List, 'view');
+ dart.setSignature(Float64x2List, {
+ constructors: () => ({
+ Float64x2List: [Float64x2List, [core.int]],
+ fromList: [Float64x2List, [core.List$(Float64x2)]],
+ view: [Float64x2List, [ByteBuffer], [core.int, core.int]]
+ })
+ });
Float64x2List.BYTES_PER_ELEMENT = 16;
class Float32x4 extends core.Object {
Float32x4(x, y, z, w) {
@@ -320,6 +427,15 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
dart.defineNamedConstructor(Float32x4, 'zero');
dart.defineNamedConstructor(Float32x4, 'fromInt32x4Bits');
dart.defineNamedConstructor(Float32x4, 'fromFloat64x2');
+ dart.setSignature(Float32x4, {
+ constructors: () => ({
+ Float32x4: [Float32x4, [core.double, core.double, core.double, core.double]],
+ splat: [Float32x4, [core.double]],
+ zero: [Float32x4, []],
+ fromInt32x4Bits: [Float32x4, [Int32x4]],
+ fromFloat64x2: [Float32x4, [Float64x2]]
+ })
+ });
Float32x4.XXXX = 0;
Float32x4.XXXY = 64;
Float32x4.XXXZ = 128;
@@ -589,6 +705,13 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
}
dart.defineNamedConstructor(Int32x4, 'bool');
dart.defineNamedConstructor(Int32x4, 'fromFloat32x4Bits');
+ dart.setSignature(Int32x4, {
+ constructors: () => ({
+ Int32x4: [Int32x4, [core.int, core.int, core.int, core.int]],
+ bool: [Int32x4, [core.bool, core.bool, core.bool, core.bool]],
+ fromFloat32x4Bits: [Int32x4, [Float32x4]]
+ })
+ });
Int32x4.XXXX = 0;
Int32x4.XXXY = 64;
Int32x4.XXXZ = 128;
@@ -862,6 +985,14 @@ var _native_typed_data = dart.lazyImport(_native_typed_data);
dart.defineNamedConstructor(Float64x2, 'splat');
dart.defineNamedConstructor(Float64x2, 'zero');
dart.defineNamedConstructor(Float64x2, 'fromFloat32x4');
+ dart.setSignature(Float64x2, {
+ constructors: () => ({
+ Float64x2: [Float64x2, [core.double, core.double]],
+ splat: [Float64x2, [core.double]],
+ zero: [Float64x2, []],
+ fromFloat32x4: [Float64x2, [Float32x4]]
+ })
+ });
// Exports:
exports.ByteBuffer = ByteBuffer;
exports.TypedData = TypedData;

Powered by Google App Engine
This is Rietveld 408576698