Request for reviews (XL): 6894206: JVM needs a way to traverse method handle structures

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Fri Dec 4 08:59:37 PST 2009


I think you should cast 'f' to jlong also:

427 #define ID4(x, y, z, f) ((ID3(x, y, z) << vmIntrinsics::log2_FLAG_LIMIT) | (int)(f))

 > I integrated both changes but I omitted a check for flags as it seems
 > not to be a simple assert.

Why it is not simple ?:

!     assert(flags_for(id) == Flags(flags), "correct id");

Also remove growableArray.hpp changes since Tom pushed his.

Vladimir

Christian Thalinger wrote:
> On Fri, 2009-12-04 at 00:49 -0800, John Rose wrote:
>> P.S.  I don't think there's a portability issue with the long switch.
>>  C++ allows any "integral type" (including int64_t) as a switch
>> selector.
>>
>>
>> I tried a little fault-injection by having the ID3 fields overlap
>> completely.  The result was a nice compile-time error about duplicate
>> case statements.
>>
>>
>> The code would be better with more asserts of the form Vladimir asked
>> for.  One extra assert that would be nice would be to have find_id,
>> when it returns a hit, immediately check the resulting i-id against
>> the i-id query functions, such as in this sketch:
> 
> I integrated both changes but I omitted a check for flags as it seems
> not to be a simple assert.
> 
> http://cr.openjdk.java.net/~twisti/6894206/webrev.04/
> 
> -- Christian
> 


More information about the hotspot-compiler-dev mailing list