[Nice-commit] Nice/stdlib/nice/lang/inline Assert.java,1.8,1.9
Brought to you by:
bonniot
|
From: Artem Gr K. <ar...@us...> - 2005-04-09 20:59:49
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang/inline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12826/stdlib/nice/lang/inline Modified Files: Assert.java Log Message: Allow Object to be used for assertion message. Index: Assert.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/inline/Assert.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Assert.java 1 Feb 2005 23:01:35 -0000 1.8 --- Assert.java 9 Apr 2005 20:59:12 -0000 1.9 *************** *** 82,86 **** { args[1].compile(comp, Target.pushObject); ! code.emitInvokeSpecial(errorInitString); } --- 82,88 ---- { args[1].compile(comp, Target.pushObject); ! Method init = args[1].getType().getName().equals(Type.string_type.getName()) ! ? errorInitString : errorInitObject; ! code.emitInvokeSpecial(init); } *************** *** 94,98 **** errorClass = ClassType.make("nice.lang.AssertionFailed"); ! private static Method errorInit, errorInitString; private static void prepare() --- 96,100 ---- errorClass = ClassType.make("nice.lang.AssertionFailed"); ! private static Method errorInit, errorInitString, errorInitObject; private static void prepare() *************** *** 105,108 **** --- 107,112 ---- errorInitString = errorClass.addMethod ("<init>", Access.PUBLIC, new Type[]{Type.string_type}, Type.void_type); + errorInitObject = errorClass.addMethod + ("<init>", Access.PUBLIC, new Type[]{Type.pointer_type}, Type.void_type); } |