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

LFVM: set and setByte test #759

Merged
merged 16 commits into from
Oct 1, 2024
Merged

LFVM: set and setByte test #759

merged 16 commits into from
Oct 1, 2024

Conversation

facuMH
Copy link
Contributor

@facuMH facuMH commented Sep 12, 2024

This PR is part of a series of PRs that aim to make private and improve the memory methods.
In this PR:

  • SetByte and SetWord are now private functions.
  • Set functions is removed since we are moving towards enforcing that memory can not attempt to read/write without expanding first.
  • SetWithCapacityAndGasCheck is renamed to set, simplified to simply call getSlice from LFVM: CopyWord and GetSlice* test #761 and then copy from input value to the slice.
  • setByte and setWord is implemented as a specialization of setWithCapacityAndGasCheck.
  • tests are added for set, setByte and setWord.

This is part of #682
This PR will rework set to be a specialization+copy of getSlice from #761

@facuMH facuMH force-pushed the facundo/lfvm-setbyte branch 2 times, most recently from d57c1ce to d86f2be Compare September 12, 2024 08:43
@facuMH facuMH force-pushed the facundo/lfvm-setbyte branch 2 times, most recently from 93f29c5 to 277d3ce Compare September 12, 2024 12:10
@facuMH facuMH self-assigned this Sep 12, 2024
@facuMH facuMH added this to the Release Ready LFVM milestone Sep 12, 2024
LuisPH3
LuisPH3 previously approved these changes Sep 12, 2024
go/interpreter/lfvm/memory.go Outdated Show resolved Hide resolved
go/interpreter/lfvm/memory.go Outdated Show resolved Hide resolved
go/interpreter/lfvm/memory_test.go Outdated Show resolved Hide resolved
go/interpreter/lfvm/memory_test.go Outdated Show resolved Hide resolved
go/interpreter/lfvm/memory_test.go Outdated Show resolved Hide resolved
HerbertJordan
HerbertJordan previously approved these changes Sep 27, 2024
Copy link
Contributor

@LuisPH3 LuisPH3 left a comment

Choose a reason for hiding this comment

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

👍

@facuMH facuMH merged commit f6fa48a into main Oct 1, 2024
5 checks passed
@facuMH facuMH deleted the facundo/lfvm-setbyte branch October 1, 2024 07:53
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.

4 participants