mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 06:21:29 +00:00
Update internal ABI to zero/sign-extend where necessary only (#87)
This commit is contained in:
@ -628,21 +628,18 @@
|
||||
(if
|
||||
(get_local $1)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
(i32.gt_s
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 36)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $0)
|
||||
(i32.gt_s
|
||||
(get_local $1)
|
||||
(i32.const 36)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.const nan:0x8000000000000)
|
||||
@ -650,21 +647,18 @@
|
||||
)
|
||||
(set_local $1
|
||||
(if (result i32)
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 48)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 48)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(i32.const 2)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(i32.const 2)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(block $break|0 (result i32)
|
||||
(block $case6|0
|
||||
@ -791,67 +785,58 @@
|
||||
(i32.ge_s
|
||||
(tee_local $2
|
||||
(if (result i32)
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.ge_s
|
||||
(tee_local $2
|
||||
(i32.load16_u offset=4
|
||||
(get_local $3)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.ge_s
|
||||
(tee_local $2
|
||||
(i32.load16_u offset=4
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.const 48)
|
||||
)
|
||||
(i32.const 48)
|
||||
)
|
||||
(i32.le_s
|
||||
(get_local $2)
|
||||
(i32.const 57)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.le_s
|
||||
(get_local $2)
|
||||
(i32.const 57)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 48)
|
||||
)
|
||||
(if (result i32)
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.ge_s
|
||||
(get_local $2)
|
||||
(i32.const 65)
|
||||
)
|
||||
)
|
||||
(i32.le_s
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.ge_s
|
||||
(get_local $2)
|
||||
(i32.const 90)
|
||||
(i32.const 65)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.le_s
|
||||
(get_local $2)
|
||||
(i32.const 90)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 55)
|
||||
)
|
||||
(if (result i32)
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.ge_s
|
||||
(get_local $2)
|
||||
(i32.const 97)
|
||||
)
|
||||
)
|
||||
(i32.le_s
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.ge_s
|
||||
(get_local $2)
|
||||
(i32.const 122)
|
||||
(i32.const 97)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.le_s
|
||||
(get_local $2)
|
||||
(i32.const 122)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
@ -1065,25 +1050,22 @@
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.eq
|
||||
(tee_local $2
|
||||
(i32.load16_u offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 69)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 101)
|
||||
(tee_local $2
|
||||
(i32.load16_u offset=4
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 69)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $0)
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 101)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
@ -1268,21 +1250,18 @@
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.gt_s
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(i32.le_s
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.gt_s
|
||||
(get_local $0)
|
||||
(i32.const 536870910)
|
||||
(i32.const 0)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.le_s
|
||||
(get_local $0)
|
||||
(i32.const 536870910)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
@ -2897,27 +2876,24 @@
|
||||
(return)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(i32.le_u
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(i32.le_u
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $3)
|
||||
(i32.le_u
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(call $~lib/memory/copy_memory
|
||||
@ -3290,19 +3266,16 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
@ -3352,31 +3325,25 @@
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
@ -3445,19 +3412,16 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
@ -3519,31 +3483,25 @@
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
@ -3612,19 +3570,16 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
@ -3706,24 +3661,21 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.gt_s
|
||||
(i32.mul
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 268435456)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $2)
|
||||
(i32.gt_s
|
||||
(i32.mul
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 268435456)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
@ -3736,19 +3688,16 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.eqz
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $2)
|
||||
(i32.eqz
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.const 332)
|
||||
|
Reference in New Issue
Block a user