mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 23:12:19 +00:00
Things the optimizer does not catch
This commit is contained in:
parent
da672e2ca6
commit
d6b94d4c33
@ -17,10 +17,7 @@
|
|||||||
(if
|
(if
|
||||||
(if (result i32)
|
(if (result i32)
|
||||||
(tee_local $3
|
(tee_local $3
|
||||||
(i32.ne
|
(get_local $2)
|
||||||
(get_local $2)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(i32.rem_s
|
(i32.rem_s
|
||||||
(get_local $1)
|
(get_local $1)
|
||||||
|
@ -4,7 +4,7 @@ export function memcpy(dest: usize, src: usize, n: usize): usize {
|
|||||||
let w: u32, x: u32;
|
let w: u32, x: u32;
|
||||||
|
|
||||||
// copy 1 byte each until src is aligned to 4 bytes
|
// copy 1 byte each until src is aligned to 4 bytes
|
||||||
while (n != 0 && s % 4 != 0) {
|
while (n && s % 4) {
|
||||||
store<u8>(d++, load<u8>(s++));
|
store<u8>(d++, load<u8>(s++));
|
||||||
n--;
|
n--;
|
||||||
}
|
}
|
||||||
|
@ -108,17 +108,11 @@
|
|||||||
(if
|
(if
|
||||||
(if (result i32)
|
(if (result i32)
|
||||||
(tee_local $7
|
(tee_local $7
|
||||||
(i32.ne
|
(get_local $2)
|
||||||
(get_local $2)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(i32.ne
|
(i32.rem_s
|
||||||
(i32.rem_s
|
(get_local $4)
|
||||||
(get_local $4)
|
(i32.const 4)
|
||||||
(i32.const 4)
|
|
||||||
)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(get_local $7)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user