PatchSet 17 
Date: 2003/10/28 17:01:15
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
New patches for KJC.

The former patch about method invokation wasn't completely clean. That one
corresponds to the KJC in kaffe's CVS.
The patch about inner class access fixes the global modifier of a generated
classfile concerning an inner class: if it has to contain ACC_PROTECTED (but
can't because of the spec) it is transformed in a ACC_PUBLIC for compatibility
with the JDK.

Members: 
        build.xml:1.9->1.10 
        patches/kjc-inner-access.diff:INITIAL->1.1 
        patches/kjc-method-call.diff:1.3->1.4 

Index: kaffe-extras/build.xml
diff -u kaffe-extras/build.xml:1.9 kaffe-extras/build.xml:1.10
--- kaffe-extras/build.xml:1.9  Sat Sep 27 12:26:39 2003
+++ kaffe-extras/build.xml      Tue Oct 28 17:01:15 2003
@@ -248,6 +248,9 @@
        <patch patchfile="${patches_dir}/kjc-method-call.diff"
                strip="1"
                dir="${kjcsuite_dir}"/>
+       <patch patchfile="${patches_dir}/kjc-inner-access.diff"
+               strip="1"
+               dir="${kjcsuite_dir}"/>
        <touch file="${kjcsuite_unpacked_stamp}"/>
   </target>
 
===================================================================
Checking out kaffe-extras/patches/kjc-inner-access.diff
RCS:  /home/cvs/kaffe/kaffe-extras/patches/kjc-inner-access.diff,v
VERS: 1.1
***************
--- /dev/null   Sun Aug  4 19:57:58 2002
+++ kaffe-extras/patches/kjc-inner-access.diff  Tue Oct 28 17:01:17 2003
@@ -0,0 +1,17 @@
+--- kjc-suite-2.1B.old/src/bytecode/classfile/ClassInfo.java   2003-09-28 
21:44:43.000000000 +0200
++++ kjc-suite-2.1B/src/bytecode/classfile/ClassInfo.java       2003-10-28 
17:40:27.000000000 +0100
+@@ -408,7 +408,13 @@
+     constantPool.write(out);
+ 
+     // Class hierarchy/access
+-    out.writeShort((getModifiers() | ACC_SUPER) & MODIFIER_MASK);
++    int top_modifiers;
++
++    top_modifiers = (getModifiers() | ACC_SUPER);
++    if ((top_modifiers & ACC_PROTECTED) != 0) {
++      top_modifiers |= ACC_PUBLIC;
++    }
++    out.writeShort(top_modifiers & MODIFIER_MASK);
+     out.writeShort(thisClass.getIndex());
+     out.writeShort(superClass == null ? 0 : superClass.getIndex());
+ 
Index: kaffe-extras/patches/kjc-method-call.diff
diff -u kaffe-extras/patches/kjc-method-call.diff:1.3 
kaffe-extras/patches/kjc-method-call.diff:1.4
--- kaffe-extras/patches/kjc-method-call.diff:1.3       Sun Sep 28 19:06:50 2003
+++ kaffe-extras/patches/kjc-method-call.diff   Tue Oct 28 17:01:16 2003
@@ -1,5 +1,5 @@
---- kjc-suite-2.1B/src/kjc/CMethod.java        2003-09-28 21:02:42.000000000 +0200
-+++ kjc-suite-2.1B.new/src/kjc/CMethod.java    2003-09-28 20:46:29.000000000 +0200
+--- kjc-suite-2.1B/src/kjc/CMethod.java        2003-09-28 21:43:46.000000000 +0200
++++ kjc-suite-2.1B.new/src/kjc/CMethod.java    2003-09-28 21:28:25.000000000 +0200
 @@ -550,6 +550,7 @@
    // ----------------------------------------------------------------------
    // CODE GENERATION
@@ -8,7 +8,7 @@
  
    /**
     * Generates a sequence of bytecode
-@@ -557,7 +558,25 @@
+@@ -557,16 +558,34 @@
     * @param   nonVirtual      force non-virtual dispatching
     */
    public void genCode(GenerationContext context, boolean nonVirtual) {
@@ -32,9 +32,11 @@
 +      throw new IllegalArgumentException(
 +      "prefixClass " + prefixClass + " doesn't descends from the owner " + owner + " 
of the method " + getIdent());
  
-     if (getOwner().isInterface()) {
+-    if (getOwner().isInterface()) {
++    if (prefixClass.isInterface()) {
        int             size = 0;
-@@ -566,7 +585,7 @@
+ 
+       for (int i = 0; i < parameters.length; i++) {
        size += parameters[i].getSize();
        }
  
@@ -52,7 +54,7 @@
                                     getIdent(),
                                     getSignature());
      }
---- kjc-suite-2.1B/src/kjc/JMethodCallExpression.java  2003-09-28 21:02:42.000000000 
+0200
+--- kjc-suite-2.1B/src/kjc/JMethodCallExpression.java  2003-09-28 21:43:46.000000000 
+0200
 +++ kjc-suite-2.1B.new/src/kjc/JMethodCallExpression.java      2003-09-28 
20:58:09.000000000 +0200
 @@ -40,7 +40,7 @@
     */

_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to