| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012, 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 part of html; | |
| 6 | |
| 7 class _TypedArrayFactoryProvider { | |
| 8 static Float32Array createFloat32Array(int length) => _F32(length); | |
| 9 static Float32Array createFloat32Array_fromList(List<num> list) => | |
| 10 _F32(ensureNative(list)); | |
| 11 static Float32Array createFloat32Array_fromBuffer(ArrayBuffer buffer, | |
| 12 [int byteOffset = 0, int length]) => _F32(buffer, byteOffset, length); | |
| 13 static _F32(arg0, [arg1, arg2]) native "Float32Array_constructor_Callback"; | |
| 14 | |
| 15 static Float64Array createFloat64Array(int length) => _F64(length); | |
| 16 static Float64Array createFloat64Array_fromList(List<num> list) => | |
| 17 _F64(ensureNative(list)); | |
| 18 static Float64Array createFloat64Array_fromBuffer(ArrayBuffer buffer, | |
| 19 [int byteOffset = 0, int length]) => _F64(buffer, byteOffset, length); | |
| 20 static _F64(arg0, [arg1, arg2]) native "Float64Array_constructor_Callback"; | |
| 21 | |
| 22 static Int8Array createInt8Array(int length) => _I8(length); | |
| 23 static Int8Array createInt8Array_fromList(List<num> list) => | |
| 24 _I8(ensureNative(list)); | |
| 25 static Int8Array createInt8Array_fromBuffer(ArrayBuffer buffer, | |
| 26 [int byteOffset = 0, int length]) => _I8(buffer, byteOffset, length); | |
| 27 static _I8(arg0, [arg1, arg2]) native "Int8Array_constructor_Callback"; | |
| 28 | |
| 29 static Int16Array createInt16Array(int length) => _I16(length); | |
| 30 static Int16Array createInt16Array_fromList(List<num> list) => | |
| 31 _I16(ensureNative(list)); | |
| 32 static Int16Array createInt16Array_fromBuffer(ArrayBuffer buffer, | |
| 33 [int byteOffset = 0, int length]) => _I16(buffer, byteOffset, length); | |
| 34 static _I16(arg0, [arg1, arg2]) native "Int16Array_constructor_Callback"; | |
| 35 | |
| 36 static Int32Array createInt32Array(int length) => _I32(length); | |
| 37 static Int32Array createInt32Array_fromList(List<num> list) => | |
| 38 _I32(ensureNative(list)); | |
| 39 static Int32Array createInt32Array_fromBuffer(ArrayBuffer buffer, | |
| 40 [int byteOffset = 0, int length]) => _I32(buffer, byteOffset, length); | |
| 41 static _I32(arg0, [arg1, arg2]) native "Int32Array_constructor_Callback"; | |
| 42 | |
| 43 static Uint8Array createUint8Array(int length) => _U8(length); | |
| 44 static Uint8Array createUint8Array_fromList(List<num> list) => | |
| 45 _U8(ensureNative(list)); | |
| 46 static Uint8Array createUint8Array_fromBuffer(ArrayBuffer buffer, | |
| 47 [int byteOffset = 0, int length]) => _U8(buffer, byteOffset, length); | |
| 48 static _U8(arg0, [arg1, arg2]) native "Uint8Array_constructor_Callback"; | |
| 49 | |
| 50 static Uint16Array createUint16Array(int length) => _U16(length); | |
| 51 static Uint16Array createUint16Array_fromList(List<num> list) => | |
| 52 _U16(ensureNative(list)); | |
| 53 static Uint16Array createUint16Array_fromBuffer(ArrayBuffer buffer, | |
| 54 [int byteOffset = 0, int length]) => _U16(buffer, byteOffset, length); | |
| 55 static _U16(arg0, [arg1, arg2]) native "Uint16Array_constructor_Callback"; | |
| 56 | |
| 57 static Uint32Array createUint32Array(int length) => _U32(length); | |
| 58 static Uint32Array createUint32Array_fromList(List<num> list) => | |
| 59 _U32(ensureNative(list)); | |
| 60 static Uint32Array createUint32Array_fromBuffer(ArrayBuffer buffer, | |
| 61 [int byteOffset = 0, int length]) => _U32(buffer, byteOffset, length); | |
| 62 static _U32(arg0, [arg1, arg2]) native "Uint32Array_constructor_Callback"; | |
| 63 | |
| 64 static Uint8ClampedArray createUint8ClampedArray(int length) => _U8C(length); | |
| 65 static Uint8ClampedArray createUint8ClampedArray_fromList( | |
| 66 List<num> list) => _U8C(ensureNative(list)); | |
| 67 static Uint8ClampedArray createUint8ClampedArray_fromBuffer( | |
| 68 ArrayBuffer buffer, [int byteOffset = 0, int length]) => | |
| 69 _U8C(buffer, byteOffset, length); | |
| 70 static _U8C(arg0, [arg1, arg2]) native "Uint8ClampedArray_constructor_Callback
"; | |
| 71 | |
| 72 static ensureNative(List list) => list; // TODO: make sure. | |
| 73 } | |
| 74 | |
| 75 class _TextFactoryProvider { | |
| 76 static Text createText(String data) => document.$dom_createTextNode(data); | |
| 77 } | |
| OLD | NEW |