Suppress some unnecessary blocks and nops; Fix compilation of always 'break'ing 'do's

This commit is contained in:
dcodeIO
2018-05-06 05:46:35 +02:00
parent 2f8f477ab0
commit 25a1f6230a
45 changed files with 1318 additions and 1642 deletions

View File

@ -538,33 +538,31 @@
(get_local $4)
)
(block
(block
(if
(i32.eqz
(call $~lib/memory/compare_memory
(if
(i32.eqz
(call $~lib/memory/compare_memory
(i32.add
(i32.add
(i32.add
(get_local $0)
(i32.const 4)
)
(i32.shl
(get_local $5)
(i32.const 1)
)
)
(i32.add
(get_local $1)
(get_local $0)
(i32.const 4)
)
(i32.shl
(get_local $8)
(get_local $5)
(i32.const 1)
)
)
(i32.add
(get_local $1)
(i32.const 4)
)
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(return
(get_local $5)
)
)
(return
(get_local $5)
)
)
(set_local $5
@ -673,7 +671,6 @@
(get_local $3)
)
)
(nop)
(if
(i32.eq
(get_local $4)
@ -877,10 +874,8 @@
(br $break|0)
)
)
(block
(set_local $1
(i32.const 10)
)
(set_local $1
(i32.const 10)
)
)
(set_local $1
@ -1099,7 +1094,6 @@
(get_local $2)
)
)
(nop)
(if
(i32.eq
(get_local $3)
@ -1512,7 +1506,6 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(nop)
(block $break|0
(loop $continue|0
(if
@ -3604,22 +3597,20 @@
(if
(get_local $2)
(block
(block
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
)
@ -4314,21 +4305,19 @@
(get_local $6)
)
(block
(block
(call $~lib/memory/move_memory
(call $~lib/memory/move_memory
(i32.add
(i32.add
(i32.add
(get_local $4)
(i32.const 4)
)
(get_local $3)
)
(i32.add
(get_local $0)
(get_local $4)
(i32.const 4)
)
(get_local $5)
(get_local $3)
)
(i32.add
(get_local $0)
(i32.const 4)
)
(get_local $5)
)
(set_local $3
(i32.add