mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 15:12:12 +00:00
* Rework IR and resolver to use nested lookup tables * Integrate types into IR * Make components prefer IR, slimmed down AST * Implement `export *` * Add `@lazy` annotation and remove `--noTreeShaking` * Add `@start` annotation and remove magic `main` * Related refactoring, cleanup and docs
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
(module
|
|
(type $_ (func))
|
|
(type $iiii_ (func (param i32 i32 i32 i32)))
|
|
(import "declare" "externalConstant" (global $declare/externalConstant i32))
|
|
(import "declare" "my.externalConstant" (global $declare/my.externalConstant i32))
|
|
(import "declare" "externalFunction" (func $declare/externalFunction))
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
|
(import "declare" "my.externalFunction" (func $declare/my.externalFunction))
|
|
(memory $0 1)
|
|
(data (i32.const 8) "\n\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s")
|
|
(table $0 1 funcref)
|
|
(elem (i32.const 0) $null)
|
|
(export "memory" (memory $0))
|
|
(export "table" (table $0))
|
|
(start $start)
|
|
(func $start:declare (; 3 ;) (type $_)
|
|
call $declare/externalFunction
|
|
global.get $declare/externalConstant
|
|
i32.const 1
|
|
i32.ne
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 5
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
call $declare/my.externalFunction
|
|
global.get $declare/my.externalConstant
|
|
i32.const 2
|
|
i32.ne
|
|
if
|
|
i32.const 0
|
|
i32.const 8
|
|
i32.const 13
|
|
i32.const 0
|
|
call $~lib/env/abort
|
|
unreachable
|
|
end
|
|
)
|
|
(func $start (; 4 ;) (type $_)
|
|
call $start:declare
|
|
)
|
|
(func $null (; 5 ;) (type $_)
|
|
nop
|
|
)
|
|
)
|