diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 581c4caa..f3a4de3e 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,129 +1,185 @@ -import { HEADER_SIZE } from "./internal/arraybuffer"; +import { + HEADER_SIZE, + MAX_BLENGTH +} from "./internal/arraybuffer"; export class DataView { + constructor( readonly buffer: ArrayBuffer, readonly byteOffset: i32 = 0, - readonly byteLength: i32 = i32.MIN_VALUE, + readonly byteLength: i32 = i32.MIN_VALUE // FIXME ) { - if (byteLength === i32.MIN_VALUE) byteLength = buffer.byteLength - byteOffset; - - if (byteOffset < 0) throw new RangeError("byteOffset cannot be negative"); - if (byteLength < 0) throw new RangeError("byteLength cannot be negative"); - if (byteOffset + byteLength > buffer.byteLength) throw new RangeError("Length out of range of buffer"); + if (byteLength === i32.MIN_VALUE) byteLength = buffer.byteLength - byteOffset; // FIXME + if (byteOffset > MAX_BLENGTH) throw new RangeError("Invalid byteOffset"); + if (byteLength > MAX_BLENGTH) throw new RangeError("Invalid byteLength"); + if (byteOffset + byteLength > buffer.byteLength) throw new RangeError("Invalid length"); } - @inline getFloat32(byteOffset: i32, littleEndian: boolean = false): f32 { - var result: u32 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); - return reinterpret(littleEndian ? result : bswap(result)); + checkOffset(byteOffset, 4, this.byteLength); + return littleEndian + ? load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + : reinterpret( + bswap( + load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + ) + ); } - @inline getFloat64(byteOffset: i32, littleEndian: boolean = false): f64 { - var result: u64 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); - return reinterpret(littleEndian ? result : bswap(result)); + checkOffset(byteOffset, 8, this.byteLength); + return littleEndian + ? load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + : reinterpret( + bswap( + load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + ) + ); } - @inline getInt8(byteOffset: i32): i8 { + checkOffset(byteOffset, 1, this.byteLength); return load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); } - @inline getInt16(byteOffset: i32, littleEndian: boolean = false): i16 { + checkOffset(byteOffset, 2, this.byteLength); var result: i16 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); return littleEndian ? result : bswap(result); } - @inline getInt32(byteOffset: i32, littleEndian: boolean = false): i32 { - var result: i32 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + checkOffset(byteOffset, 4, this.byteLength); + var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); return littleEndian ? result : bswap(result); } - @inline getUint8(byteOffset: i32): u8 { + checkOffset(byteOffset, 1, this.byteLength); return load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); } - @inline getUint16(byteOffset: i32, littleEndian: boolean = false): u16 { + checkOffset(byteOffset, 2, this.byteLength); var result: u16 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); return littleEndian ? result : bswap(result); } - @inline getUint32(byteOffset: i32, littleEndian: boolean = false): u32 { - var result: u32 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + checkOffset(byteOffset, 4, this.byteLength); + var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); return littleEndian ? result : bswap(result); } - @inline setFloat32(byteOffset: i32, value: f32, littleEndian: boolean = false): void { - var input: f32 = littleEndian ? value : reinterpret(bswap(reinterpret(value))); - store(changetype(this.buffer) + this.byteOffset + byteOffset, input, HEADER_SIZE); + checkOffset(byteOffset, 4, this.byteLength); + if (littleEndian) { + store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); + } else { + store(changetype(this.buffer) + this.byteOffset + byteOffset, + bswap( + reinterpret(value) + ), + HEADER_SIZE + ); + } } - @inline setFloat64(byteOffset: i32, value: f64, littleEndian: boolean = false): void { - var input: f64 = littleEndian ? value : reinterpret(bswap(reinterpret(value))); - store(changetype(this.buffer) + this.byteOffset + byteOffset, input, HEADER_SIZE); + checkOffset(byteOffset, 8, this.byteLength); + if (littleEndian) { + store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); + } else { + store(changetype(this.buffer) + this.byteOffset + byteOffset, + bswap( + reinterpret(value) + ), + HEADER_SIZE + ); + } } - @inline setInt8(byteOffset: i32, value: i8): void { + checkOffset(byteOffset, 1, this.byteLength); store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); } - @inline setInt16(byteOffset: i32, value: i16, littleEndian: boolean = false): void { - store(changetype(this.buffer) + this.byteOffset + byteOffset, littleEndian ? value : bswap(value), HEADER_SIZE); + checkOffset(byteOffset, 2, this.byteLength); + store( + changetype(this.buffer) + this.byteOffset + byteOffset, + littleEndian ? value : bswap(value), + HEADER_SIZE + ); } - @inline setInt32(byteOffset: i32, value: i32, littleEndian: boolean = false): void { - store(changetype(this.buffer) + this.byteOffset + byteOffset, littleEndian ? value : bswap(value), HEADER_SIZE); + checkOffset(byteOffset, 4, this.byteLength); + store( + changetype(this.buffer) + this.byteOffset + byteOffset, + littleEndian ? value : bswap(value), + HEADER_SIZE + ); } - @inline setUint8(byteOffset: i32, value: u8): void { + checkOffset(byteOffset, 1, this.byteLength); store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); } - @inline setUint16(byteOffset: i32, value: u16, littleEndian: boolean = false): void { - store(changetype(this.buffer) + this.byteOffset + byteOffset, littleEndian ? value : bswap(value), HEADER_SIZE); + checkOffset(byteOffset, 2, this.byteLength); + store( + changetype(this.buffer) + this.byteOffset + byteOffset, + littleEndian ? value : bswap(value), + HEADER_SIZE + ); } - @inline setUint32(byteOffset: i32, value: u32, littleEndian: boolean = false): void { - store(changetype(this.buffer) + this.byteOffset + byteOffset, littleEndian ? value : bswap(value), HEADER_SIZE); + checkOffset(byteOffset, 4, this.byteLength); + store( + changetype(this.buffer) + this.byteOffset + byteOffset, + littleEndian ? value : bswap(value), + HEADER_SIZE + ); } - /** - * Non-standard additions that makes sense in WebAssembly, but won't work in JS - */ + // Non-standard additions that make sense in WebAssembly, but won't work in JS: - @inline getInt64(byteOffset: i32, littleEndian: boolean = false): i64 { - var result: i64 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); - return littleEndian ? result : bswap(result); + checkOffset(byteOffset, 8, this.byteLength); + var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + return littleEndian ? result : bswap(result); } - @inline getUint64(byteOffset: i32, littleEndian: boolean = false): u64 { - var result: u64 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); - return littleEndian ? result : bswap(result); + checkOffset(byteOffset, 8, this.byteLength); + var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + return littleEndian ? result : bswap(result); } - @inline setInt64(byteOffset: i32, value: i64, littleEndian: boolean = false): void { - store(changetype(this.buffer) + this.byteOffset + byteOffset, littleEndian ? value : bswap(value), HEADER_SIZE); + checkOffset(byteOffset, 8, this.byteLength); + store( + changetype(this.buffer) + this.byteOffset + byteOffset, + littleEndian ? value : bswap(value), + HEADER_SIZE + ); } - @inline setUint64(byteOffset: i32, value: u64, littleEndian: boolean = false): void { - store(changetype(this.buffer) + this.byteOffset + byteOffset, littleEndian ? value : bswap(value), HEADER_SIZE); + checkOffset(byteOffset, 8, this.byteLength); + store( + changetype(this.buffer) + this.byteOffset + byteOffset, + littleEndian ? value : bswap(value), + HEADER_SIZE + ); } } + +@inline function checkOffset(byteOffset: i32, n: i32, byteLength: i32): void { + // n and byteLength must be known to be in bounds + if (byteOffset > MAX_BLENGTH || byteOffset + n > byteLength) throw new Error("Offset out of bounds"); +} diff --git a/tests/compiler.js b/tests/compiler.js index c5642072..ed174bdd 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -184,7 +184,7 @@ tests.forEach(filename => { console.log(colorsUtil.red(" abort: " + getString(msg) + " at " + getString(file) + ":" + line + ":" + column)); }, trace: function(msg, n) { - console.log(" " + getString(msg) + (n ? " " : "") + Array.prototype.slice.call(arguments, 2, 2 + n).join(", ")); + console.log(" trace: " + getString(msg) + (n ? " " : "") + Array.prototype.slice.call(arguments, 2, 2 + n).join(", ")); }, externalFunction: function() { }, externalConstant: 1 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat new file mode 100644 index 00000000..b1ad7f46 --- /dev/null +++ b/tests/compiler/std/dataview.optimized.wat @@ -0,0 +1,2651 @@ +(module + (type $v (func)) + (type $iii (func (param i32 i32) (result i32))) + (type $iiiiv (func (param i32 i32 i32 i32))) + (type $ii (func (param i32) (result i32))) + (type $iiiv (func (param i32 i32 i32))) + (type $iiif (func (param i32 i32 i32) (result f32))) + (type $II (func (param i64) (result i64))) + (type $iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$dii (func (param i32 i32) (result f64))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) + (type $FUNCSIG$vifi (func (param i32 f32 i32))) + (type $FUNCSIG$vidi (func (param i32 f64 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viji (func (param i32 i64 i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 72) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 136) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 176) "\0f\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (table $0 1 anyfunc) + (elem (i32.const 0) $null) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~started (mut i32) (i32.const 0)) + (global $std/dataview/array (mut i32) (i32.const 0)) + (global $std/dataview/view (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $std/dataview/main)) + (func $std/dataview/main (; 1 ;) (type $v) + get_global $~started + i32.eqz + if + call $start + i32.const 1 + set_global $~started + end + ) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + get_local $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + get_global $~lib/allocator/arena/offset + tee_local $1 + get_local $0 + i32.const 1 + get_local $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + tee_local $2 + current_memory + tee_local $3 + i32.const 16 + i32.shl + i32.gt_u + if + get_local $3 + get_local $2 + get_local $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + tee_local $0 + get_local $3 + get_local $0 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + get_local $0 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + get_local $2 + set_global $~lib/allocator/arena/offset + get_local $1 + ) + (func $~lib/internal/arraybuffer/allocateUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) + get_local $0 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 72 + i32.const 23 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 1 + i32.const 32 + get_local $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__memory_allocate + tee_local $1 + get_local $0 + i32.store + get_local $1 + ) + (func $~lib/internal/memory/memset (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + get_local $1 + i32.eqz + if + return + end + get_local $0 + i32.const 0 + i32.store8 + get_local $0 + get_local $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + get_local $1 + i32.const 2 + i32.le_u + if + return + end + get_local $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + get_local $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + get_local $0 + get_local $1 + i32.add + tee_local $2 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + get_local $2 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + get_local $1 + i32.const 6 + i32.le_u + if + return + end + get_local $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + get_local $0 + get_local $1 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store8 + get_local $1 + i32.const 8 + i32.le_u + if + return + end + get_local $0 + i32.const 0 + get_local $0 + i32.sub + i32.const 3 + i32.and + tee_local $2 + i32.add + tee_local $0 + i32.const 0 + i32.store + get_local $0 + get_local $1 + get_local $2 + i32.sub + i32.const -4 + i32.and + tee_local $1 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store + get_local $1 + i32.const 8 + i32.le_u + if + return + end + get_local $0 + i32.const 4 + i32.add + i32.const 0 + i32.store + get_local $0 + i32.const 8 + i32.add + i32.const 0 + i32.store + get_local $0 + get_local $1 + i32.add + tee_local $2 + i32.const 12 + i32.sub + i32.const 0 + i32.store + get_local $2 + i32.const 8 + i32.sub + i32.const 0 + i32.store + get_local $1 + i32.const 24 + i32.le_u + if + return + end + get_local $0 + i32.const 12 + i32.add + i32.const 0 + i32.store + get_local $0 + i32.const 16 + i32.add + i32.const 0 + i32.store + get_local $0 + i32.const 20 + i32.add + i32.const 0 + i32.store + get_local $0 + i32.const 24 + i32.add + i32.const 0 + i32.store + get_local $0 + get_local $1 + i32.add + tee_local $2 + i32.const 28 + i32.sub + i32.const 0 + i32.store + get_local $2 + i32.const 24 + i32.sub + i32.const 0 + i32.store + get_local $2 + i32.const 20 + i32.sub + i32.const 0 + i32.store + get_local $2 + i32.const 16 + i32.sub + i32.const 0 + i32.store + get_local $0 + get_local $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + tee_local $2 + i32.add + set_local $0 + get_local $1 + get_local $2 + i32.sub + set_local $1 + loop $continue|0 + get_local $1 + i32.const 32 + i32.ge_u + if + get_local $0 + i64.const 0 + i64.store + get_local $0 + i32.const 8 + i32.add + i64.const 0 + i64.store + get_local $0 + i32.const 16 + i32.add + i64.const 0 + i64.store + get_local $0 + i32.const 24 + i32.add + i64.const 0 + i64.store + get_local $1 + i32.const 32 + i32.sub + set_local $1 + get_local $0 + i32.const 32 + i32.add + set_local $0 + br $continue|0 + end + end + ) + (func $~lib/internal/typedarray/TypedArray#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + i32.const 8 + call $~lib/internal/arraybuffer/allocateUnsafe + tee_local $1 + i32.const 8 + i32.add + i32.const 8 + call $~lib/internal/memory/memset + i32.const 12 + call $~lib/allocator/arena/__memory_allocate + tee_local $0 + i32.const 0 + i32.store + get_local $0 + i32.const 0 + i32.store offset=4 + get_local $0 + i32.const 0 + i32.store offset=8 + get_local $0 + get_local $1 + i32.store + get_local $0 + i32.const 0 + i32.store offset=4 + get_local $0 + i32.const 8 + i32.store offset=8 + get_local $0 + ) + (func $~lib/internal/typedarray/TypedArray#__set (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + get_local $1 + get_local $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 8 + i32.const 51 + i32.const 63 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $2 + i32.store8 offset=8 + ) + (func $~lib/dataview/DataView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + get_local $2 + i32.const -2147483648 + i32.eq + if + get_local $0 + i32.load + get_local $1 + i32.sub + set_local $2 + end + get_local $1 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 136 + i32.const 14 + i32.const 44 + call $~lib/env/abort + unreachable + end + get_local $2 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 136 + i32.const 15 + i32.const 44 + call $~lib/env/abort + unreachable + end + get_local $1 + get_local $2 + i32.add + get_local $0 + i32.load + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 16 + i32.const 53 + call $~lib/env/abort + unreachable + end + i32.const 12 + call $~lib/allocator/arena/__memory_allocate + tee_local $3 + get_local $0 + i32.store + get_local $3 + get_local $1 + i32.store offset=4 + get_local $3 + get_local $2 + i32.store offset=8 + get_local $3 + ) + (func $~lib/dataview/DataView#getFloat32 (; 8 ;) (type $iiif) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (local $3 i32) + (local $4 i32) + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + i32.const 1073741816 + i32.gt_u + tee_local $3 + i32.eqz + if + get_local $1 + i32.const 4 + i32.add + get_local $4 + i32.gt_s + set_local $3 + end + get_local $3 + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $2 + i32.const 1 + i32.and + if (result f32) + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + f32.load offset=8 + else + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load offset=8 + tee_local $0 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + get_local $0 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + f32.reinterpret/i32 + end + ) + (func $~lib/polyfills/bswap (; 9 ;) (type $II) (param $0 i64) (result i64) + (local $1 i64) + get_local $0 + i64.const 8 + i64.shr_u + i64.const 71777214294589695 + i64.and + get_local $0 + i64.const 71777214294589695 + i64.and + i64.const 8 + i64.shl + i64.or + tee_local $1 + i64.const 16 + i64.shr_u + i64.const 281470681808895 + i64.and + get_local $1 + i64.const 281470681808895 + i64.and + i64.const 16 + i64.shl + i64.or + i64.const 32 + i64.rotr + ) + (func $~lib/dataview/DataView#getFloat64 (; 10 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + i32.const 8 + get_local $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $1 + i32.const 1 + i32.and + if (result f64) + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + f64.load offset=8 + else + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + i64.load offset=8 + call $~lib/polyfills/bswap + f64.reinterpret/i64 + end + ) + (func $~lib/dataview/DataView#getInt8 (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + get_local $0 + i32.load offset=8 + set_local $3 + get_local $1 + i32.const 1073741816 + i32.gt_u + tee_local $2 + i32.eqz + if + get_local $1 + i32.const 1 + i32.add + get_local $3 + i32.gt_s + set_local $2 + end + get_local $2 + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load8_s offset=8 + ) + (func $~lib/dataview/DataView#getInt16 (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + i32.const 1073741816 + i32.gt_u + tee_local $3 + i32.eqz + if + get_local $1 + i32.const 2 + i32.add + get_local $4 + i32.gt_s + set_local $3 + end + get_local $3 + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load16_s offset=8 + set_local $0 + get_local $2 + i32.const 1 + i32.and + i32.eqz + if + get_local $0 + i32.const 8 + i32.shl + get_local $0 + i32.const 16 + i32.shl + i32.const 24 + i32.shr_s + i32.const 255 + i32.and + i32.or + set_local $0 + end + get_local $0 + ) + (func $~lib/dataview/DataView#getInt32 (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + i32.const 1073741816 + i32.gt_u + tee_local $3 + i32.eqz + if + get_local $1 + i32.const 4 + i32.add + get_local $4 + i32.gt_s + set_local $3 + end + get_local $3 + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load offset=8 + set_local $0 + get_local $2 + i32.const 1 + i32.and + i32.eqz + if + get_local $0 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + get_local $0 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + set_local $0 + end + get_local $0 + ) + (func $~lib/dataview/DataView#getInt64 (; 14 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (local $2 i64) + i32.const 8 + get_local $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + i64.load offset=8 + set_local $2 + get_local $1 + i32.const 1 + i32.and + i32.eqz + if + get_local $2 + call $~lib/polyfills/bswap + set_local $2 + end + get_local $2 + ) + (func $~lib/dataview/DataView#getUint8 (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + get_local $0 + i32.load offset=8 + set_local $3 + get_local $1 + i32.const 1073741816 + i32.gt_u + tee_local $2 + i32.eqz + if + get_local $1 + i32.const 1 + i32.add + get_local $3 + i32.gt_s + set_local $2 + end + get_local $2 + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load8_u offset=8 + ) + (func $~lib/dataview/DataView#getUint16 (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + i32.const 1073741816 + i32.gt_u + tee_local $3 + i32.eqz + if + get_local $1 + i32.const 2 + i32.add + get_local $4 + i32.gt_s + set_local $3 + end + get_local $3 + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load16_u offset=8 + set_local $0 + get_local $2 + i32.const 1 + i32.and + i32.eqz + if + get_local $0 + i32.const 8 + i32.shl + get_local $0 + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.or + set_local $0 + end + get_local $0 + ) + (func $~lib/dataview/DataView#setFloat32 (; 17 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (local $3 i32) + i32.const 4 + get_local $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $2 + i32.const 1 + i32.and + if + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + f32.store offset=8 + else + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.reinterpret/f32 + tee_local $3 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + get_local $3 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + i32.store offset=8 + end + ) + (func $~lib/dataview/DataView#setFloat64 (; 18 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + i32.const 8 + get_local $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $2 + i32.const 1 + i32.and + if + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + f64.store offset=8 + else + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i64.reinterpret/f64 + call $~lib/polyfills/bswap + i64.store offset=8 + end + ) + (func $~lib/dataview/DataView#setInt8 (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + get_local $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.store8 offset=8 + ) + (func $~lib/dataview/DataView#setInt16 (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 2 + get_local $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + set_local $0 + get_local $2 + i32.const 1 + i32.and + i32.eqz + if + get_local $1 + i32.const 8 + i32.shl + get_local $1 + i32.const 16 + i32.shl + i32.const 24 + i32.shr_s + i32.const 255 + i32.and + i32.or + set_local $1 + end + get_local $0 + get_local $1 + i32.store16 offset=8 + ) + (func $~lib/dataview/DataView#setInt32 (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 4 + get_local $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + set_local $0 + get_local $2 + i32.const 1 + i32.and + i32.eqz + if + get_local $1 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + get_local $1 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + set_local $1 + end + get_local $0 + get_local $1 + i32.store offset=8 + ) + (func $~lib/dataview/DataView#setInt64 (; 22 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + i32.const 8 + get_local $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + set_local $0 + get_local $2 + i32.const 1 + i32.and + i32.eqz + if + get_local $1 + call $~lib/polyfills/bswap + set_local $1 + end + get_local $0 + get_local $1 + i64.store offset=8 + ) + (func $~lib/dataview/DataView#setUint16 (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 2 + get_local $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + set_local $0 + get_local $2 + i32.const 1 + i32.and + i32.eqz + if + get_local $1 + i32.const 8 + i32.shl + get_local $1 + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.or + set_local $1 + end + get_local $0 + get_local $1 + i32.store16 offset=8 + ) + (func $start (; 24 ;) (type $v) + i32.const 216 + set_global $~lib/allocator/arena/startOffset + get_global $~lib/allocator/arena/startOffset + set_global $~lib/allocator/arena/offset + call $~lib/internal/typedarray/TypedArray#constructor + set_global $std/dataview/array + get_global $std/dataview/array + i32.const 0 + i32.const 246 + call $~lib/internal/typedarray/TypedArray#__set + get_global $std/dataview/array + i32.const 1 + i32.const 224 + call $~lib/internal/typedarray/TypedArray#__set + get_global $std/dataview/array + i32.const 2 + i32.const 88 + call $~lib/internal/typedarray/TypedArray#__set + get_global $std/dataview/array + i32.const 3 + i32.const 159 + call $~lib/internal/typedarray/TypedArray#__set + get_global $std/dataview/array + i32.const 4 + i32.const 130 + call $~lib/internal/typedarray/TypedArray#__set + get_global $std/dataview/array + i32.const 5 + i32.const 101 + call $~lib/internal/typedarray/TypedArray#__set + get_global $std/dataview/array + i32.const 6 + i32.const 67 + call $~lib/internal/typedarray/TypedArray#__set + get_global $std/dataview/array + i32.const 7 + i32.const 95 + call $~lib/internal/typedarray/TypedArray#__set + get_global $std/dataview/array + i32.load + get_global $std/dataview/array + i32.load offset=4 + get_global $std/dataview/array + i32.load offset=8 + call $~lib/dataview/DataView#constructor + set_global $std/dataview/view + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const -4.592586247781397e-20 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 18 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const -2.3413961970849473e-37 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 19 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const 77105877018631129268224 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 20 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const 229.51023864746094 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 21 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const 14079802746555334656 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 22 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const -2275140518817895515269171e9 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 24 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const -62437351080004157440 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 25 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const 1403059112509440 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 26 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const -5.522466503261712e-20 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 27 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const -1.6843597451835358e-37 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 28 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getFloat64 + f64.const 7936550095674706383278551e126 + f64.ne + if + i32.const 0 + i32.const 176 + i32.const 30 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getFloat64 + f64.const -411777475818852546741639e241 + f64.ne + if + i32.const 0 + i32.const 176 + i32.const 31 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getInt8 + i32.const -10 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 33 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getInt8 + i32.const -32 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 34 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + call $~lib/dataview/DataView#getInt8 + i32.const 88 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 35 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + call $~lib/dataview/DataView#getInt8 + i32.const -97 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 36 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + call $~lib/dataview/DataView#getInt8 + i32.const -126 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 37 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 5 + call $~lib/dataview/DataView#getInt8 + i32.const 101 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 38 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 6 + call $~lib/dataview/DataView#getInt8 + i32.const 67 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 39 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 7 + call $~lib/dataview/DataView#getInt8 + i32.const 95 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 40 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 57590 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 42 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 22752 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 43 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 40792 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 44 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 33439 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 45 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 25986 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 46 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 5 + i32.const 1 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 17253 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 47 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 6 + i32.const 1 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 24387 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 48 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 63200 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 50 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 57432 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 51 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 22687 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 52 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 40834 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 53 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 33381 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 54 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 5 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 25923 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 55 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 6 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 17247 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 56 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const -1621565194 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 58 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const -2103486240 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 59 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1703059288 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 60 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1130726047 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 61 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1598252418 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 62 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -153069409 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 64 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -531062910 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 65 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const 1486848613 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 66 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -1618844349 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 67 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -2107292833 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 68 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getInt64 + i64.const 6864441868736323830 + i64.ne + if + i32.const 0 + i32.const 176 + i32.const 70 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getInt64 + i64.const -657428103485373601 + i64.ne + if + i32.const 0 + i32.const 176 + i32.const 71 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getUint8 + i32.const 246 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 73 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getUint8 + i32.const 224 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 74 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + call $~lib/dataview/DataView#getUint8 + i32.const 88 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 75 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + call $~lib/dataview/DataView#getUint8 + i32.const 159 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 76 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + call $~lib/dataview/DataView#getUint8 + i32.const 130 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 77 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 5 + call $~lib/dataview/DataView#getUint8 + i32.const 101 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 78 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 6 + call $~lib/dataview/DataView#getUint8 + i32.const 67 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 79 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 7 + call $~lib/dataview/DataView#getUint8 + i32.const 95 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 80 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 57590 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 82 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 22752 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 83 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 40792 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 84 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 33439 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 85 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 25986 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 86 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 5 + i32.const 1 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 17253 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 87 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 6 + i32.const 1 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 24387 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 88 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 63200 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 90 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 57432 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 91 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 22687 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 92 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 40834 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 93 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 33381 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 94 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 5 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 25923 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 95 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 6 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 17247 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 96 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const -1621565194 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 98 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const -2103486240 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 99 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1703059288 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 100 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1130726047 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 101 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1598252418 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 102 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -153069409 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 104 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -531062910 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 105 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const 1486848613 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 106 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -1618844349 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 107 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -2107292833 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 108 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getInt64 + i64.const 6864441868736323830 + i64.ne + if + i32.const 0 + i32.const 176 + i32.const 110 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getInt64 + i64.const -657428103485373601 + i64.ne + if + i32.const 0 + i32.const 176 + i32.const 111 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + f32.const 1.5976661625240943e-18 + i32.const 1 + call $~lib/dataview/DataView#setFloat32 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const 1.5976661625240943e-18 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 114 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + f32.const 1976281973381696323584 + i32.const 0 + call $~lib/dataview/DataView#setFloat32 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const 1976281973381696323584 + f32.ne + if + i32.const 0 + i32.const 176 + i32.const 117 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + f64.const -1094252199637739024055454e124 + i32.const 1 + call $~lib/dataview/DataView#setFloat64 + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getFloat64 + f64.const -1094252199637739024055454e124 + f64.ne + if + i32.const 0 + i32.const 176 + i32.const 120 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + f64.const 6.022586634778589e-103 + i32.const 0 + call $~lib/dataview/DataView#setFloat64 + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getFloat64 + f64.const 6.022586634778589e-103 + f64.ne + if + i32.const 0 + i32.const 176 + i32.const 123 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 108 + call $~lib/dataview/DataView#setInt8 + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getInt8 + i32.const 108 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 126 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const -13360 + i32.const 1 + call $~lib/dataview/DataView#setInt16 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 52176 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 129 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 14689 + i32.const 0 + call $~lib/dataview/DataView#setInt16 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 65535 + i32.and + i32.const 14689 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 132 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 1204680201 + i32.const 1 + call $~lib/dataview/DataView#setInt32 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1204680201 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 135 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 660673230 + i32.const 0 + call $~lib/dataview/DataView#setInt32 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const 660673230 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 138 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i64.const -3290739641816099749 + i32.const 1 + call $~lib/dataview/DataView#setInt64 + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getInt64 + i64.const -3290739641816099749 + i64.ne + if + i32.const 0 + i32.const 176 + i32.const 141 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i64.const 8178932412950708047 + i32.const 0 + call $~lib/dataview/DataView#setInt64 + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getInt64 + i64.const 8178932412950708047 + i64.ne + if + i32.const 0 + i32.const 176 + i32.const 144 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 238 + call $~lib/dataview/DataView#setInt8 + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getUint8 + i32.const 238 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 147 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 58856 + i32.const 1 + call $~lib/dataview/DataView#setUint16 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 58856 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 150 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 60400 + i32.const 0 + call $~lib/dataview/DataView#setUint16 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 60400 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 153 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const -846805744 + i32.const 1 + call $~lib/dataview/DataView#setInt32 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const -846805744 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 156 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const -1510791631 + i32.const 0 + call $~lib/dataview/DataView#setInt32 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -1510791631 + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 159 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i64.const 2334704782995986958 + i32.const 1 + call $~lib/dataview/DataView#setInt64 + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getInt64 + i64.const 2334704782995986958 + i64.ne + if + i32.const 0 + i32.const 176 + i32.const 162 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i64.const -7123186897289856329 + i32.const 0 + call $~lib/dataview/DataView#setInt64 + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getInt64 + i64.const -7123186897289856329 + i64.ne + if + i32.const 0 + i32.const 176 + i32.const 165 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $null (; 25 ;) (type $v) + nop + ) +) diff --git a/tests/compiler/std/dataview.ts b/tests/compiler/std/dataview.ts index b4179eec..68e12f34 100644 --- a/tests/compiler/std/dataview.ts +++ b/tests/compiler/std/dataview.ts @@ -65,8 +65,8 @@ assert(view.getInt32(2, false) === 1486848613); assert(view.getInt32(3, false) === -1618844349); assert(view.getInt32(4, false) === -2107292833); -assert(view.getInt64(0, true) === 6864441868736323830) -assert(view.getInt64(0, false) === -657428103485373601) +assert(view.getInt64(0, true) === 6864441868736323830); +assert(view.getInt64(0, false) === -657428103485373601); assert(view.getUint8(0) === 246); assert(view.getUint8(1) === 224); @@ -105,59 +105,59 @@ assert(view.getUint32(2, false) === 1486848613); assert(view.getUint32(3, false) === 2676122947); assert(view.getUint32(4, false) === 2187674463); -assert(view.getUint64(0, true) === 6864441868736323830) -assert(view.getUint64(0, false) === 17789315970224178015) +assert(view.getUint64(0, true) === 6864441868736323830); +assert(view.getUint64(0, false) === 17789315970224178015); -view.setFloat32(0, 1.5976661625240943e-18, true) -assert(view.getFloat32(0, true) === 1.5976661625240943e-18) +view.setFloat32(0, 1.5976661625240943e-18, true); +assert(view.getFloat32(0, true) === 1.5976661625240943e-18); -view.setFloat32(0, 1.9762819733816963e+21, false) -assert(view.getFloat32(0, false) === 1.9762819733816963e+21) +view.setFloat32(0, 1.9762819733816963e+21, false); +assert(view.getFloat32(0, false) === 1.9762819733816963e+21); -view.setFloat64(0, -1.094252199637739e+148, true) -assert(view.getFloat64(0, true) === -1.094252199637739e+148) +view.setFloat64(0, -1.094252199637739e+148, true); +assert(view.getFloat64(0, true) === -1.094252199637739e+148); -view.setFloat64(0, 6.022586634778589e-103, false) -assert(view.getFloat64(0, false) === 6.022586634778589e-103) +view.setFloat64(0, 6.022586634778589e-103, false); +assert(view.getFloat64(0, false) === 6.022586634778589e-103); -view.setInt8(0, 108) -assert(view.getInt8(0) === 108) +view.setInt8(0, 108); +assert(view.getInt8(0) === 108); -view.setInt16(0, -13360, true) -assert(view.getInt16(0, true) === -13360) +view.setInt16(0, -13360, true); +assert(view.getInt16(0, true) === -13360); -view.setInt16(0, 14689, false) -assert(view.getInt16(0, false) === 14689) +view.setInt16(0, 14689, false); +assert(view.getInt16(0, false) === 14689); -view.setInt32(0, 1204680201, true) -assert(view.getInt32(0, true) === 1204680201) +view.setInt32(0, 1204680201, true); +assert(view.getInt32(0, true) === 1204680201); -view.setInt32(0, 660673230, false) -assert(view.getInt32(0, false) === 660673230) +view.setInt32(0, 660673230, false); +assert(view.getInt32(0, false) === 660673230); -view.setInt64(0, -3290739641816099749, true) -assert(view.getInt64(0, true) === -3290739641816099749) +view.setInt64(0, -3290739641816099749, true); +assert(view.getInt64(0, true) === -3290739641816099749); -view.setInt64(0, 8178932412950708047, false) -assert(view.getInt64(0, false) === 8178932412950708047) +view.setInt64(0, 8178932412950708047, false); +assert(view.getInt64(0, false) === 8178932412950708047); -view.setUint8(0, 238) -assert(view.getUint8(0) === 238) +view.setUint8(0, 238); +assert(view.getUint8(0) === 238); -view.setUint16(0, 58856, true) -assert(view.getUint16(0, true) === 58856) +view.setUint16(0, 58856, true); +assert(view.getUint16(0, true) === 58856); -view.setUint16(0, 60400, false) -assert(view.getUint16(0, false) === 60400) +view.setUint16(0, 60400, false); +assert(view.getUint16(0, false) === 60400); -view.setUint32(0, 3448161552, true) -assert(view.getUint32(0, true) === 3448161552) +view.setUint32(0, 3448161552, true); +assert(view.getUint32(0, true) === 3448161552); -view.setUint32(0, 2784175665, false) -assert(view.getUint32(0, false) === 2784175665) +view.setUint32(0, 2784175665, false); +assert(view.getUint32(0, false) === 2784175665); -view.setUint64(0, 2334704782995986958, true) -assert(view.getUint64(0, true) === 2334704782995986958) +view.setUint64(0, 2334704782995986958, true); +assert(view.getUint64(0, true) === 2334704782995986958); -view.setUint64(0, 11323557176419695287, false) -assert(view.getUint64(0, false) === 11323557176419695287) +view.setUint64(0, 11323557176419695287, false); +assert(view.getUint64(0, false) === 11323557176419695287); diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 229bca63..fe282aa8 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -1,11 +1,18 @@ (module + (type $v (func)) (type $iii (func (param i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $ii (func (param i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $iiif (func (param i32 i32 i32) (result f32))) + (type $iiiF (func (param i32 i32 i32) (result f64))) (type $II (func (param i64) (result i64))) - (type $v (func)) + (type $iiii (func (param i32 i32 i32) (result i32))) + (type $iiiI (func (param i32 i32 i32) (result i64))) + (type $iifiv (func (param i32 i32 f32 i32))) + (type $iiFiv (func (param i32 i32 f64 i32))) + (type $iiIiv (func (param i32 i32 i64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") @@ -20,6 +27,7 @@ (global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~started (mut i32) (i32.const 0)) (global $~lib/internal/arraybuffer/HEADER_SIZE i32 (i32.const 8)) (global $~lib/internal/arraybuffer/MAX_BLENGTH i32 (i32.const 1073741816)) (global $std/dataview/array (mut i32) (i32.const 0)) @@ -28,8 +36,17 @@ (global $HEAP_BASE i32 (i32.const 212)) (export "memory" (memory $0)) (export "table" (table $0)) - (start $start) - (func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32) + (export "main" (func $std/dataview/main)) + (func $std/dataview/main (; 1 ;) (type $v) + get_global $~started + i32.eqz + if + call $start + i32.const 1 + set_global $~started + end + ) + (func $~lib/internal/arraybuffer/computeSize (; 2 ;) (type $ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 get_local $0 @@ -41,7 +58,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -120,7 +137,7 @@ set_global $~lib/allocator/arena/offset get_local $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocateUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) get_local $0 @@ -149,7 +166,7 @@ i32.store get_local $1 ) - (func $~lib/internal/memory/memset (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -403,12 +420,12 @@ end end ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) get_local $0 call $~lib/allocator/arena/__memory_allocate return ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -475,7 +492,7 @@ i32.store offset=8 get_local $0 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/typedarray/TypedArray#__set (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) get_local $1 @@ -510,7 +527,7 @@ i32.store8 offset=8 end ) - (func $~lib/dataview/DataView#constructor (; 8 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 9 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) get_local $3 get_global $~lib/builtins/i32.MIN_VALUE @@ -523,24 +540,24 @@ set_local $3 end get_local $2 - i32.const 0 - i32.lt_s + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u if i32.const 0 i32.const 136 - i32.const 11 - i32.const 24 + i32.const 14 + i32.const 44 call $~lib/env/abort unreachable end get_local $3 - i32.const 0 - i32.lt_s + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u if i32.const 0 i32.const 136 - i32.const 12 - i32.const 24 + i32.const 15 + i32.const 44 call $~lib/env/abort unreachable end @@ -553,7 +570,7 @@ if i32.const 0 i32.const 136 - i32.const 13 + i32.const 16 i32.const 53 call $~lib/env/abort unreachable @@ -581,7 +598,7 @@ end tee_local $0 ) - (func $~lib/polyfills/bswap (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 10 ;) (type $ii) (param $0 i32) (result i32) get_local $0 i32.const -16711936 i32.and @@ -595,7 +612,64 @@ i32.or return ) - (func $~lib/polyfills/bswap (; 10 ;) (type $II) (param $0 i64) (result i64) + (func $~lib/dataview/DataView#getFloat32 (; 11 ;) (type $iiif) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/dataview/checkOffset|inlined.0 + i32.const 4 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $2 + i32.const 1 + i32.and + if (result f32) + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + f32.load offset=8 + else + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load offset=8 + call $~lib/polyfills/bswap + f32.reinterpret/i32 + end + ) + (func $~lib/polyfills/bswap (; 12 ;) (type $II) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -634,7 +708,105 @@ i64.rotr return ) - (func $~lib/polyfills/bswap (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/dataview/DataView#getFloat64 (; 13 ;) (type $iiiF) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/dataview/checkOffset|inlined.1 + i32.const 8 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $2 + i32.const 1 + i32.and + if (result f64) + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + f64.load offset=8 + else + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i64.load offset=8 + call $~lib/polyfills/bswap + f64.reinterpret/i64 + end + ) + (func $~lib/dataview/DataView#getInt8 (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/dataview/checkOffset|inlined.2 + i32.const 1 + set_local $2 + get_local $0 + i32.load offset=8 + set_local $3 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $4 + if (result i32) + get_local $4 + else + get_local $1 + get_local $2 + i32.add + get_local $3 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load8_s offset=8 + ) + (func $~lib/polyfills/bswap (; 15 ;) (type $ii) (param $0 i32) (result i32) get_local $0 i32.const 8 i32.shl @@ -650,7 +822,59 @@ i32.or return ) - (func $~lib/polyfills/bswap (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.3 + i32.const 2 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load16_s offset=8 + set_local $6 + get_local $2 + i32.const 1 + i32.and + if (result i32) + get_local $6 + else + get_local $6 + call $~lib/polyfills/bswap + end + ) + (func $~lib/polyfills/bswap (; 17 ;) (type $ii) (param $0 i32) (result i32) get_local $0 i32.const -16711936 i32.and @@ -664,7 +888,59 @@ i32.or return ) - (func $~lib/polyfills/bswap (; 13 ;) (type $II) (param $0 i64) (result i64) + (func $~lib/dataview/DataView#getInt32 (; 18 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.4 + i32.const 4 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load offset=8 + set_local $6 + get_local $2 + i32.const 1 + i32.and + if (result i32) + get_local $6 + else + get_local $6 + call $~lib/polyfills/bswap + end + ) + (func $~lib/polyfills/bswap (; 19 ;) (type $II) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -703,7 +979,100 @@ i64.rotr return ) - (func $~lib/polyfills/bswap (; 14 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/dataview/DataView#getInt64 (; 20 ;) (type $iiiI) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/dataview/checkOffset|inlined.5 + i32.const 8 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i64.load offset=8 + set_local $6 + get_local $2 + i32.const 1 + i32.and + if (result i64) + get_local $6 + else + get_local $6 + call $~lib/polyfills/bswap + end + ) + (func $~lib/dataview/DataView#getUint8 (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/dataview/checkOffset|inlined.6 + i32.const 1 + set_local $2 + get_local $0 + i32.load offset=8 + set_local $3 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $4 + if (result i32) + get_local $4 + else + get_local $1 + get_local $2 + i32.add + get_local $3 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load8_u offset=8 + ) + (func $~lib/polyfills/bswap (; 22 ;) (type $ii) (param $0 i32) (result i32) get_local $0 i32.const 8 i32.shl @@ -717,16 +1086,665 @@ i32.or return ) - (func $start (; 15 ;) (type $v) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/dataview/DataView#getUint16 (; 23 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i64) - (local $5 f32) - (local $6 f32) - (local $7 f64) - (local $8 f64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.7 + i32.const 2 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load16_u offset=8 + set_local $6 + get_local $2 + i32.const 1 + i32.and + if (result i32) + get_local $6 + else + get_local $6 + call $~lib/polyfills/bswap + end + ) + (func $~lib/dataview/DataView#getUint32 (; 24 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.8 + i32.const 4 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i32.load offset=8 + set_local $6 + get_local $2 + i32.const 1 + i32.and + if (result i32) + get_local $6 + else + get_local $6 + call $~lib/polyfills/bswap + end + ) + (func $~lib/dataview/DataView#getUint64 (; 25 ;) (type $iiiI) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/dataview/checkOffset|inlined.9 + i32.const 8 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + i64.load offset=8 + set_local $6 + get_local $2 + i32.const 1 + i32.and + if (result i64) + get_local $6 + else + get_local $6 + call $~lib/polyfills/bswap + end + ) + (func $~lib/dataview/DataView#setFloat32 (; 26 ;) (type $iifiv) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.10 + i32.const 4 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else + get_local $1 + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $3 + i32.const 1 + i32.and + if + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $2 + f32.store offset=8 + else + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $2 + i32.reinterpret/f32 + call $~lib/polyfills/bswap + i32.store offset=8 + end + ) + (func $~lib/dataview/DataView#setFloat64 (; 27 ;) (type $iiFiv) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.11 + i32.const 8 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else + get_local $1 + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $3 + i32.const 1 + i32.and + if + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $2 + f64.store offset=8 + else + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $2 + i64.reinterpret/f64 + call $~lib/polyfills/bswap + i64.store offset=8 + end + ) + (func $~lib/dataview/DataView#setInt8 (; 28 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/dataview/checkOffset|inlined.12 + i32.const 1 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $2 + i32.store8 offset=8 + ) + (func $~lib/dataview/DataView#setInt16 (; 29 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.13 + i32.const 2 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else + get_local $1 + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $3 + i32.const 1 + i32.and + if (result i32) + get_local $2 + else + get_local $2 + call $~lib/polyfills/bswap + end + i32.store16 offset=8 + ) + (func $~lib/dataview/DataView#setInt32 (; 30 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.14 + i32.const 4 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else + get_local $1 + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $3 + i32.const 1 + i32.and + if (result i32) + get_local $2 + else + get_local $2 + call $~lib/polyfills/bswap + end + i32.store offset=8 + ) + (func $~lib/dataview/DataView#setInt64 (; 31 ;) (type $iiIiv) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.15 + i32.const 8 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else + get_local $1 + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $3 + i32.const 1 + i32.and + if (result i64) + get_local $2 + else + get_local $2 + call $~lib/polyfills/bswap + end + i64.store offset=8 + ) + (func $~lib/dataview/DataView#setUint8 (; 32 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/dataview/checkOffset|inlined.16 + i32.const 1 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else + get_local $1 + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $2 + i32.store8 offset=8 + ) + (func $~lib/dataview/DataView#setUint16 (; 33 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.17 + i32.const 2 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else + get_local $1 + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $3 + i32.const 1 + i32.and + if (result i32) + get_local $2 + else + get_local $2 + call $~lib/polyfills/bswap + end + i32.store16 offset=8 + ) + (func $~lib/dataview/DataView#setUint32 (; 34 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.18 + i32.const 4 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else + get_local $1 + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $3 + i32.const 1 + i32.and + if (result i32) + get_local $2 + else + get_local $2 + call $~lib/polyfills/bswap + end + i32.store offset=8 + ) + (func $~lib/dataview/DataView#setUint64 (; 35 ;) (type $iiIiv) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/dataview/checkOffset|inlined.19 + i32.const 8 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else + get_local $1 + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable + end + end + get_local $0 + i32.load + get_local $0 + i32.load offset=4 + i32.add + get_local $1 + i32.add + get_local $3 + i32.const 1 + i32.and + if (result i64) + get_local $2 + else + get_local $2 + call $~lib/polyfills/bswap + end + i64.store offset=8 + ) + (func $start (; 36 ;) (type $v) get_global $HEAP_BASE get_global $~lib/internal/allocator/AL_MASK i32.add @@ -782,106 +1800,13 @@ i32.load offset=8 call $~lib/dataview/DataView#constructor set_global $std/dataview/view - block $~lib/dataview/DataView#getFloat32|inlined.0 (result f32) - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 f32.const -4.592586247781397e-20 f32.eq i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 16 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getFloat32|inlined.1 (result f32) - get_global $std/dataview/view - set_local $3 - i32.const 1 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end - f32.const -2.3413961970849473e-37 - f32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 17 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getFloat32|inlined.2 (result f32) - get_global $std/dataview/view - set_local $0 - i32.const 2 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end - f32.const 77105877018631129268224 - f32.eq - i32.eqz if i32.const 0 i32.const 176 @@ -890,32 +1815,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getFloat32|inlined.3 (result f32) - get_global $std/dataview/view - set_local $3 - i32.const 3 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end - f32.const 229.51023864746094 + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const -2.3413961970849473e-37 f32.eq i32.eqz if @@ -926,32 +1830,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getFloat32|inlined.4 (result f32) - get_global $std/dataview/view - set_local $0 - i32.const 4 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end - f32.const 14079802746555334656 + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const 77105877018631129268224 f32.eq i32.eqz if @@ -962,32 +1845,26 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getFloat32|inlined.5 (result f32) - get_global $std/dataview/view - set_local $3 + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const 229.51023864746094 + f32.eq + i32.eqz + if i32.const 0 - set_local $2 + i32.const 176 + i32.const 21 i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 + call $~lib/env/abort + unreachable end - f32.const -2275140518817895515269171e9 + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 + f32.const 14079802746555334656 f32.eq i32.eqz if @@ -998,68 +1875,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getFloat32|inlined.6 (result f32) - get_global $std/dataview/view - set_local $0 - i32.const 1 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end - f32.const -62437351080004157440 - f32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 23 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getFloat32|inlined.7 (result f32) - get_global $std/dataview/view - set_local $3 - i32.const 2 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end - f32.const 1403059112509440 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const -2275140518817895515269171e9 f32.eq i32.eqz if @@ -1070,32 +1890,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getFloat32|inlined.8 (result f32) - get_global $std/dataview/view - set_local $0 - i32.const 3 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end - f32.const -5.522466503261712e-20 + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const -62437351080004157440 f32.eq i32.eqz if @@ -1106,32 +1905,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getFloat32|inlined.9 (result f32) - get_global $std/dataview/view - set_local $3 - i32.const 4 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end - f32.const -1.6843597451835358e-37 + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const 1403059112509440 f32.eq i32.eqz if @@ -1142,33 +1920,27 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getFloat64|inlined.0 (result f64) - get_global $std/dataview/view - set_local $0 + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const -5.522466503261712e-20 + f32.eq + i32.eqz + if i32.const 0 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i64.load offset=8 - set_local $4 - get_local $2 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - f64.reinterpret/i64 + i32.const 176 + i32.const 27 + i32.const 0 + call $~lib/env/abort + unreachable end - f64.const 7936550095674706383278551e126 - f64.eq + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 + f32.const -1.6843597451835358e-37 + f32.eq i32.eqz if i32.const 0 @@ -1178,62 +1950,27 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getFloat64|inlined.1 (result f64) - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $1 - i32.const 0 - set_local $0 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i64.load offset=8 - set_local $4 - get_local $0 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - f64.reinterpret/i64 - end - f64.const -411777475818852546741639e241 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getFloat64 + f64.const 7936550095674706383278551e126 f64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 29 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt8|inlined.0 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load8_s offset=8 - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -10 - i32.eq + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getFloat64 + f64.const -411777475818852546741639e241 + f64.eq i32.eqz if i32.const 0 @@ -1243,54 +1980,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt8|inlined.1 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 1 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load8_s offset=8 - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -32 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 32 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getInt8|inlined.2 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 2 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load8_s offset=8 - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 88 + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getInt8 + i32.const -10 i32.eq i32.eqz if @@ -1301,25 +1994,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt8|inlined.3 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 3 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load8_s offset=8 - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -97 + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getInt8 + i32.const -32 i32.eq i32.eqz if @@ -1330,25 +2008,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt8|inlined.4 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 4 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load8_s offset=8 - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -126 + get_global $std/dataview/view + i32.const 2 + call $~lib/dataview/DataView#getInt8 + i32.const 88 i32.eq i32.eqz if @@ -1359,25 +2022,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt8|inlined.5 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 5 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load8_s offset=8 - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 101 + get_global $std/dataview/view + i32.const 3 + call $~lib/dataview/DataView#getInt8 + i32.const -97 i32.eq i32.eqz if @@ -1388,25 +2036,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt8|inlined.6 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 6 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load8_s offset=8 - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 67 + get_global $std/dataview/view + i32.const 4 + call $~lib/dataview/DataView#getInt8 + i32.const -126 i32.eq i32.eqz if @@ -1417,25 +2050,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt8|inlined.7 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 7 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load8_s offset=8 - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 95 + get_global $std/dataview/view + i32.const 5 + call $~lib/dataview/DataView#getInt8 + i32.const 101 i32.eq i32.eqz if @@ -1446,35 +2064,24 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.0 (result i32) - get_global $std/dataview/view - set_local $0 + get_global $std/dataview/view + i32.const 6 + call $~lib/dataview/DataView#getInt8 + i32.const 67 + i32.eq + i32.eqz + if i32.const 0 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_s offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end + i32.const 176 + i32.const 39 + i32.const 0 + call $~lib/env/abort + unreachable end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const -7946 + get_global $std/dataview/view + i32.const 7 + call $~lib/dataview/DataView#getInt8 + i32.const 95 i32.eq i32.eqz if @@ -1485,74 +2092,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.1 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 1 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_s offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const 22752 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 41 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getInt16|inlined.2 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 2 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_s offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const -24744 + i32.const -7946 i32.eq i32.eqz if @@ -1563,35 +2111,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.3 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 3 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_s offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const -32097 + i32.const 22752 i32.eq i32.eqz if @@ -1602,35 +2130,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.4 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 4 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_s offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const 25986 + i32.const -24744 i32.eq i32.eqz if @@ -1641,35 +2149,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.5 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 5 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_s offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const 17253 + i32.const -32097 i32.eq i32.eqz if @@ -1680,35 +2168,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.6 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 6 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_s offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const 24387 + i32.const 25986 i32.eq i32.eqz if @@ -1719,35 +2187,34 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.7 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_s offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 5 + i32.const 1 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const -2336 + i32.const 17253 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 176 + i32.const 47 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 6 + i32.const 1 + call $~lib/dataview/DataView#getInt16 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 24387 i32.eq i32.eqz if @@ -1758,74 +2225,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.8 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 1 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_s offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const -8104 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 49 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getInt16|inlined.9 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 2 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_s offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 22687 + i32.const -2336 i32.eq i32.eqz if @@ -1836,35 +2244,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.10 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 3 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_s offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const -24702 + i32.const -8104 i32.eq i32.eqz if @@ -1875,35 +2263,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.11 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 4 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_s offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const -32155 + i32.const 22687 i32.eq i32.eqz if @@ -1914,35 +2282,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.12 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 5 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_s offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const 25923 + i32.const -24702 i32.eq i32.eqz if @@ -1953,35 +2301,15 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt16|inlined.13 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 6 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_s offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.const 17247 + i32.const -32155 i32.eq i32.eqz if @@ -1992,31 +2320,34 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt32|inlined.0 (result i32) - get_global $std/dataview/view - set_local $0 + get_global $std/dataview/view + i32.const 5 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 25923 + i32.eq + i32.eqz + if i32.const 0 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end + i32.const 176 + i32.const 55 + i32.const 0 + call $~lib/env/abort + unreachable end - i32.const -1621565194 + get_global $std/dataview/view + i32.const 6 + i32.const 0 + call $~lib/dataview/DataView#getInt16 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 17247 i32.eq i32.eqz if @@ -2027,66 +2358,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt32|inlined.1 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 1 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const -2103486240 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 57 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getInt32|inlined.2 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 2 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const 1703059288 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const -1621565194 i32.eq i32.eqz if @@ -2097,31 +2373,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt32|inlined.3 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 3 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const 1130726047 + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const -2103486240 i32.eq i32.eqz if @@ -2132,31 +2388,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt32|inlined.4 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 4 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const 1598252418 + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1703059288 i32.eq i32.eqz if @@ -2167,31 +2403,26 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt32|inlined.5 (result i32) - get_global $std/dataview/view - set_local $3 + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1130726047 + i32.eq + i32.eqz + if i32.const 0 - set_local $2 + i32.const 176 + i32.const 61 i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end + call $~lib/env/abort + unreachable end - i32.const -153069409 + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getInt32 + i32.const 1598252418 i32.eq i32.eqz if @@ -2202,66 +2433,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt32|inlined.6 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 1 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const -531062910 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 63 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getInt32|inlined.7 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 2 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const 1486848613 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -153069409 i32.eq i32.eqz if @@ -2272,31 +2448,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt32|inlined.8 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 3 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const -1618844349 + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -531062910 i32.eq i32.eqz if @@ -2307,31 +2463,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt32|inlined.9 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 4 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const -2107292833 + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const 1486848613 i32.eq i32.eqz if @@ -2342,32 +2478,27 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt64|inlined.0 (result i64) - get_global $std/dataview/view - set_local $0 + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -1618844349 + i32.eq + i32.eqz + if i32.const 0 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i64.load offset=8 - set_local $4 - get_local $2 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end + i32.const 176 + i32.const 67 + i32.const 0 + call $~lib/env/abort + unreachable end - i64.const 6864441868736323830 - i64.eq + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getInt32 + i32.const -2107292833 + i32.eq i32.eqz if i32.const 0 @@ -2377,59 +2508,27 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getInt64|inlined.1 (result i64) - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $1 - i32.const 0 - set_local $0 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i64.load offset=8 - set_local $4 - get_local $0 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - end - i64.const -657428103485373601 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt64 + i64.const 6864441868736323830 i64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 69 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint8|inlined.0 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load8_u offset=8 - end - i32.const 255 - i32.and - i32.const 246 - i32.eq + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt64 + i64.const -657428103485373601 + i64.eq i32.eqz if i32.const 0 @@ -2439,50 +2538,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint8|inlined.1 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 1 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load8_u offset=8 - end - i32.const 255 - i32.and - i32.const 224 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 72 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getUint8|inlined.2 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 2 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load8_u offset=8 - end - i32.const 255 - i32.and - i32.const 88 + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getUint8 + i32.const 246 i32.eq i32.eqz if @@ -2493,23 +2552,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint8|inlined.3 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 3 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load8_u offset=8 - end - i32.const 255 - i32.and - i32.const 159 + get_global $std/dataview/view + i32.const 1 + call $~lib/dataview/DataView#getUint8 + i32.const 224 i32.eq i32.eqz if @@ -2520,23 +2566,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint8|inlined.4 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 4 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load8_u offset=8 - end - i32.const 255 - i32.and - i32.const 130 + get_global $std/dataview/view + i32.const 2 + call $~lib/dataview/DataView#getUint8 + i32.const 88 i32.eq i32.eqz if @@ -2547,23 +2580,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint8|inlined.5 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 5 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load8_u offset=8 - end - i32.const 255 - i32.and - i32.const 101 + get_global $std/dataview/view + i32.const 3 + call $~lib/dataview/DataView#getUint8 + i32.const 159 i32.eq i32.eqz if @@ -2574,23 +2594,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint8|inlined.6 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 6 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load8_u offset=8 - end - i32.const 255 - i32.and - i32.const 67 + get_global $std/dataview/view + i32.const 4 + call $~lib/dataview/DataView#getUint8 + i32.const 130 i32.eq i32.eqz if @@ -2601,23 +2608,10 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint8|inlined.7 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 7 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load8_u offset=8 - end - i32.const 255 - i32.and - i32.const 95 + get_global $std/dataview/view + i32.const 5 + call $~lib/dataview/DataView#getUint8 + i32.const 101 i32.eq i32.eqz if @@ -2628,33 +2622,24 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.0 (result i32) - get_global $std/dataview/view - set_local $0 + get_global $std/dataview/view + i32.const 6 + call $~lib/dataview/DataView#getUint8 + i32.const 67 + i32.eq + i32.eqz + if i32.const 0 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_u offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end + i32.const 176 + i32.const 79 + i32.const 0 + call $~lib/env/abort + unreachable end - i32.const 65535 - i32.and - i32.const 57590 + get_global $std/dataview/view + i32.const 7 + call $~lib/dataview/DataView#getUint8 + i32.const 95 i32.eq i32.eqz if @@ -2665,70 +2650,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.1 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 1 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_u offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 22752 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 81 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getUint16|inlined.2 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 2 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_u offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const 65535 - i32.and - i32.const 40792 + i32.const 57590 i32.eq i32.eqz if @@ -2739,33 +2667,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.3 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 3 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_u offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 33439 + i32.const 22752 i32.eq i32.eqz if @@ -2776,33 +2684,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.4 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 4 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_u offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 25986 + i32.const 40792 i32.eq i32.eqz if @@ -2813,33 +2701,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.5 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 5 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_u offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 17253 + i32.const 33439 i32.eq i32.eqz if @@ -2850,33 +2718,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.6 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 6 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_u offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 24387 + i32.const 25986 i32.eq i32.eqz if @@ -2887,33 +2735,30 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.7 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_u offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 5 + i32.const 1 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 63200 + i32.const 17253 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 176 + i32.const 87 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 6 + i32.const 1 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 24387 i32.eq i32.eqz if @@ -2924,70 +2769,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.8 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 1 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_u offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 57432 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 89 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getUint16|inlined.9 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 2 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_u offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const 65535 - i32.and - i32.const 22687 + i32.const 63200 i32.eq i32.eqz if @@ -2998,33 +2786,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.10 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 3 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_u offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 40834 + i32.const 57432 i32.eq i32.eqz if @@ -3035,33 +2803,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.11 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 4 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_u offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 33381 + i32.const 22687 i32.eq i32.eqz if @@ -3072,33 +2820,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.12 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 5 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load16_u offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 25923 + i32.const 40834 i32.eq i32.eqz if @@ -3109,33 +2837,13 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint16|inlined.13 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 6 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_u offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and - i32.const 17247 + i32.const 33381 i32.eq i32.eqz if @@ -3146,31 +2854,30 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint32|inlined.0 (result i32) - get_global $std/dataview/view - set_local $0 + get_global $std/dataview/view + i32.const 5 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 25923 + i32.eq + i32.eqz + if i32.const 0 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end + i32.const 176 + i32.const 95 + i32.const 0 + call $~lib/env/abort + unreachable end - i32.const -1621565194 + get_global $std/dataview/view + i32.const 6 + i32.const 0 + call $~lib/dataview/DataView#getUint16 + i32.const 65535 + i32.and + i32.const 17247 i32.eq i32.eqz if @@ -3181,66 +2888,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint32|inlined.1 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 1 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const -2103486240 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 97 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getUint32|inlined.2 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 2 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const 1703059288 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getUint32 + i32.const -1621565194 i32.eq i32.eqz if @@ -3251,31 +2903,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint32|inlined.3 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 3 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const 1130726047 + get_global $std/dataview/view + i32.const 1 + i32.const 1 + call $~lib/dataview/DataView#getUint32 + i32.const -2103486240 i32.eq i32.eqz if @@ -3286,31 +2918,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint32|inlined.4 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 4 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const 1598252418 + get_global $std/dataview/view + i32.const 2 + i32.const 1 + call $~lib/dataview/DataView#getUint32 + i32.const 1703059288 i32.eq i32.eqz if @@ -3321,31 +2933,26 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint32|inlined.5 (result i32) - get_global $std/dataview/view - set_local $3 + get_global $std/dataview/view + i32.const 3 + i32.const 1 + call $~lib/dataview/DataView#getUint32 + i32.const 1130726047 + i32.eq + i32.eqz + if i32.const 0 - set_local $2 + i32.const 176 + i32.const 101 i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end + call $~lib/env/abort + unreachable end - i32.const -153069409 + get_global $std/dataview/view + i32.const 4 + i32.const 1 + call $~lib/dataview/DataView#getUint32 + i32.const 1598252418 i32.eq i32.eqz if @@ -3356,66 +2963,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint32|inlined.6 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 1 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const -531062910 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 103 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/dataview/DataView#getUint32|inlined.7 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 2 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const 1486848613 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getUint32 + i32.const -153069409 i32.eq i32.eqz if @@ -3426,31 +2978,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint32|inlined.8 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 3 - set_local $1 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $2 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end - i32.const -1618844349 + get_global $std/dataview/view + i32.const 1 + i32.const 0 + call $~lib/dataview/DataView#getUint32 + i32.const -531062910 i32.eq i32.eqz if @@ -3461,31 +2993,11 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint32|inlined.9 (result i32) - get_global $std/dataview/view - set_local $3 - i32.const 4 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $0 - get_local $1 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end - i32.const -2107292833 + get_global $std/dataview/view + i32.const 2 + i32.const 0 + call $~lib/dataview/DataView#getUint32 + i32.const 1486848613 i32.eq i32.eqz if @@ -3496,431 +3008,173 @@ call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint64|inlined.0 (result i64) - get_global $std/dataview/view - set_local $0 + get_global $std/dataview/view + i32.const 3 + i32.const 0 + call $~lib/dataview/DataView#getUint32 + i32.const -1618844349 + i32.eq + i32.eqz + if i32.const 0 - set_local $1 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i64.load offset=8 - set_local $4 - get_local $2 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end + i32.const 176 + i32.const 107 + i32.const 0 + call $~lib/env/abort + unreachable end + get_global $std/dataview/view + i32.const 4 + i32.const 0 + call $~lib/dataview/DataView#getUint32 + i32.const -2107292833 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 176 + i32.const 108 + i32.const 0 + call $~lib/env/abort + unreachable + end + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getUint64 i64.const 6864441868736323830 i64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 108 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#getUint64|inlined.1 (result i64) - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $1 - i32.const 0 - set_local $0 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i64.load offset=8 - set_local $4 - get_local $0 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getUint64 i64.const -657428103485373601 i64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 109 + i32.const 111 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setFloat32|inlined.0 - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $1 - f32.const 1.5976661625240943e-18 - set_local $5 - i32.const 1 - set_local $2 - get_local $2 - if (result f32) - get_local $5 - else - get_local $5 - i32.reinterpret/f32 - call $~lib/polyfills/bswap - f32.reinterpret/i32 - end - set_local $6 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $1 - i32.add - get_local $6 - f32.store offset=8 - end - block $~lib/dataview/DataView#getFloat32|inlined.10 (result f32) - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $1 - i32.const 1 - set_local $0 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $1 - i32.add - i32.load offset=8 - set_local $3 - get_local $0 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end + get_global $std/dataview/view + i32.const 0 + f32.const 1.5976661625240943e-18 + i32.const 1 + call $~lib/dataview/DataView#setFloat32 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getFloat32 f32.const 1.5976661625240943e-18 f32.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 112 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setFloat32|inlined.1 - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $0 - f32.const 1976281973381696323584 - set_local $6 - i32.const 0 - set_local $1 - get_local $1 - if (result f32) - get_local $6 - else - get_local $6 - i32.reinterpret/f32 - call $~lib/polyfills/bswap - f32.reinterpret/i32 - end - set_local $5 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $0 - i32.add - get_local $5 - f32.store offset=8 - end - block $~lib/dataview/DataView#getFloat32|inlined.11 (result f32) - get_global $std/dataview/view - set_local $1 - i32.const 0 - set_local $0 - i32.const 0 - set_local $3 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load offset=8 - set_local $2 - get_local $3 - if (result i32) - get_local $2 - else - get_local $2 - call $~lib/polyfills/bswap - end - f32.reinterpret/i32 - end + get_global $std/dataview/view + i32.const 0 + f32.const 1976281973381696323584 + i32.const 0 + call $~lib/dataview/DataView#setFloat32 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getFloat32 f32.const 1976281973381696323584 f32.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 115 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setFloat64|inlined.0 - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $3 - f64.const -1094252199637739024055454e124 - set_local $7 - i32.const 1 - set_local $0 - get_local $0 - if (result f64) - get_local $7 - else - get_local $7 - i64.reinterpret/f64 - call $~lib/polyfills/bswap - f64.reinterpret/i64 - end - set_local $8 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $3 - i32.add - get_local $8 - f64.store offset=8 - end - block $~lib/dataview/DataView#getFloat64|inlined.2 (result f64) - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $3 - i32.const 1 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $3 - i32.add - i64.load offset=8 - set_local $4 - get_local $2 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - f64.reinterpret/i64 - end + get_global $std/dataview/view + i32.const 0 + f64.const -1094252199637739024055454e124 + i32.const 1 + call $~lib/dataview/DataView#setFloat64 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getFloat64 f64.const -1094252199637739024055454e124 f64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 118 + i32.const 120 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setFloat64|inlined.1 - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $3 - f64.const 6.022586634778589e-103 - set_local $8 - i32.const 0 - set_local $0 - get_local $0 - if (result f64) - get_local $8 - else - get_local $8 - i64.reinterpret/f64 - call $~lib/polyfills/bswap - f64.reinterpret/i64 - end - set_local $7 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $3 - i32.add - get_local $7 - f64.store offset=8 - end - block $~lib/dataview/DataView#getFloat64|inlined.3 (result f64) - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $3 - i32.const 0 - set_local $2 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $3 - i32.add - i64.load offset=8 - set_local $4 - get_local $2 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - f64.reinterpret/i64 - end + get_global $std/dataview/view + i32.const 0 + f64.const 6.022586634778589e-103 + i32.const 0 + call $~lib/dataview/DataView#setFloat64 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getFloat64 f64.const 6.022586634778589e-103 f64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 121 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setInt8|inlined.0 - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $3 - i32.const 108 - set_local $0 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $3 - i32.add - get_local $0 - i32.store8 offset=8 - end - block $~lib/dataview/DataView#getInt8|inlined.8 (result i32) - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $3 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $3 - i32.add - i32.load8_s offset=8 - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + get_global $std/dataview/view + i32.const 0 + i32.const 108 + call $~lib/dataview/DataView#setInt8 + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getInt8 i32.const 108 i32.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 124 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setInt16|inlined.0 - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $0 - i32.const -13360 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $0 - i32.add - get_local $1 - if (result i32) - get_local $2 - else - get_local $2 - call $~lib/polyfills/bswap - end - i32.store16 offset=8 - end - block $~lib/dataview/DataView#getInt16|inlined.14 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 0 - set_local $2 - i32.const 1 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_s offset=8 - set_local $3 - get_local $0 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const -13360 + i32.const 1 + call $~lib/dataview/DataView#setInt16 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 @@ -3931,60 +3185,20 @@ if i32.const 0 i32.const 176 - i32.const 127 + i32.const 129 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setInt16|inlined.1 - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $0 - i32.const 14689 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $0 - i32.add - get_local $1 - if (result i32) - get_local $2 - else - get_local $2 - call $~lib/polyfills/bswap - end - i32.store16 offset=8 - end - block $~lib/dataview/DataView#getInt16|inlined.15 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 0 - set_local $2 - i32.const 0 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load16_s offset=8 - set_local $3 - get_local $0 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 14689 + i32.const 0 + call $~lib/dataview/DataView#setInt16 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt16 i32.const 16 i32.shl i32.const 16 @@ -3995,344 +3209,118 @@ if i32.const 0 i32.const 176 - i32.const 130 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setInt32|inlined.0 - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $0 - i32.const 1204680201 - set_local $2 - i32.const 1 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $0 - i32.add - get_local $1 - if (result i32) - get_local $2 - else - get_local $2 - call $~lib/polyfills/bswap - end - i32.store offset=8 - end - block $~lib/dataview/DataView#getInt32|inlined.10 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 0 - set_local $2 - i32.const 1 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $3 - get_local $0 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 1204680201 + i32.const 1 + call $~lib/dataview/DataView#setInt32 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt32 i32.const 1204680201 i32.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 133 + i32.const 135 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setInt32|inlined.1 - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $0 - i32.const 660673230 - set_local $2 - i32.const 0 - set_local $1 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $0 - i32.add - get_local $1 - if (result i32) - get_local $2 - else - get_local $2 - call $~lib/polyfills/bswap - end - i32.store offset=8 - end - block $~lib/dataview/DataView#getInt32|inlined.11 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 0 - set_local $2 - i32.const 0 - set_local $0 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i32.load offset=8 - set_local $3 - get_local $0 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 660673230 + i32.const 0 + call $~lib/dataview/DataView#setInt32 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt32 i32.const 660673230 i32.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 136 + i32.const 138 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setInt64|inlined.0 - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $0 - i64.const -3290739641816099749 - set_local $4 - i32.const 1 - set_local $2 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $0 - i32.add - get_local $2 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - i64.store offset=8 - end - block $~lib/dataview/DataView#getInt64|inlined.2 (result i64) - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $0 - i32.const 1 - set_local $3 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i64.load offset=8 - set_local $4 - get_local $3 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i64.const -3290739641816099749 + i32.const 1 + call $~lib/dataview/DataView#setInt64 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getInt64 i64.const -3290739641816099749 i64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 139 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setInt64|inlined.1 - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $0 - i64.const 8178932412950708047 - set_local $4 - i32.const 0 - set_local $2 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $0 - i32.add - get_local $2 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - i64.store offset=8 - end - block $~lib/dataview/DataView#getInt64|inlined.3 (result i64) - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $0 - i32.const 0 - set_local $3 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i64.load offset=8 - set_local $4 - get_local $3 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i64.const 8178932412950708047 + i32.const 0 + call $~lib/dataview/DataView#setInt64 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getInt64 i64.const 8178932412950708047 i64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 142 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setUint8|inlined.0 - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $0 - i32.const 238 - set_local $2 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $0 - i32.add - get_local $2 - i32.store8 offset=8 - end - block $~lib/dataview/DataView#getUint8|inlined.8 (result i32) - get_global $std/dataview/view - set_local $2 - i32.const 0 - set_local $0 - get_local $2 - i32.load - get_local $2 - i32.load offset=4 - i32.add - get_local $0 - i32.add - i32.load8_u offset=8 - end - i32.const 255 - i32.and + get_global $std/dataview/view + i32.const 0 + i32.const 238 + call $~lib/dataview/DataView#setUint8 + get_global $std/dataview/view + i32.const 0 + call $~lib/dataview/DataView#getUint8 i32.const 238 i32.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 145 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setUint16|inlined.0 - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $2 - i32.const 58856 - set_local $3 - i32.const 1 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $2 - i32.add - get_local $1 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - i32.store16 offset=8 - end - block $~lib/dataview/DataView#getUint16|inlined.14 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 0 - set_local $3 - i32.const 1 - set_local $2 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $3 - i32.add - i32.load16_u offset=8 - set_local $0 - get_local $2 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 58856 + i32.const 1 + call $~lib/dataview/DataView#setUint16 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and i32.const 58856 @@ -4341,60 +3329,20 @@ if i32.const 0 i32.const 176 - i32.const 148 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setUint16|inlined.1 - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $2 - i32.const 60400 - set_local $3 - i32.const 0 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $2 - i32.add - get_local $1 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - i32.store16 offset=8 - end - block $~lib/dataview/DataView#getUint16|inlined.15 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 0 - set_local $3 - i32.const 0 - set_local $2 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $3 - i32.add - i32.load16_u offset=8 - set_local $0 - get_local $2 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const 60400 + i32.const 0 + call $~lib/dataview/DataView#setUint16 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getUint16 i32.const 65535 i32.and i32.const 60400 @@ -4403,252 +3351,92 @@ if i32.const 0 i32.const 176 - i32.const 151 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setUint32|inlined.0 - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $2 - i32.const -846805744 - set_local $3 - i32.const 1 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $2 - i32.add - get_local $1 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - i32.store offset=8 - end - block $~lib/dataview/DataView#getUint32|inlined.10 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 0 - set_local $3 - i32.const 1 - set_local $2 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $3 - i32.add - i32.load offset=8 - set_local $0 - get_local $2 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const -846805744 + i32.const 1 + call $~lib/dataview/DataView#setUint32 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getUint32 i32.const -846805744 i32.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 154 + i32.const 156 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setUint32|inlined.1 - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $2 - i32.const -1510791631 - set_local $3 - i32.const 0 - set_local $1 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $2 - i32.add - get_local $1 - if (result i32) - get_local $3 - else - get_local $3 - call $~lib/polyfills/bswap - end - i32.store offset=8 - end - block $~lib/dataview/DataView#getUint32|inlined.11 (result i32) - get_global $std/dataview/view - set_local $1 - i32.const 0 - set_local $3 - i32.const 0 - set_local $2 - get_local $1 - i32.load - get_local $1 - i32.load offset=4 - i32.add - get_local $3 - i32.add - i32.load offset=8 - set_local $0 - get_local $2 - if (result i32) - get_local $0 - else - get_local $0 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i32.const -1510791631 + i32.const 0 + call $~lib/dataview/DataView#setUint32 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getUint32 i32.const -1510791631 i32.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 157 + i32.const 159 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setUint64|inlined.0 - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $2 - i64.const 2334704782995986958 - set_local $4 - i32.const 1 - set_local $3 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $2 - i32.add - get_local $3 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - i64.store offset=8 - end - block $~lib/dataview/DataView#getUint64|inlined.2 (result i64) - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $2 - i32.const 1 - set_local $0 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i64.load offset=8 - set_local $4 - get_local $0 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i64.const 2334704782995986958 + i32.const 1 + call $~lib/dataview/DataView#setUint64 + get_global $std/dataview/view + i32.const 0 + i32.const 1 + call $~lib/dataview/DataView#getUint64 i64.const 2334704782995986958 i64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 160 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/dataview/DataView#setUint64|inlined.1 - get_global $std/dataview/view - set_local $0 - i32.const 0 - set_local $2 - i64.const -7123186897289856329 - set_local $4 - i32.const 0 - set_local $3 - get_local $0 - i32.load - get_local $0 - i32.load offset=4 - i32.add - get_local $2 - i32.add - get_local $3 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - i64.store offset=8 - end - block $~lib/dataview/DataView#getUint64|inlined.3 (result i64) - get_global $std/dataview/view - set_local $3 - i32.const 0 - set_local $2 - i32.const 0 - set_local $0 - get_local $3 - i32.load - get_local $3 - i32.load offset=4 - i32.add - get_local $2 - i32.add - i64.load offset=8 - set_local $4 - get_local $0 - if (result i64) - get_local $4 - else - get_local $4 - call $~lib/polyfills/bswap - end - end + get_global $std/dataview/view + i32.const 0 + i64.const -7123186897289856329 + i32.const 0 + call $~lib/dataview/DataView#setUint64 + get_global $std/dataview/view + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#getUint64 i64.const -7123186897289856329 i64.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 163 + i32.const 165 i32.const 0 call $~lib/env/abort unreachable end ) - (func $null (; 16 ;) (type $v) + (func $null (; 37 ;) (type $v) ) )