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,6 +4,8 @@
(type $ii (func (param i32) (result i32)))
(type $iiiv (func (param i32 i32 i32)))
(type $v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$vii (func (param i32 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))
@ -204,37 +206,36 @@
)
(get_local $1)
)
(func $~lib/memory/memory.allocate (; 6 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/memory/memory.allocate (; 6 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32)
(call $~lib/allocator/arena/__memory_allocate
(get_local $0)
(i32.const 8)
)
)
(func $~lib/internal/memory/memset (; 7 ;) (; 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 (; 7 ;) (; 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)
@ -244,37 +245,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)
@ -284,74 +285,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)
@ -361,37 +351,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)
@ -401,66 +391,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)
@ -471,60 +461,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)
)
)
@ -539,62 +516,38 @@
)
)
)
(func $~lib/array/Array<i8>#constructor (; 8 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(if
(i32.gt_u
(get_local $1)
(i32.const 1073741816)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 136)
(i32.const 23)
(i32.const 39)
)
(unreachable)
)
)
(set_local $2
(func $~lib/array/Array<i8>#constructor (; 8 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/internal/arraybuffer/allocateUnsafe
(get_local $1)
)
)
(if
(i32.eqz
(get_local $0)
)
(block
(i32.store
(tee_local $0
(call $~lib/memory/memory.allocate
(i32.const 8)
)
)
(i32.const 0)
)
(i32.store offset=4
(get_local $0)
(i32.const 0)
)
(i32.const 3)
)
)
(i32.store
(get_local $0)
(get_local $2)
(tee_local $0
(call $~lib/memory/memory.allocate)
)
(i32.const 0)
)
(i32.store offset=4
(get_local $0)
(i32.const 0)
)
(i32.store
(get_local $0)
(get_local $1)
)
(i32.store offset=4
(get_local $0)
(i32.const 3)
)
(call $~lib/internal/memory/memset
(i32.add
(get_local $2)
(get_local $1)
(i32.const 8)
)
(i32.const 0)
(get_local $1)
(i32.const 3)
)
(get_local $0)
)
@ -609,68 +562,38 @@
(get_local $2)
)
)
(func $~lib/array/Array<i32>#constructor (; 10 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(if
(i32.gt_u
(get_local $1)
(i32.const 268435454)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 136)
(i32.const 23)
(i32.const 39)
)
(unreachable)
)
)
(set_local $2
(func $~lib/array/Array<i32>#constructor (; 10 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
(local $1 i32)
(set_local $1
(call $~lib/internal/arraybuffer/allocateUnsafe
(tee_local $3
(i32.shl
(get_local $1)
(i32.const 2)
)
)
)
)
(if
(i32.eqz
(get_local $0)
)
(block
(i32.store
(tee_local $0
(call $~lib/memory/memory.allocate
(i32.const 8)
)
)
(i32.const 0)
)
(i32.store offset=4
(get_local $0)
(i32.const 0)
)
(i32.const 12)
)
)
(i32.store
(get_local $0)
(get_local $2)
(tee_local $0
(call $~lib/memory/memory.allocate)
)
(i32.const 0)
)
(i32.store offset=4
(get_local $0)
(i32.const 0)
)
(i32.store
(get_local $0)
(get_local $1)
)
(i32.store offset=4
(get_local $0)
(i32.const 3)
)
(call $~lib/internal/memory/memset
(i32.add
(get_local $2)
(get_local $1)
(i32.const 8)
)
(i32.const 0)
(get_local $3)
(i32.const 12)
)
(get_local $0)
)
@ -857,10 +780,7 @@
)
(call $~lib/array/Array<i8>#__unchecked_set
(tee_local $0
(call $~lib/array/Array<i8>#constructor
(i32.const 0)
(i32.const 3)
)
(call $~lib/array/Array<i8>#constructor)
)
(i32.const 0)
(get_global $std/array-literal/i)
@ -972,10 +892,7 @@
)
(call $~lib/array/Array<i32>#__unchecked_set
(tee_local $0
(call $~lib/array/Array<i32>#constructor
(i32.const 0)
(i32.const 3)
)
(call $~lib/array/Array<i32>#constructor)
)
(i32.const 0)
(get_global $std/array-literal/i)