RFR: 8251850: Simplify ResourceMark constructors using delegation
Kim Barrett
kim.barrett at oracle.com
Mon Aug 17 00:59:01 UTC 2020
> On Aug 16, 2020, at 1:25 AM, Ioi Lam <ioi.lam at oracle.com> wrote:
> Since the new function current_thread_or_null() is used in only one place, I think it's better to get rid of it, and change this constructor as:
>
> explicit ResourceMark(ResourceArea* area)
> : ResourceMark(area, DEBUG_ONLY(Thread::current_or_null()) NOT_DEBUG(nullptr)) {}
I’ll do that.
> PS, NOT_PRODUCT_ARG does come with a comma:
>
> #define NOT_PRODUCT_ARG(arg) arg,
Oh, I’ve never had cause to use one of those. I hardly ever write anything conditional on PRODUCT.
More information about the hotspot-runtime-dev
mailing list