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:
dcodeIO
2018-09-17 01:48:35 +02:00
parent 9613d29d93
commit 16d1a833dd
170 changed files with 973 additions and 368 deletions

View File

@ -36,6 +36,8 @@
(global $~lib/set/FREE_FACTOR f64 (f64.const 0.75))
(global $~lib/set/FILL_FACTOR f64 (f64.const 2.6666666666666665))
(global $HEAP_BASE i32 (i32.const 144))
(table 1 1 anyfunc)
(elem (i32.const 0) $null)
(memory $0 1)
(data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00")
(data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00")
@ -10897,4 +10899,6 @@
(call $std/set/test<f32>)
(call $std/set/test<f64>)
)
(func $null (; 112 ;) (type $v)
)
)