Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extensive re-working of the way we generate signatures in actions.pm.…
… Now we build an object representing the signature at compile time, and then use a method on it to do the code generation. This neatens up actions.pm a little, but also means it'll be easier to change signature building later (since only one method will need to change, in theory).
- Loading branch information
Showing
6 changed files
with
230 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (C) 2007-2009, The Perl Foundation. | ||
|
||
=head1 NAME | ||
|
||
signature.pir - a plug-in to the PAST::Compiler for signatures | ||
|
||
=head1 DESCRIPTION | ||
|
||
This adds another multi-variant so when we see a Perl6::Compiler::Signature | ||
in the PAST tree, we know what to do with it. This prevents us from having | ||
to make sure we emit code to build the signature. | ||
|
||
=cut | ||
|
||
.include "interpinfo.pasm" | ||
.namespace [ 'PAST';'Compiler' ] | ||
.sub 'as_post' :method :multi(_, ['Perl6';'Compiler';'Signature']) | ||
.param pmc node | ||
.param pmc options :slurpy :named | ||
node = node.'ast'() | ||
.tailcall self.'as_post'(node, options :flat :named) | ||
.end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.