@@ -199,7 +199,7 @@ u2* ConstMethod::checked_exceptions_length_addr() const {
199
199
}
200
200
201
201
u2* ConstMethod::exception_table_length_addr () const {
202
- assert (has_exception_handler (), " called only if table is present" );
202
+ assert (has_exception_table (), " called only if table is present" );
203
203
if (has_checked_exceptions ()) {
204
204
// If checked_exception present, locate immediately before them.
205
205
return (u2*) checked_exceptions_start () - 1 ;
@@ -217,7 +217,7 @@ u2* ConstMethod::exception_table_length_addr() const {
217
217
218
218
u2* ConstMethod::localvariable_table_length_addr () const {
219
219
assert (has_localvariable_table (), " called only if table is present" );
220
- if (has_exception_handler ()) {
220
+ if (has_exception_table ()) {
221
221
// If exception_table present, locate immediately before them.
222
222
return (u2*) exception_table_start () - 1 ;
223
223
} else {
@@ -239,30 +239,29 @@ u2* ConstMethod::localvariable_table_length_addr() const {
239
239
240
240
// Update the flags to indicate the presence of these optional fields.
241
241
void ConstMethod::set_inlined_tables_length (InlineTableSizes* sizes) {
242
- _flags = 0 ;
243
242
if (sizes->compressed_linenumber_size () > 0 )
244
- _flags |= _has_linenumber_table ;
243
+ set_has_linenumber_table () ;
245
244
if (sizes->generic_signature_index () != 0 )
246
- _flags |= _has_generic_signature ;
245
+ set_has_generic_signature () ;
247
246
if (sizes->method_parameters_length () >= 0 )
248
- _flags |= _has_method_parameters ;
247
+ set_has_method_parameters () ;
249
248
if (sizes->checked_exceptions_length () > 0 )
250
- _flags |= _has_checked_exceptions ;
249
+ set_has_checked_exceptions () ;
251
250
if (sizes->exception_table_length () > 0 )
252
- _flags |= _has_exception_table ;
251
+ set_has_exception_table () ;
253
252
if (sizes->localvariable_table_length () > 0 )
254
- _flags |= _has_localvariable_table ;
253
+ set_has_localvariable_table () ;
255
254
256
255
// annotations, they are all pointer sized embedded objects so don't have
257
256
// a length embedded also.
258
257
if (sizes->method_annotations_length () > 0 )
259
- _flags |= _has_method_annotations ;
258
+ set_has_method_annotations () ;
260
259
if (sizes->parameter_annotations_length () > 0 )
261
- _flags |= _has_parameter_annotations ;
260
+ set_has_parameter_annotations () ;
262
261
if (sizes->type_annotations_length () > 0 )
263
- _flags |= _has_type_annotations ;
262
+ set_has_type_annotations () ;
264
263
if (sizes->default_annotations_length () > 0 )
265
- _flags |= _has_default_annotations ;
264
+ set_has_default_annotations () ;
266
265
267
266
// This code is extremely brittle and should possibly be revised.
268
267
// The *_length_addr functions walk backwards through the
@@ -329,7 +328,7 @@ LocalVariableTableElement* ConstMethod::localvariable_table_start() const {
329
328
}
330
329
331
330
int ConstMethod::exception_table_length () const {
332
- return has_exception_handler () ? *(exception_table_length_addr ()) : 0 ;
331
+ return has_exception_table () ? *(exception_table_length_addr ()) : 0 ;
333
332
}
334
333
335
334
ExceptionTableElement* ConstMethod::exception_table_start () const {
@@ -431,13 +430,14 @@ void ConstMethod::print_on(outputStream* st) const {
431
430
ResourceMark rm;
432
431
st->print_cr (" %s" , internal_name ());
433
432
Method* m = method ();
434
- st->print (" - method: " PTR_FORMAT " " , p2i (m));
433
+ st->print (" - method: " PTR_FORMAT " " , p2i (m));
435
434
if (m != nullptr ) {
436
435
m->print_value_on (st);
437
436
}
438
437
st->cr ();
438
+ st->print (" - flags: 0x%x " , _flags.as_int ()); _flags.print_on (st); st->cr ();
439
439
if (has_stackmap_table ()) {
440
- st->print (" - stackmap data: " );
440
+ st->print (" - stackmap data: " );
441
441
stackmap_data ()->print_value_on (st);
442
442
st->cr ();
443
443
}
@@ -484,7 +484,7 @@ void ConstMethod::verify_on(outputStream* st) {
484
484
u2* addr = checked_exceptions_length_addr ();
485
485
guarantee (*addr > 0 && (address) addr >= compressed_table_end && (address) addr < m_end, " invalid method layout" );
486
486
}
487
- if (has_exception_handler ()) {
487
+ if (has_exception_table ()) {
488
488
u2* addr = exception_table_length_addr ();
489
489
guarantee (*addr > 0 && (address) addr >= compressed_table_end && (address) addr < m_end, " invalid method layout" );
490
490
}
@@ -496,7 +496,7 @@ void ConstMethod::verify_on(outputStream* st) {
496
496
u2* uncompressed_table_start;
497
497
if (has_localvariable_table ()) {
498
498
uncompressed_table_start = (u2*) localvariable_table_start ();
499
- } else if (has_exception_handler ()) {
499
+ } else if (has_exception_table ()) {
500
500
uncompressed_table_start = (u2*) exception_table_start ();
501
501
} else if (has_checked_exceptions ()) {
502
502
uncompressed_table_start = (u2*) checked_exceptions_start ();
0 commit comments