Skip to content

Fix none handling + map fetch rewrite - #15686

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
gldubc:fix-map-operations
Jul 27, 2026
Merged

Fix none handling + map fetch rewrite#15686
josevalim merged 1 commit into
elixir-lang:mainfrom
gldubc:fix-map-operations

Conversation

@gldubc

@gldubc gldubc commented Jul 27, 2026

Copy link
Copy Markdown
Member

Closes #15594 + I noticed some problems with the map fetch code:

  1. splitting was done twice using two similar named functions map_split_negative_pairs_key and the take_fun in map_negative
  2. two functions were called splitting; renamed the second to map_remove_negative to show it eliminates negatives

I think the duplication was to avoid re-building a list of negatives, but it was doing extra work in the end.

This is an alternative solution to #15593 (which works fine), since removing the no negative "fast path" in map fetch key and testing if the bdd we fetched from is non empty serves the same.

@josevalim
josevalim merged commit 745ee1d into elixir-lang:main Jul 27, 2026
15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

map_put result depends on representation

2 participants