[Nice-commit] Nice/src/bossa/syntax analyse.nice,1.85,1.86
Brought to you by:
bonniot
From: <bo...@us...> - 2003-11-24 16:50:28
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv28379/src/bossa/syntax Modified Files: analyse.nice Log Message: Removed some casts, since the compiler is now more clever about instanceof. Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** analyse.nice 18 Oct 2003 22:50:55 -0000 1.85 --- analyse.nice 24 Nov 2003 16:50:24 -0000 1.86 *************** *** 416,424 **** if (sym instanceof Block.LocalVariable.Symbol) { - Block.LocalVariable.Symbol s = cast(sym); if (assigned) ! setInitialized(s, info, e.location()); else ! checkInitialized(s, info, e.location()); } return new SymbolExp(sym, e.location()); --- 416,423 ---- if (sym instanceof Block.LocalVariable.Symbol) { if (assigned) ! setInitialized(sym, info, e.location()); else ! checkInitialized(sym, info, e.location()); } return new SymbolExp(sym, e.location()); *************** *** 441,451 **** if (sym instanceof FormalParameters.Parameter.Symbol) { ! FormalParameters.Parameter.Symbol s = cast(sym); ! int state = s.getState(); if (state == 0/*XXX: FormalParameters.Parameter.Symbol.NOT_ACCESSIBLE*/) throw error(e, "Parameter " + e + " is not accessible"); if (state == 1/*XXX: FormalParameters.Parameter.Symbol.ARGUMENT_REFERENCE*/) ! return new FormalParameters.Parameter.AccessExp(s, e.location()); // Otherwise, we are in the normal case. } --- 440,449 ---- if (sym instanceof FormalParameters.Parameter.Symbol) { ! int state = sym.getState(); if (state == 0/*XXX: FormalParameters.Parameter.Symbol.NOT_ACCESSIBLE*/) throw error(e, "Parameter " + e + " is not accessible"); if (state == 1/*XXX: FormalParameters.Parameter.Symbol.ARGUMENT_REFERENCE*/) ! return new FormalParameters.Parameter.AccessExp(sym, e.location()); // Otherwise, we are in the normal case. } |