mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
use param_map instead of localcontext
This commit is contained in:
parent
4957b84eae
commit
d7045b037f
1 changed files with 1 additions and 9 deletions
|
@ -151,8 +151,7 @@ pub type JPLiveVarMap = MutMap<JoinPointId, LiveVarSet>;
|
||||||
struct Context<'a> {
|
struct Context<'a> {
|
||||||
arena: &'a Bump,
|
arena: &'a Bump,
|
||||||
vars: VarMap,
|
vars: VarMap,
|
||||||
jp_live_vars: JPLiveVarMap, // map: join point => live variables
|
jp_live_vars: JPLiveVarMap, // map: join point => live variables
|
||||||
local_context: LocalContext<'a>, // we use it to store the join point declarations
|
|
||||||
param_map: &'a ParamMap<'a>,
|
param_map: &'a ParamMap<'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +243,6 @@ impl<'a> Context<'a> {
|
||||||
arena,
|
arena,
|
||||||
vars,
|
vars,
|
||||||
jp_live_vars: MutMap::default(),
|
jp_live_vars: MutMap::default(),
|
||||||
local_context: LocalContext::default(),
|
|
||||||
param_map,
|
param_map,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -956,7 +954,6 @@ impl<'a> Context<'a> {
|
||||||
};
|
};
|
||||||
// TODO use borrow signature here?
|
// TODO use borrow signature here?
|
||||||
let ps = self.param_map.get_join_point(*j);
|
let ps = self.param_map.get_join_point(*j);
|
||||||
// let ps = self.local_context.join_points.get(j).unwrap().0;
|
|
||||||
|
|
||||||
let b = self.add_inc_before(xs, ps, stmt, j_live_vars);
|
let b = self.add_inc_before(xs, ps, stmt, j_live_vars);
|
||||||
|
|
||||||
|
@ -1014,11 +1011,6 @@ impl<'a> Context<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default)]
|
|
||||||
pub struct LocalContext<'a> {
|
|
||||||
join_points: MutMap<JoinPointId, (&'a [Param<'a>], &'a Stmt<'a>)>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn collect_stmt(
|
pub fn collect_stmt(
|
||||||
stmt: &Stmt<'_>,
|
stmt: &Stmt<'_>,
|
||||||
jp_live_vars: &JPLiveVarMap,
|
jp_live_vars: &JPLiveVarMap,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue