src/share/vm/oops/cpCache.cpp

Print this page
rev 5729 : 8029396: PPC64 (part 212): Several memory ordering fixes in C-code.


 346     assert(method_type_index >= 0 && method_type_index < resolved_references->length(), "oob");
 347     assert(resolved_references->obj_at(method_type_index) == NULL, "init just once");
 348     resolved_references->obj_at_put(method_type_index, method_type());
 349   }
 350 
 351   release_set_f1(adapter());  // This must be the last one to set (see NOTE above)!
 352 
 353   // The interpreter assembly code does not check byte_2,
 354   // but it is used by is_resolved, method_if_resolved, etc.
 355   set_bytecode_1(invoke_code);
 356   NOT_PRODUCT(verify(tty));
 357   if (TraceInvokeDynamic) {
 358     this->print(tty, 0);
 359   }
 360 }
 361 
 362 Method* ConstantPoolCacheEntry::method_if_resolved(constantPoolHandle cpool) {
 363   // Decode the action of set_method and set_interface_call
 364   Bytecodes::Code invoke_code = bytecode_1();
 365   if (invoke_code != (Bytecodes::Code)0) {
 366     Metadata* f1 = (Metadata*)_f1;
 367     if (f1 != NULL) {
 368       switch (invoke_code) {
 369       case Bytecodes::_invokeinterface:
 370         assert(f1->is_klass(), "");
 371         return klassItable::method_for_itable_index((Klass*)f1, f2_as_index());
 372       case Bytecodes::_invokestatic:
 373       case Bytecodes::_invokespecial:
 374         assert(!has_appendix(), "");
 375       case Bytecodes::_invokehandle:
 376       case Bytecodes::_invokedynamic:
 377         assert(f1->is_method(), "");
 378         return (Method*)f1;
 379       }
 380     }
 381   }
 382   invoke_code = bytecode_2();
 383   if (invoke_code != (Bytecodes::Code)0) {
 384     switch (invoke_code) {
 385     case Bytecodes::_invokevirtual:
 386       if (is_vfinal()) {




 346     assert(method_type_index >= 0 && method_type_index < resolved_references->length(), "oob");
 347     assert(resolved_references->obj_at(method_type_index) == NULL, "init just once");
 348     resolved_references->obj_at_put(method_type_index, method_type());
 349   }
 350 
 351   release_set_f1(adapter());  // This must be the last one to set (see NOTE above)!
 352 
 353   // The interpreter assembly code does not check byte_2,
 354   // but it is used by is_resolved, method_if_resolved, etc.
 355   set_bytecode_1(invoke_code);
 356   NOT_PRODUCT(verify(tty));
 357   if (TraceInvokeDynamic) {
 358     this->print(tty, 0);
 359   }
 360 }
 361 
 362 Method* ConstantPoolCacheEntry::method_if_resolved(constantPoolHandle cpool) {
 363   // Decode the action of set_method and set_interface_call
 364   Bytecodes::Code invoke_code = bytecode_1();
 365   if (invoke_code != (Bytecodes::Code)0) {
 366     Metadata* f1 = f1_ord();
 367     if (f1 != NULL) {
 368       switch (invoke_code) {
 369       case Bytecodes::_invokeinterface:
 370         assert(f1->is_klass(), "");
 371         return klassItable::method_for_itable_index((Klass*)f1, f2_as_index());
 372       case Bytecodes::_invokestatic:
 373       case Bytecodes::_invokespecial:
 374         assert(!has_appendix(), "");
 375       case Bytecodes::_invokehandle:
 376       case Bytecodes::_invokedynamic:
 377         assert(f1->is_method(), "");
 378         return (Method*)f1;
 379       }
 380     }
 381   }
 382   invoke_code = bytecode_2();
 383   if (invoke_code != (Bytecodes::Code)0) {
 384     switch (invoke_code) {
 385     case Bytecodes::_invokevirtual:
 386       if (is_vfinal()) {