>=head2 Pragmata
>
>Lines beginning with a period (.) followed by some text are B<pragmata>
>and are reserved. No pragmata are currently defined.
I was supposed to organize some proposed pragmas but apparently
I forgot to remind myself.
I think I mailed out a couple a while back but anyway, here goes again.
..parrot - Some variation that could be used for version
information, optional metadata, etc. Sort
of a future catchall.
Example: .parrot (require=>1.0, source='Perl6',
fastsymbols=true)
Hmm, on second thought, these probably should just
be their own
directives.
..start (or .entry) - Entry point of the bytecode file
..sub - Simple, just a nicer looking shorthand for a
label that represents a subroutine.
..namespace - Self explanatory
..class - Optional, names the surrounded code as a
class definition.
..global - Declares a global symbol in the current namespace.
Optionally typed.
Ex: .global i32 i
.global PerlArray myList
And then there are nice-to-haves such as local register aliasing. I implemented
this in a simple preprocessor for parrot as the middle layer between my
compiler and Parrot.
.local i32 foo is I0
.local str bar is S0
set str, "Bar"
This is just sugar on top for people that spend a lot of time looking at
their intermediate code.
Comments please?
-Melvin