[Nice-commit] Nice/stdlib/nice/lang/inline ReferenceOp.java,1.6,1.7
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-09-15 18:16:37
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang/inline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2097/F:/nice/stdlib/nice/lang/inline Modified Files: ReferenceOp.java Log Message: Optimization for codegeneration of NotNullPattern on primitives. Index: ReferenceOp.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/inline/ReferenceOp.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ReferenceOp.java 3 Aug 2004 14:36:06 -0000 1.6 --- ReferenceOp.java 15 Sep 2004 18:16:27 -0000 1.7 *************** *** 101,104 **** --- 101,112 ---- ((QuoteExp)args[0]).getType() == Type.nullType) { + if (args[1].getType() instanceof PrimType) + { + if (kind == Ne) + code.emitGoto(to); + + return; + } + args[1].compile(comp, stack); if (kind == Eq) *************** *** 111,114 **** --- 119,130 ---- ((QuoteExp)args[1]).getType() == Type.nullType) { + if (args[0].getType() instanceof PrimType) + { + if (kind == Ne) + code.emitGoto(to); + + return; + } + args[0].compile(comp, stack); if (kind == Eq) *************** *** 138,141 **** --- 154,165 ---- ((QuoteExp)args[0]).getType() == Type.nullType) { + if (args[1].getType() instanceof PrimType) + { + if (kind == Eq) + code.emitGoto(to); + + return; + } + args[1].compile(comp, stack); if (kind == Eq) *************** *** 148,151 **** --- 172,183 ---- ((QuoteExp)args[1]).getType() == Type.nullType) { + if (args[0].getType() instanceof PrimType) + { + if (kind == Eq) + code.emitGoto(to); + + return; + } + args[0].compile(comp, stack); if (kind == Eq) |