Skip to content

Commit fc24b09

Browse files
committed
Add compreg and [get|set]_hll_global abstractions.
We're not going to provide full on namespace support in the nqp:: ops. However, we will provide languages with a global place to stash stuff. They can hang their idea of namespace off that or any other useful things (for example, NQP and Rakudo use it to stash their module loader).
1 parent 93b13be commit fc24b09

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/QAST/Operations.nqp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,6 +1693,12 @@ QAST::Operations.add_core_pirop_mapping('serialize', 'nqp_serialize_sc', 'SPP');
16931693
QAST::Operations.add_core_pirop_mapping('deserialize', 'nqp_deserialize_sc', '0sPPPP');
16941694
QAST::Operations.add_core_pirop_mapping('wval', 'nqp_get_sc_object', 'Psi');
16951695

1696+
# hll related opcodes
1697+
QAST::Operations.add_core_pirop_mapping('getcomp', 'compreg', 'Ps');
1698+
QAST::Operations.add_core_pirop_mapping('bindcomp', 'compreg', '1sP');
1699+
QAST::Operations.add_core_pirop_mapping('getcurhllsym', 'get_hll_global', 'Ps');
1700+
QAST::Operations.add_core_pirop_mapping('bindcurhllsym', 'set_hll_global', '1sP');
1701+
16961702
# process related opcodes
16971703
QAST::Operations.add_core_pirop_mapping('exit', 'exit', '0i', :inlinable(1));
16981704
QAST::Operations.add_core_pirop_mapping('sleep', 'sleep', '0n', :inlinable(1));

0 commit comments

Comments
 (0)