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

gen: support non-string map equality and speed it up #7682

Merged
merged 2 commits into from
Jan 1, 2021

Conversation

ntrel
Copy link
Contributor

@ntrel ntrel commented Dec 29, 2020

Part of #6991.

Avoid allocating keys array (which wasn't freed).
Don't clone keys (which weren't freed).
Check right key exists before getting left value.
Use fast_string_eq for string values.
Restore match and use Table.type_kind to handle pointers (and now optionals too).

@ntrel
Copy link
Contributor Author

ntrel commented Dec 29, 2020

Unrelated checker errors:
error: unwrapped optional cannot be used in an infix expression

@medvednikov medvednikov reopened this Dec 31, 2020
@ntrel ntrel marked this pull request as ready for review December 31, 2020 15:51
@ntrel
Copy link
Contributor Author

ntrel commented Dec 31, 2020

@medvednikov ready for merge ;-)

@medvednikov
Copy link
Member

map_test conflict

Avoid allocating keys array (which wasn't freed).
Don't clone keys (which weren't freed).
Check right key exists before getting left value.
Use fast_string_eq for string values.
@ntrel
Copy link
Contributor Author

ntrel commented Jan 1, 2021

Rebased

@medvednikov medvednikov merged commit 0a069de into vlang:master Jan 1, 2021
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