diff --git a/cli/src/repl.rs b/cli/src/repl.rs index fdc928e727..d95ebe26dc 100644 --- a/cli/src/repl.rs +++ b/cli/src/repl.rs @@ -258,7 +258,6 @@ pub fn gen(src: &[u8], target: Triple, opt_level: OptLevel) -> Result<(String, S problems: &mut mono_problems, home, ident_ids: &mut ident_ids, - jump_counter: arena.alloc(0), }; let main_body = roc_mono::expr::Expr::new(&mut mono_env, loc_expr.value, &mut procs); diff --git a/compiler/build/src/program.rs b/compiler/build/src/program.rs index a3e7dd409a..aa7887b7a5 100644 --- a/compiler/build/src/program.rs +++ b/compiler/build/src/program.rs @@ -169,7 +169,6 @@ pub fn gen( problems: &mut mono_problems, home, ident_ids: &mut ident_ids, - jump_counter: arena.alloc(0), }; // Add modules' decls to Procs diff --git a/compiler/gen/tests/helpers/eval.rs b/compiler/gen/tests/helpers/eval.rs index 4a06795266..0885361f8a 100644 --- a/compiler/gen/tests/helpers/eval.rs +++ b/compiler/gen/tests/helpers/eval.rs @@ -70,7 +70,6 @@ macro_rules! assert_llvm_evals_to { problems: &mut mono_problems, home, ident_ids: &mut ident_ids, - jump_counter: arena.alloc(0), }; let main_body = Expr::new(&mut mono_env, loc_expr.value, &mut procs); @@ -255,7 +254,6 @@ macro_rules! assert_opt_evals_to { problems: &mut mono_problems, home, ident_ids: &mut ident_ids, - jump_counter: arena.alloc(0), }; let main_body = Expr::new(&mut mono_env, loc_expr.value, &mut procs); diff --git a/compiler/mono/src/decision_tree.rs b/compiler/mono/src/decision_tree.rs index c423118104..ce135e5c45 100644 --- a/compiler/mono/src/decision_tree.rs +++ b/compiler/mono/src/decision_tree.rs @@ -910,9 +910,6 @@ pub fn optimize_when<'a>( &jumps, ); - // increase the jump counter by the number of jumps in this branching structure - *env.jump_counter += jumps.len() as u64; - Expr::Store(stores, env.arena.alloc(expr)) } diff --git a/compiler/mono/src/expr.rs b/compiler/mono/src/expr.rs index df694a8008..cc49771813 100644 --- a/compiler/mono/src/expr.rs +++ b/compiler/mono/src/expr.rs @@ -252,7 +252,6 @@ pub struct Env<'a, 'i> { pub problems: &'i mut std::vec::Vec, pub home: ModuleId, pub ident_ids: &'i mut IdentIds, - pub jump_counter: &'a mut u64, } impl<'a, 'i> Env<'a, 'i> { diff --git a/compiler/mono/tests/test_mono.rs b/compiler/mono/tests/test_mono.rs index 5584fb0bae..438f5ec535 100644 --- a/compiler/mono/tests/test_mono.rs +++ b/compiler/mono/tests/test_mono.rs @@ -58,7 +58,6 @@ mod test_mono { problems: &mut mono_problems, home, ident_ids: &mut ident_ids, - jump_counter: arena.alloc(0), }; let mono_expr = Expr::new(&mut mono_env, loc_expr.value, &mut procs); let procs = diff --git a/compiler/reporting/tests/test_reporting.rs b/compiler/reporting/tests/test_reporting.rs index 7c7d55b27f..f9887083ca 100644 --- a/compiler/reporting/tests/test_reporting.rs +++ b/compiler/reporting/tests/test_reporting.rs @@ -93,7 +93,6 @@ mod test_reporting { problems: &mut mono_problems, home, ident_ids: &mut ident_ids, - jump_counter: arena.alloc(0), }; let _mono_expr = Expr::new(&mut mono_env, loc_expr.value, &mut procs); }