Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update HLL::Backend::Parrot to use new EvalPMC/PackfileView API.
Resolves issue #76, but requires a Parrot newer than
RELEASE_5_7_0-20-g07dfdb4.  See issue #76 for more details.
  • Loading branch information
pmichaud committed Oct 9, 2013
1 parent d7eae46 commit cbd4843
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/vm/parrot/HLL/Backend.nqp
Expand Up @@ -114,19 +114,24 @@ class HLL::Backend::Parrot {

method evalpmc($source, *%adverbs) {
my $compiler := nqp::getcomp('PIR');
$compiler($source)
my $pbc := $compiler($source);
unless $pbc.is_initialized('init') {
for $pbc.subs_by_tag('init') -> $sub { $sub() }
$pbc.mark_initialized('init');
}
$pbc
}

method is_compunit($cuish) {
!pir::isa__IPs($cuish, 'String')
}

method compunit_mainline($cu) {
$cu[0]
$cu.all_subs()[0]
}

method compunit_coderefs($cu) {
$cu
$cu.all_subs();
}

method recursion_limit($limit) {
Expand Down

0 comments on commit cbd4843

Please sign in to comment.