Adds a new option --target=pbc to the frontend. This is the first tiny step on the way to direct bytecode generation as envisioned by whiteknight.
The corresponding NQP changes can be found in the branch target-pbc of the main NQP repository, and the old Parrot-side infrastructure has been removed in whiteknight's branch eval_pmc.
Should not be merged into nom: please create a new branch instead.
Once someone pulls the trigger on parrot/parrot#934 , the code can be tested via perl Configure.pl --gen-parrot=eval_pmc --gen-nqp=target-pbc.
perl Configure.pl --gen-parrot=eval_pmc --gen-nqp=target-pbc
migrate World.pm to PackfileView
adjust to new HLL::Compiler interface
modify build to use --target=pbc
Are you certain that $precomp.main_sub() is always the same as the previous $precomp ?
I'm not 100% certain, no. In my defense:
Spectesting on Cygwin seems to result in additional failures with message
Dubious, test returned 1 (wstat 256, 0x100)
which is why I'm asking for a branch to be created so others can check I did not mess up.
@pmichaud Note that we're now always calling the main sub instead of invoking an eval PMC. As the eval PMC implicitly called the sub at index 0 as well, the change is at least consistent.
The main_sub member of the bytecode structure apparently gets initialized to -1, so somewhere some code gets executed that fixes it to return the first sub in absence of an explicit annotation.
I'll look into it some more tomorrow.
@pmichaud found it - see parrot-dev
Rename $main to $mainline to avoid confusion
@pmichaud I believe I've taken care of all of your complaints, so please take another look if you have a free minute.
The PackfileView PMC now comes with 2 additional methods first_sub_in_const_table() and single_sub_by_tag(). The former is the drop-in replacement for the old logic, is used right now but imo should go away long-term. The latter can only be used after tag generation has been added to the code generator. Right now, it's implemented in terms of subs_by_tag(), which should be fixed once it becomes more heavily used.
I don't think it's an immediate concern: I'd wait with switching to the new tag-based system until someone takes a shot at direct bytecode generation.
Now obsolete - see #106
List Zoffix Znet as release manager for #102 August release
Unless someone else who wants to learn how to do a release wishes
to have a go.