Changeset 6801 for src/Pugs/CodeGen/PIR.hs
- Timestamp:
- 09/06/05 17:00:17 (3 years ago)
- Files:
-
- 1 modified
-
src/Pugs/CodeGen/PIR.hs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/CodeGen/PIR.hs
r6424 r6801 106 106 tellLabel endL 107 107 return (ExpLV this) 108 trans (PCode styp params _ body) = do108 trans (PCode styp params _ _ body) = do 109 109 [begL, endL] <- genLabel ["blockBegin", "blockEnd"] 110 110 this <- genPMC "block" … … 126 126 127 127 instance Translate PIL_Decl Decl where 128 trans (PSub name styp params lvalue body) | Just (pkg, name') <- isQualified name = do129 declC <- trans $ PSub name' styp params lvalue body128 trans (PSub name styp params lvalue ismulti body) | Just (pkg, name') <- isQualified name = do 129 declC <- trans $ PSub name' styp params lvalue ismulti body 130 130 return $ DeclNS pkg [declC] 131 trans (PSub name styp params _ body) = do131 trans (PSub name styp params _ _ body) = do 132 132 (_, stmts) <- listen $ do 133 133 let prms = map tpParam params … … 186 186 tellIns $ lhsC <:= rhsC 187 187 return lhsC 188 trans (PApp _ exp@(PCode _ _ _ _ ) Nothing []) = do188 trans (PApp _ exp@(PCode _ _ _ _ _) Nothing []) = do 189 189 blockC <- trans exp 190 190 tellIns $ [reg tempPMC] <-& blockC $ [] … … 383 383 , InsNew tempPMC PerlScalar 384 384 , "store_global" .- [lit "$_", tempPMC] 385 ]) ++ [ StmtRaw (text (name ++ "()")) | PSub name@('_':'_':_) _ _ _ _ <- pilGlob penv ] ++385 ]) ++ [ StmtRaw (text (name ++ "()")) | PSub name@('_':'_':_) _ _ _ _ _ <- pilGlob penv ] ++ 386 386 [ StmtRaw (text "main()") 387 387 , StmtIns $ tempPMC <-- "find_global" $ [lit "Perl6::Internals", lit "&exit"]
