diff --git a/src/QAST/Compiler.nqp b/src/QAST/Compiler.nqp index 546e06679f..16137410b1 100755 --- a/src/QAST/Compiler.nqp +++ b/src/QAST/Compiler.nqp @@ -1068,7 +1068,7 @@ class QAST::Compiler is HLL::Compiler { my %*REG; # build the list of (unique) registers we need - my $reglist := nqp::split(' ', 'start pmc tgt string pos int off int eos int rep int cur pmc curclass pmc bstack pmc cstack pmc'); + my $reglist := nqp::split(' ', 'start pmc tgtp pmc tgt string posp pmc pos int off int eos int rep int cur pmc curclass pmc bstack pmc cstack pmc'); while $reglist { my $reg := nqp::shift($reglist); my $name := %*REG{$reg} := $prefix ~ $reg; @@ -1088,11 +1088,14 @@ class QAST::Compiler is HLL::Compiler { # common prologue $ops.push_pirop('callmethod', '"!cursor_start_all"', 'self', :result(%*REG)); $ops.push_pirop('set', %*REG, %*REG ~ '[0]'); - $ops.push_pirop('set', %*REG, %*REG ~ '[1]'); - $ops.push_pirop('set', %*REG, %*REG ~ '[2]'); + $ops.push_pirop('set', %*REG, %*REG ~ '[1]'); + $ops.push_pirop('set', %*REG, %*REG); + $ops.push_pirop('set', %*REG, %*REG ~ '[2]'); + $ops.push_pirop('set', %*REG, %*REG); $ops.push_pirop('set', %*REG, %*REG ~ '[3]'); $ops.push_pirop('set', %*REG, %*REG ~ '[4]'); - $ops.push_pirop('set', '$I19', %*REG ~ '[5]'); + $ops.push_pirop('set', '$P19', %*REG ~ '[5]'); + $ops.push_pirop('set', '$I19', '$P19'); $ops.push_pirop('store_lex', 'unicode:"$\x{a2}"', %*REG); $ops.push_pirop('length', %*REG, %*REG); $ops.push_pirop('eq', '$I19', 1, $restartlabel);