649 {
650 RegExpMacroAssembler* assembler =
compiler->macro_assembler();
651
653
654 if (actions_ ==
nullptr &&
backtrack() ==
nullptr) {
655
656
657
658 if (cp_offset_ != 0) assembler->AdvanceCurrentPosition(cp_offset_);
659
661 successor->Emit(
compiler, &new_state);
662 return;
663 }
664
665
666 OutSet affected_registers;
667
669
670
671
672 assembler->PushCurrentPosition();
673 }
674 Zone* zone = successor->zone();
675 intptr_t max_register = FindAffectedRegisters(&affected_registers, zone);
676 OutSet registers_to_pop;
677 OutSet registers_to_clear;
678 PerformDeferredActions(assembler, max_register, affected_registers,
679 ®isters_to_pop, ®isters_to_clear, zone);
680 if (cp_offset_ != 0) {
681 assembler->AdvanceCurrentPosition(cp_offset_);
682 }
683
684
685 BlockLabel undo;
686 assembler->PushBacktrack(&undo);
688 successor->Emit(
compiler, &new_state);
689
690
691 assembler->BindBlock(&undo);
692 RestoreAffectedRegisters(assembler, max_register, registers_to_pop,
693 registers_to_clear);
695 assembler->Backtrack();
696 } else {
697 assembler->PopCurrentPosition();
699 }
700}