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

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

Issue 1047023002: use == and != to enable handling null/undefined (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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/math.js ('k') | lib/runtime/dart_runtime.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var typed_data; 1 var typed_data;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class ByteBuffer extends core.Object { 4 class ByteBuffer extends core.Object {
5 } 5 }
6 class TypedData extends core.Object { 6 class TypedData extends core.Object {
7 } 7 }
8 let _ = Symbol('_'); 8 let _ = Symbol('_');
9 let _littleEndian = Symbol('_littleEndian'); 9 let _littleEndian = Symbol('_littleEndian');
10 class Endianness extends core.Object { 10 class Endianness extends core.Object {
11 [_](littleEndian) { 11 [_](littleEndian) {
12 this[_littleEndian] = littleEndian; 12 this[_littleEndian] = littleEndian;
13 } 13 }
14 } 14 }
15 dart.defineNamedConstructor(Endianness, _); 15 dart.defineNamedConstructor(Endianness, _);
16 Endianness.BIG_ENDIAN = new Endianness[_](false); 16 Endianness.BIG_ENDIAN = new Endianness[_](false);
17 Endianness.LITTLE_ENDIAN = new Endianness[_](true); 17 Endianness.LITTLE_ENDIAN = new Endianness[_](true);
18 dart.defineLazyProperties(Endianness, { 18 dart.defineLazyProperties(Endianness, {
19 get HOST_ENDIAN() { 19 get HOST_ENDIAN() {
20 return new ByteData.view(new Uint16List.fromList(dart.as(new core.List.fro m([1]), core.List$(core.int))).buffer).getInt8(0) === 1 ? Endianness.LITTLE_ENDI AN : Endianness.BIG_ENDIAN; 20 return new ByteData.view(new Uint16List.fromList(dart.as(new core.List.fro m([1]), core.List$(core.int))).buffer).getInt8(0) == 1 ? Endianness.LITTLE_ENDIA N : Endianness.BIG_ENDIAN;
21 } 21 }
22 }); 22 });
23 class ByteData extends core.Object { 23 class ByteData extends core.Object {
24 ByteData(length) { 24 ByteData(length) {
25 return new _native_typed_data.NativeByteData(length); 25 return new _native_typed_data.NativeByteData(length);
26 } 26 }
27 view(buffer, offsetInBytes, length) { 27 view(buffer, offsetInBytes, length) {
28 if (offsetInBytes === void 0) 28 if (offsetInBytes === void 0)
29 offsetInBytes = 0; 29 offsetInBytes = 0;
30 if (length === void 0) 30 if (length === void 0)
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 exports.Uint64List = Uint64List; 864 exports.Uint64List = Uint64List;
865 exports.Float32List = Float32List; 865 exports.Float32List = Float32List;
866 exports.Float64List = Float64List; 866 exports.Float64List = Float64List;
867 exports.Float32x4List = Float32x4List; 867 exports.Float32x4List = Float32x4List;
868 exports.Int32x4List = Int32x4List; 868 exports.Int32x4List = Int32x4List;
869 exports.Float64x2List = Float64x2List; 869 exports.Float64x2List = Float64x2List;
870 exports.Float32x4 = Float32x4; 870 exports.Float32x4 = Float32x4;
871 exports.Int32x4 = Int32x4; 871 exports.Int32x4 = Int32x4;
872 exports.Float64x2 = Float64x2; 872 exports.Float64x2 = Float64x2;
873 })(typed_data || (typed_data = {})); 873 })(typed_data || (typed_data = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/math.js ('k') | lib/runtime/dart_runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698