(&mut self, first_slot: usize, expr: &Hir)
| 363 | } |
| 364 | |
| 365 | fn c_capture(&mut self, first_slot: usize, expr: &Hir) -> Result { |
| 366 | if self.num_exprs > 1 || self.compiled.is_dfa { |
| 367 | // Don't ever compile Save instructions for regex sets because |
| 368 | // they are never used. They are also never used in DFA programs |
| 369 | // because DFAs can't handle captures. |
| 370 | self.c(expr) |
| 371 | } else { |
| 372 | let entry = self.insts.len(); |
| 373 | let hole = self.push_hole(InstHole::Save { slot: first_slot }); |
| 374 | let patch = self.c(expr)?; |
| 375 | self.fill(hole, patch.entry); |
| 376 | self.fill_to_next(patch.hole); |
| 377 | let hole = self.push_hole(InstHole::Save { slot: first_slot + 1 }); |
| 378 | Ok(Patch { hole: hole, entry: entry }) |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | fn c_dotstar(&mut self) -> Result { |
| 383 | Ok(if !self.compiled.only_utf8() { |
no test coverage detected