Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add nqp::symlink and nqp::link
  • Loading branch information
FROGGS committed Apr 12, 2013
1 parent 8a6373f commit 5104c2e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/QAST/Operations.nqp
Expand Up @@ -1676,6 +1676,30 @@ QAST::Operations.add_core_op('copy', -> $qastcomp, $op {
$op[0],
$op[1]) );
});
QAST::Operations.add_core_op('symlink', -> $qastcomp, $op {
if +$op.list != 2 {
nqp::die("The 'symlink' op expects two operands");
}
$qastcomp.as_post(QAST::Op.new(
:op('callmethod'),
:name('symlink'),
QAST::VM.new( :pirop('new__Ps'),
QAST::SVal.new( :value('OS') ) ),
$op[0],
$op[1]) );
});
QAST::Operations.add_core_op('link', -> $qastcomp, $op {
if +$op.list != 2 {
nqp::die("The 'link' op expects two operands");
}
$qastcomp.as_post(QAST::Op.new(
:op('callmethod'),
:name('link'),
QAST::VM.new( :pirop('new__Ps'),
QAST::SVal.new( :value('OS') ) ),
$op[0],
$op[1]) );
});

# terms
QAST::Operations.add_core_pirop_mapping('time_i', 'time', 'I', :inlinable(1));
Expand Down

0 comments on commit 5104c2e

Please sign in to comment.