HTTP/1.1 -1 Read error in cache disk data: SuccessContent-Type: text/csv; charset="utf-8" Last-Modified: Sat, 22 Jan 2022 02:52:08 GMT Content-length: 1978 Connection: Close Proxy-Connection: Close X-Cache: HIT from web1.osuosl.org Server: ProxyTrack 0.5 (HTTrack 3.49.2) id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,lang,patch,platform 150,"load_bytecode, loadlib, and HLL",tene,,"This works fine: {{{ # demo.pir .sub main :main load_bytecode 'perl6.pbc' .end }}} This fails, due to Perl6Str not existing {{{ # demo.pir .HLL 'foo' .sub main :main load_bytecode 'perl6.pbc' .end }}} The runtime version using the 'loadlib' op can work, kind of. Adding this to perl6.pir doesn't help: {{{ # perl6.pir .HLL 'parrot' .sub '' :anon :load :init :immediate $P0 = loadlib 'perl6_group' $P0 = loadlib 'perl6_ops' .end }}} Adding that same code to the example does work: {{{ # demo.pir .HLL 'parrot' .sub '' :anon :load :init :immediate $P0 = loadlib 'perl6_group' $P0 = loadlib 'perl6_ops' .end .HLL 'foo' .sub main :main load_bytecode 'perl6.pbc' .end }}} This rather complicates attempts to use rakudo from another HLL. I did a little bit of digging, and found this: .loadlib is handled by do_loadlib in imcparser.c, which is: {{{ /* imcparser.c */ do_loadlib(PARROT_INTERP, ARGIN(const char *lib)) { ASSERT_ARGS(do_loadlib); STRING * const s = string_unescape_cstring(interp, lib + 1, '""', NULL); PMC *ignored = Parrot_load_lib(interp, s, NULL); UNUSED(ignored); Parrot_register_HLL_lib(interp, s); } }}} The loadlib op is handled by 'op loadlib' in core.ops: {{{ /* core.ops */ inline op loadlib(out PMC, in STR) { $1 = Parrot_load_lib(interp, $2, NULL); } }}} You'll notice that the op version doesn't call Parrot_register_HLL_lib, but adding that to 'op loadlib' doesn't help. That's as far as I got in investigating this issue. ",bug,closed,normal,,hll_interop,,medium,fixed,,coke NotFound,,, Preferences
  • Help/Guide<