@@ -436,7 +436,7 @@ class CompileReplay : public StackObj {
436
436
} else if (strcmp (dyno_ref, " <bsm>" ) == 0 ) {
437
437
int pool_index = cp_cache_entry->constant_pool_index ();
438
438
BootstrapInfo bootstrap_specifier (cp, pool_index, index );
439
- obj = cp->resolve_possibly_cached_constant_at (bootstrap_specifier.bsm_index (), thread );
439
+ obj = cp->resolve_possibly_cached_constant_at (bootstrap_specifier.bsm_index (), CHECK_NULL );
440
440
} else {
441
441
report_error (" unrecognized token" );
442
442
return NULL ;
@@ -465,58 +465,57 @@ class CompileReplay : public StackObj {
465
465
report_error (" no method handle found at cpi" );
466
466
return NULL ;
467
467
}
468
- {
469
- bool found_it;
470
- ik->link_class (CHECK_NULL);
471
- obj = cp->find_cached_constant_at (cpi, found_it, thread);
472
- }
468
+ ik->link_class (CHECK_NULL);
469
+ obj = cp->resolve_possibly_cached_constant_at (cpi, CHECK_NULL);
470
+ }
471
+ if (obj == NULL ) {
472
+ report_error (" null cp object found" );
473
+ return NULL ;
473
474
}
474
475
Klass* k = NULL ;
475
- if (obj != NULL ) {
476
- skip_ws ();
477
- // loop: read fields
478
- char * field = NULL ;
479
- do {
480
- field = parse_string ();
481
- if (field == NULL ) {
482
- report_error (" no field found" );
476
+ skip_ws ();
477
+ // loop: read fields
478
+ char * field = NULL ;
479
+ do {
480
+ field = parse_string ();
481
+ if (field == NULL ) {
482
+ report_error (" no field found" );
483
+ return NULL ;
484
+ }
485
+ if (strcmp (field, " ;" ) == 0 ) {
486
+ break ;
487
+ }
488
+ // raw Method*
489
+ if (strcmp (field, " <vmtarget>" ) == 0 ) {
490
+ Method* vmtarget = java_lang_invoke_MemberName::vmtarget (obj);
491
+ k = (vmtarget == NULL ) ? NULL : vmtarget->method_holder ();
492
+ if (k == NULL ) {
493
+ report_error (" null vmtarget found" );
483
494
return NULL ;
484
495
}
485
- if (strcmp (field, " ;" ) == 0 ) {
486
- break ;
487
- }
488
- // raw Method*
489
- if (strcmp (field, " <vmtarget>" ) == 0 ) {
490
- Method* vmtarget = java_lang_invoke_MemberName::vmtarget (obj);
491
- k = (vmtarget == NULL ) ? NULL : vmtarget->method_holder ();
492
- if (k == NULL ) {
493
- report_error (" null vmtarget found" );
494
- return NULL ;
495
- }
496
- if (!parse_terminator ()) {
497
- report_error (" missing terminator" );
498
- return NULL ;
499
- }
500
- return k;
496
+ if (!parse_terminator ()) {
497
+ report_error (" missing terminator" );
498
+ return NULL ;
501
499
}
502
- obj = ciReplay::obj_field (obj, field) ;
503
- // array
504
- if ( obj != NULL && obj-> is_objArray ()) {
505
- objArrayOop arr = (objArrayOop)obj;
506
- int index = parse_int ( " index " );
507
- if ( index >= arr-> length ()) {
508
- report_error ( " bad array index" );
509
- return NULL ;
510
- }
511
- obj = arr-> obj_at ( index ) ;
500
+ return k ;
501
+ }
502
+ obj = ciReplay::obj_field (obj, field);
503
+ // array
504
+ if (obj != NULL && obj-> is_objArray ()) {
505
+ objArrayOop arr = (objArrayOop)obj;
506
+ int index = parse_int ( " index" );
507
+ if ( index >= arr-> length ()) {
508
+ report_error ( " bad array index " );
509
+ return NULL ;
512
510
}
513
- } while (obj != NULL );
514
- if (obj == NULL ) {
515
- report_error (" null field found" );
516
- return NULL ;
511
+ obj = arr->obj_at (index );
517
512
}
518
- k = obj->klass ();
513
+ } while (obj != NULL );
514
+ if (obj == NULL ) {
515
+ report_error (" null field found" );
516
+ return NULL ;
519
517
}
518
+ k = obj->klass ();
520
519
return k;
521
520
}
522
521
0 commit comments