Changeset 5646 for src/Pugs/CodeGen

Show
Ignore:
Timestamp:
07/17/05 21:22:32 (3 years ago)
Author:
iblech
svk:copy_cache_prev:
7648
Message:

* Pugs.Compile -- &infix:<>(foo, bar) is compiled as &infix:<>(foo,

PThunk(bar)) now.

* Pugs.CodeGen?.PIR -- So Pugs.CodeGen?.PIR doesn't have to do this change, as

Pugs.Compile does it now.

* Pugs.Parser -- Filtered out &infix:<,> from list of user-overridable subs, as

else even basic arglists use &infix:<,> if a &infix:<,> is defined (see
comment).

* PIL2JS: Prelude::JS -- Proper support for , &&, etc.
* PIL2JS: README -- Minor cleanup.

Files:
1 modified

Legend:

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

    r5644 r5646  
    123123            _           -> trans fun 
    124124        -} 
    125         argsC   <- if isLogicalLazy fun 
    126             then mapM trans (head args : map PThunk (tail args)) 
    127             else mapM trans args 
     125        argsC   <- mapM trans args 
    128126        -- XXX WORKAROUND PARROT BUG (see below) 
    129127        pmc     <- genLV "app" 
     
    142140                return pmc 
    143141        -} 
    144         where 
    145         -- XXX HACK 
    146         isLogicalLazy (PExp (PVar "&infix:or"))     = True 
    147         isLogicalLazy (PExp (PVar "&infix:and"))    = True 
    148         isLogicalLazy (PExp (PVar "&infix:||"))     = True 
    149         isLogicalLazy (PExp (PVar "&infix:&&"))     = True 
    150         isLogicalLazy _ = False 
    151142    trans (PPad SMy pad exps) = do 
    152143        valsC   <- mapM trans (map snd pad)