Default methods for jdk8: request for code review
vitalyd at gmail.com
Thu Oct 11 05:52:44 PDT 2012
Understood on resource marks - thanks. Perhaps just a comment then saying
caller assumed to have set up a mark?
I completely missed the assignment of the buffer into the field - don't
know how. Sorry for the noise on that one.
I'll keep looking as time permits :)
Sent from my phone
On Oct 11, 2012 8:46 AM, "Keith McGuigan" <keith.mcguigan at oracle.com> wrote:
> On Oct 11, 2012, at 8:04 AM, Vitaly Davidovich wrote:
> 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