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

@ -4,7 +4,6 @@
(type $iv (func (param i32)))
(type $iiii (func (param i32 i32 i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $iiiv (func (param i32 i32 i32)))
(type $iii (func (param i32 i32) (result i32)))
(type $iiv (func (param i32 i32)))
(type $iIi (func (param i32 i64) (result i32)))
@ -19,6 +18,9 @@
(type $Fi (func (param f64) (result i32)))
(type $iFii (func (param i32 f64 i32) (result i32)))
(type $iFv (func (param i32 f64)))
(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))
@ -113,9 +115,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)
@ -161,32 +163,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)
@ -196,37 +197,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)
@ -236,74 +237,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)
@ -313,37 +303,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)
@ -353,66 +343,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)
@ -423,60 +413,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)
)
)
@ -491,11 +468,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
@ -508,34 +485,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/set/Set<i8>#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)
)
@ -547,7 +522,6 @@
(i32.store offset=8
(get_local $0)
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.const 32)
(i32.const 1)
)
@ -565,41 +539,33 @@
(i32.const 0)
)
)
(func $~lib/set/Set<i8>#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/set/Set<i8>#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/set/Set<i8>#clear
(get_local $0)
@ -714,7 +680,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -729,7 +694,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -1100,9 +1064,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i8>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i8>#constructor)
)
(block $break|0
(loop $repeat|0
@ -1470,7 +1432,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -1485,7 +1446,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -1848,9 +1808,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i8>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i8>#constructor)
)
(block $break|0
(loop $repeat|0
@ -2308,7 +2266,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -2323,7 +2280,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -2689,9 +2645,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i8>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i8>#constructor)
)
(block $break|0
(loop $repeat|0
@ -3059,7 +3013,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -3074,7 +3027,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -3437,9 +3389,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i8>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i8>#constructor)
)
(block $break|0
(loop $repeat|0
@ -3912,7 +3862,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -3927,7 +3876,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -4287,9 +4235,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i8>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i8>#constructor)
)
(block $break|0
(loop $repeat|0
@ -4631,9 +4577,7 @@
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i8>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i8>#constructor)
)
(block $break|0
(loop $repeat|0
@ -4975,7 +4919,6 @@
(i32.store
(get_local $0)
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.const 16)
(i32.const 0)
)
@ -4987,7 +4930,6 @@
(i32.store offset=8
(get_local $0)
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.const 64)
(i32.const 1)
)
@ -5005,41 +4947,33 @@
(i32.const 0)
)
)
(func $~lib/set/Set<i64>#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/set/Set<i64>#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/set/Set<i64>#clear
(get_local $0)
@ -5235,7 +5169,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -5250,7 +5183,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -5611,9 +5543,7 @@
(local $0 i64)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i64>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i64>#constructor)
)
(block $break|0
(loop $repeat|0
@ -5955,9 +5885,7 @@
(local $0 i64)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i64>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i64>#constructor)
)
(block $break|0
(loop $repeat|0
@ -6387,7 +6315,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -6402,7 +6329,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -6767,9 +6693,7 @@
(local $0 f32)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i8>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i8>#constructor)
)
(block $break|0
(loop $repeat|0
@ -7207,7 +7131,6 @@
(local $8 i32)
(set_local $4
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $2
(i32.add
@ -7222,7 +7145,6 @@
)
(set_local $5
(call $~lib/arraybuffer/ArrayBuffer#constructor
(i32.const 0)
(i32.shl
(tee_local $7
(i32.trunc_s/f64
@ -7587,9 +7509,7 @@
(local $0 f64)
(local $1 i32)
(set_local $1
(call $~lib/set/Set<i64>#constructor
(i32.const 0)
)
(call $~lib/set/Set<i64>#constructor)
)
(block $break|0
(loop $repeat|0