Break up arguments of insert

This commit is contained in:
Ayaz Hafiz 2023-06-09 15:44:21 -05:00
parent c57d254205
commit bb3cfb9cd3
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 6 additions and 6 deletions

View file

@ -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,