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

Unified Diff: test/dart_codegen/expect/typed_data/typed_data

Issue 961493003: don't run dart gen on JS patch code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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 | « test/dart_codegen/expect/math/random.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/dart_codegen/expect/typed_data/typed_data
diff --git a/test/dart_codegen/expect/typed_data/typed_data b/test/dart_codegen/expect/typed_data/typed_data
index 09793bde1998fa61eaf192a76eda8cd6be8f39be..0f400699fd5c4b83f7462e9b5d5c9e0ef42da850 100644
--- a/test/dart_codegen/expect/typed_data/typed_data
+++ b/test/dart_codegen/expect/typed_data/typed_data
@@ -2,9 +2,6 @@ library dart.typed_data;
import 'package:dev_compiler/runtime/dart_logging_runtime.dart' as DDC$RT;
import 'dart:collection';
-import 'dart:_internal' show FixedLengthListMixin;
-import 'dart:_internal';
-import 'dart:math' as Math;
abstract class ByteBuffer {
int get lengthInBytes;
@@ -41,7 +38,7 @@ class Endianness {
final bool _littleEndian;
}
abstract class ByteData implements TypedData {
- factory ByteData(int length) = NativeByteData;
+ external factory ByteData(int length);
factory ByteData.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asByteData(offsetInBytes, length);
@@ -78,8 +75,8 @@ abstract class ByteData implements TypedData {
[Endianness endian = Endianness.BIG_ENDIAN]);
}
abstract class Int8List implements List<int>, TypedData {
- factory Int8List(int length) = NativeInt8List;
- factory Int8List.fromList(List<int> elements) = NativeInt8List.fromList;
+ external factory Int8List(int length);
+ external factory Int8List.fromList(List<int> elements);
factory Int8List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asInt8List(offsetInBytes, length);
@@ -87,8 +84,8 @@ abstract class Int8List implements List<int>, TypedData {
static const int BYTES_PER_ELEMENT = 1;
}
abstract class Uint8List implements List<int>, TypedData {
- factory Uint8List(int length) = NativeUint8List;
- factory Uint8List.fromList(List<int> elements) = NativeUint8List.fromList;
+ external factory Uint8List(int length);
+ external factory Uint8List.fromList(List<int> elements);
factory Uint8List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asUint8List(offsetInBytes, length);
@@ -96,9 +93,8 @@ abstract class Uint8List implements List<int>, TypedData {
static const int BYTES_PER_ELEMENT = 1;
}
abstract class Uint8ClampedList implements List<int>, TypedData {
- factory Uint8ClampedList(int length) = NativeUint8ClampedList;
- factory Uint8ClampedList.fromList(
- List<int> elements) = NativeUint8ClampedList.fromList;
+ external factory Uint8ClampedList(int length);
+ external factory Uint8ClampedList.fromList(List<int> elements);
factory Uint8ClampedList.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asUint8ClampedList(offsetInBytes, length);
@@ -106,8 +102,8 @@ abstract class Uint8ClampedList implements List<int>, TypedData {
static const int BYTES_PER_ELEMENT = 1;
}
abstract class Int16List implements List<int>, TypedData {
- factory Int16List(int length) = NativeInt16List;
- factory Int16List.fromList(List<int> elements) = NativeInt16List.fromList;
+ external factory Int16List(int length);
+ external factory Int16List.fromList(List<int> elements);
factory Int16List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asInt16List(offsetInBytes, length);
@@ -115,8 +111,8 @@ abstract class Int16List implements List<int>, TypedData {
static const int BYTES_PER_ELEMENT = 2;
}
abstract class Uint16List implements List<int>, TypedData {
- factory Uint16List(int length) = NativeUint16List;
- factory Uint16List.fromList(List<int> elements) = NativeUint16List.fromList;
+ external factory Uint16List(int length);
+ external factory Uint16List.fromList(List<int> elements);
factory Uint16List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asUint16List(offsetInBytes, length);
@@ -124,8 +120,8 @@ abstract class Uint16List implements List<int>, TypedData {
static const int BYTES_PER_ELEMENT = 2;
}
abstract class Int32List implements List<int>, TypedData {
- factory Int32List(int length) = NativeInt32List;
- factory Int32List.fromList(List<int> elements) = NativeInt32List.fromList;
+ external factory Int32List(int length);
+ external factory Int32List.fromList(List<int> elements);
factory Int32List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asInt32List(offsetInBytes, length);
@@ -133,8 +129,8 @@ abstract class Int32List implements List<int>, TypedData {
static const int BYTES_PER_ELEMENT = 4;
}
abstract class Uint32List implements List<int>, TypedData {
- factory Uint32List(int length) = NativeUint32List;
- factory Uint32List.fromList(List<int> elements) = NativeUint32List.fromList;
+ external factory Uint32List(int length);
+ external factory Uint32List.fromList(List<int> elements);
factory Uint32List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asUint32List(offsetInBytes, length);
@@ -142,12 +138,8 @@ abstract class Uint32List implements List<int>, TypedData {
static const int BYTES_PER_ELEMENT = 4;
}
abstract class Int64List implements List<int>, TypedData {
- factory Int64List(int length) {
- throw new UnsupportedError("Int64List not supported by dart2js.");
- }
- factory Int64List.fromList(List<int> elements) {
- throw new UnsupportedError("Int64List not supported by dart2js.");
- }
+ external factory Int64List(int length);
+ external factory Int64List.fromList(List<int> elements);
factory Int64List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asInt64List(offsetInBytes, length);
@@ -155,12 +147,8 @@ abstract class Int64List implements List<int>, TypedData {
static const int BYTES_PER_ELEMENT = 8;
}
abstract class Uint64List implements List<int>, TypedData {
- factory Uint64List(int length) {
- throw new UnsupportedError("Uint64List not supported by dart2js.");
- }
- factory Uint64List.fromList(List<int> elements) {
- throw new UnsupportedError("Uint64List not supported by dart2js.");
- }
+ external factory Uint64List(int length);
+ external factory Uint64List.fromList(List<int> elements);
factory Uint64List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asUint64List(offsetInBytes, length);
@@ -168,9 +156,8 @@ abstract class Uint64List implements List<int>, TypedData {
static const int BYTES_PER_ELEMENT = 8;
}
abstract class Float32List implements List<double>, TypedData {
- factory Float32List(int length) = NativeFloat32List;
- factory Float32List.fromList(
- List<double> elements) = NativeFloat32List.fromList;
+ external factory Float32List(int length);
+ external factory Float32List.fromList(List<double> elements);
factory Float32List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asFloat32List(offsetInBytes, length);
@@ -178,9 +165,8 @@ abstract class Float32List implements List<double>, TypedData {
static const int BYTES_PER_ELEMENT = 4;
}
abstract class Float64List implements List<double>, TypedData {
- factory Float64List(int length) = NativeFloat64List;
- factory Float64List.fromList(
- List<double> elements) = NativeFloat64List.fromList;
+ external factory Float64List(int length);
+ external factory Float64List.fromList(List<double> elements);
factory Float64List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asFloat64List(offsetInBytes, length);
@@ -188,9 +174,8 @@ abstract class Float64List implements List<double>, TypedData {
static const int BYTES_PER_ELEMENT = 8;
}
abstract class Float32x4List implements List<Float32x4>, TypedData {
- factory Float32x4List(int length) = NativeFloat32x4List;
- factory Float32x4List.fromList(
- List<Float32x4> elements) = NativeFloat32x4List.fromList;
+ external factory Float32x4List(int length);
+ external factory Float32x4List.fromList(List<Float32x4> elements);
factory Float32x4List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asFloat32x4List(offsetInBytes, length);
@@ -198,9 +183,8 @@ abstract class Float32x4List implements List<Float32x4>, TypedData {
static const int BYTES_PER_ELEMENT = 16;
}
abstract class Int32x4List implements List<Int32x4>, TypedData {
- factory Int32x4List(int length) = NativeInt32x4List;
- factory Int32x4List.fromList(
- List<Int32x4> elements) = NativeInt32x4List.fromList;
+ external factory Int32x4List(int length);
+ external factory Int32x4List.fromList(List<Int32x4> elements);
factory Int32x4List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asInt32x4List(offsetInBytes, length);
@@ -208,9 +192,8 @@ abstract class Int32x4List implements List<Int32x4>, TypedData {
static const int BYTES_PER_ELEMENT = 16;
}
abstract class Float64x2List implements List<Float64x2>, TypedData {
- factory Float64x2List(int length) = NativeFloat64x2List;
- factory Float64x2List.fromList(
- List<Float64x2> elements) = NativeFloat64x2List.fromList;
+ external factory Float64x2List(int length);
+ external factory Float64x2List.fromList(List<Float64x2> elements);
factory Float64x2List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return buffer.asFloat64x2List(offsetInBytes, length);
@@ -218,12 +201,11 @@ abstract class Float64x2List implements List<Float64x2>, TypedData {
static const int BYTES_PER_ELEMENT = 16;
}
abstract class Float32x4 {
- factory Float32x4(double x, double y, double z, double w) = NativeFloat32x4;
- factory Float32x4.splat(double v) = NativeFloat32x4.splat;
- factory Float32x4.zero() = NativeFloat32x4.zero;
- factory Float32x4.fromInt32x4Bits(
- Int32x4 x) = NativeFloat32x4.fromInt32x4Bits;
- factory Float32x4.fromFloat64x2(Float64x2 v) = NativeFloat32x4.fromFloat64x2;
+ external factory Float32x4(double x, double y, double z, double w);
+ external factory Float32x4.splat(double v);
+ external factory Float32x4.zero();
+ external factory Float32x4.fromInt32x4Bits(Int32x4 x);
+ external factory Float32x4.fromFloat64x2(Float64x2 v);
Float32x4 operator +(Float32x4 other);
Float32x4 operator -();
Float32x4 operator -(Float32x4 other);
@@ -512,10 +494,9 @@ abstract class Float32x4 {
Float32x4 reciprocalSqrt();
}
abstract class Int32x4 {
- factory Int32x4(int x, int y, int z, int w) = NativeInt32x4;
- factory Int32x4.bool(bool x, bool y, bool z, bool w) = NativeInt32x4.bool;
- factory Int32x4.fromFloat32x4Bits(
- Float32x4 x) = NativeInt32x4.fromFloat32x4Bits;
+ external factory Int32x4(int x, int y, int z, int w);
+ external factory Int32x4.bool(bool x, bool y, bool z, bool w);
+ external factory Int32x4.fromFloat32x4Bits(Float32x4 x);
Int32x4 operator |(Int32x4 other);
Int32x4 operator &(Int32x4 other);
Int32x4 operator ^(Int32x4 other);
@@ -799,10 +780,10 @@ abstract class Int32x4 {
Float32x4 select(Float32x4 trueValue, Float32x4 falseValue);
}
abstract class Float64x2 {
- factory Float64x2(double x, double y) = NativeFloat64x2;
- factory Float64x2.splat(double v) = NativeFloat64x2.splat;
- factory Float64x2.zero() = NativeFloat64x2.zero;
- factory Float64x2.fromFloat32x4(Float32x4 v) = NativeFloat64x2.fromFloat32x4;
+ external factory Float64x2(double x, double y);
+ external factory Float64x2.splat(double v);
+ external factory Float64x2.zero();
+ external factory Float64x2.fromFloat32x4(Float32x4 v);
Float64x2 operator +(Float64x2 other);
Float64x2 operator -();
Float64x2 operator -(Float64x2 other);
« no previous file with comments | « test/dart_codegen/expect/math/random.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698