memory64 icon indicating copy to clipboard operation
memory64 copied to clipboard

JS API changes?

Open lars-t-hansen opened this issue 4 years ago • 4 comments

This proposal looks like it might need changes to the JS API, off the top of my head at least these:

  • the index type needs to be described in the memory descriptor (our prototype uses the key "index" for this)
  • the current JS API enforces the range of initial and max to be unsigned long, ie, a u32, but this proposal requires something better than that

lars-t-hansen avatar Aug 16 '21 07:08 lars-t-hansen

Not familiar with the JS API design myself.. @backes did you run into this?

aardappel avatar Aug 31 '21 00:08 aardappel

I didn't hit this yet, but the V8 implementation is not complete yet. Also, we currently still only allow up to 4GB memories, even if you use 64 bit for indexing.

But I agree that the JS API will need changes.

backes avatar Aug 31 '21 09:08 backes

@lars-t-hansen what do you propose for the value of "index"? The string u64 or u32 maybe?

sbc100 avatar Aug 19 '22 17:08 sbc100

SpiderMonkey currently uses “i32” and “i64” for the JS-type representation of index type. IIRC, that’s what the memory64 proposal uses in the text format, so we were trying to stay symmetrical to that.

On Aug 19, 2022, at 9:16 AM, Sam Clegg @.***> wrote:

 @lars-t-hansen what do you propose for the value of "index"? The string u64 or u32 maybe?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

eqrion avatar Oct 11 '22 09:10 eqrion

I believe this is fixed by #39

sbc100 avatar Aug 04 '23 18:08 sbc100