Changeset 12871 for src/Pugs/Eval
- Timestamp:
- 08/30/06 08:14:32 (2 years ago)
- svk:copy_cache_prev:
- 19311
- Files:
-
- 1 modified
-
src/Pugs/Eval/Var.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Eval/Var.hs
r12800 r12871 158 158 -> [Exp] -- ^ Other arguments 159 159 -> Eval (Either FindSubFailure VCode) 160 findSub _var _invs _args = case _invs of 161 Nothing -> findBuiltinSub NoMatchingMulti _var 162 _ | not (isQualifiedVar _var) -> case unwrap _inv of 160 findSub _var _invs _args 161 | Nothing <- _invs = do 162 findBuiltinSub NoMatchingMulti _var 163 | not (isQualifiedVar _var) = case unwrap _inv of 163 164 Val vv@VV{} -> withExternalCall callMethodVV vv 164 165 Val sv@PerlSV{} -> withExternalCall callMethodPerl5 sv 165 166 inv' -> do 166 167 typ <- evalInvType inv' 167 findTypedSub (cast typ) _var 168 | Just var' <- dropVarPkg _SUPER _var -> do 168 if typ == mkType "Scalar::Perl5" 169 then evalExp inv' >>= withExternalCall callMethodPerl5 170 else findTypedSub (cast typ) _var 171 | Just var' <- dropVarPkg _SUPER _var = do 169 172 pkg <- asks envPackage 170 173 findSuperSub pkg var' 171 | otherwise ->do174 | otherwise = do 172 175 findBuiltinSub NoMatchingMulti _var 173 176 where … … 242 245 namSVs <- fmap concat (fromVals named) 243 246 let svs = posSVs ++ namSVs 244 found <- liftIO $ canPerl5 sv name 245 found' <- liftIO $ if found 246 then return found 247 else canPerl5 sv (__"AUTOLOAD") 248 if not found' 247 found <- liftIO $ do 248 rv <- canPerl5 sv name 249 if rv then return rv else canPerl5 sv (__"AUTOLOAD") 250 if not found 249 251 then do 250 252 -- XXX - when svs is empty, this could call back here infinitely
