Default methods for jdk8: request for code review
Keith McGuigan
keith.mcguigan at oracle.com
Thu Oct 11 05:46:51 PDT 2012
On Oct 11, 2012, at 8:04 AM, Vitaly Davidovich wrote:
> 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.
>
Because the only entrances to this code, (generate_default_methods() and find_super_default()) have a resource mark at the beginning, all of these tracing message are covered by a resource mark. More marks in these print locations would use a little less incidental memory when tracing is enabled, but I'm not too worried about that.
> In genericSignatures.cpp, DescriptorStream::parse_error() asserts that the error is null - is that right?
>
No, that doesn't make any sense at all. I can't even imagine what kind of situation would bring a nonsensical thing like that into light. Removed! (also I suppose I'll add a set_parse_error() method and add a message != NULL assert in there instead).
> Also, assert_char() - does the buffer need to be from the resource area? I'd think a stack one would work here?
>
No, in this case I do need that buffer to be a resource array. If it were on the stack it would be in 'asert_char()'s frame and would be deallocated as soon as that function returns.
> Sorry for the piecemeal comments - I'm looking at the code on my phone so it's a bit slower :).
No problem at all, keep them coming! And thanks!
--
- Keith
More information about the lambda-dev
mailing list