mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Subs efficiency
This commit is contained in:
parent
7bb367713c
commit
41e61ba38a
3 changed files with 50 additions and 44 deletions
|
@ -306,6 +306,18 @@ impl Subs {
|
|||
self.utable.probe_value(key)
|
||||
}
|
||||
|
||||
pub fn get_ref(&self, key: Variable) -> &Descriptor {
|
||||
&self.utable.probe_value_ref(key).value
|
||||
}
|
||||
|
||||
pub fn get_rank(&mut self, key: Variable) -> Rank {
|
||||
self.utable.probe_value_ref(key).value.rank
|
||||
}
|
||||
|
||||
pub fn get_mark(&mut self, key: Variable) -> Mark {
|
||||
self.utable.probe_value_ref(key).value.mark
|
||||
}
|
||||
|
||||
pub fn get_without_compacting(&self, key: Variable) -> Descriptor {
|
||||
self.utable.probe_value_without_compacting(key)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue