Skip to content

Commit

Permalink
refactor(ir): modify scopes in module
Browse files Browse the repository at this point in the history
  • Loading branch information
JuniMay committed Feb 17, 2024
1 parent a7822b3 commit 4ebc98e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ir/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,14 @@ impl Module {
self.functions.get_mut(&function)
}

pub fn add_global_slot(&mut self, data: ValueData) -> Value {
pub(super) fn add_global_slot(&mut self, data: ValueData) -> Value {
let value = Value::new(self.allocate_id());
self.globals.borrow_mut().insert(value, data);
self.global_slot_layout.push(value);
value
}

pub fn add_function(&mut self, value_data: ValueData, function_data: FunctionData) -> Function {
pub(super) fn add_function(&mut self, value_data: ValueData, function_data: FunctionData) -> Function {
let function = Value::new(self.allocate_id());
self.globals.borrow_mut().insert(function, value_data);
self.functions.insert(function.into(), function_data);
Expand Down

0 comments on commit 4ebc98e

Please sign in to comment.