On Mon, 11 Jul 2022 14:58:07 GMT, Axel Boldt-Christmas <d...@openjdk.org> wrote:
> Currently the `RegisterMap` constructor uses implicit boolean arguments to > configure its function. Implicit boolean arguments makes code harder to > understand and reason about at the call site. Using explicit scoped enums > instead makes it both clear what is being configured and the type safety > makes mistakes less likely. > > Update `RegisterMap` constructors to use these scoped enum types instead of > booleans. > ```C++ > enum class UpdateMap { skip, yes }; > enum class ProcessFrames { skip, yes }; > enum class WalkContinuation { skip, yes }; > > > Testing: tier1-3 Feel free to ignore my comment, seems good otherwise. src/hotspot/share/runtime/registerMap.hpp line 75: > 73: enum class UpdateMap { skip, yes }; > 74: enum class ProcessFrames { skip, yes }; > 75: enum class WalkContinuation { skip, yes }; Instead of `yes` I would recommend using like `include` (or `add') as `yes` seems relatively unspecific compared to `skip`. ------------- Marked as reviewed by tschatzl (Reviewer). PR: https://git.openjdk.org/jdk/pull/9455