WebAssembly / memory64

Memory with 64-bit indexes
Other
194 stars 21 forks source link

memory.copy / table.copy between memories / tables of different types (32-bit vs 64-bit) #55

Closed sbc100 closed 2 months ago

sbc100 commented 2 months ago

The memory64 proposal so far has not needed to deal with this issue since there was no multi-memory support. Now that multi-memory is at stage 4 and not that we are adding table64 support we need to decide what do about these cross-tables / cross-memory copies.

I seem like there are are basically two choices:

  1. Do not support copying between tables/memories of different index types. We can simply make this a validation failure.
  2. If either of the tables/memories are i64 indexed then require i64 arguments (as we do for the case when both tables/memories are i64 indexed.

Supporting this would certainly blow the up the number of tests we would need to write, but thats not really a great reason not to do it. Do folks have any good reasons why we would wand to support this?

sbc100 commented 2 months ago

@dschuff @ashleynh

alexcrichton commented 2 months ago

cc https://github.com/WebAssembly/memory64/issues/6 which has some, albeit not a whole lot more, discussion

sbc100 commented 2 months ago

cc #6 which has some, albeit not a whole lot more, discussion

What solution do your propose we go with memory.copy ? (1) or (2) or something else?

sbc100 commented 2 months ago

Actually lets just close this in favor of #6.