Default methods for jdk8: request for code review
Vitaly Davidovich
vitalyd at gmail.com
Thu Oct 11 05:04:20 PDT 2012
Keith,
In defaultMethods.cpp, I think there are a few places missing a
ResourceMark, e.g. print_exception() but there are others. If you search
for as_C_string() you'll find them.
In genericSignatures.cpp, DescriptorStream::parse_error() asserts that the
error is null - is that right?
Also, assert_char() - does the buffer need to be from the resource area?
I'd think a stack one would work here?
Sorry for the piecemeal comments - I'm looking at the code on my phone so
it's a bit slower :).
Thanks
Sent from my phone
On Oct 10, 2012 8:09 PM, "Keith McGuigan" <keith.mcguigan at oracle.com> wrote:
>
> You know I think I just picked it randomly as a prime that was close to
> 1024. I suppose by that criteria 1021 would have worked too.
>
> Either of those are probably overkill, though. And you're right that
> using a prime isn't necessary. Maybe I should change that to 256 or
> something else a little more memory-usage-friendly.
>
> Thanks!
>
> --
> - Keith
>
> On 10/10/2012 7:59 PM, Vitaly Davidovich wrote:
>
>> Hi Keith,
>>
>> In ResourceHashtable, how did you settle on size 1019? I see it's a
>> prime so presumably you're worried about collisions? I'd think a power
>> of 2 would give you some speed up as you can avoid the relatively
>> expensive mod operation, but just curious what your thinking is here.
>>
>> Nice job on the "short" :) writeup by the way.
>>
>> Thanks
>>
>> Sent from my phone
>>
>> On Oct 10, 2012 1:12 PM, "Keith McGuigan" <keith.mcguigan at oracle.com
>> <mailto:keith.mcguigan at oracle.**com <keith.mcguigan at oracle.com>>> wrote:
>>
>> Hello,
>>
>> I'd like any review of the code which implements default methods in
>> the
>> JVM. This is destined for jdk8 as part of JSR 335 (Lambdas), and
>> tracked by CR 7200776.
>>
>> The design and implementation is described in this short document:
>> http://cr.openjdk.java.net/~**kamg/default_methods_in_**hotspot.txt<http://cr.openjdk.java.net/~kamg/default_methods_in_hotspot.txt>
>>
>> And the code is here:
>> http://cr.openjdk.java.net/~**kamg/default_methods/<http://cr.openjdk.java.net/~kamg/default_methods/>
>>
>> Any review (even partial) would be appreciated. Thanks!
>>
>> --
>> - Keith
>>
>>
More information about the lambda-dev
mailing list