389 bc.number_of_pairs() < BinarySwitchThreshold 390 ? Bytecodes::_fast_linearswitch 391 : Bytecodes::_fast_binaryswitch 392 ); 393 #endif 394 break; 395 } 396 case Bytecodes::_fast_linearswitch: 397 case Bytecodes::_fast_binaryswitch: { 398 #ifndef CC_INTERP 399 (*bcp) = Bytecodes::_lookupswitch; 400 #endif 401 break; 402 } 403 404 case Bytecodes::_invokespecial : { 405 rewrite_invokespecial(bcp, prefix_length+1, reverse, invokespecial_error); 406 break; 407 } 408 409 case Bytecodes::_getstatic : // fall through 410 case Bytecodes::_putstatic : // fall through 411 case Bytecodes::_getfield : // fall through 412 case Bytecodes::_putfield : // fall through 413 case Bytecodes::_invokevirtual : // fall through 414 case Bytecodes::_invokestatic : 415 case Bytecodes::_invokeinterface: 416 case Bytecodes::_invokehandle : // if reverse=true 417 rewrite_member_reference(bcp, prefix_length+1, reverse); 418 break; 419 case Bytecodes::_invokedynamic: 420 rewrite_invokedynamic(bcp, prefix_length+1, reverse); 421 break; 422 case Bytecodes::_ldc: 423 case Bytecodes::_fast_aldc: // if reverse=true 424 maybe_rewrite_ldc(bcp, prefix_length+1, false, reverse); 425 break; 426 case Bytecodes::_ldc_w: 427 case Bytecodes::_fast_aldc_w: // if reverse=true 428 maybe_rewrite_ldc(bcp, prefix_length+1, true, reverse); 429 break; 430 case Bytecodes::_jsr : // fall through 431 case Bytecodes::_jsr_w : nof_jsrs++; break; 432 case Bytecodes::_monitorenter : // fall through | 389 bc.number_of_pairs() < BinarySwitchThreshold 390 ? Bytecodes::_fast_linearswitch 391 : Bytecodes::_fast_binaryswitch 392 ); 393 #endif 394 break; 395 } 396 case Bytecodes::_fast_linearswitch: 397 case Bytecodes::_fast_binaryswitch: { 398 #ifndef CC_INTERP 399 (*bcp) = Bytecodes::_lookupswitch; 400 #endif 401 break; 402 } 403 404 case Bytecodes::_invokespecial : { 405 rewrite_invokespecial(bcp, prefix_length+1, reverse, invokespecial_error); 406 break; 407 } 408 409 case Bytecodes::_putstatic : 410 case Bytecodes::_putfield : { 411 // Check if any final field of the class given as parameter is modified 412 // outside of initializer methods of the class. Fields that are modified 413 // are marked with a flag. For marked fields, the compilers do not perform 414 // constant folding (as the field can be changed after initialization). 415 // 416 // The check is performed after verification and only if verification has 417 // succeeded. Therefore, the class is guaranteed to be well-formed. 418 InstanceKlass* klass = method->method_holder(); 419 u2 bc_index = Bytes::get_Java_u2(bcp + prefix_length + 1); 420 constantPoolHandle cp(method->constants()); 421 Symbol* field_name = cp->name_ref_at(bc_index); 422 Symbol* field_sig = cp->signature_ref_at(bc_index); 423 Symbol* ref_class_name = cp->klass_name_at(cp->klass_ref_index_at(bc_index)); 424 425 if (klass->name() == ref_class_name) { 426 fieldDescriptor fd; 427 klass->find_field(field_name, field_sig, &fd); 428 if (fd.access_flags().is_final()) { 429 if (fd.access_flags().is_static()) { 430 assert(c == Bytecodes::_putstatic, "must be putstatic"); 431 if (!method->is_static_initializer()) { 432 fd.set_has_initialized_final_update(true); 433 } 434 } else { 435 assert(c == Bytecodes::_putfield, "must be putfield"); 436 if (!method->is_object_initializer()) { 437 fd.set_has_initialized_final_update(true); 438 } 439 } 440 } 441 } 442 } 443 // fall through 444 case Bytecodes::_getstatic : // fall through 445 case Bytecodes::_getfield : // fall through 446 case Bytecodes::_invokevirtual : // fall through 447 case Bytecodes::_invokestatic : 448 case Bytecodes::_invokeinterface: 449 case Bytecodes::_invokehandle : // if reverse=true 450 rewrite_member_reference(bcp, prefix_length+1, reverse); 451 break; 452 case Bytecodes::_invokedynamic: 453 rewrite_invokedynamic(bcp, prefix_length+1, reverse); 454 break; 455 case Bytecodes::_ldc: 456 case Bytecodes::_fast_aldc: // if reverse=true 457 maybe_rewrite_ldc(bcp, prefix_length+1, false, reverse); 458 break; 459 case Bytecodes::_ldc_w: 460 case Bytecodes::_fast_aldc_w: // if reverse=true 461 maybe_rewrite_ldc(bcp, prefix_length+1, true, reverse); 462 break; 463 case Bytecodes::_jsr : // fall through 464 case Bytecodes::_jsr_w : nof_jsrs++; break; 465 case Bytecodes::_monitorenter : // fall through |