Changeset 12678 for src/Pugs/Eval

Show
Ignore:
Timestamp:
08/25/06 03:32:36 (2 years ago)
Author:
audreyt
Message:

* Eval.Var: Simple array/hash variables as function arguments

should gets their size in lvalue, not rvalue, context, such
that huge array/hash sizes won't cause heap overflow.
Reported by: cmarcelo++

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Eval/Var.hs

    r12483 r12678  
    284284    argSlurpLen (Val val) = valSlurpLen val 
    285285    argSlurpLen (Var name) = do 
    286         val <- evalExp (Var name) 
     286        val <- enterLValue $ evalExp (Var name) 
    287287        valSlurpLen val 
    288288    argSlurpLen (Syn "," list) =  return $ length list