Author: kjs
Date: Wed Dec 31 05:49:17 2008
New Revision: 34702
Modified:
trunk/compilers/pirc/README.pod
trunk/compilers/pirc/TODO
Log:
[pirc] update todo and readme.
Modified: trunk/compilers/pirc/README.pod
==============================================================================
--- trunk/compilers/pirc/README.pod (original)
+++ trunk/compilers/pirc/README.pod Wed Dec 31 05:49:17 2008
@@ -22,6 +22,8 @@
=item * allow multiple heredocs in subroutine invocations (like: foo(<<'A',
<<'B', <<'C') )
+=item * register usage optimization
+
=back
=head2 Compiling and Running
@@ -297,13 +299,31 @@
The implementation of the vanilla register allocator is done in the PIR symbol
management module (C<pirsymbol.c>).
+=head2 Register optimizer
+
+PIRC has a register optimizer, which uses a Linear Scan Register algorithm.
+For each symbolic register, a live-interval object is created, which has
+an I<start> and I<end> point, indicating the first and last usage of that
+symbolic register in the sub. The register optimizer figures out when
+symbolic registers don't overlap, in which case they can use the same
+register (assuming they're of the same type).
+
=head2 Status
-The PIR parser is complete, but should be tested intensively. The back-end
creates
-a data structure representing the input. Currently, only (almost working) PASM
-output is generated, but eventually a Parrot Byte Code (PBC) file should be
generated.
-In order to do this, we need a proper API to generate the appropriate data
structures
-(such as Parrot PackFile and friends).
+Bytecode generation is mostly done, except for:
+
+=over 4
+
+=item * :multi types
+
+=item * keys and indexed assignments
+
+=item * auto-boxing of return values doesn't work
+
+=item * :flat flag doesn't work
+
+=back
+
=head1 IMPLEMENTATION
@@ -383,24 +403,6 @@
=back
-=head1 FUTURE WORK: HELP WANTED
-
-Eventually, either IMCC needs to be fixed rigorously, or, rewritten altogether.
-PIRC is an attempt to do the latter. The following things need to be considered
-when replacing IMCC with PIRC:
-
-=over 4
-
-=item * bytecode generation
-
-There must be a proper bytecode API for PIRC to use.
-
-=item * C<:immediate> and related flags
-
-Flags such as C<:immediate> must be implemented; a sub that is marked with the
-C<:immediate> flag must be run immediately after compilation.
-
-=back
=head1 SEE ALSO
Modified: trunk/compilers/pirc/TODO
==============================================================================
--- trunk/compilers/pirc/TODO (original)
+++ trunk/compilers/pirc/TODO Wed Dec 31 05:49:17 2008
@@ -24,12 +24,14 @@
places this is not used yet, and in others, it's not necessary
to use it (but in those mem_sys_free() must be called explicitly).
-[TODO] 7. Figure out how :named argument passing works in bytecode.
+[DONE] 7. Figure out how :named argument passing works in bytecode.
[DONE] 8. Finish the parrot calling conventions ops in the back-end
(var.args must be fixed).
-[TODO] 9. Handle :slurpy and :flat flags properly in bytecode.
+[DONE] 9.a Handle :slurpy
+
+[TODO] 9.b Handle :flat
[TODO] 10. Handle indexed assignments in bytecode.