Check radix in parseInt and use constant offsets

This commit is contained in:
dcodeIO
2018-01-29 00:33:32 +01:00
parent 002fba3067
commit d3f22637ed
3 changed files with 98 additions and 61 deletions

View File

@ -504,12 +504,6 @@
(get_local $0)
)
)
(set_local $3
(i32.add
(get_local $0)
(i32.const 4)
)
)
(if
(i32.eqz
(get_local $2)
@ -518,8 +512,11 @@
(i64.const 0)
)
)
(set_local $3
(get_local $0)
)
(set_local $4
(i32.load16_u
(i32.load16_u offset=4
(get_local $3)
)
)
@ -544,7 +541,7 @@
)
)
(set_local $4
(i32.load16_u
(i32.load16_u offset=4
(tee_local $3
(i32.add
(get_local $3)
@ -580,7 +577,7 @@
)
)
(set_local $4
(i32.load16_u
(i32.load16_u offset=4
(tee_local $3
(i32.add
(get_local $3)
@ -632,7 +629,7 @@
(block $case1|0
(block $case0|0
(set_local $6
(i32.load16_u
(i32.load16_u offset=4
(i32.add
(get_local $3)
(i32.const 2)
@ -739,6 +736,31 @@
(i32.const 10)
)
)
(if
(i32.and
(if (result i32)
(i32.ne
(i32.lt_s
(get_local $1)
(i32.const 2)
)
(i32.const 0)
)
(i32.lt_s
(get_local $1)
(i32.const 2)
)
(i32.gt_s
(get_local $1)
(i32.const 36)
)
)
(i32.const 1)
)
(return
(i64.const 0)
)
)
)
(set_local $7
(i64.const 0)
@ -761,7 +783,7 @@
(block
(block
(set_local $4
(i32.load16_u
(i32.load16_u offset=4
(get_local $3)
)
)