RFR: 8316930: HotSpot should use noexcept instead of throw() [v4]
David Holmes
dholmes at openjdk.org
Sun Feb 4 23:07:02 UTC 2024
On Fri, 2 Feb 2024 08:38:40 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits:
>>
>> - Merge branch 'openjdk:master' into noexcept
>> - Typo in GensrcAdlc.gmk
>> - Merge branch 'openjdk:master' into noexcept
>> - Merge branch 'master' into noexcept
>> - ic in compiledIC.hpp
>> - Revert compiledIC.cpp
>> - Revert compiledIC.hpp
>> - Partially Revert parse.hpp
>> - Merge branch 'master' into noexcept
>> - Merge branch 'master' into noexcept
>> - ... and 3 more: https://git.openjdk.org/jdk/compare/a474b372...0d2fe966
>
> src/hotspot/share/c1/c1_Instruction.hpp line 337:
>
>> 335:
>> 336: public:
>> 337: void* operator new(size_t size) noexcept {
>
> Should the noexcept specifiers on both operator new in this file be removed? They both call Amalloc with the default parameter of EXIT_OOM, which means they both crash instead of returning nullptr when failing to allocate memory
I think EXIT_OOM is an implementation detail. The key point is that these methods do not throw.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15910#discussion_r1477473088
More information about the hotspot-dev
mailing list