RFR: 8283013: Simplify Arguments::parse_argument()

David Holmes dholmes at openjdk.java.net
Mon Mar 28 11:42:41 UTC 2022


On Wed, 23 Mar 2022 06:19:38 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> - Remove all the complex `sscanf()` calls in `Arguments::parse_argument()`
> - Call the appropriate parsing function according to the type of the flag
> - Added more test cases for flags of the `double` type.
> 
> As a result of this change, `double` flags can now be specified in more ways, as long as the input is accepted by `strtod()`. However, `NaN` and `INFINITY` values are not allowed because the VM probably cannot handle them. Please see the test case for details.
> 
> Tested with tiers 1-5.

src/hotspot/share/runtime/arguments.cpp line 905:

> 903:     return false;
> 904:   }
> 905:   if (g_isnan(v) || !g_isfinite(v)) {

Surely the not-sign should not be there ???

-------------

PR: https://git.openjdk.java.net/jdk/pull/7916


More information about the hotspot-dev mailing list