Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Make it work with Rakduo
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeeler committed May 20, 2010
1 parent 96c2b36 commit 3664226
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/PAST/Compiler-Regex.pir
Expand Up @@ -823,9 +823,15 @@ Don't interpolate anything, just execute the PAST code
self.'!cursorop'(ops, '!mark_push', 0, 0, pos, label_reg)

# Check if it's already a compiled Regex, and call it as a method if so
ops.'push_pirop'('typeof', '$P11', '$P10')
ops.'push_pirop'('isa', '$I10', '$P10', "['Sub']")
ops.'push_pirop'('if', '$I10', precompiled_label)

# XXX This is rakudo's Regex class. I'm not sure why the above test doesn't catch it, but
# need to figure it out so NQP doesn't have rakudo knowledge :(
ops.'push_pirop'('isa', '$I10', '$P10', "['Regex']")
ops.'push_pirop'('if', '$I10', precompiled_label)

# Otherwise, treat it as a literal
ops.'push_pirop'('set', '$S10', '$P10')
ops.'push_pirop'('length', '$I10', '$S10')
Expand Down

0 comments on commit 3664226

Please sign in to comment.