Hotspot Zero patch for invokedynamic
Chris Phillips @ T O
ChrisPhi at LGonQn.Org
Tue May 8 20:30:41 PDT 2012
Hi David,
Yes, I have reviewed and applied it. Its OK for Zero, it fixes problems
encountered in JSR 292 testing.
Cheers!
Chris
On 08/05/12 09:00 PM, David Holmes wrote:
> Hi Andrew,
>
> Is there some other Zero developer who can act as reviewer for this?
> Preferably someone with an OpenJDK username so it can be recorded in
> the changeset.
>
> Thanks,
> David
>
> On 9/05/2012 1:08 AM, Andrew Dinn wrote:
>> Enclosed below are details of a patch to the hsx/hotspot-main tree. The
>> patch fixes some errors which manifested in the Zero ARM code when
>> running the TCK tests which exercise method handles. This patch has
>> already been applied to the iced tea 7-2.1 hotspot hg repository and
>> found to correct the errors when retested on ARM. However, since the
>> changes actually apply to Zero code (none of which is not ARM-specific)
>> I think it really ought to be included in the hotspot tree.
>>
>> I would be grateful if someone would agree to sponsor this patch for
>> inclusion into the relevant hotspot repo(s).
>>
>> n.b. I originally posted this last week with a full webrev attached but
>> the note was held (for all I know still may be held) awaiting moderation
>> because of the size of the attachment. I will happily forward the webrev
>> to whoever is willing to sponsor this patch.
>>
>> regards,
>>
>>
>> Andrew Dinn
>> -----------
>> Principal Software Engineer
>> Red Hat UK Ltd
>> Registered in UK and Wales under Company Registration No. 3798903
>> Directors: Michael Cunningham (USA), Mark Hegarty (Ireland), Matt Parson
>> (USA), Charlie Peters (USA)
>>
>> index.html
>> ----- 8< -------- 8< -------- 8< -------- 8< -------- 8<
>> -------- 8< ---
>> Code Review for hotspot
>> Prepared by: "Andrew Dinn " on Fri May 4 17:40:58 BST 2012
>> Workspace: /ssd/home/adinn/redhat/openjdk/hsx/hotspot-main/hotspot
>> Compare against: http://hg.openjdk.java.net/hsx/hotspot-main//hotspot
>> Compare against version: 3292
>> Summary of changes: 19 lines changed: 19 ins; 0 del; 0 mod; 1565
>> unchg
>> Patch of changes: hotspot.patch
>> ----- 8< -------- 8< -------- 8< -------- 8< -------- 8<
>> -------- 8< ---
>> hotspot.patch:
>> ----- 8< -------- 8< -------- 8< -------- 8< -------- 8<
>> -------- 8< ---
>> --- old/src/cpu/zero/vm/cppInterpreter_zero.cpp 2012-05-04
>> 17:40:57.837805644 +0100
>> +++ new/src/cpu/zero/vm/cppInterpreter_zero.cpp 2012-05-04
>> 17:40:57.756806657 +0100
>> @@ -1026,6 +1026,16 @@
>>
>> java_lang_invoke_AdapterMethodHandle::vmargslot(method_handle);
>> oop arg = VMSLOTS_OBJECT(arg_slot);
>> jvalue arg_value;
>> + if (arg == NULL) {
>> + // queue a nullpointer exception for the caller
>> + stack->set_sp(calculate_unwind_sp(stack, method_handle));
>> + CALL_VM_NOCHECK_NOFIX(
>> + throw_exception(
>> + thread, vmSymbols::java_lang_NullPointerException()));
>> + // NB all oops trashed!
>> + assert(HAS_PENDING_EXCEPTION, "should do");
>> + return;
>> + }
>> BasicType arg_type = java_lang_boxing_object::get_value(arg,
>> &arg_value);
>> if (arg_type == T_LONG || arg_type == T_DOUBLE) {
>> intptr_t *unwind_sp = calculate_unwind_sp(stack,
>> method_handle);
>> @@ -1112,6 +1122,15 @@
>> case T_SHORT:
>> return;
>> }
>> + // INT results sometimes need narrowing
>> + case T_BOOLEAN:
>> + case T_CHAR:
>> + case T_BYTE:
>> + case T_SHORT:
>> + switch (src_rtype) {
>> + case T_INT:
>> + return;
>> + }
>> }
>>
>> tty->print_cr("unhandled conversion:");
>> ----- 8< -------- 8< -------- 8< -------- 8< -------- 8<
>> -------- 8< ---
>
>
More information about the hotspot-dev
mailing list