Repository navigation
Conversation
| (elem (table $t) (i32.const 0) func $f3) | ||
| (elem (table $t) (i32.const 0) funcref (ref.func $f4)) | ||
| (elem func $f5) | ||
| (elem funcref (ref.func $f6)) |
There was a problem hiding this comment.
Should the function referenced by the start section be included here?
There was a problem hiding this comment.
Excellent question! I think not, since the start function doesn't escape. I added another special case and test for it.
There was a problem hiding this comment.
That's true, but neither do non-exported globals and tables. It does seem like a strange omission.
There was a problem hiding this comment.
@binji, I suppose you mean the references stored in such globals or tables? Those can still escape after global.get or table.get and returning the result to somewhere. I think checking that these can't escape would require inter-procedural flow analysis.
(Put differently, the start function does not produce a first-class reference.)
| (elem (table $t) (i32.const 0) func $f3) | ||
| (elem (table $t) (i32.const 0) funcref (ref.func $f4)) | ||
| (elem func $f5) | ||
| (elem funcref (ref.func $f6)) |
There was a problem hiding this comment.
That's true, but neither do non-exported globals and tables. It does seem like a strange omission.
This was accidentally omitted.
Resolves #76, as discussed in CG meeting.