Closed dakenf closed 11 months ago
Sounds like index: "u64"
is what folks suggested in #24. Any reason not to go with that?
No, it's even better than my proposal. Will update the PR
I've fixed V8 to work with 64bit memory and threads. Except changes in WebAssembly.Memory there was also an issue with compiler that prevented passing i64.const to memory.fill and memory.init. I think I will clean up the code and make a PR in next few days. Can we get this reviewed and merged? I'm glad to make any changes to get it done
It looks like your CL to add Memory index type support in the JS API to V8 is your first contribution to V8 (https://crrev.com/c/4742982). Or did you use another mail address before?
Anyway, we should land this PR before adding support in V8. Can you also add spec tests for the new parameter please?
It was my first contribution, will add the tests today
I've added JS tests. There were memory64 tests in test/core/bulk64._wast but they are disabled because the interpreter does not support memory.copy, fill and init operations. And as it's written in ocaml, i don't think i can add these op support in a reasonable time
I went with the easy way, checked presence of type() method and updated assert_Memory to check the index value
Oh wait, I think we should have gone with i64
/i32
here. This would be consistent with the JS types proposal (see https://github.com/WebAssembly/js-types/blob/main/proposals/js-types/Overview.md) and also with what spidermonkey apparently implement: https://github.com/WebAssembly/memory64/issues/24#issuecomment-1274397516
Sorry to flip flop on this.. I know I suggested 'u64' back in https://github.com/WebAssembly/memory64/pull/39#issuecomment-1652059727 but I think I was wrong.
Yeah, why not. I think i'm the only one who's using it right now so it won't hurt anyone. Will make a new changeset to V8
Currently spec does not allow creating 64 bit memory from JS code, so there is no way to create a shared memory instance with more than 65,536 pages.
I propose to add an optional parameter that would create a 64 bit memory instance without those limits.