@@ -114,7 +114,7 @@ class DataLayout {
114
114
};
115
115
116
116
// Tag values
117
- enum {
117
+ enum : u1 {
118
118
no_tag,
119
119
bit_data_tag,
120
120
counter_data_tag,
@@ -204,7 +204,7 @@ class DataLayout {
204
204
}
205
205
206
206
void set_flag_at (u1 flag_number) {
207
- _header._struct ._flags |= (0x1 << flag_number);
207
+ _header._struct ._flags |= (u1)( 0x1 << flag_number);
208
208
}
209
209
bool flag_at (u1 flag_number) const {
210
210
return (_header._struct ._flags & (0x1 << flag_number)) != 0 ;
@@ -233,7 +233,7 @@ class DataLayout {
233
233
return temp._header ._struct ._flags ;
234
234
}
235
235
// Return a value which, when or-ed as a word into _header, sets the flag.
236
- static u8 flag_mask_to_header_mask (uint byte_constant) {
236
+ static u8 flag_mask_to_header_mask (u1 byte_constant) {
237
237
DataLayout temp; temp.set_header (0 );
238
238
temp._header ._struct ._flags = byte_constant;
239
239
return temp._header ._bits ;
@@ -344,18 +344,18 @@ class ProfileData : public ResourceObj {
344
344
return cast_to_oop (intptr_at (index ));
345
345
}
346
346
347
- void set_flag_at (int flag_number) {
347
+ void set_flag_at (u1 flag_number) {
348
348
data ()->set_flag_at (flag_number);
349
349
}
350
- bool flag_at (int flag_number) const {
350
+ bool flag_at (u1 flag_number) const {
351
351
return data ()->flag_at (flag_number);
352
352
}
353
353
354
354
// two convenient imports for use by subclasses:
355
355
static ByteSize cell_offset (int index) {
356
356
return DataLayout::cell_offset (index );
357
357
}
358
- static int flag_number_to_constant (int flag_number) {
358
+ static u1 flag_number_to_constant (u1 flag_number) {
359
359
return DataLayout::flag_number_to_constant (flag_number);
360
360
}
361
361
@@ -487,7 +487,7 @@ class BitData : public ProfileData {
487
487
friend class VMStructs ;
488
488
friend class JVMCIVMStructs ;
489
489
protected:
490
- enum {
490
+ enum : u1 {
491
491
// null_seen:
492
492
// saw a null operand (cast/aastore/instanceof)
493
493
null_seen_flag = DataLayout::first_flag + 0
@@ -525,7 +525,7 @@ class BitData : public ProfileData {
525
525
#endif
526
526
527
527
// Code generation support
528
- static int null_seen_byte_constant () {
528
+ static u1 null_seen_byte_constant () {
529
529
return flag_number_to_constant (null_seen_flag);
530
530
}
531
531
@@ -1126,7 +1126,7 @@ class ReceiverTypeData : public CounterData {
1126
1126
1127
1127
// Direct accessors
1128
1128
static uint row_limit () {
1129
- return TypeProfileWidth;
1129
+ return ( uint ) TypeProfileWidth;
1130
1130
}
1131
1131
static int receiver_cell_index (uint row) {
1132
1132
return receiver0_offset + row * receiver_type_row_cell_count;
@@ -1430,7 +1430,7 @@ class RetData : public CounterData {
1430
1430
}
1431
1431
1432
1432
static uint row_limit () {
1433
- return BciProfileWidth;
1433
+ return ( uint ) BciProfileWidth;
1434
1434
}
1435
1435
static int bci_cell_index (uint row) {
1436
1436
return bci0_offset + row * ret_row_cell_count;
@@ -2010,7 +2010,7 @@ class MethodData : public Metadata {
2010
2010
assert ((uint )reason < ARRAY_SIZE (_trap_hist._array ), " oob" );
2011
2011
uint cnt1 = 1 + _trap_hist._array [reason];
2012
2012
if ((cnt1 & _trap_hist_mask) != 0 ) { // if no counter overflow...
2013
- _trap_hist._array [reason] = cnt1;
2013
+ _trap_hist._array [reason] = (u1) cnt1;
2014
2014
return cnt1;
2015
2015
} else {
2016
2016
return _trap_hist_mask + (++_nof_overflow_traps);
@@ -2262,9 +2262,9 @@ class MethodData : public Metadata {
2262
2262
bool would_profile () const { return _would_profile != no_profile; }
2263
2263
2264
2264
int num_loops () const { return _num_loops; }
2265
- void set_num_loops (int n) { _num_loops = n; }
2265
+ void set_num_loops (short n) { _num_loops = n; }
2266
2266
int num_blocks () const { return _num_blocks; }
2267
- void set_num_blocks (int n) { _num_blocks = n; }
2267
+ void set_num_blocks (short n) { _num_blocks = n; }
2268
2268
2269
2269
bool is_mature () const ; // consult mileage and ProfileMaturityPercentage
2270
2270
static int mileage_of (Method* m);
@@ -2326,7 +2326,7 @@ class MethodData : public Metadata {
2326
2326
2327
2327
// Convert a dp (data pointer) to a di (data index).
2328
2328
int dp_to_di (address dp) const {
2329
- return dp - ((address)_data);
2329
+ return ( int )( dp - ((address)_data) );
2330
2330
}
2331
2331
2332
2332
// bci to di/dp conversion.
@@ -2366,7 +2366,7 @@ class MethodData : public Metadata {
2366
2366
DataLayout* extra_data_limit () const { return (DataLayout*)((address)this + size_in_bytes ()); }
2367
2367
DataLayout* args_data_limit () const { return (DataLayout*)((address)this + size_in_bytes () -
2368
2368
parameters_size_in_bytes ()); }
2369
- int extra_data_size () const { return (address)extra_data_limit () - (address)extra_data_base (); }
2369
+ int extra_data_size () const { return (int )(( address)extra_data_limit () - (address)extra_data_base () ); }
2370
2370
static DataLayout* next_extra (DataLayout* dp);
2371
2371
2372
2372
// Return (uint)-1 for overflow.
0 commit comments