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

map: add 3 DenseArray methods for bootstrapping #7113

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

ntrel
Copy link
Contributor

@ntrel ntrel commented Dec 3, 2020

Add key, value and has_index methods that each take an index.
This is needed to allow structural changes to DenseArray in map.v, part of work for #6991.

key returns a voidptr, not a string.
value is needed to allow interleaving key,value pairs in memory rather than in separate allocations. This will be more efficient.
has_index is needed because currently key.str != 0 is used, which is string-specific.

@ntrel ntrel marked this pull request as ready for review December 3, 2020 17:22
@spytheman spytheman merged commit d590ce7 into vlang:master Dec 3, 2020
@ntrel ntrel deleted the map-for branch December 4, 2020 11:08
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