MCPcopy Create free account
hub / github.com/Rust-API/Rust-API-Bypass-Checker / visit_repeat

Method visit_repeat

src/analysis/mir_visitor/block_visitor.rs:2113–2124  ·  view source on GitHub ↗

Repeat `operand` for `count` times

(&mut self, path: Rc<Path>, operand: &mir::Operand<'tcx>, count: &Const<'tcx>)

Source from the content-addressed store, hash-verified

2111
2112 // Repeat `operand` for `count` times
2113 fn visit_repeat(&mut self, path: Rc<Path>, operand: &mir::Operand<'tcx>, count: &Const<'tcx>) {
2114 let length_path = Path::new_length(path.clone());
2115 let length_value = self.visit_constant(count);
2116 self.body_visitor
2117 .state
2118 .update_value_at(length_path, length_value.clone());
2119 let slice_path = Path::new_slice(path, length_value).refine_paths(&self.state());
2120 let initial_value = self.visit_operand(operand);
2121 self.body_visitor
2122 .state
2123 .update_value_at(slice_path, initial_value);
2124 }
2125
2126 // TODO: check this
2127 // Convert mir::Operand into SymbolicValue

Callers 1

visit_rvalueMethod · 0.80

Calls 5

visit_constantMethod · 0.80
update_value_atMethod · 0.80
stateMethod · 0.80
visit_operandMethod · 0.80
refine_pathsMethod · 0.45

Tested by

no test coverage detected