mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-31 06:02:11 +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:
@@ -3,9 +3,12 @@
|
||||
(type $FF (func (param f64) (result f64)))
|
||||
(type $Fi (func (param f64) (result i32)))
|
||||
(type $FFFF (func (param f64 f64 f64) (result f64)))
|
||||
(type $v (func))
|
||||
(global $../../examples/mandelbrot/assembly/index/NUM_COLORS i32 (i32.const 2048))
|
||||
(global $~lib/math/NativeMath.LN2 f64 (f64.const 0.6931471805599453))
|
||||
(global $HEAP_BASE i32 (i32.const 8))
|
||||
(table 1 1 anyfunc)
|
||||
(elem (i32.const 0) $null)
|
||||
(memory $0 0)
|
||||
(export "memory" (memory $0))
|
||||
(export "computeLine" (func $../../examples/mandelbrot/assembly/index/computeLine))
|
||||
@@ -638,4 +641,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $null (; 4 ;) (type $v)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user