[Nice-commit] Nice/src/bossa/modules Package.java,1.113,1.114
Brought to you by:
bonniot
From: <bo...@us...> - 2004-03-05 14:21:23
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4983/src/bossa/modules Modified Files: Package.java Log Message: Compile global variables lazily, so that all direct dependencies are handled correctly (not just one level of dependency). Index: Package.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** Package.java 25 Feb 2004 14:23:20 -0000 1.113 --- Package.java 5 Mar 2004 14:07:14 -0000 1.114 *************** *** 639,665 **** } ! public gnu.expr.Declaration addGlobalVar(String name, Type type, boolean constant) { - gnu.expr.Declaration declaration = new gnu.expr.Declaration(name, type); - if (!compiling()) // The code is already there { ! declaration.setSimple(false); ! declaration.field = source.getBytecode().getField(name); ! if (declaration.field == null) Internal.error(this, ! "The compiled file is not consistant with the interface file for global variable " + name); } else { ! getImplementationClass().addDeclaration(declaration); ! if (constant) declaration.setFlag(Declaration.IS_CONSTANT); ! declaration.setFlag(Declaration.STATIC_SPECIFIED|Declaration.TYPE_SPECIFIED); } - - return declaration; } --- 639,662 ---- } ! public void addGlobalVar(gnu.expr.Declaration decl, ! boolean constant) { if (!compiling()) // The code is already there { ! decl.setSimple(false); ! decl.field = source.getBytecode().getField(decl.getName()); ! if (decl.field == null) Internal.error(this, ! "The compiled file is not consistant with the interface file for global variable " + decl.getName()); } else { ! getImplementationClass().addDeclaration(decl); ! if (constant) decl.setFlag(Declaration.IS_CONSTANT); ! decl.setFlag(Declaration.STATIC_SPECIFIED|Declaration.TYPE_SPECIFIED); } } |