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

Side by Side Diff: sdk/lib/_internal/compiler/js_lib/typed_data_patch.dart

Issue 1212513002: sdk files reorganization to make dart2js a proper package (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: renamed Created 5 years, 5 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
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5
6 import 'dart:_internal' show FixedLengthListMixin;
7 import 'dart:_foreign_helper' show JS;
8 import 'dart:math' as Math;
9 import 'dart:_internal';
10 import 'dart:_interceptors' show JSIndexable, JSUInt32, JSUInt31;
11 import 'dart:_js_helper'
12 show Creates, JavaScriptIndexingBehavior, JSName, Null, Returns, patch;
13 import 'dart:_native_typed_data';
14
15 @patch class ByteData {
16 @patch factory ByteData(int length) = NativeByteData;
17 }
18
19
20 @patch class Float32List {
21 @patch factory Float32List(int length) = NativeFloat32List;
22
23 @patch factory Float32List.fromList(List<double> elements) =
24 NativeFloat32List.fromList;
25 }
26
27
28 @patch class Float64List {
29 @patch factory Float64List(int length) = NativeFloat64List;
30
31 @patch factory Float64List.fromList(List<double> elements) =
32 NativeFloat64List.fromList;
33 }
34
35
36 @patch class Int16List {
37 @patch factory Int16List(int length) = NativeInt16List;
38
39 @patch factory Int16List.fromList(List<int> elements) =
40 NativeInt16List.fromList;
41 }
42
43 @patch class Int32List {
44 @patch factory Int32List(int length) = NativeInt32List;
45
46 @patch factory Int32List.fromList(List<int> elements) =
47 NativeInt32List.fromList;
48 }
49
50
51 @patch class Int8List {
52 @patch factory Int8List(int length) = NativeInt8List;
53
54 @patch factory Int8List.fromList(List<int> elements) =
55 NativeInt8List.fromList;
56 }
57
58
59 @patch class Uint32List {
60 @patch factory Uint32List(int length) = NativeUint32List;
61
62 @patch factory Uint32List.fromList(List<int> elements) =
63 NativeUint32List.fromList;
64 }
65
66
67 @patch class Uint16List {
68 @patch factory Uint16List(int length) = NativeUint16List;
69
70 @patch factory Uint16List.fromList(List<int> elements) =
71 NativeUint16List.fromList;
72 }
73
74
75 @patch class Uint8ClampedList {
76 @patch factory Uint8ClampedList(int length) = NativeUint8ClampedList;
77
78 @patch factory Uint8ClampedList.fromList(List<int> elements) =
79 NativeUint8ClampedList.fromList;
80 }
81
82
83 @patch class Uint8List {
84 @patch factory Uint8List(int length) = NativeUint8List;
85
86 @patch factory Uint8List.fromList(List<int> elements) =
87 NativeUint8List.fromList;
88 }
89
90
91 @patch class Int64List {
92 @patch factory Int64List(int length) {
93 throw new UnsupportedError("Int64List not supported by dart2js.");
94 }
95
96 @patch factory Int64List.fromList(List<int> elements) {
97 throw new UnsupportedError("Int64List not supported by dart2js.");
98 }
99 }
100
101
102 @patch class Uint64List {
103 @patch factory Uint64List(int length) {
104 throw new UnsupportedError("Uint64List not supported by dart2js.");
105 }
106
107 @patch factory Uint64List.fromList(List<int> elements) {
108 throw new UnsupportedError("Uint64List not supported by dart2js.");
109 }
110 }
111
112 @patch class Int32x4List {
113 @patch factory Int32x4List(int length) = NativeInt32x4List;
114
115 @patch factory Int32x4List.fromList(List<Int32x4> elements) =
116 NativeInt32x4List.fromList;
117 }
118
119 @patch class Float32x4List {
120 @patch factory Float32x4List(int length) = NativeFloat32x4List;
121
122 @patch factory Float32x4List.fromList(List<Float32x4> elements) =
123 NativeFloat32x4List.fromList;
124 }
125
126 @patch class Float64x2List {
127 @patch factory Float64x2List(int length) = NativeFloat64x2List;
128
129 @patch factory Float64x2List.fromList(List<Float64x2> elements) =
130 NativeFloat64x2List.fromList;
131 }
132
133 @patch class Float32x4 {
134 @patch factory Float32x4(double x, double y, double z, double w) =
135 NativeFloat32x4;
136 @patch factory Float32x4.splat(double v) = NativeFloat32x4.splat;
137 @patch factory Float32x4.zero() = NativeFloat32x4.zero;
138 @patch factory Float32x4.fromInt32x4Bits(Int32x4 x) =
139 NativeFloat32x4.fromInt32x4Bits;
140 @patch factory Float32x4.fromFloat64x2(Float64x2 v) =
141 NativeFloat32x4.fromFloat64x2;
142 }
143
144 @patch class Int32x4 {
145 @patch factory Int32x4(int x, int y, int z, int w) = NativeInt32x4;
146 @patch factory Int32x4.bool(bool x, bool y, bool z, bool w) =
147 NativeInt32x4.bool;
148 @patch factory Int32x4.fromFloat32x4Bits(Float32x4 x) =
149 NativeInt32x4.fromFloat32x4Bits;
150 }
151
152 @patch class Float64x2 {
153 @patch factory Float64x2(double x, double y) = NativeFloat64x2;
154 @patch factory Float64x2.splat(double v) = NativeFloat64x2.splat;
155 @patch factory Float64x2.zero() = NativeFloat64x2.zero;
156 @patch factory Float64x2.fromFloat32x4(Float32x4 v) =
157 NativeFloat64x2.fromFloat32x4;
158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698