MCPcopy Create free account
hub / github.com/davidblewett/rure-python / resize

Method resize

regex/src/pikevm.rs:367–374  ·  view source on GitHub ↗
(&mut self, num_insts: usize, ncaps: usize)

Source from the content-addressed store, hash-verified

365 }
366
367 fn resize(&mut self, num_insts: usize, ncaps: usize) {
368 if num_insts == self.set.capacity() {
369 return;
370 }
371 self.slots_per_thread = ncaps * 2;
372 self.set = SparseSet::new(num_insts);
373 self.caps = vec![None; self.slots_per_thread * num_insts];
374 }
375
376 fn caps(&mut self, pc: usize) -> &mut [Option<usize>] {
377 let i = pc * self.slots_per_thread;

Callers 1

execMethod · 0.80

Calls 1

capacityMethod · 0.80

Tested by

no test coverage detected