mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 17:31:29 +00:00
move stuff, run both untouched and optimized
This commit is contained in:
@ -3,9 +3,7 @@
|
||||
(type $FUNCSIG$v (func))
|
||||
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\n\00\00\00\01\00\00\00\10\00\00\00\n\00\00\00d\00o\00.\00t\00s\00")
|
||||
(table $0 1 funcref)
|
||||
(elem (i32.const 0) $null)
|
||||
(data (i32.const 8) "\n\00\00\00\01\00\00\00\10\00\00\00\n\00\00\00d\00o\00.\00t\00s")
|
||||
(global $do/n (mut i32) (i32.const 10))
|
||||
(global $do/m (mut i32) (i32.const 0))
|
||||
(global $do/o (mut i32) (i32.const 0))
|
||||
@ -13,26 +11,19 @@
|
||||
(start $start)
|
||||
(func $start:do (; 1 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
block $break|0
|
||||
loop $continue|0
|
||||
block
|
||||
global.get $do/n
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $do/n
|
||||
global.get $do/m
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $do/m
|
||||
end
|
||||
global.get $do/n
|
||||
br_if $continue|0
|
||||
end
|
||||
loop $continue|0
|
||||
global.get $do/n
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $do/n
|
||||
global.get $do/m
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $do/m
|
||||
global.get $do/n
|
||||
br_if $continue|0
|
||||
end
|
||||
global.get $do/n
|
||||
i32.const 0
|
||||
i32.eq
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
@ -43,8 +34,7 @@
|
||||
end
|
||||
global.get $do/m
|
||||
i32.const 10
|
||||
i32.eq
|
||||
i32.eqz
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
@ -55,24 +45,18 @@
|
||||
end
|
||||
i32.const 10
|
||||
global.set $do/n
|
||||
block $break|1
|
||||
loop $continue|1
|
||||
nop
|
||||
block (result i32)
|
||||
global.get $do/n
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $do/n
|
||||
local.get $0
|
||||
end
|
||||
br_if $continue|1
|
||||
end
|
||||
loop $continue|1
|
||||
global.get $do/n
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $do/n
|
||||
local.get $0
|
||||
br_if $continue|1
|
||||
end
|
||||
global.get $do/n
|
||||
i32.const -1
|
||||
i32.eq
|
||||
i32.eqz
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
@ -85,66 +69,51 @@
|
||||
global.set $do/n
|
||||
i32.const 0
|
||||
global.set $do/m
|
||||
block $break|2
|
||||
loop $continue|2
|
||||
block
|
||||
global.get $do/n
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $do/n
|
||||
global.get $do/m
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $do/m
|
||||
block $break|3
|
||||
loop $continue|3
|
||||
block
|
||||
global.get $do/n
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $do/n
|
||||
global.get $do/o
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $do/o
|
||||
end
|
||||
global.get $do/n
|
||||
br_if $continue|3
|
||||
end
|
||||
end
|
||||
global.get $do/n
|
||||
i32.const 0
|
||||
i32.eq
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 24
|
||||
i32.const 2
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
global.get $do/o
|
||||
i32.const 9
|
||||
i32.eq
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 25
|
||||
i32.const 2
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
end
|
||||
loop $continue|2
|
||||
global.get $do/n
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $do/n
|
||||
global.get $do/m
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $do/m
|
||||
loop $continue|3
|
||||
global.get $do/n
|
||||
br_if $continue|2
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $do/n
|
||||
global.get $do/o
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $do/o
|
||||
global.get $do/n
|
||||
br_if $continue|3
|
||||
end
|
||||
global.get $do/n
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 24
|
||||
i32.const 2
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
global.get $do/o
|
||||
i32.const 9
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 25
|
||||
i32.const 2
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
global.get $do/n
|
||||
br_if $continue|2
|
||||
end
|
||||
global.get $do/n
|
||||
i32.const 0
|
||||
i32.eq
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
@ -155,8 +124,7 @@
|
||||
end
|
||||
global.get $do/m
|
||||
i32.const 1
|
||||
i32.eq
|
||||
i32.eqz
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
@ -167,8 +135,7 @@
|
||||
end
|
||||
global.get $do/o
|
||||
i32.const 9
|
||||
i32.eq
|
||||
i32.eqz
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
@ -182,5 +149,6 @@
|
||||
call $start:do
|
||||
)
|
||||
(func $null (; 3 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user