Changeset 4875
- Timestamp:
- 06/20/05 19:08:03 (4 years ago)
- svk:copy_cache_prev:
- 6641
- Files:
-
- 1 modified
-
src/Pugs/Compile/PIR.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Compile/PIR.hs
r4874 r4875 344 344 -- XXX I'd like to lambda lift... :-/ 345 345 _ <- askTCxt 346 bodyC <- compile (subBody sub) 346 bodyC <- compile $ case subBody sub of 347 Syn "block" [exp] -> exp 348 exp -> exp 347 349 return $ PBlock bodyC 348 350 compile (Syn "for" _) = compile Noop -- XXX TODO … … 473 475 [begC, endC] <- genLabel ["blockBegin", "blockEnd"] 474 476 this <- genPMC "block" 475 tellIns $ "newsub" .- [reg this, bare ".C ontinuation", bare begC]477 tellIns $ "newsub" .- [reg this, bare ".Closure", bare begC] 476 478 tellIns $ "goto" .- [bare endC] 477 479 tellLabel begC 478 cc <- genPMC "cc"479 fetchCC cc (reg this)480 480 trans body -- XXX - consistency check 481 481 bodyC <- lastPMC 482 tellIns $ if parrotBrokenXXX 483 then "store_global" .- [tempSTR, bodyC] -- XXX HACK 484 else "set_args" .- [lit "(0b10)", bodyC] 485 -- tellIns $ "invoke" .- [reg cc] 482 tellIns $ "set_returns" .- retSigList [bodyC] 483 tellIns $ "returncc" .- [] 486 484 tellLabel endC 487 485 return (ExpLV this)
