Changeset 6248 for src/Pugs/CodeGen/PIR.hs
- Timestamp:
- 08/14/05 17:32:14 (3 years ago)
- svk:copy_cache_prev:
- 8452
- Files:
-
- 1 modified
-
src/Pugs/CodeGen/PIR.hs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/CodeGen/PIR.hs
r6229 r6248 19 19 import Pugs.Types 20 20 import Pugs.Eval.Var 21 import Pugs.PIL1 21 22 import Emit.PIR 22 23 import Pugs.Pretty … … 338 339 local (\env -> env{ envDebug = Nothing }) $ do 339 340 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) 346 344 libs <- liftIO $ getLibs 347 345 return . VStr . unlines $ … … 385 383 , InsNew tempPMC PerlScalar 386 384 , "store_global" .- [lit "$_", tempPMC] 387 ]) ++ [ StmtRaw (text (name ++ "()")) | PSub name@('_':'_':_) _ _ _ <- globPIL] ++385 ]) ++ [ StmtRaw (text (name ++ "()")) | PSub name@('_':'_':_) _ _ _ <- pilGlob penv ] ++ 388 386 [ StmtRaw (text "main()") 389 387 , StmtIns $ tempPMC <-- "find_global" $ [lit "Perl6::Internals", lit "&exit"]
