Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4138872

class file contents differs slightly on solaris JDK

XMLWordPrintable

    • sparc
    • solaris_2.5.1



      Name: laC46010 Date: 05/15/98



      APIChangeTest has found some little inconsistency
      between class files on win32 and solaris of JDK 1.1.x
      APIChangeTest (in maintenance mode) reports that there are ~200
      classes in win32 version of JDK1.1.x which have ACC_SUPER flag
      set but the flag is not set for the same classes in solaris version
      of the same JDK version. If the classes are disassembled we can see
      that method codes are also different (see for example java.lang.Float).
      It can't make any big troubles of course and are caused possibly
      by differences in makefiles used to build JDK1.1.x on win32 and solaris.
      Particularly some of the solaris classes are compiled under -O option
      and as result javac produces different (more optimized) code on solaris
      compared with win32. It's already fixed in JDK1.2 but not in JDK1.1.x
      Maybe it make sence to fix that inconsistency in 1.1.7 too.


      /tmp_64 diff Float.solaris.jasm Float.win32.jasm
      3c3
      < public final class Float
      ---
      > super public final class Float
      96c96
      < stack 5 locals 3
      ---
      > stack 2 locals 2
      99,100d98
      < new class Float;
      < dup;
      102,106c100,101
      < invokestatic Method Double.valueOf0:"(Ljava/lang/String;)D";
      < invokespecial Method "<init>":"(D)V";
      < astore_2;
      < aload_2;
      < getfield Field value:"F";
      ---
      > invokestatic Method valueOf:"(Ljava/lang/String;)Ljava/lang/Float;";
      > invokevirtual Method floatValue:"()F";
      112c107
      < stack 2 locals 2
      ---
      > stack 1 locals 1
      116,121c111
      < fstore_1;
      < fload_1;
      < fload_1;
      < fcmpl;
      < ifne L13;
      < iconst_0;
      ---
      > invokestatic Method isNaN:"(F)Z";
      123,124d112
      < L13: iconst_1;
      < ireturn;
      128c116
      < stack 2 locals 2
      ---
      > stack 1 locals 1
      132,141c120
      < fstore_1;
      < fload_1;
      < ldc float Infinity;
      < fcmpl;
      < ifeq L21;
      < fload_1;
      < ldc float -Infinity;
      < fcmpl;
      < ifeq L21;
      < iconst_0;
      ---
      > invokestatic Method isInfinite:"(F)Z";
      143,144d121
      < L21: iconst_1;
      < ireturn;
      148c125
      < stack 3 locals 2
      ---
      > stack 1 locals 1
      152,157c129
      < fstore_1;
      < new class FloatingDecimal;
      < dup;
      < fload_1;
      < invokespecial Method FloatingDecimal."<init>":"(F)V";
      < invokevirtual Method FloatingDecimal.toJavaFormatString:"()Ljava/lang/String;";
      ---
      > invokestatic Method String.valueOf:"(F)Ljava/lang/String;";


      Hook 5(hook5):
      ======================================================================

            Unassigned Unassigned
            leosunw Leo Leo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: