Skip to main content

Module visitors

Module visitors 

Source

Structs§

ScopeBlockTraversal
Helper struct for traversing scope blocks in HIR-form. Equivalent to TS ScopeBlockTraversal class.

Enums§

ScopeBlockInfo
Block info entry for ScopeBlockTraversal.

Functions§

does_pattern_contain_spread_element
Returns true if the pattern contains a spread element. Equivalent to TS doesPatternContainSpreadElement.
each_call_argument
Yields each arg’s place. Equivalent to TS eachCallArgument.
each_instruction_lvalue
Yields instr.lvalue plus the value’s lvalues. Equivalent to TS eachInstructionLValue.
each_instruction_lvalue_ids
Collect all lvalue IdentifierIds from an instruction. Convenience wrapper around each_instruction_lvalue that maps to ids.
each_instruction_lvalue_with_kind
Yields lvalues with their InstructionKind. Equivalent to TS eachInstructionLValueWithKind.
each_instruction_operand
Delegates to each_instruction_value_operand. Equivalent to TS eachInstructionOperand.
each_instruction_operand_ids
Collect all operand IdentifierIds from an instruction. Convenience wrapper around each_instruction_operand that maps to ids.
each_instruction_operand_with_functions
Like each_instruction_operand but takes functions directly instead of env. Useful when borrow splitting prevents passing the full Environment.
each_instruction_value_lvalue
Yields lvalues from DeclareLocal/StoreLocal/DeclareContext/StoreContext/Destructure/PostfixUpdate/PrefixUpdate. Equivalent to TS eachInstructionValueLValue.
each_instruction_value_operand
Yields operand places from an InstructionValue. Equivalent to TS eachInstructionValueOperand.
each_instruction_value_operand_ids
Collect all operand IdentifierIds from an instruction value. Convenience wrapper around each_instruction_value_operand that maps to ids.
each_instruction_value_operand_with_functions
Like each_instruction_value_operand but takes functions directly instead of env. Useful when borrow splitting prevents passing the full Environment.
each_pattern_operand
Yields places from array/object patterns. Equivalent to TS eachPatternOperand.
each_pattern_operand_ids
Collect all IdentifierIds from a pattern. Convenience wrapper around each_pattern_operand that maps to ids.
each_terminal_all_successors
Yields ALL block IDs referenced by a terminal (successors + fallthroughs + internal blocks). Unlike each_terminal_successor which yields only standard control flow successors, this function yields every block ID that map_terminal_successors would visit.
each_terminal_operand
Yields places used by terminal. Equivalent to TS eachTerminalOperand.
each_terminal_operand_ids
Collect all operand IdentifierIds from a terminal. Convenience wrapper around each_terminal_operand that maps to ids.
each_terminal_successor
Yields successor block IDs (NOT fallthroughs, this is intentional). Equivalent to TS eachTerminalSuccessor.
for_each_call_argument_mut
In-place mutation of call arguments.
for_each_instruction_lvalue_mut
In-place mutation of the instruction’s lvalue and value’s lvalues. Matches the same variants as TS mapInstructionLValues (skips DeclareContext/StoreContext).
for_each_instruction_value_lvalue_mut
In-place mutation of an InstructionValue’s lvalues (DeclareLocal, StoreLocal, DeclareContext, StoreContext, Destructure, PostfixUpdate, PrefixUpdate). Does NOT include the instruction’s top-level lvalue — use for_each_instruction_lvalue_mut for that.
for_each_instruction_value_operand_mut
In-place mutation of all operand places in an InstructionValue. Does NOT handle FunctionExpression/ObjectMethod context — callers handle those separately.
for_each_pattern_operand_mut
In-place mutation of pattern operands.
for_each_terminal_operand_mut
In-place mutation of terminal operand places.
map_call_arguments
Maps call arguments in place. Equivalent to TS mapCallArguments.
map_instruction_lvalues
Maps the instruction’s lvalue and value’s lvalues. Equivalent to TS mapInstructionLValues.
map_instruction_operands
Maps operands of an instruction. Equivalent to TS mapInstructionOperands.
map_instruction_value_operands
Maps operand places in an InstructionValue. Equivalent to TS mapInstructionValueOperands.
map_pattern_operands
Maps pattern operands in place. Equivalent to TS mapPatternOperands.
map_terminal_operands
Maps a terminal node’s operand places in place. Equivalent to TS mapTerminalOperands.
map_terminal_successors
Maps a terminal node’s block assignments in place. Equivalent to TS mapTerminalSuccessors — but mutates in place instead of returning a new terminal.
terminal_fallthrough
Returns the fallthrough block ID for terminals that have one. Equivalent to TS terminalFallthrough.
terminal_has_fallthrough
Returns true if the terminal has a fallthrough block. Equivalent to TS terminalHasFallthrough.