Changeset 10848 for src/Pugs/CodeGen
- Timestamp:
- 06/23/06 15:05:56 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/CodeGen/PIR.hs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/CodeGen/PIR.hs
r10662 r10848 398 398 , StmtIns $ "invokecc" .- [tempPMC] 399 399 ] 400 , DeclSub "main" [SubANON] (concatMap vivifySub globPIR ++ mainPIR) ] 400 -- , DeclSub "main" [SubANON] (concatMap vivifySub globPIR ++ mainPIR) ] 401 ] 401 402 , emit globPIR ] ] 402 403 -- XXX - This is TOTALLY UNNECCESSARY for Parrot 0.4.2 and later.404 vivifySub :: Decl -> [Stmt]405 vivifySub (DeclNS "main" decls) = concatMap vivifySub decls406 vivifySub (DeclSub name@('&':c:_') [SubOUTER "main"] _)407 | c /= '*'408 = map StmtIns409 [ tempPMC <-- "find_name" $ [lit name]410 , tempPMC <-- "newclosure" $ [tempPMC]411 , "store_global" .- [lit "main", lit name, tempPMC]412 ]413 vivifySub _ = []414 403 415 404 genPIRWith :: ([Decl] -> [Stmt] -> PIL_Environment -> Eval a) -> Eval a
