mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-22 11:11:43 +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:
@ -19,6 +19,8 @@
|
||||
(global $std/constructor/ctorAllocates (mut i32) (i32.const 0))
|
||||
(global $std/constructor/ctorConditionallyAllocates (mut i32) (i32.const 0))
|
||||
(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)
|
||||
@ -405,4 +407,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $null (; 10 ;) (type $v)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user