Struct debris_llir::opt::variable_metadata::ValueHints
source · pub struct ValueHints {
hints: FxHashMap<ItemId, Hint>,
}
Expand description
Stores the possible range of values of a runtime variable
Fields§
§hints: FxHashMap<ItemId, Hint>
Implementations§
source§impl ValueHints
impl ValueHints
pub fn set_hint(&mut self, id: ItemId, hint: Hint)
sourcepub fn clear_hint(&mut self, id: ItemId)
pub fn clear_hint(&mut self, id: ItemId)
Clears all hints for this id
pub fn get_hint(&self, id: ItemId) -> Hint
sourcepub fn get_scoreboard_value(&self, value: ScoreboardValue) -> Option<i32>
pub fn get_scoreboard_value(&self, value: ScoreboardValue) -> Option<i32>
Tries to get the static value of a scoreboard value
sourcepub fn update_hints(&mut self, node: &Node, guaranteed_run: bool)
pub fn update_hints(&mut self, node: &Node, guaranteed_run: bool)
Updates the hints for all variables that this node modifies
guaranteed_run
specifies whether node
will definitely execute
sourcepub fn static_binary_operation(&self, bin_op: &BinaryOperation) -> Option<i32>
pub fn static_binary_operation(&self, bin_op: &BinaryOperation) -> Option<i32>
Tries to evaluate a binary operation with static values
sourcepub fn static_condition(&self, condition: &Condition) -> Option<bool>
pub fn static_condition(&self, condition: &Condition) -> Option<bool>
Tries to evaluate a condition with static values
pub fn simplify_condition(&self, condition: &Condition) -> Option<Condition>
Trait Implementations§
source§impl Debug for ValueHints
impl Debug for ValueHints
source§impl Default for ValueHints
impl Default for ValueHints
source§fn default() -> ValueHints
fn default() -> ValueHints
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ValueHints
impl Send for ValueHints
impl Sync for ValueHints
impl Unpin for ValueHints
impl UnwindSafe for ValueHints
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more