for review (M): 6812831 factor general subclass check (for 6655638)

John Rose John.Rose at Sun.COM
Thu Mar 5 21:06:42 PST 2009


Here is another review request similar to the previous:
   http://cr.openjdk.java.net/~jrose/6813212/webrev.00

It moves assembly code for subtyping from about 20 places in the  
source base to two places, one for sparc and one for x86.

I will update this webrev after I clean out the subtype assembly code  
from the *.ad files.

While doing this work, I encountered two or three small bugs in the  
assembly code, probably due to the fact that it was so hard to read  
and understand all 20 variations:
1. 32-bit instead of 64-bit comparison of pointers in C1 subtype code  
(c1_LIRAssembler_sparc.cpp).
2. Compare against wrong register in sparc stub generator  
(stubGenerator_sparc.cpp at cmp(super_klass, sc_offset)).
3. Wrong variable names in C1 slow-path code: subclass and superclass  
were swapped (c1_Runtime1_x86.cpp).

None of these are very harmful, or we would have fixed them already.   
I think we know about number 1; it makes it hard to port C1 to LP64.   
Number 2 would make System.arraycopy wrongly throw a CCE if the target  
array element type is a secondary supertype and is *not* already  
cached on the element subtypes.  I think I'll have to break this one  
out as a separate fix, so it can be backported.

-- John



More information about the hotspot-compiler-dev mailing list