You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2009/01/09 11:45:06 UTC
svn commit: r733004 -
/harmony/enhanced/buildtest/trunk/tests/tools/vmtt/src/org/apache/harmony/vmtt/ccode/DefaultCodeFileParser.java
Author: tellison
Date: Fri Jan 9 02:45:05 2009
New Revision: 733004
URL: http://svn.apache.org/viewvc?rev=733004&view=rev
Log:
Apply patch for HARMONY-6069 ([drlvm][testing] VMTT compiles floats and longs incorrectly in constant pool)
Modified:
harmony/enhanced/buildtest/trunk/tests/tools/vmtt/src/org/apache/harmony/vmtt/ccode/DefaultCodeFileParser.java
Modified: harmony/enhanced/buildtest/trunk/tests/tools/vmtt/src/org/apache/harmony/vmtt/ccode/DefaultCodeFileParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/trunk/tests/tools/vmtt/src/org/apache/harmony/vmtt/ccode/DefaultCodeFileParser.java?rev=733004&r1=733003&r2=733004&view=diff
==============================================================================
--- harmony/enhanced/buildtest/trunk/tests/tools/vmtt/src/org/apache/harmony/vmtt/ccode/DefaultCodeFileParser.java (original)
+++ harmony/enhanced/buildtest/trunk/tests/tools/vmtt/src/org/apache/harmony/vmtt/ccode/DefaultCodeFileParser.java Fri Jan 9 02:45:05 2009
@@ -358,7 +358,11 @@
protected ConstantNum32 parseConstant_Num32(byte tag)
throws IOException, CodeFileFormatException, NumberFormatException {
-
+ if(tag==CPTags.CONSTANT_Float) {
+ ConstantNum32 c = new ConstantNum32(tag);
+ c.setBytes(Float.floatToIntBits(parseNumber().floatValue()));
+ return c;
+ }
ConstantNum32 c = new ConstantNum32(tag);
c.setBytes(parseNumber().intValue());
return c;
@@ -368,7 +372,12 @@
throws IOException, CodeFileFormatException, NumberFormatException {
ConstantNum64 c = new ConstantNum64(tag);
- long l = Double.doubleToLongBits(parseNumber().doubleValue());
+ long l = 0L;
+ if(tag==CPTags.CONSTANT_Long) {
+ l = parseNumber().longValue();
+ } else {
+ l = Double.doubleToLongBits(parseNumber().doubleValue());
+ }
c.setLowBytes((int) l);
c.setHighBytes((int) (l >> 32));
return c;