Mercurial > projects > ddmd
diff dmd/FuncDeclaration.d @ 107:d8f19d85fadb
changes from interpret.c
author | Trass3r |
---|---|
date | Tue, 31 Aug 2010 18:18:31 +0200 |
parents | 5c859d5fbe27 |
children | 12c0c84d13fd |
line wrap: on
line diff
--- a/dmd/FuncDeclaration.d Tue Aug 31 16:22:22 2010 +0200 +++ b/dmd/FuncDeclaration.d Tue Aug 31 18:18:31 2010 +0200 @@ -2339,13 +2339,28 @@ } if (global.errors) return null; +version(DMDV1) +{ if (ident == Id.aaLen) return interpret_aaLen(istate, arguments); else if (ident == Id.aaKeys) return interpret_aaKeys(istate, arguments); else if (ident == Id.aaValues) return interpret_aaValues(istate, arguments); - +} +else version(DMDV2) +{ + if (thisarg && (!arguments || arguments.dim == 0)) + { + if (ident == Id.length) + return interpret_length(istate, thisarg); + else if (ident == Id.keys) + return interpret_keys(istate, thisarg, this); + else if (ident == Id.values) + return interpret_values(istate, thisarg, this); + } +} + if (cantInterpret || semanticRun == 3) return null;