You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2005/04/08 20:34:58 UTC

svn commit: r160580 - incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java

Author: djd
Date: Fri Apr  8 11:34:57 2005
New Revision: 160580

URL: http://svn.apache.org/viewcvs?view=rev&rev=160580
Log:
Derby-176 (partial)
Change generate fields to use the same name space as
generated methods to reduce the number of constant pool entries created.

Modified:
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java?view=diff&r1=160579&r2=160580
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java Fri Apr  8 11:34:57 2005
@@ -853,12 +853,16 @@
 
 	/**
 	 * generated the next field name available.
-	 * these are of the form 'f#', where # is
+	 * these are of the form 'e#', where # is
 	 * incremented each time.
+	 * This shares the name space with the expression methods
+	 * as Java allows names and fields to have the same name.
+	 * This reduces the number of constant pool entries created
+	 * for a generated class file.
 	 */
 	private String newFieldName()
 	{
-		return "f".concat(Integer.toString(nextFieldNum++));
+		return "e".concat(Integer.toString(nextFieldNum++));
 	}