Should cont.new be allowed to appear in global initializers, element segment items, etc.? The explainer does not currently say either way. For comparison, ref.func, struct.new, and array.new are all constant. I think it would make sense to allow cont.new to be constant, too. That would allow globals and tables to be initialized with continuations. Other new instructions should not be constant because they have observable side effects.
Should
cont.newbe allowed to appear in global initializers, element segment items, etc.? The explainer does not currently say either way. For comparison,ref.func,struct.new, andarray.neware all constant. I think it would make sense to allowcont.newto be constant, too. That would allow globals and tables to be initialized with continuations. Other new instructions should not be constant because they have observable side effects.