Show
Ignore:
Timestamp:
08/14/05 17:32:14 (3 years ago)
Author:
autrijus
svk:copy_cache_prev:
8452
Message:

* -CBinary - dump PIL1 tree as opaque GhcBinary? file for fast loading.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/CodeGen/PIR.hs

    r6229 r6248  
    1919import Pugs.Types 
    2020import Pugs.Eval.Var 
     21import Pugs.PIL1 
    2122import Emit.PIR 
    2223import Pugs.Pretty 
     
    338339    local (\env -> env{ envDebug = Nothing }) $ do 
    339340        opEval style "<prelude-pir>" preludeStr 
    340     glob        <- askGlobal 
    341     main        <- asks envBody 
    342     globPIL     <- compile glob 
    343     mainPIL     <- compile main 
    344     globPIR     <- runCodeGenGlob tenv globPIL 
    345     mainPIR     <- runCodeGenMain tenv mainPIL 
     341    penv        <- compile () 
     342    globPIR     <- runCodeGenGlob tenv (pilGlob penv) 
     343    mainPIR     <- runCodeGenMain tenv (pilMain penv) 
    346344    libs        <- liftIO $ getLibs 
    347345    return . VStr . unlines $ 
     
    385383            , InsNew tempPMC PerlScalar 
    386384            , "store_global"    .- [lit "$_", tempPMC] 
    387             ]) ++ [ StmtRaw (text (name ++ "()")) | PSub name@('_':'_':_) _ _ _ <- globPIL] ++ 
     385            ]) ++ [ StmtRaw (text (name ++ "()")) | PSub name@('_':'_':_) _ _ _ <- pilGlob penv ] ++ 
    388386            [ StmtRaw (text "main()") 
    389387            , StmtIns $ tempPMC  <-- "find_global" $ [lit "Perl6::Internals", lit "&exit"]