db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r160580 - incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java
Date Fri, 08 Apr 2005 18:34:58 GMT
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++));
 	}
 
 



Mime
View raw message