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

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

Issue 1636233002: fixes #427, static fields emitted outside the scope of their class (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 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
1 dart_library.library('dart/typed_data', null, /* Imports */[ 1 dart_library.library('dart/typed_data', null, /* Imports */[
2 'dart/_runtime', 2 'dart/_runtime',
3 'dart/core' 3 'dart/core'
4 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
5 'dart/_native_typed_data' 5 'dart/_native_typed_data'
6 ], function(exports, dart, core, _native_typed_data) { 6 ], function(exports, dart, core, _native_typed_data) {
7 'use strict'; 7 'use strict';
8 let dartx = dart.dartx; 8 let dartx = dart.dartx;
9 class ByteBuffer extends core.Object {} 9 class ByteBuffer extends core.Object {}
10 class TypedData extends core.Object {} 10 class TypedData extends core.Object {}
11 const _littleEndian = Symbol('_littleEndian'); 11 const _littleEndian = Symbol('_littleEndian');
12 class Endianness extends core.Object { 12 class Endianness extends core.Object {
13 _(littleEndian) { 13 _(littleEndian) {
14 this[_littleEndian] = littleEndian; 14 this[_littleEndian] = littleEndian;
15 } 15 }
16 } 16 }
17 dart.defineNamedConstructor(Endianness, '_'); 17 dart.defineNamedConstructor(Endianness, '_');
18 dart.setSignature(Endianness, { 18 dart.setSignature(Endianness, {
19 constructors: () => ({_: [Endianness, [core.bool]]}) 19 constructors: () => ({_: [Endianness, [core.bool]]})
20 }); 20 });
21 Endianness.BIG_ENDIAN = dart.const(new Endianness._(false));
22 Endianness.LITTLE_ENDIAN = dart.const(new Endianness._(true));
23 dart.defineLazyProperties(Endianness, { 21 dart.defineLazyProperties(Endianness, {
22 get BIG_ENDIAN() {
23 return dart.const(new Endianness._(false));
24 },
25 get LITTLE_ENDIAN() {
26 return dart.const(new Endianness._(true));
27 },
24 get HOST_ENDIAN() { 28 get HOST_ENDIAN() {
25 return ByteData.view(Uint16List.fromList(dart.list([1], core.int)).buffer) .getInt8(0) == 1 ? Endianness.LITTLE_ENDIAN : Endianness.BIG_ENDIAN; 29 return ByteData.view(Uint16List.fromList(dart.list([1], core.int)).buffer) .getInt8(0) == 1 ? Endianness.LITTLE_ENDIAN : Endianness.BIG_ENDIAN;
26 } 30 }
27 }); 31 });
28 class ByteData extends core.Object { 32 class ByteData extends core.Object {
29 static new(length) { 33 static new(length) {
30 return _native_typed_data.NativeByteData.new(length); 34 return _native_typed_data.NativeByteData.new(length);
31 } 35 }
32 static view(buffer, offsetInBytes, length) { 36 static view(buffer, offsetInBytes, length) {
33 if (offsetInBytes === void 0) offsetInBytes = 0; 37 if (offsetInBytes === void 0) offsetInBytes = 0;
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 exports.Uint64List = Uint64List; 948 exports.Uint64List = Uint64List;
945 exports.Float32List = Float32List; 949 exports.Float32List = Float32List;
946 exports.Float64List = Float64List; 950 exports.Float64List = Float64List;
947 exports.Float32x4List = Float32x4List; 951 exports.Float32x4List = Float32x4List;
948 exports.Int32x4List = Int32x4List; 952 exports.Int32x4List = Int32x4List;
949 exports.Float64x2List = Float64x2List; 953 exports.Float64x2List = Float64x2List;
950 exports.Float32x4 = Float32x4; 954 exports.Float32x4 = Float32x4;
951 exports.Int32x4 = Int32x4; 955 exports.Int32x4 = Int32x4;
952 exports.Float64x2 = Float64x2; 956 exports.Float64x2 = Float64x2;
953 }); 957 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698