develooper Front page | perl.perl5.porters | Postings from December 2010

Re: Adding codegeneration step

Thread Previous | Thread Next
From:
Gerard Goossen
Date:
December 31, 2010 04:41
Subject:
Re: Adding codegeneration step
Message ID:
20101231124056.GS3391@ggoossen.net
On Fri, Dec 31, 2010 at 09:02:27AM +0000, Nicholas Clark wrote:
> On Thu, Dec 30, 2010 at 11:09:27PM +0100, Gerard Goossen wrote:
> > I will send the patches afterthis, but the changes are in the codegen
> > branch at git://github.com/ggoossen/perl.git or to view the commits
> > https://github.com/ggoossen/perl/commits/codegen
> 
> I see that your final commit is:
> 
>  98 files changed, 8360 insertions(+), 6617 deletions(-)
> 
> Is there any way to break that down into more manageable parts?

Splitting it into smaller parts is rather difficult (of course it could
be split into changes to modules (mostly B modules) (about 2k lines),
auto-generated files (1-2k lines), but I don't think that would make it
more manageable).
But I don't see how it can be split into smaller steps, you can't do
half a code generation step.

Maybe telling a little more about the changes is more useful:
The bulk of the new code is in codegen.c, most of which is converting the
optree into a instruction list, with a large "case" statement handling
the different optypes. At the top of codegen.c there is some documentation
about how this is done. Most of the removed code is in op.c where a lot of
optree manipulation is removed, which is replaced by code in codegen.c
Most of the other changes have to do with "return addresses" now being
INSTRUCTION* instead of OP* and using the arguments in the pp_*

Gerard Goossen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About