Skip to content

Commit

Permalink
proc sort fix #7531 #7514 #7496
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-4 committed Jan 18, 2025
1 parent 1e087b1 commit b2e3adf
Show file tree
Hide file tree
Showing 26 changed files with 186 additions and 178 deletions.
10 changes: 9 additions & 1 deletion crates/compiler/mono/src/tail_recursion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@ pub fn apply_trmc<'a, 'i>(

let env = &mut env;

for proc in procs.values_mut() {
// TODO temporary workaround for #7531, remove this cloning and sorting once that is fixed
let clone_procs = procs.clone();
let mut procs_key_value_list = clone_procs.iter().collect::<std::vec::Vec<_>>();

procs_key_value_list.sort_by(|a, b| a.0 .0.cmp(&b.0 .0));

for (key, _) in procs_key_value_list {
let proc = procs.get_mut(key).unwrap();

use self::SelfRecursive::*;
if let SelfRecursive(id) = proc.is_self_recursive {
let trmc_candidate_symbols = trmc_candidates(env.interner, proc);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions crates/compiler/test_mono/generated/dbg_in_expect.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions crates/compiler/test_mono/generated/dbg_inside_string.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b2e3adf

Please sign in to comment.