RFR: 8254586: Replace fthrow() calls with simpler method calls in classFileParser.cpp
David Holmes
dholmes at openjdk.java.net
Mon Oct 12 21:53:14 UTC 2020
On Mon, 12 Oct 2020 20:34:25 GMT, Harold Seigel <hseigel at openjdk.org> wrote:
> Hi,
> Please review this small change to simplify exception throwing in classFileParser.cpp The change was tested with tiers
> one and two on Windows, Linux x64, and Mac OSX, and with tiers 3-5 on Linux x64.
> Thanks, Harold
Hi Harold,
Not sure why we couldn't use THROW_MSG in these cases? The helper functions are okay though.
But don't use CHECK macro here - just pass THREADS and then return. We know there is a pending exception.
Thanks,
David
src/hotspot/share/classfile/classFileParser.cpp line 4317:
> 4315:
> 4316: if (super_ik->is_sealed() && !super_ik->has_as_permitted_subclass(this_klass)) {
> 4317: classfile_icce_error("class %s cannot inherit from sealed class %s", super_ik, CHECK);
You don't want CHECK there - you know there is an exception pending. Just pass THREAD and return afterwards. This goes
for all the new callsites.
src/hotspot/share/classfile/classFileError.cpp line 81:
> 79: }
> 80:
> 81: void ClassFileParser::classfile_icce_error(const char* msg,
Is there a reason we can't just use THROW_MSG at the callsites rather than introducing these helper functions?
-------------
Changes requested by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/618
More information about the hotspot-runtime-dev
mailing list