Repository navigation
initial bulk array op implementations - #363
Conversation
|
The opcodes here seem fine to me. We can figure out permanent opcodes alongside everything else just before we go to phase 4. |
|
For the record, |
|
I'm happy to switch this PR to match the reservations listed in that doc (IIUC, |
|
What needs to happen to get this landed? Do we need an update to MVP.md to accompany the work here, or can that come later? |
|
@rossberg PTAL! |
| let seg = data c.frame.inst y in | ||
| let bs = Data.bytes seg in | ||
| let j = I32.to_int_u y_off in | ||
| (* TODO: unify with ArrayNewData *) |
There was a problem hiding this comment.
Can you extend the Data module with a load_num function analogous to Memory.load_num and use that here and for ArrayNewData?
There was a problem hiding this comment.
opening Type/Value in Data seems to cause a build circularity. For now I'm factoring this out into a shared helper in eval.ml.
There was a problem hiding this comment.
Hm, that is very odd. What's the circularity? I cannot reproduce it on main.
|
@rossberg PTAL |
| | Vec v -> Plain (VecConst (v @@ at)) | ||
| | Ref r -> Refer r | ||
|
|
||
| let value_of_data_ind (seg : Data.data) (st : storage_type) (j : int) at = |
There was a problem hiding this comment.
Can we somehow make this mirror the load_num/load_vec functions in Memory.ml?
There was a problem hiding this comment.
I'm not sure what you have in mind here. Now that I've at least pulled this out as an auxiliary definition, would you be willing to take on refactoring it as a small follow-up PR?
| let seg = data c.frame.inst y in | ||
| let bs = Data.bytes seg in | ||
| let j = I32.to_int_u y_off in | ||
| (* TODO: unify with ArrayNewData *) |
There was a problem hiding this comment.
Hm, that is very odd. What's the circularity? I cannot reproduce it on main.
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
|
@rossberg PTAL, everything should be resolved except the issue with |
| | Vec v -> Plain (VecConst (v @@ at)) | ||
| | Ref r -> Refer r | ||
|
|
||
| let value_of_data_ind (seg : Data.data) (st : storage_type) (j : int) at = |
|
merging now 🥳 |
See #313, and more specifically this comment.
This patch only updates the interpreter, the overview is not updated.
Note - this patch currently using the following opcode encodings in the hope of provoking more permanent suggestions: