Make specialization symbols a two-layered VecMap

This commit is contained in:
Ayaz Hafiz 2022-05-06 11:58:02 -04:00
parent b4f5e62f46
commit e0bfe6c762
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
4 changed files with 241 additions and 250 deletions

View file

@ -1210,15 +1210,8 @@ pub fn optimize_when<'a>(
// bind the fields referenced in the pattern. For guards this happens separately, so
// the pattern variables are defined when evaluating the guard.
if !has_guard {
branch = crate::ir::store_pattern(
env,
procs,
layout_cache,
&pattern,
cond_layout,
cond_symbol,
branch,
);
branch =
crate::ir::store_pattern(env, procs, layout_cache, &pattern, cond_symbol, branch);
}
let ((branch_index, choice), opt_jump) = create_choices(&target_counts, index, branch);
@ -1730,15 +1723,7 @@ fn decide_to_branching<'a>(
body: arena.alloc(decide),
};
crate::ir::store_pattern(
env,
procs,
layout_cache,
&pattern,
cond_layout,
cond_symbol,
join,
)
crate::ir::store_pattern(env, procs, layout_cache, &pattern, cond_symbol, join)
}
Chain {
test_chain,