Tom Tromey wrote:
"Bryce" == Bryce McKinlay <[EMAIL PROTECTED]> writes:


Bryce> Certainly, bytecode isn't allowed to do this kind of thing, but I'm
Bryce> not sure if the structured locking rules in the VM spec are meant to
Bryce> apply to native code. For example, wait() would be impossible to
Bryce> implement if this were the case, wouldn't it?

I agree with your main point, that it isn't clear that this
restriction is meant to apply to native code.  I suppose I would
expect to see a note in the JNI spec about this -- except that the JNI
specification is in general not that precise.  (As to wait(), I think
one could plausibly argue that it is a special case, part of the VM.)

The problem exists when native code does things that are visible to non-native code, like locking objects. If it doesn't touch the Java heap then I would say that yes, you can do whatever you want.


Cheers,
Chris


_______________________________________________ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to