Skip to content

[go1.20] Fixing reflect Value.Grow #1315

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

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

grantnelson-wf
Copy link
Collaborator

@grantnelson-wf grantnelson-wf commented Jun 4, 2024

Fixing the reflect method Value.Grow that grows a slice to a contain a minimum specified capacity. This required the grow method to be updated so that it can call into JS. I split the append method to create a growSlice method which functions similar to reflect.growslice.

CI will still fail right now because internal/godebug.setUpdate needs to be implemented. It is implemented in another PR. With both this and the setUpdate change the TestGrow tests pass.

This does not fix the issue with Value.extendSlice used by Value.Append. I'm fixing that in another PR.

This is part of #1270

@grantnelson-wf grantnelson-wf marked this pull request as draft June 4, 2024 18:30
@grantnelson-wf grantnelson-wf marked this pull request as ready for review June 4, 2024 20:02
Copy link
Member

@flimzy flimzy left a comment

Choose a reason for hiding this comment

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

One comment, otherwise LGTM.

@grantnelson-wf grantnelson-wf requested a review from flimzy June 6, 2024 14:59
@grantnelson-wf grantnelson-wf marked this pull request as draft June 11, 2024 20:10
@grantnelson-wf

This comment was marked as resolved.

@grantnelson-wf grantnelson-wf marked this pull request as ready for review June 26, 2024 22:00
@nevkontakte nevkontakte merged commit 0a2738b into gopherjs:go1.20 Jul 2, 2024
4 of 8 checks passed
@grantnelson-wf grantnelson-wf deleted the addReflectGrow branch July 2, 2024 22:01
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.

3 participants