mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-02 16:11:49 +00:00
Always add a null function at table index zero
This allows function references (a table index internally) to be nullable
This commit is contained in:
@ -27,6 +27,8 @@
|
||||
(global $~lib/builtins/f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991))
|
||||
(global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991))
|
||||
(global $HEAP_BASE i32 (i32.const 8))
|
||||
(table 1 1 anyfunc)
|
||||
(elem (i32.const 0) $null)
|
||||
(memory $0 0)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
@ -110,4 +112,6 @@
|
||||
(get_global $~lib/builtins/f64.MAX_SAFE_INTEGER)
|
||||
)
|
||||
)
|
||||
(func $null (; 1 ;) (type $v)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user