@@ -661,23 +661,9 @@ class QAST::MASTRegexCompiler {
661
661
op($ op , $ s0 , % ! reg <zero >, sval(nqp :: lc ($ c ) ~ nqp :: uc ($ c )), % ! reg <fail >),
662
662
]);
663
663
}
664
- elsif $ node . subtype eq ' ignorecase' {
665
- # XXX ignorecase may want fc instead of lc
666
- my $ cmpop := $ node . negate ?? ' if_i' !! ' unless_i' ;
667
- nqp :: push (@ ins , op(' const_s' , $ s0 , sval(nqp :: lc ($ litconst ))));
668
- unless nqp ::existskey(% ! reg , ' haystacklc' ) {
669
- % ! reg <haystacklc > := $ ! regalloc . fresh_s();
670
- }
671
- my $ no_need_lc := label();
672
- nqp :: push (@ ins , op(' isnull_s' , $ i0 , % ! reg <haystacklc >));
673
- nqp :: push (@ ins , op(' unless_i' , $ i0 , $ no_need_lc ));
674
- nqp :: push (@ ins , op(' lc' , % ! reg <haystacklc >, % ! reg <tgt >));
675
- nqp :: push (@ ins , $ no_need_lc );
676
- nqp :: push (@ ins , op(' eqat_s' , $ i0 , % ! reg <haystacklc >, $ s0 , % ! reg <pos >));
677
- nqp :: push (@ ins , op($ cmpop , $ i0 , % ! reg <fail >));
678
- }
679
664
else {
680
- my $ eq_op := $ node . subtype eq ' ignoremark' ?? ' eqatim_s' !! ' eqat_s' ;
665
+ my $ eq_op := $ node . subtype eq ' ignorecase' ?? ' eqatic_s' !!
666
+ $ node . subtype eq ' ignoremark' ?? ' eqatim_s' !! ' eqat_s' ;
681
667
my $ cmpop := $ node . negate ?? ' if_i' !! ' unless_i' ;
682
668
nqp :: push (@ ins , op(' const_s' , $ s0 , sval($ litconst )));
683
669
nqp :: push (@ ins , op($ eq_op , $ i0 , % ! reg <tgt >, $ s0 , % ! reg <pos >));
0 commit comments