Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array functionality in Move #30

Merged
merged 7 commits into from
Sep 16, 2020
Merged

Array functionality in Move #30

merged 7 commits into from
Sep 16, 2020

Conversation

jessicalally
Copy link
Collaborator

Changes

  • Fixed array accesses and added runtime functions for removing elements from and inserting elements into dynamic arrays in Move Array functionality unimplemented in move #20
  • Added runtime tests for arrays and dynamic arrays in Move

Array accesses

The Libra target had support for storing arrays as Libra vectors, but not for accessing or storing to them, as the original implementation had been broken by a Libra update. The code generated from Flint subscript expressions has now been updated to use the Vector.borrow() and Vector.borrow_mut() methods for array accesses, depending on whether the value should be mutated or not.

Runtime functions for dynamic arrays

Three runtime functions, Flint_array_remove(), Flint_array_insert() and Flint_array_length(), have been added to allow elements to be inserted into and removed from dynamic arrays.

@jessicalally jessicalally added bug Something isn't working move ir Code generation for Libra labels Sep 11, 2020
@mrRachar mrRachar merged commit cf23885 into master Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working move ir Code generation for Libra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants