forked from M-Labs/nac3
1
0
Fork 0
nac3/nac3core/src/codegen
David Mak 77de24ef74 core: Use BTreeMap for type variable mapping
There have been multiple instances where I had the need to iterate over
type variables, only to discover that the traversal order is arbitrary.

This commit fixes that by adding SortedMapping, which utilizes BTreeMap
internally to guarantee a traversal order. All instances of VarMap are
now refactored to use this to ensure that type variables are iterated in
 the order of its variable ID, which should be monotonically incremented
 by the unifier.
2024-03-04 23:56:04 +08:00
..
irrt core: Apply clippy suggestions 2024-02-23 15:41:06 +08:00
classes.rs core: Extract LLVM intrinsic functions to their functions 2024-02-23 15:41:06 +08:00
concrete_type.rs core: Use BTreeMap for type variable mapping 2024-03-04 23:56:04 +08:00
expr.rs core: Use BTreeMap for type variable mapping 2024-03-04 23:56:04 +08:00
generator.rs core: Apply clippy suggestions 2024-02-23 15:41:06 +08:00
llvm_intrinsics.rs core: Extract LLVM intrinsic functions to their functions 2024-02-23 15:41:06 +08:00
mod.rs core: Use TObj for NDArray 2024-03-01 15:41:55 +08:00
stmt.rs core: Use TObj for NDArray 2024-03-01 15:41:55 +08:00
test.rs core: Use BTreeMap for type variable mapping 2024-03-04 23:56:04 +08:00