Show
Ignore:
Timestamp:
06/22/05 19:19:04 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
6641
Message:

* So much for not compromising... change the := ?? :: line

in Test.pm so it can work with PIR.

Files:
1 modified

Legend:

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

    r4909 r4911  
    182182instance Compile (SubName, VCode) [PIL Decl] where 
    183183    compile (name, vsub) | packageOf name /= packageOf (subName vsub) = do 
    184         let storeC  = PAssign [PVar $ qualify name] (PExp . PVar . qualify $ subName vsub) 
     184        let storeC  = PBind [PVar $ qualify name] (PExp . PVar . qualify $ subName vsub) 
    185185            bodyC   = PStmts (PStmt . PExp $ storeC) PNil 
    186186            exportL = "__export_" ++ (render $ varText name) 
     
    473473        tellIns $ lhsC <== rhsC 
    474474        return lhsC 
     475    trans (PBind [PVar name] rhs) 
     476        | Just (pkg, name') <- isQualified (qualify name) = do 
     477        rhsC    <- trans rhs 
     478        tellIns $ "store_global" .- [lit pkg, lit name', rhsC] 
     479        trans (PVar name) 
    475480    trans (PBind [lhs] rhs) = do 
    476481        lhsC    <- enter tcLValue $ trans lhs 
     
    498503            then mapM trans (head args : map PThunk (tail args)) 
    499504            else mapM trans args 
     505        -- XXX WORKAROUND PARROT BUG (see below) 
     506        pmc     <- genLV "app" 
     507        -- XXX - probe if funC is slurpy, then modify ExpLV pmc accordingly 
     508        tellIns $ [reg pmc] <-& funC $ argsC 
     509        return pmc 
     510        {- XXX PARROT BUG -- tailcall broken 
    500511        case cxt of 
    501512            TTailCall _ -> do 
     
    507518                tellIns $ [reg pmc] <-& funC $ argsC 
    508519                return pmc 
     520        -} 
    509521        where 
    510522        -- XXX HACK