petdance/scratch — Issue #362: Parrot_load_bytecode should only load bytecode
Author: petdance
Created: 2011-11-14 06:07:43+00:00
State: open
Labels: core, Pri-normal, rfc, Sev-medium

The function src/packfile.c:Parrot_load_bytecode() is too magical. It not only loads bytecode, but it also does some rudimentary extension string matching to also allow it to load .pir and .pasm file. This is extremely magical and is not made clear through the function's name.
This function is exposed primarily through the load_bytecode PIR op, which has similar magical behavior.

I suggest that we eliminate the magical behavior of this function and the opcode that exposes it: load_bytecode and Parrot_load_bytecode should *only* load bytecode files under any extension. If the user wants to compile a PIR source file they should use the PIR compreg.

Originally http://trac.parrot.org/parrot/ticket/1885