for review (XXL): 6655638 method handles for invokedynamic
John Rose
John.Rose at Sun.COM
Thu Feb 5 21:15:42 PST 2009
On Feb 5, 2009, at 4:44 AM, Christian Thalinger wrote:
> src/share/vm/runtime/globals.hpp:
>
> + product(bool, MethodHandleSupport,
> false, \
> + "support method handles (true by default under JSR
> 292") \
>
> There's a missing ) before the closing ".
Thanks; fixed.
> src/share/vm/runtime/sharedRuntime.hpp:
>
> ! static char* generate_class_cast_message(const char* name, const
> char* klass);
> ! static char* generate_class_cast_message(const char* name, const
> char* klass,
> + const char* gripe = "
> cannot be cast to ");
>
> name and klass have a @param comment but gripe does not.
Fixed.
> src/cpu/sparc/vm/methodHandles_sparc.cpp (I know SPARC does not work
> yet):
>
> 75 // fetch the MethodType from the method handle into
> G5_method_type
> 76 {
> 77 Register tem = G5_method;
> 78 for (int* pchase =
> methodOopDesc::method_type_pointer_chase(); (*pchase) != -1; pchase+
> +) {
> 79 __ ld_ptr(tem, *pchase, G5_method_type);
> 80 tem = G5_method_type; // yes, it's the same
> register...
> 81 }
> 82 }
>
> What size can *pchase be? Is it possibly too large for ld_ptr?
It's a small offset (part of a pointer-chase). We can portably assume
it is suitable as a pointer displacement, and is never larger than
offset_t. We use ints like that countless places in hotspot, so I
don't think a comment is needed here. However, I changed it to a
jint; that will make it more definite.
> 116 // - rax: method handle type (already checked at call site, then
> unused)
> 117 // - rsi: sender SP (must preserve)
> 118 // - rdx: garbage temp, can blow away
>
> Wrong register names.
Heh; thanks.
> I'm not finished yet, will continue later...
Thanks! Even if you find something after the stuff is committed, I'll
be very happy to fix it.
-- John
More information about the hotspot-compiler-dev
mailing list