Changeset 4874

Show
Ignore:
Timestamp:
06/20/05 18:55:05 (4 years ago)
Author:
iblech
svk:copy_cache_prev:
6641
Message:

* Some work on ChangeLog?.
* Emit.PIR -- Don't quote C<'>. Now C<say "hi'"> works as expected.
* Pugs.Compile.PIR, Emit.PIR -- Some more Haddock.

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4854 r4874  
    33=== Pugs Internals 
    44 
    5 * Lots of work on the Emit.* modules: 
    6 ** Pugs can now generate the PAST (Pugs Abstract Syntax Tree) 
     5* New compiler backend: `PIR` 
     6** Pugs can now generate PIL (Pugs Immediate Representation) 
    77** ... and emit PIR for it 
    8 ** Emit.PIR can now compile `ext/Test/lib/Test.pm` 
    9 * eval and related builtins are now implemented in the Prelude 
    10 * intial support for `%*INC` 
     8** Supported are: `%*ENV`, standard operators (e.g. `&infix:<+>`), symbolic 
     9   dereferentiation (e.g. `$::(...)`), `END` blocks, short circuiting logical 
     10   operators, user-defined subroutines and `return`, and tail calls 
     11** `Emit.PIR` can compile `ext/Test/lib/Test.pm` and passes almost all sanity 
     12   tests 
     13* `eval` and related builtins are now implemented in the Prelude 
     14* Initial support for `%*INC` 
    1115 
    1216=== Bundled Modules 
     
    1923=== Test, Examples and Documentations 
    2024 
    21 * Many new tests and several refactorings based on p6l rulings, we now have 7562 tests 
    22 * new `examples/continuation` and `examples/unitfunctions` directories added 
     25* Many new tests and several refactorings based on p6l rulings, we now have 
     26  7500+ tests 
     27* New `examples/continuation` and `examples/unitfunctions` directories added 
    2328  and populated 
    24 * Examples of built-in type methods in `examples/vmethods/` 
    25 * low level sanity tests in `t/01-sanity/` for the Pugs code emitter 
    26 * more japhs added to `examples/japhs` 
    27 * updates and clean up to `* docs/01Overview.html` 
    28 * Interpreter for l33t in `examples/obfu/l33t.p6` 
    29 * Various perl6 grammars being added to `module/Grammars/` 
     29* Examples of methods acting on builtin-types in `examples/vmethods/` 
     30* Low level sanity tests in `t/01-sanity/` for the PIR code emitter 
     31* More JAPHs added to `examples/japhs/` 
     32* Updates and cleanups to `docs/01Overview.html` 
     33* Interpreter and debugger for l33t in `examples/obfu/l33t.p6` 
     34* Perl 6 Rule grammar and related files added to `module/Grammars/` 
    3035 
    3136=== Bug Fixes 
     
    3338* `(42).kv` will now die and `(42,).kv` will work 
    3439* `sleep()` now returns seconds slept 
    35 * Fixed `!~` to mean `not(... ~~ ...)`, instead of `ne`. 
     40* Fixed `!~` to mean `not(... ~~ ...)`, instead of `ne` 
     41* `eval("...", :lang<...>")` works now 
     42* Call parrot without `-j` (JIT), as Parrot doesn't support JIT on all 
     43  systems. You can use the new environment veriable `PUGS_PARROT_OPTS` to 
     44  switch JIT on again 
     45* Fixed order of method invocation in `BUILDALL` and `DESTROYALL` 
    3646 
    3747== Changes for 6.2.7 (r4612) - June 13, 2005 
     
    7080* Haskell Workshop paper on Pugs in `docs/talks/hw2005.tex` 
    7181* Overview of Pugs source tree in `lib/pugs/hack.pod` 
    72 * Overview of Rules bootstrapping plan in `/docs/other/rules_bootstrap` 
     82* Overview of Rules bootstrapping plan in `docs/other/rules_bootstrap` 
    7383* Some new tests; several tests refactored; we now have 7600+ tests 
    7484* Unit manipulation and conversion examples in `units.p6` 
  • src/Emit/PIR.hs

    r4873 r4874  
    193193    where 
    194194    quote :: Char -> String 
    195     quote '\'' = "\\'" 
    196195    quote '\\' = "\\\\" 
    197196    quote x = [x] 
     
    486485      ] --> [rv] 
    487486 
    488 {-| Wrapper for a opcode which accepts and returns an @I@ register. -} 
     487{-| Wrapper for an opcode which accepts and returns an @I@ register. -} 
    489488vop1ii :: SubName -> PrimName -> Decl 
    490489vop1ii p6name opname = vop1x p6name opname tempINT tempINT 
    491 {-| Wrapper for a opcode which accepts and returns a @N@ register. -} 
     490{-| Wrapper for an opcode which accepts and returns a @N@ register. -} 
    492491vop1nn :: SubName -> PrimName -> Decl 
    493492vop1nn p6name opname = vop1x p6name opname tempNUM tempNUM 
    494 {-| Wrapper for a opcode which accepts and returns a @S@ register. -} 
     493{-| Wrapper for an opcode which accepts and returns a @S@ register. -} 
    495494vop1ss :: SubName -> PrimName -> Decl 
    496495vop1ss p6name opname = vop1x p6name opname tempSTR tempSTR 
    497 {-| Wrapper for a opcode which returns a @S@ register and accepts a @I@ register. -} 
     496{-| Wrapper for an opcode which returns a @S@ register and accepts a @I@ register. -} 
    498497vop1si :: SubName -> PrimName -> Decl 
    499498vop1si p6name opname = vop1x p6name opname tempSTR tempINT 
    500 {-| Wrapper for a opcode which returns a @I@ register and accepts a @S@ register. -} 
     499{-| Wrapper for an opcode which returns a @I@ register and accepts a @S@ register. -} 
    501500vop1is :: SubName -> PrimName -> Decl 
    502501vop1is p6name opname = vop1x p6name opname tempINT tempSTR 
    503 {-| Wrapper for a opcode which returns a @I@ register and accepts a @P@ register. -} 
     502{-| Wrapper for an opcode which returns a @I@ register and accepts a @P@ register. -} 
    504503vop1ip :: SubName -> PrimName -> Decl 
    505504vop1ip p6name opname = vop1x p6name opname tempINT tempPMC 
    506505 
    507 {-| Wrapper for a opcode which accepts and returns @I@ registers. -} 
     506{-| Wrapper for an opcode which accepts and returns @I@ registers. -} 
    508507vop2iii :: SubName -> PrimName -> Decl 
    509508vop2iii p6name opname = vop2x p6name opname tempINT tempINT tempINT2  
    510 {-| Wrapper for a opcode which accepts and returns @N@ registers. -} 
     509{-| Wrapper for an opcode which accepts and returns @N@ registers. -} 
    511510vop2nnn :: SubName -> PrimName -> Decl 
    512511vop2nnn p6name opname = vop2x p6name opname tempNUM tempNUM tempNUM2  
    513 {-| Wrapper for a opcode which accepts two @S@ registers and returns a native 
     512{-| Wrapper for an opcode which accepts two @S@ registers and returns a native 
    514513    integer (@I@ register). -} 
    515514vop2iss :: SubName -> PrimName -> Decl 
  • src/Pugs/Compile/PIR.hs

    r4873 r4874  
    11{-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans -funbox-strict-fields -fallow-undecidable-instances -cpp #-} 
     2 
     3{-| 
     4    This module provides 'genPIR', a function which compiles the current 
     5    environment to PIR code. 
     6 
     7    The general plan is to first compile the environment (subroutines, 
     8    statements, etc.) to an abstract syntax tree ('PIL' -- Pugs Intermediate 
     9    Representation) using the 'compile' function and 'Compile' class, and then 
     10    translate the PIL to a data structure of type 'PIR' using the 'trans' 
     11    function and 'Translate' class. This data structure is then reduced to 
     12    final PIR code by "Emit.PIR". 
     13-} 
    214 
    315module Pugs.Compile.PIR (genPIR) where