[Nice-commit] Nice/src/bossa/syntax compilation.nice,1.7,1.8
Brought to you by:
bonniot
|
From: Daniel B. <bo...@us...> - 2005-03-26 15:33:10
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11173/src/bossa/syntax Modified Files: compilation.nice Log Message: Exit the JVM with exit code 1 when the main program finishes with an uncaught exception. Index: compilation.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/compilation.nice,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** compilation.nice 25 Mar 2005 16:40:00 -0000 1.7 --- compilation.nice 26 Mar 2005 15:33:02 -0000 1.8 *************** *** 84,95 **** res.setCatchClauses(c); ! gnu.bytecode.Method print = gnu.bytecode.ClassType.make("nice.lang.dispatch"). ! addMethod("printStackTraceWithSourceInfo", gnu.bytecode.Access.PUBLIC | gnu.bytecode.Access.STATIC, [cast(gnu.bytecode.Type.throwable_type)], gnu.bytecode.Type.void_type); ! c.setBody(new gnu.expr.ApplyExp(new gnu.expr.PrimProcedure(print), ! [new gnu.expr.ReferenceExp(c.getDeclaration())])); return res; --- 84,102 ---- res.setCatchClauses(c); ! let print = gnu.bytecode.ClassType.make("nice.lang.dispatch"). ! addMethod("printStackTraceWithSourceInfo", gnu.bytecode.Access.PUBLIC | gnu.bytecode.Access.STATIC, [cast(gnu.bytecode.Type.throwable_type)], gnu.bytecode.Type.void_type); ! let exit = gnu.bytecode.ClassType.make("java.lang.System"). ! getDeclaredMethod("exit", 1); ! ! c.setBody(new gnu.expr.BeginExp ! ([new gnu.expr.ApplyExp(print, ! [new gnu.expr.ReferenceExp(c.getDeclaration())]), ! new gnu.expr.ApplyExp(exit, ! [new gnu.expr.QuoteExp(new Integer(1))]) ! ])); return res; |