Closed fitzgen closed 5 months ago
The only surprise, perhaps, is the special casing to disallow growing a memory that has a page size of
1
to length2**32 - 1
to avoid ambiguities on the result ofmemory.grow
instructions.
Wasm does not impose this restriction for tables, which have the exact same problem. We accepted the ambiguity of 0xffff_ffff returned from grow there, so we should be consistent here.
Wasm does not impose this restriction for tables, which have the exact same problem. We accepted the ambiguity of 0xffff_ffff returned from grow there, so we should be consistent here.
I didn't think about tables, but you are right! I'll update this PR in a bit to remove that special casing and be consistent.
I'll update this PR in a bit to remove that special casing and be consistent.
Done!
Alright it's been a few days, going to go ahead and merge this.
This commit fills out the
TODO
placeholders for the details of validation and execution in the overview. I think everything here should be pretty much what folks expect.The only surprise, perhaps, is the special casing to disallow growing a memory that has a page size of1
to length2**32 - 1
to avoid ambiguities on the result ofmemory.grow
instructions.I believe I've enumerated everywhere in the spec that page sizes are referenced; actually making the spec changes should be pretty easy after this change. But first, I wanted to get the overview document into a place where it is pretty much complete.
I'll leave this PR up for a few days for folks to comment on and provide feedback.