harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject [drlvm][concurrent] HARMONY-2086 and how to implement private native AtomicLong.VMSupportsCS8 method
Date Sun, 11 Feb 2007 14:28:12 GMT

Today I tried to look into HARMONY-2086 patch. It adds implementation of 
private native method j.u.concurrent.atomic.AtomicLong.VMSupportsCS8 to 
DRLVM. But such patch IMHO doesn't fit into concept of kernel classes.

If a native method implementation is located in VM code, then Java class 
should be made kernel class, otherwise native code should go to classlib. The 
problem is that AFAIU we don't control the Java code of j.u.c because it is 
taken from an external repository, so we cannot create a kernel class which 
j.u.c.a.AtomicLong could use instead of a private native method.

Another way to fix this problem would be to add a native method implementation 
in classlib which would use VMI interface to query VM whether or not it 
supports CS8. But this requires extending VMI for this type of request and I 
am not sure if we can add native methods for j.u.c package in classlib.

Finally we could make a exception for this particular method and implement it 
in VM like the patch in HARMONY-2086 does.

What do you think about the choices?


View raw message