RFR: JDK-8293711: Factor out size parsing functions from arguments.cpp [v2]

Thomas Stuefe stuefe at openjdk.org
Wed Sep 21 06:13:39 UTC 2022


On Wed, 21 Sep 2022 04:02:00 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Basic moving of the parsing functions to their own header file (modulo the naming of that file) seems okay. But I don't follow the "memory size" aspect of this refactoring. ??

I splitted the original function set into two. One parsing integers, one atop of that parsing memory sizes. These functions existed before, but I renamed the original one to parse_memory_size to make it clear what it actually does.

Before we had:
A) parse_integer() -> does not parse integer, but memory sizes, e.g. "1K", "1G", etc
B) parse_integer_impl() -> helper functions to parse real integers 

Now we have:
A) parse_memory_size() -> parses memory sizes
B) parse_integer() -> parses integers

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

PR: https://git.openjdk.org/jdk/pull/10252


More information about the hotspot-dev mailing list