Changeset 4876 for src/Pugs/Compile

Show
Ignore:
Timestamp:
06/20/05 19:23:02 (3 years ago)
Author:
autrijus
svk:copy_cache_prev:
6641
Message:

* loop and bare blocks at value position now Really Works (tm).

Files:
1 modified

Legend:

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

    r4875 r4876  
    335335    compile (Cxt cxt rest) = enter cxt $ compile rest 
    336336    compile (Var name) = return . PExp $ PVar name 
     337    compile exp@(Val (VCode _)) = compile (Syn "sub" [exp]) 
    337338    compile (Val val) = fmap PLit (compile val) 
    338339    compile Noop = compile (Val undef) 
     
    436437    trans (PApp _ exp@(PBlock _) []) = do 
    437438        blockC  <- trans exp 
    438         [appC] <- genLabel ["invokeBlock"] 
    439         tell $ map StmtIns $ callBlock appC blockC  
     439        tellIns $ [reg tempPMC] <-& blockC $ [] 
    440440        return tempPMC 
    441441    trans (PApp (TCxtLValue _) (PExp (PVar "&postcircumfix:[]")) [(PExp lhs), rhs]) = do