mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-26 15:32:16 +00:00
When specifying -O3 or -Oz, asc now automatically increases the optimize level to 4, then including costly non-LLVM optimizations for blocky code, in turn achieving similar results as an LLVM-based generator.
57 lines
1.2 KiB
Plaintext
57 lines
1.2 KiB
Plaintext
(module
|
|
(type $i (func (result i32)))
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
|
(type $v (func))
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
|
(global $abi/condition (mut i32) (i32.const 0))
|
|
(global $abi/y (mut i32) (i32.const 0))
|
|
(memory $0 1)
|
|
(data (i32.const 8) "\06\00\00\00a\00b\00i\00.\00t\00s")
|
|
(export "exported" (func $abi/exported))
|
|
(export "exportedExported" (func $abi/exportedExported))
|
|
(export "exportedInternal" (func $abi/exportedInternal))
|
|
(export "memory" (memory $0))
|
|
(start $start)
|
|
(func $abi/exported (; 1 ;) (type $i) (result i32)
|
|
(i32.const -128)
|
|
)
|
|
(func $abi/exportedExported (; 2 ;) (type $i) (result i32)
|
|
(call $abi/exported)
|
|
)
|
|
(func $abi/internal (; 3 ;) (type $i) (result i32)
|
|
(i32.const 128)
|
|
)
|
|
(func $abi/exportedInternal (; 4 ;) (type $i) (result i32)
|
|
(i32.shr_s
|
|
(i32.shl
|
|
(call $abi/internal)
|
|
(i32.const 24)
|
|
)
|
|
(i32.const 24)
|
|
)
|
|
)
|
|
(func $start (; 5 ;) (type $v)
|
|
(drop
|
|
(call $abi/internal)
|
|
)
|
|
(set_global $abi/condition
|
|
(i32.const 1)
|
|
)
|
|
(set_global $abi/y
|
|
(i32.const 0)
|
|
)
|
|
(if
|
|
(get_global $abi/y)
|
|
(block
|
|
(call $~lib/env/abort
|
|
(i32.const 0)
|
|
(i32.const 8)
|
|
(i32.const 65)
|
|
(i32.const 2)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
)
|
|
)
|