Ben L. Titzer
Ben L. Titzer
Isn't it the case that all initializers must run before the start function, which is the earliest that a segment could be dropped?
Yes, that matches my understanding too. Element segments (which themselves contain constants) are evaluated at instantiation time, before the start function. ...well technically speaking, they *could* be lazily evaluated and...
Afaict, this is just an additional (derived) index space for fields. This would actually be useful for an interpreter to have only one LEB index in `struct.get` and `struct.set` instructions....
The issue with interpreters is that if the index to `struct.get` and `struct.set` is *just* a field index within the struct (`0`...`struct.numfields`), then an interpreter lacks the necessary metadata to...
Keep in mind that globals can be imported/exported, so their storage needs to be indirected from instances. I don't understand why `call_ref` is 6 loads, can you explain?
@aardappel Imported functions can't be changed, but tables can. `call-indirect` is complex because of signature checking and the possibility of a cross-module call. TurboFan generates all of that inline, but...
@jakobkummerow Ah, yes, I hadn't considered JS functions flowing into a wasm call ref and then presumably escaping again via `anyref`. There are several ways of increasing intrusiveness that can...
I don't think object models will work exactly along the lines in this thread, but I can see a use case for importing field accesses. That said, there are several...
I wasn't aware that we reached consensus on this issue, so I think this PR is a little premature, though I do appreciate the amount of work done here. >...
Also, just for the record, field access for GC objects in the interpreter is not going to be pretty. Since we want to pack objects and have unboxed representations, and...