Skip to content

Commit 9e4e480

Browse files
committed
Add nqp::hlllist op.
1 parent 117931a commit 9e4e480

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/QAST/Operations.nqp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,15 @@ class QAST::Operations {
257257
}
258258

259259
# Data structures
260+
QAST::Operations.add_core_op('hlllist', :inlinable(1), -> $qastcomp, $op {
261+
# Just invoke nqp::getlex to find the "NQPArray" type
262+
$qastcomp.as_post(QAST::Op.new(
263+
:op('getlex'),
264+
#$qastcomp.coerce('NQPArray', 's')
265+
QAST::SVal.new(:value('NQPArray'))
266+
));
267+
});
268+
260269
QAST::Operations.add_core_op('list', :inlinable(1), -> $qastcomp, $op {
261270
# Create register for the resulting list and make an empty one.
262271
my $list_reg := $*REGALLOC.fresh_p();

0 commit comments

Comments
 (0)