mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 23:12:19 +00:00
* Traverse base classes when resolving overloads * Implement preliminary TypedArray accessors * Extract decorator flags from common flags to make space * Add '**' overload * Implement basic explicit inlining * Support inlining of instance methods * Reduce number of required locals when inlining * Implement inlining of operator overloads * Fix issues when inlining generic functions
143 lines
2.3 KiB
Plaintext
143 lines
2.3 KiB
Plaintext
(module
|
|
(type $ii (func (param i32) (result i32)))
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
|
(type $v (func))
|
|
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
|
(memory $0 1)
|
|
(data (i32.const 4) "\05\00\00\00i\00f\00.\00t\00s")
|
|
(export "ifThenElse" (func $if/ifThenElse))
|
|
(export "ifThen" (func $if/ifThen))
|
|
(export "ifThenElseBlock" (func $if/ifThenElse))
|
|
(export "ifAlwaysReturns" (func $if/ifAlwaysReturns))
|
|
(export "memory" (memory $0))
|
|
(start $start)
|
|
(func $if/ifThenElse (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
|
(select
|
|
(i32.const 1)
|
|
(i32.const 0)
|
|
(get_local $0)
|
|
)
|
|
)
|
|
(func $if/ifThen (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
|
(if
|
|
(get_local $0)
|
|
(return
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(i32.const 0)
|
|
)
|
|
(func $if/ifAlwaysReturns (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
|
(if
|
|
(get_local $0)
|
|
(return
|
|
(i32.const 1)
|
|
)
|
|
(block
|
|
(call $abort
|
|
(i32.const 0)
|
|
(i32.const 4)
|
|
(i32.const 37)
|
|
(i32.const 4)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
)
|
|
(func $start (; 4 ;) (type $v)
|
|
(if
|
|
(call $if/ifThenElse
|
|
(i32.const 0)
|
|
)
|
|
(block
|
|
(call $abort
|
|
(i32.const 0)
|
|
(i32.const 4)
|
|
(i32.const 8)
|
|
(i32.const 0)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
(if
|
|
(i32.ne
|
|
(call $if/ifThenElse
|
|
(i32.const 1)
|
|
)
|
|
(i32.const 1)
|
|
)
|
|
(block
|
|
(call $abort
|
|
(i32.const 0)
|
|
(i32.const 4)
|
|
(i32.const 9)
|
|
(i32.const 0)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
(if
|
|
(call $if/ifThen
|
|
(i32.const 0)
|
|
)
|
|
(block
|
|
(call $abort
|
|
(i32.const 0)
|
|
(i32.const 4)
|
|
(i32.const 17)
|
|
(i32.const 0)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
(if
|
|
(i32.ne
|
|
(call $if/ifThen
|
|
(i32.const 1)
|
|
)
|
|
(i32.const 1)
|
|
)
|
|
(block
|
|
(call $abort
|
|
(i32.const 0)
|
|
(i32.const 4)
|
|
(i32.const 18)
|
|
(i32.const 0)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
(if
|
|
(call $if/ifThenElse
|
|
(i32.const 0)
|
|
)
|
|
(block
|
|
(call $abort
|
|
(i32.const 0)
|
|
(i32.const 4)
|
|
(i32.const 30)
|
|
(i32.const 0)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
(if
|
|
(i32.ne
|
|
(call $if/ifThenElse
|
|
(i32.const 1)
|
|
)
|
|
(i32.const 1)
|
|
)
|
|
(block
|
|
(call $abort
|
|
(i32.const 0)
|
|
(i32.const 4)
|
|
(i32.const 31)
|
|
(i32.const 0)
|
|
)
|
|
(unreachable)
|
|
)
|
|
)
|
|
)
|
|
)
|