develooper Front page | perl.perl5.porters | Postings from June 2022

Re: Any outstanding branches of op.c? / Split into smaller pieces

Thread Previous | Thread Next
From:
Yuki Kimoto
Date:
June 7, 2022 00:04
Subject:
Re: Any outstanding branches of op.c? / Split into smaller pieces
Message ID:
CAExogxNyvQMWYkaWPU1eG6C82PMPjp-DRnUqgzvUNtVCE882vQ@mail.gmail.com
2021-12-4 23:17 Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> wrote:

> Lately I'm trying to make some edits on op.c, and finding that the file
> has become a giant sprawling monstrosity of way too much code in one
> file; 630k in size and 18k lines of C source code.
>
> I intend to split it into a few smaller pieces.
>
> My plan is to create two new .c files to contain subsections of what is
> currently in op.c:
>
>   peep.c: to contain the finalizer and peephole optimiser
>
>   ck.c: to contain the opchecker functions (Perl_ck_*)
>
>
 I think this is a good cleanup.

1. op.c (build op. These functions are called from perly.y)
2. ck.c (traversal the tree of ops(AST) to check them)

If ck.c is too big, peep.c is a good idea.

I feel the name "ck.c" is a little difficult to understand. Alternative
proposal "check.c", "op_check.c"

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