classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another Classpath / Kissme incompatibility


From: Casey Marshall
Subject: Re: Another Classpath / Kissme incompatibility
Date: Sat, 26 Apr 2003 13:39:21 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030303

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stephen Crawley wrote:
>>Casey Marshall <address@hidden> writes:
>
>
>>>This patch seems to work for me, but I'm not sure if this is the way
>>>the initialization should be done (i.e. it assigns in, out, and err
>>>invalid FileDescriptors first, then the nativeInit() method fills in
>>>their correct nativeFd values).
>>>
>>>I'm no JNI expert, so this could be wrong.
>
> Without this change, I found that the static FileDescriptor fields had
value
> null; i.e. they were being clobbered after nativeInit9) had set them.
 I didn't
> look at the bytecodes, but my guess is that Jikes is emitting an opcode to
> initialize the fields, even though this may be notionally unnecessary.
>

That was because the null-initializations came after the static
intitializer -- java compilers (as per the JLS) should combine static
intitializations and the explicit static intitializer into a single
static code block, in the order they appear in the file.

See:
http://java.sun.com/docs/books/jls/second_edition/html/execution.doc.html#44630
(step 8).

- --
Casey Marshall || address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+qu53gAuWMgRGsWsRAlp8AJ4414Hkk5Ni/OpLF+RgpEsh0SkW/QCeLQee
FTpg0N6GBaPk6sPJSs3OqbA=
=VMko
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]