Skip to content

Commit f3524e5

Browse files
committed
Fix pir::op and Q:PIR.
1 parent 0909ba9 commit f3524e5

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/NQPQ/Actions.pm

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,12 +1233,10 @@ class NQP::Actions is HLL::Actions {
12331233
}
12341234

12351235
method term:sym<pir::op>($/) {
1236-
my $past := $<args> ?? $<args>[0].ast !! PAST::Op.new( :node($/) );
1236+
my @args := $<args> ?? $<args>[0].ast.list !! [];
12371237
my $pirop := ~$<op>;
12381238
$pirop := nqp::join(' ', nqp::split('__', $pirop));
1239-
$past.pirop($pirop);
1240-
$past.pasttype('pirop');
1241-
make $past;
1239+
make QAST::VM.new( :pirop($pirop), :node($/), |@args );
12421240
}
12431241

12441242
method term:sym<pir::const>($/) {
@@ -1417,9 +1415,7 @@ class NQP::Actions is HLL::Actions {
14171415
method quote:sym<q>($/) { make $<quote_EXPR>.ast; }
14181416
method quote:sym<Q>($/) { make $<quote_EXPR>.ast; }
14191417
method quote:sym<Q:PIR>($/) {
1420-
make PAST::Op.new( :inline( $<quote_EXPR>.ast.value ),
1421-
:pasttype('inline'),
1422-
:node($/) );
1418+
make QAST::VM.new( :pir( $<quote_EXPR>.ast.value ), :node($/) );
14231419
}
14241420

14251421
method quote:sym</ />($/) {

t/nqp/30-pirop.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ plan(3);
66

77
say( pir::join__SsP('', ('o', 'k', ' ', 1) ) );
88

9-
say( 'ok ', pir::div(6,3) );
9+
say( 'ok ', pir::div__Iii(6,3) );
1010

1111
say( 'ok ', pir::chr__Si(51) );

0 commit comments

Comments
 (0)