#1885: Parrot_load_bytecode should only load bytecode
-------------------------+--------------------------------------------------
Reporter: whiteknight | Owner: cotto
Type: RFC | Status: new
Priority: normal | Milestone:
Component: core | Version: master
Severity: medium | Keywords: pir, pbc
Lang: | Patch:
Platform: all |
-------------------------+--------------------------------------------------
Comment(by pmichaud):
Overall I agree with the proposed changes, but there's a very important
dependency that I think needs to be added before removing the ability to
load_bytecode on .pir files.
Currently it's not possible for a Parrot program to reliably generate .pbc
files on its own -- .pbc can only be generated by an external command line
invocation. This means that .pir files are the only mechanism we
currently have for a Parrot program to create a file that can be
subsequently loaded directly by another Parrot program (via
load_bytecode).
Also, note that compiling via the PIR compreg is somewhat different from
using load_bytecode, especially with respect to :load/:init markers. A
file compiled using PIR compreg executes :init-flagged subs, while
load_bytecode executes :load-flagged subs. Using the PIR compreg is not
at all a direct replacement for load_bytecode.
Lastly, some crude benchmarking I did in 2009 seemed to indicate that
using load_bytecode on .pir files was actually ''faster'' than loading the
equivalent pre-compiled .pbc file. I totally admit this seems
counterintuitive, but I tried it several times and got consistent results
for several of Rakudo's precompiled modules.
So, while I give a +1 to eventually removing the .pir aspect of
load_bytecode, the PIR compreg doesn't yet provide equivalent capability,
and we ought to have a way to generate .pbc from Parrot before eliminating
.pir from load_bytecode.
(It's okay with me if .pbc's are created via PIR compreg or some other
compiler object in Parrot -- I'm simply noting that currently we don't
have ''any'' officially-supported mechanism to do it.)
Pm
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1885#comment:5>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets