New release of KJC 1.3C

2000-01-01 Thread Vincent GAY-PARA

Mark Wielaard wrote:

 Hi,

  I added support for kjc and have tested it to see that at least for me
  it doesn't work.  I just did an update to sync to CVS and maybe that
  will fix it but I don't know.  It complains about a lot of exceptions
  which supposedly need to be declared.

There is a new release of KJC version 1.3C, which should correct this bug,
available on our CVS and download pages at http://www.dms.at/kopi

Vincent for DMS




Re: KJC and GNU Classpath

1999-12-30 Thread Vincent GAY-PARA

Geoff Berry wrote:

 Vincent GAY-PARA [EMAIL PROTECTED] writes:

  Hi,
 
  At DMS we tried to compile GNU Classpath with KJC
  (http://www.dms.at/kjc) and we encoutered some problems.
 
  ObjectInputStream:
  ==
problem with an expression (java/io/ObjectInputStream.java:1188:
  Variable "value" cannot be initialized by a value of type "int" [JLS
  4.5.4])
Which compiler do you use ???
please rewrite:
char value = default_initialize ? 0 : this.realInputStream.readChar
  ();
as:
char value = default_initialize ? (char)0 :
  this.realInputStream.readChar ();
 
  see also: java/io/ObjectInputStream.java:1223: Variable "value" cannot
  be initialized by a value of type "int" [JLS 4.5.4]



 I believe this is a compiler error, not an error in the code.  `value'
 is not being initialized with a value of type int, but with a value of
 type char.  JLS 15.24:

 The type of a conditional expression is determined as follows:

  ...

  Otherwise, if the second and third operands have numeric type,
  then there are several cases:

 ...

 If one of the operands is of type T where T is byte, short, or
 char, and the other operand is a constant expression of type
 int whose value is representable in type T, then the type of
 the conditional expression is T.

You're right.

I've corrected KJC accordingly.

My test case was:
short s = aCondition ? 0 : 1; // compile time error
but the following is valid:
short s = aCondition ? 0 : (short)1;

Sorry for the inconvenience.

Vincent for DMS



 ...

 --
 Geoff Berry



Re: KJC and GNU Classpath

1999-12-29 Thread Vincent GAY-PARA

Brian Jones wrote:

  we tried by hand but we encoutered the following problems:
  command: cd classpath/lib; java -mx12800 at.dms.kjc.Main --verbose
  --nowrite @classes

 According to the documentation I think you'd want to do something like
 the above but changed to

 cd classpath/lib; java -mx12800 at.dms.kjc.Main --verbose
 --nowrite `cat classes`, since I did not see the "@classes" syntax
 documented on your web page, but if it works that's great.

It works.



  Introspector:
  =
  ../java/beans/Introspector.java:23: Package gnu.java.beans not found in
  import.
  import gnu.java.beans.*;
 
  ComponentBeanInfo:
  ==
  ../gnu/java/beans/info/ComponentBeanInfo.java:23: Package gnu.java.beans
  not found in import.
  import gnu.java.beans.*;

 This package exists in classpath/gnu/java/beans/ so something is
 probably wrong with how you're trying to compile.

It was our fault.



  AWTEvent:
  =
  ../java/awt/AWTEvent.java is missing from lib/classes

 It appears that AWTEvent is not part of the compile, see
 classpath/lib/standard.omit.

It has been added in lib/classes in the last CVS of CLASSPATH.



  ObjectInputStream:
  ==
problem with an expression (java/io/ObjectInputStream.java:1188:
  Variable "value" cannot be initialized by a value of type "int" [JLS
  4.5.4])
Which compiler do you use ???
please rewrite:
char value = default_initialize ? 0 : this.realInputStream.readChar
  ();
as:
char value = default_initialize ? (char)0 :
  this.realInputStream.readChar ();
 
  see also: java/io/ObjectInputStream.java:1223: Variable "value" cannot
  be initialized by a value of type "int" [JLS 4.5.4]
 

 Okay, I made these changes in CVS.

It works fine.



  WeakHashMap:
  
  java/util/WeakHashMap.java:336: Cannot access field "queue" it is in an
  other package and not a class member [JLS 15.10]

 This is a problem with how WeakBucket is setup I believe.  It doesn't
 make much sense to me why we would call the super constructor with a
 package private data member that isn't even initialized in
 java/lang/ref/Reference.java except in this same constructor.  There
 is also the problem mentioned above of queue being in another
 package.  I think Jochen Hoenicke should look at this.

  And we also have the following problem that is a bug in KJC:
 
  java/util/AbstractList.java:410: Invalid outer class for this operation
  [JLS 15.7.2]
 
  we will try to fix it today.
 
  Could you fix these problems and send us an email ([EMAIL PROTECTED]) when
  it's available on your CVS ?

 lyta:~$ cvs -d :pserver:[EMAIL PROTECTED]:/cvs/public co kjc-suite
 cvs server: cannot find module `kjc-suite' - ignored

This bug is already fixed. We'll try to make a new release available on our
CVS tomorrow. The line above should now work.



 Could you fix this problem and let the classpath list know when you
 have ([EMAIL PROTECTED])?  I'd also like to know when you fix the
 AbstractList problem above.

Thanks you for your prompt answer.

I got GNU CLASSPATH to compile on my computer using SUN's JDK with:
vgp% cd classpath/lib
vgp% CLASSPATH=$CLASSPATH:/extra/kaffe/libraries/javalib/Klasses.jar java
-mx128m at.dms.kjc.Main @classes

Vincent for DMS.



 Brian
 --
 Brian Jones [EMAIL PROTECTED]



KJC and GNU Classpath

1999-12-28 Thread Vincent GAY-PARA

Hi,

At DMS we tried to compile GNU Classpath with KJC
(http://www.dms.at/kjc) and we encoutered some problems.

First of all, we were not able to properly generate the makefiles from
the CVS repository.
Here is what we did on an intel station with RH6.1:

vgp% cvs co classpath
vgp% cd classpath
vgp% aclocal
vgp% autoheader
configure.in:41: warning: AC_TRY_RUN called without default to allow
cross compiling
vgp% automake
vgp% autoconf
configure.in:41: warning: AC_TRY_RUN called without default to allow
cross compiling
vgp% ./configure --with-jikes
--with-javah=/usr/local/packages/jdk118/bin/javah
--with-classlib=/usr/local/packages/jdk118/lib/classes.zip
--with-japhar=/tmp/japhar-0.08
vgp% make
Making all in lib
make[1]: Entering directory `/tmp/classpath/lib'
/bin/sh -c "/usr/bin/jikes -nowarn -classpath
..:../vm/reference:.:/usr/local/packages/jdk118/lib/classes.zip +CSO +M
+F -d . @classes"
make[1]: *** [compile-classes] Segmentation fault
make[1]: Leaving directory `/tmp/classpath/lib'
make: *** [all-recursive] Error 1

vgp% jikes -version
...
Version 1.06 (17 Sep 99) by Philippe Charles and David Shields, IBM
Research.

we tried by hand but we encoutered the following problems:
command: cd classpath/lib; java -mx12800 at.dms.kjc.Main --verbose
--nowrite @classes

Introspector:
=
../java/beans/Introspector.java:23: Package gnu.java.beans not found in
import.
import gnu.java.beans.*;

ComponentBeanInfo:
==
../gnu/java/beans/info/ComponentBeanInfo.java:23: Package gnu.java.beans
not found in import.
import gnu.java.beans.*;

AWTEvent:
=
../java/awt/AWTEvent.java is missing from lib/classes

ObjectInputStream:
==
  problem with an expression (java/io/ObjectInputStream.java:1188:
Variable "value" cannot be initialized by a value of type "int" [JLS
4.5.4])
  Which compiler do you use ???
  please rewrite:
  char value = default_initialize ? 0 : this.realInputStream.readChar
();
  as:
  char value = default_initialize ? (char)0 :
this.realInputStream.readChar ();

see also: java/io/ObjectInputStream.java:1223: Variable "value" cannot
be initialized by a value of type "int" [JLS 4.5.4]

WeakHashMap:

java/util/WeakHashMap.java:336: Cannot access field "queue" it is in an
other package and not a class member [JLS 15.10]

And we also have the following problem that is a bug in KJC:

java/util/AbstractList.java:410: Invalid outer class for this operation
[JLS 15.7.2]

we will try to fix it today.

Could you fix these problems and send us an email ([EMAIL PROTECTED]) when
it's available on your CVS ?

Vincent for DMS
http://www.dms.at