pub type InstructionMutRef<'str, 'ctx> = BaseRef<&'ctx mut Context<'str>, InstructionId>;Aliased Type§
pub struct InstructionMutRef<'str, 'ctx> {
pub id: InstructionId,
/* private fields */
}Fields§
§id: InstructionIdImplementations§
Source§impl<'str, 'ctx> InstructionMutRef<'str, 'ctx>
impl<'str, 'ctx> InstructionMutRef<'str, 'ctx>
pub fn as_ref(&self) -> InstructionRef<'str, '_>
pub fn inner_mut(&mut self) -> &mut Instruction<'str>
pub fn mnemonic_mut(&mut self) -> &mut Mnemonic
Sourcepub fn set_mnemonic(&mut self, mnemonic: Mnemonic)
pub fn set_mnemonic(&mut self, mnemonic: Mnemonic)
Replace this instruction’s mnemonic while keeping the reverse use-def map in sync.
pub fn address_mut(&mut self) -> &mut Option<u64>
pub fn set_address(&mut self, address: u64)
Sourcepub fn set_type(&mut self, new_type: TypeId)
pub fn set_type(&mut self, new_type: TypeId)
Sets the type of this instruction’s result.
Panics if the instruction already has a type that is incompatible with
new_type (same size but different kind).
Sourcepub fn set_type_resized(&mut self, new_type: TypeId)
pub fn set_type_resized(&mut self, new_type: TypeId)
Sets the result type, allowing the byte size to change.
Unlike set_type, this does not enforce size
invariance: it exists for transforms that legitimately resize an
aggregate result, such as trimming dead fields from a returned write-set
(dead_signature). Prefer set_type for any same-size retype.
Sourcepub fn set_space(&mut self, space: SpaceId)
pub fn set_space(&mut self, space: SpaceId)
Sets the address-space provenance of this instruction’s result.
A non-register space promotes the result to a
SpaceAddress of the same byte width.
Register spaces are ignored (pointer arithmetic is not allowed in the
register space).