[Nice-commit] Nice/src/bossa/syntax MethodDeclaration.java,1.60,1.61 FormalParameters.java,1.39,1.40
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-06-24 08:11:20
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20546/src/bossa/syntax Modified Files: MethodDeclaration.java FormalParameters.java Log Message: In compiled packages, only call typecheck on parameters when they have default values, to save on loading time. Index: FormalParameters.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/FormalParameters.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** FormalParameters.java 23 Jun 2004 19:38:09 -0000 1.39 --- FormalParameters.java 24 Jun 2004 08:11:10 -0000 1.40 *************** *** 317,320 **** --- 317,329 ---- } + boolean hasDefaultValue() + { + for (int i = size; --i>=0; ) + if (parameters[i].value() != null) + return true; + + return false; + } + /**************************************************************** * Walk methods, used in NiceMethod.create Index: MethodDeclaration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodDeclaration.java,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** MethodDeclaration.java 23 Jun 2004 19:38:09 -0000 1.60 --- MethodDeclaration.java 24 Jun 2004 08:11:09 -0000 1.61 *************** *** 133,137 **** ****************************************************************/ ! /** This is called in a pass before typechecking itself. This is important, to typecheck and disambiguate the default values --- 133,137 ---- ****************************************************************/ ! /** This is called in a pass before typechecking itself. This is important, to typecheck and disambiguate the default values *************** *** 140,143 **** --- 140,146 ---- void typedResolve() { + if (module.interfaceFile() && ! parameters.hasDefaultValue()) + return; + if (!Constraint.hasBinders(type.getConstraint())) { |