Skip to content

Conversation

@mmagician
Copy link
Contributor

Similar to #2203, but lets the caller get/set double-words in one go with a convenient interface.
Internally, the words are stored under keys [index, 0, 0, 0] and [index, 1, 0, 0] in the storage map.

In the light of having a double-word array, should we also rename the array to single_word_array? (I would probably leave it as-is, I think simple array is descriptive enough)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a double-word array abstraction for Miden, enabling storage and retrieval of two words per index through a convenient interface. The implementation extends the existing single-word array pattern by storing words under keys [index, 0, 0, 0] and [index, 1, 0, 0] in the storage map.

Changes:

  • Added double_word_array.masm implementing get/set operations for double-word array storage
  • Added comprehensive test coverage in test_array.rs to verify double-word array functionality

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
crates/miden-standards/asm/standards/data_structures/double_word_array.masm New MASM module implementing double-word array abstraction with get and set procedures
crates/miden-testing/src/kernel_tests/tx/test_array.rs Added test for double-word array get/set operations with initial and updated values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants