comparison src/share/vm/oops/constantPoolKlass.cpp @ 1602:136b78722a08

6939203: JSR 292 needs method handle constants Summary: Add new CP types CONSTANT_MethodHandle, CONSTANT_MethodType; extend 'ldc' bytecode. Reviewed-by: twisti, never
author jrose
date Wed, 09 Jun 2010 18:50:45 -0700
parents e9ff18c4ace7
children 083fde3b838e
comparison
equal deleted inserted replaced
1585:49fac4acd688 1602:136b78722a08
370 // unresolved_klass_at requires lock or safe world. 370 // unresolved_klass_at requires lock or safe world.
371 oop entry = *cp->obj_at_addr(index); 371 oop entry = *cp->obj_at_addr(index);
372 entry->print_value_on(st); 372 entry->print_value_on(st);
373 } 373 }
374 break; 374 break;
375 case JVM_CONSTANT_MethodHandle :
376 st->print("ref_kind=%d", cp->method_handle_ref_kind_at(index));
377 st->print(" ref_index=%d", cp->method_handle_index_at(index));
378 break;
379 case JVM_CONSTANT_MethodType :
380 st->print("signature_index=%d", cp->method_type_index_at(index));
381 break;
375 default: 382 default:
376 ShouldNotReachHere(); 383 ShouldNotReachHere();
377 break; 384 break;
378 } 385 }
379 st->cr(); 386 st->cr();
435 guarantee((*base)->is_instance(), "should be instance"); 442 guarantee((*base)->is_instance(), "should be instance");
436 } else { 443 } else {
437 // can be non-perm, can be non-instance (array) 444 // can be non-perm, can be non-instance (array)
438 } 445 }
439 } 446 }
447 // FIXME: verify JSR 292 tags JVM_CONSTANT_MethodHandle, etc.
440 base++; 448 base++;
441 } 449 }
442 guarantee(cp->tags()->is_perm(), "should be in permspace"); 450 guarantee(cp->tags()->is_perm(), "should be in permspace");
443 guarantee(cp->tags()->is_typeArray(), "should be type array"); 451 guarantee(cp->tags()->is_typeArray(), "should be type array");
444 if (cp->cache() != NULL) { 452 if (cp->cache() != NULL) {