-
-
Save cygx/b92999e516932a36b7ba7769c40f8a98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use nqp; | |
use QAST:from<NQP>; | |
my $nul := nqp::null(); | |
my $qcomp := nqp::getcomp('QAST'); | |
my $mcomp := nqp::getcomp('MAST'); | |
my $qcu := QAST::CompUnit.new(); | |
my $sc := nqp::createsc('42'); | |
$qcu.sc($sc); | |
nqp::setobjsc($nul, $sc); | |
nqp::scsetobj($sc, 0, $nul); | |
$qcu.set_children(nqp::list( | |
QAST::Block.new( | |
QAST::Op.new(:op<say>, | |
QAST::Op.new(:op<reprname>, | |
QAST::WVal.new(:value($nul)) | |
) | |
) | |
) | |
)); | |
#nqp::compunitmainline($mcomp.assemble_and_load($qcomp.to_mast($qcu))).(); | |
$mcomp.assemble_to_file($qcomp.to_mast($qcu), 'dummy.moarvm'); | |
# $ perl6 test.p6 | |
# $ moar dummy.moarvm | |
# Unhandled exception: SC not yet resolved; lookup failed | |
# at <unknown>:1 (dummy.moarvm:) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment