Nice/stdlib/nice/lang/inline Assert.java,1.8,1.9
Artem Gr Kozarezov <[email protected]> Sat, 09 Apr 2005 20:59:14 +0000
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
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);
}
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click