You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change type of `SymbolTable` from `HashMap` to `BTreeMap`.
`BTreeMap` gives variables an ordering in the symbol table, allowing
them to be printed in a deterministic order. It also implements `Eq`,
and `Hash`, which will allow us to compare symbol tables to each other
in the future.
Previously, with a `HashMap`, the key ordering was unspecified, so they
could be printed in any order. The keys printing in a different order in
the expected and generated test files broke some tests.
We plan to convert more `HashMaps` to `BTreeMaps` in the future for
similar reasons. For example, using it for solution sets will allow us
to compare them easier (due to implementing `Eq` and `Hash`) [#531].
Change type of `SymbolTable` from `HashMap` to `BTreeMap`.
`BTreeMap` gives variables an ordering in the symbol table, allowing
them to be printed in a deterministic order. It also implements `Eq`,
and `Hash`, which will allow us to compare symbol tables to each other
in the future.
Previously, with a `HashMap`, the key ordering was unspecified, so they
could be printed in any order. The keys printing in a different order in
the expected and generated test files broke some tests.
We plan to convert more `HashMaps` to `BTreeMaps` in the future for
similar reasons. For example, using it for solution sets will allow us
to compare them easier (due to implementing `Eq` and `Hash`) [#531].
BTreeMap
implementsEq
andHash
, which are useful things to do to solution setsThe text was updated successfully, but these errors were encountered: