review request (L): 6984311 JSR 292 needs optional bootstrap method parameters
Christian Thalinger
christian.thalinger at oracle.com
Tue Nov 2 02:38:41 PDT 2010
On Oct 30, 2010, at 9:08 PM, John Rose wrote:
> On Oct 29, 2010, at 4:09 AM, Christian Thalinger wrote:
>
>> On Oct 28, 2010, at 8:40 PM, John Rose wrote:
>>> 6984311: JSR 292 needs optional bootstrap method parameters
>>>
>>> http://cr.openjdk.java.net/~jrose/6984311/webrev.02/
>>
>> src/share/vm/oops/constantPoolOop.cpp:
>> 576 // Benign race condition: f1 may already be filled in
>> while we were trying to lock.
>> I guess we don't care here because the exception to be thrown is
>> expected to be the same for different threads, right?
>
> Yes. I added more comments:
>
> + // Benign race condition: f1 may already be filled in while
> we were trying to lock.
> ++ // The important thing here is that all threads pick up the
> same result.
> ++ // It doesn't matter which racing thread wins, as long as only
> one
> ++ // result is used by all threads, and all future queries.
> ++ // That result may be either a resolved constant or a failure
> exception.
>
> This matches what is in the javadoc (for the java.dyn package-info):
> * Every use of this constant pool entry must lead to the same
> outcome.
> * If the resolution of the names in the method handle constant
> causes an exception to occur,
> * this exception must be recorded by the JVM, and re-thrown on
> every subsequent attempt
> * to use this particular constant.
>
>> 1613 Bytes::put_Java_u2((address) (bytes+5), argc);
>> 1614 for (int arg_i = 0; arg_i < argc; arg_i++) {
>> 1615 int arg = invoke_dynamic_argument_index_at(idx,
>> arg_i);
>> 1616 Bytes::put_Java_u2((address) (bytes+5+2*arg_i), arg);
>> 1617 }
>> Isn't argc here overwritten with the first arg?
>
> Right! Changed 5 to 7 on line 1616. Thanks for spotting that.
>
>> src/share/vm/utilities/constantTag.cpp:
>>
>> Only the copyright year is changed.
>
> Fixed.
>
>> Otherwise looks good.
>
> Thanks. I am updating the webrev:
> http://cr.openjdk.java.net/~jrose/6984311/webrev.03/
Looks good. -- Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20101102/9ea9a271/attachment.html
More information about the hotspot-compiler-dev
mailing list