-
Notifications
You must be signed in to change notification settings - Fork 705
Open
Description
This is to track the need for supporting reference types in struct fields when in AOT mode. At present, only primitive types are handled correctly during the wasm-to-AOT compilation process. References need to be reconstructed in the AOT world rather than reusing the results from the wasm world.
Below is a code snippet that illustrates this requirement, though it does not encompass all scenarios.
(module
(type $f1 (func (param i32) (result i32)))
(type $vt1
(sub
(struct
(field (ref null $f1))
)
)
)
(global $g1 (ref $vt1)
ref.func $f1 ;; // <- TBD
struct.new $vt1
)
(func $f1 (type $f1) (param i32) (result i32)
i32.const 0
)
(func (export "run") (result i32)
global.get $g1
struct.get $vt1 0
ref.test (ref null $f1) ;; // should be 1 as true
)
)
Metadata
Metadata
Assignees
Labels
No labels