Leopold Toetsch wrote:
1) There is a new opcode new Px, Sc:
new P0, "PyInt"
2) If the given class doesn't yet exist, Parrot_autoload_class is called which has hardcode mapping for "Py" => "python_group", "Tcl" => "tcl_group". A bit hackish but working ...
Perhaps longer term, a change to the pbc format may be in order... the idea would be for each binary to have a list of dependencies which need to be loaded previously. Developers could declare such a dependency with a IMCC macro, something like this:
.lib python_group
This would enable JITs to convert the above new opcode into the equivalent "new Px, Ic" variety in many cases.
3) The pybuiltin.__load__() function is automatically called by the library _init loading hook now.
There is one more test in t/dynclases/pybuiltins that has an example.
Cool, thanks!
- Sam Ruby