Changeset 4874
- Timestamp:
- 06/20/05 18:55:05 (4 years ago)
- svk:copy_cache_prev:
- 6641
- Files:
-
- 3 modified
-
ChangeLog (modified) (4 diffs)
-
src/Emit/PIR.hs (modified) (2 diffs)
-
src/Pugs/Compile/PIR.hs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r4854 r4874 3 3 === Pugs Internals 4 4 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) 7 7 ** ... 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` 11 15 12 16 === Bundled Modules … … 19 23 === Test, Examples and Documentations 20 24 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 23 28 and populated 24 * Examples of built-in type methods in `examples/vmethods/`25 * low level sanity tests in `t/01-sanity/` for the Pugscode emitter26 * 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 beingadded 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/` 30 35 31 36 === Bug Fixes … … 33 38 * `(42).kv` will now die and `(42,).kv` will work 34 39 * `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` 36 46 37 47 == Changes for 6.2.7 (r4612) - June 13, 2005 … … 70 80 * Haskell Workshop paper on Pugs in `docs/talks/hw2005.tex` 71 81 * 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` 73 83 * Some new tests; several tests refactored; we now have 7600+ tests 74 84 * Unit manipulation and conversion examples in `units.p6` -
src/Emit/PIR.hs
r4873 r4874 193 193 where 194 194 quote :: Char -> String 195 quote '\'' = "\\'"196 195 quote '\\' = "\\\\" 197 196 quote x = [x] … … 486 485 ] --> [rv] 487 486 488 {-| Wrapper for a opcode which accepts and returns an @I@ register. -}487 {-| Wrapper for an opcode which accepts and returns an @I@ register. -} 489 488 vop1ii :: SubName -> PrimName -> Decl 490 489 vop1ii 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. -} 492 491 vop1nn :: SubName -> PrimName -> Decl 493 492 vop1nn 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. -} 495 494 vop1ss :: SubName -> PrimName -> Decl 496 495 vop1ss 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. -} 498 497 vop1si :: SubName -> PrimName -> Decl 499 498 vop1si 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. -} 501 500 vop1is :: SubName -> PrimName -> Decl 502 501 vop1is 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. -} 504 503 vop1ip :: SubName -> PrimName -> Decl 505 504 vop1ip p6name opname = vop1x p6name opname tempINT tempPMC 506 505 507 {-| Wrapper for a opcode which accepts and returns @I@ registers. -}506 {-| Wrapper for an opcode which accepts and returns @I@ registers. -} 508 507 vop2iii :: SubName -> PrimName -> Decl 509 508 vop2iii 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. -} 511 510 vop2nnn :: SubName -> PrimName -> Decl 512 511 vop2nnn p6name opname = vop2x p6name opname tempNUM tempNUM tempNUM2 513 {-| Wrapper for a opcode which accepts two @S@ registers and returns a native512 {-| Wrapper for an opcode which accepts two @S@ registers and returns a native 514 513 integer (@I@ register). -} 515 514 vop2iss :: SubName -> PrimName -> Decl -
src/Pugs/Compile/PIR.hs
r4873 r4874 1 1 {-# 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 -} 2 14 3 15 module Pugs.Compile.PIR (genPIR) where
