Update Binaryen

This commit is contained in:
dcodeIO
2018-09-13 23:10:49 +02:00
parent 6949cf9f9e
commit d90cd085e5
51 changed files with 2786 additions and 9159 deletions

View File

@ -17,6 +17,9 @@
(type $iFi (func (param i32 f64) (result i32)))
(type $iFii (func (param i32 f64 i32) (result i32)))
(type $iFiv (func (param i32 f64 i32)))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
@ -111,9 +114,9 @@
)
(get_local $1)
)
(func $~lib/memory/memory.allocate (; 2 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/memory/memory.allocate (; 2 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32)
(call $~lib/allocator/arena/__memory_allocate
(get_local $0)
(i32.const 24)
)
)
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
@ -159,32 +162,31 @@
)
(get_local $1)
)
(func $~lib/internal/memory/memset (; 5 ;) (; has Stack IR ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i64)
(func $~lib/internal/memory/memset (; 5 ;) (; has Stack IR ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
(if
(i32.eqz
(get_local $2)
(get_local $1)
)
(return)
)
(i32.store8
(get_local $0)
(get_local $1)
(i32.const 0)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
(get_local $1)
)
(i32.const 1)
)
(get_local $1)
(i32.const 0)
)
(if
(i32.le_u
(get_local $2)
(get_local $1)
(i32.const 2)
)
(return)
@ -194,37 +196,37 @@
(get_local $0)
(i32.const 1)
)
(get_local $1)
(i32.const 0)
)
(i32.store8
(i32.add
(get_local $0)
(i32.const 2)
)
(get_local $1)
(i32.const 0)
)
(i32.store8
(i32.sub
(tee_local $3
(tee_local $2
(i32.add
(get_local $0)
(get_local $2)
(get_local $1)
)
)
(i32.const 2)
)
(get_local $1)
(i32.const 0)
)
(i32.store8
(i32.sub
(get_local $3)
(get_local $2)
(i32.const 3)
)
(get_local $1)
(i32.const 0)
)
(if
(i32.le_u
(get_local $2)
(get_local $1)
(i32.const 6)
)
(return)
@ -234,74 +236,63 @@
(get_local $0)
(i32.const 3)
)
(get_local $1)
(i32.const 0)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
(get_local $1)
)
(i32.const 4)
)
(get_local $1)
(i32.const 0)
)
(if
(i32.le_u
(get_local $2)
(get_local $1)
(i32.const 8)
)
(return)
)
(set_local $2
(i32.sub
(get_local $2)
(tee_local $3
(i32.and
(i32.sub
(i32.const 0)
(get_local $0)
)
(i32.const 3)
)
)
)
)
(i32.store
(tee_local $0
(i32.add
(get_local $0)
(get_local $3)
)
)
(tee_local $1
(i32.mul
(i32.and
(get_local $1)
(i32.const 255)
(tee_local $2
(i32.and
(i32.sub
(i32.const 0)
(get_local $0)
)
(i32.const 3)
)
)
(i32.const 16843009)
)
)
(i32.const 0)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(tee_local $2
(tee_local $1
(i32.and
(get_local $2)
(i32.sub
(get_local $1)
(get_local $2)
)
(i32.const -4)
)
)
)
(i32.const 4)
)
(get_local $1)
(i32.const 0)
)
(if
(i32.le_u
(get_local $2)
(get_local $1)
(i32.const 8)
)
(return)
@ -311,37 +302,37 @@
(get_local $0)
(i32.const 4)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 8)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.sub
(tee_local $3
(tee_local $2
(i32.add
(get_local $0)
(get_local $2)
(get_local $1)
)
)
(i32.const 12)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.sub
(get_local $3)
(get_local $2)
(i32.const 8)
)
(get_local $1)
(i32.const 0)
)
(if
(i32.le_u
(get_local $2)
(get_local $1)
(i32.const 24)
)
(return)
@ -351,66 +342,66 @@
(get_local $0)
(i32.const 12)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 16)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 20)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.add
(get_local $0)
(i32.const 24)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.sub
(tee_local $3
(tee_local $2
(i32.add
(get_local $0)
(get_local $2)
(get_local $1)
)
)
(i32.const 28)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.sub
(get_local $3)
(get_local $2)
(i32.const 24)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.sub
(get_local $3)
(get_local $2)
(i32.const 20)
)
(get_local $1)
(i32.const 0)
)
(i32.store
(i32.sub
(get_local $3)
(get_local $2)
(i32.const 16)
)
(get_local $1)
(i32.const 0)
)
(set_local $0
(i32.add
(get_local $0)
(tee_local $3
(tee_local $2
(i32.add
(i32.and
(get_local $0)
@ -421,60 +412,47 @@
)
)
)
(set_local $2
(set_local $1
(i32.sub
(get_local $1)
(get_local $2)
(get_local $3)
)
)
(set_local $4
(i64.or
(tee_local $4
(i64.extend_u/i32
(get_local $1)
)
)
(i64.shl
(get_local $4)
(i64.const 32)
)
)
)
(loop $continue|0
(if
(i32.ge_u
(get_local $2)
(get_local $1)
(i32.const 32)
)
(block
(i64.store
(get_local $0)
(get_local $4)
(i64.const 0)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 8)
)
(get_local $4)
(i64.const 0)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 16)
)
(get_local $4)
(i64.const 0)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 24)
)
(get_local $4)
(i64.const 0)
)
(set_local $2
(set_local $1
(i32.sub
(get_local $2)
(get_local $1)
(i32.const 32)
)
)
@ -489,11 +467,11 @@
)
)
)
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (; has Stack IR ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(if
(i32.gt_u
(get_local $1)
(get_local $0)
(i32.const 1073741816)
)
(block
@ -506,34 +484,32 @@
(unreachable)
)
)
(set_local $3
(set_local $2
(call $~lib/internal/arraybuffer/allocateUnsafe
(get_local $1)
(get_local $0)
)
)
(if
(i32.eqz
(i32.and
(get_local $2)
(get_local $1)
(i32.const 1)
)
)
(call $~lib/internal/memory/memset
(i32.add
(get_local $3)
(get_local $2)
(i32.const 8)
)
(i32.const 0)
(get_local $1)
(get_local $0)
)
)
(get_local $3)
(get_local $2)
)
(func $~lib/map/Map<i8,i32>#clear (; 7 ;) (; has Stack IR ;) (type $iv) (param $0 i32)
(i32.store
(get_local $0)
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.const 16)
(i32.const 0)
)
@ -545,7 +521,6 @@
(i32.store offset=8
(get_local $0)
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.const 48)
(i32.const 1)
)
@ -563,41 +538,33 @@
(i32.const 0)
)
)
(func $~lib/map/Map<i8,i32>#constructor (; 8 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
(if
(i32.eqz
(get_local $0)
)
(block
(i32.store
(tee_local $0
(call $~lib/memory/memory.allocate
(i32.const 24)
)
)
(i32.const 0)
)
(i32.store offset=4
(get_local $0)
(i32.const 0)
)
(i32.store offset=8
(get_local $0)
(i32.const 0)
)
(i32.store offset=12
(get_local $0)
(i32.const 0)
)
(i32.store offset=16
(get_local $0)
(i32.const 0)
)
(i32.store offset=20
(get_local $0)
(i32.const 0)
)
(func $~lib/map/Map<i8,i32>#constructor (; 8 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
(i32.store
(tee_local $0
(call $~lib/memory/memory.allocate)
)
(i32.const 0)
)
(i32.store offset=4
(get_local $0)
(i32.const 0)
)
(i32.store offset=8
(get_local $0)
(i32.const 0)
)
(i32.store offset=12
(get_local $0)
(i32.const 0)
)
(i32.store offset=16
(get_local $0)
(i32.const 0)
)
(i32.store offset=20
(get_local $0)
(i32.const 0)
)
(call $~lib/map/Map<i8,i32>#clear
(get_local $0)
@ -707,7 +674,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -722,7 +688,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.mul
(tee_local $7
(i32.trunc_s/f64
@ -1138,9 +1103,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i8,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i8,i32>#constructor)
)
(block $break|0
(loop $repeat|0
@ -1645,7 +1608,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -1660,7 +1622,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.mul
(tee_local $7
(i32.trunc_s/f64
@ -2062,9 +2023,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i8,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i8,i32>#constructor)
)
(block $break|0
(loop $repeat|0
@ -2638,7 +2597,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -2653,7 +2611,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.mul
(tee_local $7
(i32.trunc_s/f64
@ -3064,9 +3021,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i8,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i8,i32>#constructor)
)
(block $break|0
(loop $repeat|0
@ -3571,7 +3526,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -3586,7 +3540,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.mul
(tee_local $7
(i32.trunc_s/f64
@ -3988,9 +3941,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i8,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i8,i32>#constructor)
)
(block $break|0
(loop $repeat|0
@ -4579,7 +4530,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -4594,7 +4544,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.mul
(tee_local $7
(i32.trunc_s/f64
@ -4987,9 +4936,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i8,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i8,i32>#constructor)
)
(block $break|0
(loop $repeat|0
@ -5431,9 +5378,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i8,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i8,i32>#constructor)
)
(block $break|0
(loop $repeat|0
@ -5875,7 +5820,6 @@
(i32.store
(get_local $0)
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.const 16)
(i32.const 0)
)
@ -5887,7 +5831,6 @@
(i32.store offset=8
(get_local $0)
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.const 64)
(i32.const 1)
)
@ -5905,41 +5848,33 @@
(i32.const 0)
)
)
(func $~lib/map/Map<i64,i32>#constructor (; 48 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
(if
(i32.eqz
(get_local $0)
)
(block
(i32.store
(tee_local $0
(call $~lib/memory/memory.allocate
(i32.const 24)
)
)
(i32.const 0)
)
(i32.store offset=4
(get_local $0)
(i32.const 0)
)
(i32.store offset=8
(get_local $0)
(i32.const 0)
)
(i32.store offset=12
(get_local $0)
(i32.const 0)
)
(i32.store offset=16
(get_local $0)
(i32.const 0)
)
(i32.store offset=20
(get_local $0)
(i32.const 0)
)
(func $~lib/map/Map<i64,i32>#constructor (; 48 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
(i32.store
(tee_local $0
(call $~lib/memory/memory.allocate)
)
(i32.const 0)
)
(i32.store offset=4
(get_local $0)
(i32.const 0)
)
(i32.store offset=8
(get_local $0)
(i32.const 0)
)
(i32.store offset=12
(get_local $0)
(i32.const 0)
)
(i32.store offset=16
(get_local $0)
(i32.const 0)
)
(i32.store offset=20
(get_local $0)
(i32.const 0)
)
(call $~lib/map/Map<i64,i32>#clear
(get_local $0)
@ -6130,7 +6065,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -6145,7 +6079,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -6539,9 +6472,7 @@
(local $0 i64)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i64,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i64,i32>#constructor)
)
(block $break|0
(loop $repeat|0
@ -6997,9 +6928,7 @@
(local $0 i64)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i64,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i64,i32>#constructor)
)
(block $break|0
(loop $repeat|0
@ -7538,7 +7467,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -7553,7 +7481,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.mul
(tee_local $7
(i32.trunc_s/f64
@ -7955,9 +7882,7 @@
(local $0 f32)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i8,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i8,i32>#constructor)
)
(block $break|0
(loop $repeat|0
@ -8504,7 +8429,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -8519,7 +8443,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -8921,9 +8844,7 @@
(local $0 f64)
(local $1 i32)
(set_local $1
(call $~lib/map/Map<i64,i32>#constructor
(i32.const 0)
)
(call $~lib/map/Map<i64,i32>#constructor)
)
(block $break|0
(loop $repeat|0