mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Break up arguments of insert
This commit is contained in:
parent
c57d254205
commit
bb3cfb9cd3
2 changed files with 6 additions and 6 deletions
|
@ -20,6 +20,10 @@ pub(crate) struct Scope<'a, 'ctx> {
|
|||
pub(crate) struct JoinPointNotFound;
|
||||
|
||||
impl<'a, 'ctx> Scope<'a, 'ctx> {
|
||||
pub fn insert(&mut self, symbol: Symbol, layout: InLayout<'a>, value: BasicValueEnum<'ctx>) {
|
||||
self.symbols.insert(symbol, (layout, value));
|
||||
}
|
||||
|
||||
pub fn load_symbol(&self, symbol: &Symbol) -> BasicValueEnum<'ctx> {
|
||||
match self.symbols.get(symbol) {
|
||||
Some((_, ptr)) => *ptr,
|
||||
|
@ -38,10 +42,6 @@ impl<'a, 'ctx> Scope<'a, 'ctx> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn insert(&mut self, symbol: Symbol, value: (InLayout<'a>, BasicValueEnum<'ctx>)) {
|
||||
self.symbols.insert(symbol, value);
|
||||
}
|
||||
|
||||
pub fn insert_top_level_thunk(
|
||||
&mut self,
|
||||
symbol: Symbol,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue