Skip to content

Commit

Permalink
Add an nqp::getenvhash op.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Apr 20, 2013
1 parent e93a51d commit dcf2e2f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vm/parrot/QAST/Operations.nqp
Expand Up @@ -2231,3 +2231,12 @@ QAST::Operations.add_core_pirop_mapping('nfarunalt', 'nqp_nfa_run_alt', '0PsiPPP
# process related opcodes
QAST::Operations.add_core_pirop_mapping('exit', 'exit', '0i', :inlinable(1));
QAST::Operations.add_core_pirop_mapping('sleep', 'sleep', '0n', :inlinable(1));
QAST::Operations.add_core_op('getenvhash', -> $qastcomp, $op {
if +@($op) != 0 {
nqp::die('getenvhash requires three operands');
}
$qastcomp.as_post(QAST::VM.new(
:pirop('new__Ps'),
QAST::SVal.new( :value('Env') )
))
});

0 comments on commit dcf2e2f

Please sign in to comment.