Request for review: 8004076: Move _max_locals and _size_of_parameters to ConstMethod for better sharing

John Rose john.r.rose at oracle.com
Fri Dec 7 14:40:46 PST 2012


On Dec 7, 2012, at 1:45 PM, Jiangli Zhou wrote:

> Could I have another reviewer for the change? Either official or non-official reviewer is okay.

I have a comment on this one.  (And you can use me as a reviewer.)

In the sparc code, I would prefer to see the Address constants kept around, because they make the code easier to read.

-  const Address size_of_parameters(G5_method, Method::size_of_parameters_offset());
-  const Address size_of_locals    (G5_method, Method::size_of_locals_offset());
+  const Register G3_constMethod = Glocals_size;
+  const Address size_of_parameters(G3_ConstMethod, ConstMethod::size_of_parameters_offset());
+  const Address size_of_locals    (G3_ConstMethod, ConstMethod::size_of_locals_offset());
   const Address constMethod       (G5_method, Method::const_offset());
   int rounded_vm_local_words = round_to( frame::interpreter_frame_vm_local_words, WordsPerLong );
 
@@ -511,7 +509,8 @@
   // Lscratch can't be used as a temporary because the call_stub uses
   // it to assert that the stack frame was setup correctly.
 
+  __ ld_ptr( constMethod, G3_constMethod );
-  __ lduh( size_of_parameters, Glocals_size);

Maybe the details make it difficult, but I think it's possible in most places.

As a side effect, using a fixed register (like G3) for the ConstMethod will make debugging easier.

Same comment for x86/64.

This may be more difficult to do on x86/32, since there are fewer temp registers.  But that's an oddball case.

Thanks,
— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20121207/046313a1/attachment.html 


More information about the hotspot-runtime-dev mailing list