Skip to content

Commit f7685a4

Browse files
committed
8256203: Simplify RegMask::Empty
Reviewed-by: thartmann, chagedorn
1 parent 70c7b1d commit f7685a4

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/hotspot/share/opto/regmask.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,7 @@ void OptoReg::dump(int r, outputStream *st) {
4949

5050

5151
//=============================================================================
52-
const RegMask RegMask::Empty(
53-
# define BODY(I) 0,
54-
FORALL_BODY
55-
# undef BODY
56-
0
57-
);
52+
const RegMask RegMask::Empty;
5853

5954
//=============================================================================
6055
bool RegMask::is_vector(uint ireg) {

src/hotspot/share/opto/regmask.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ class RegMask {
136136
}
137137

138138
// Construct an empty mask
139-
RegMask() : _RM_UP(), _lwm(_RM_SIZE - 1), _hwm(0) {}
139+
RegMask() : _RM_UP(), _lwm(_RM_SIZE - 1), _hwm(0) {
140+
assert(valid_watermarks(), "post-condition");
141+
}
140142

141143
// Construct a mask with a single bit
142144
RegMask(OptoReg::Name reg) : RegMask() {

0 commit comments

Comments
 (0)