From: Finn B. <bc...@us...> - 2001-10-06 20:18:16
|
Update of /cvsroot/jython/jython/org/python/compiler In directory usw-pr-cvs1:/tmp/cvs-serv5933 Modified Files: CodeCompiler.java Log Message: try_stmt(): Don't add a "goto handler" if the try suite always contain a return. This is added because MS jview silently aborts if the method contains a goto after a return. With this fix we might be able to use jview together with jythonc. Index: CodeCompiler.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/compiler/CodeCompiler.java,v retrieving revision 2.19 retrieving revision 2.20 diff -C2 -d -r2.19 -r2.20 *** CodeCompiler.java 2001/08/19 15:20:00 2.19 --- CodeCompiler.java 2001/10/06 20:18:13 2.20 *************** *** 1143,1149 **** start.setPosition(); //Do suite ! node.getChild(0).visit(this); end.setPosition(); ! code.goto_(handler_end); handler_start.setPosition(); --- 1143,1151 ---- start.setPosition(); //Do suite ! Object exit = node.getChild(0).visit(this); ! //System.out.println("exit: "+exit+", "+n+", "+(exit != null)); end.setPosition(); ! if (exit == null) ! code.goto_(handler_end); handler_start.setPosition(); |