447 static ClassLoaderData* register_loader(Handle class_loader); 448 protected: 449 // Mirrors for primitive classes (created eagerly) 450 static oop check_mirror(oop m) { 451 assert(m != NULL, "mirror not initialized"); 452 return m; 453 } 454 455 public: 456 // Note: java_lang_Class::primitive_type is the inverse of java_mirror 457 458 // Check class loader constraints 459 static bool add_loader_constraint(Symbol* name, Handle loader1, 460 Handle loader2, TRAPS); 461 static Symbol* check_signature_loaders(Symbol* signature, Handle loader1, 462 Handle loader2, bool is_method, TRAPS); 463 464 // JSR 292 465 // find a java.lang.invoke.MethodHandle.invoke* method for a given signature 466 // (asks Java to compute it if necessary, except in a compiler thread) 467 static methodHandle find_method_handle_invoker(Klass* klass, 468 Symbol* name, 469 Symbol* signature, 470 Klass* accessing_klass, 471 Handle *appendix_result, 472 TRAPS); 473 // for a given signature, find the internal MethodHandle method (linkTo* or invokeBasic) 474 // (does not ask Java, since this is a low-level intrinsic defined by the JVM) 475 static methodHandle find_method_handle_intrinsic(vmIntrinsics::ID iid, 476 Symbol* signature, 477 TRAPS); 478 479 // compute java_mirror (java.lang.Class instance) for a type ("I", "[[B", "LFoo;", etc.) 480 // Either the accessing_klass or the CL/PD can be non-null, but not both. 481 static Handle find_java_mirror_for_type(Symbol* signature, 482 Klass* accessing_klass, 483 Handle class_loader, 484 Handle protection_domain, 485 SignatureStream::FailureMode failure_mode, 486 TRAPS); 487 static Handle find_java_mirror_for_type(Symbol* signature, 488 Klass* accessing_klass, 489 SignatureStream::FailureMode failure_mode, 490 TRAPS) { 491 // callee will fill in CL/PD from AK, if they are needed 492 return find_java_mirror_for_type(signature, accessing_klass, Handle(), Handle(), 493 failure_mode, THREAD); 494 } 495 | 447 static ClassLoaderData* register_loader(Handle class_loader); 448 protected: 449 // Mirrors for primitive classes (created eagerly) 450 static oop check_mirror(oop m) { 451 assert(m != NULL, "mirror not initialized"); 452 return m; 453 } 454 455 public: 456 // Note: java_lang_Class::primitive_type is the inverse of java_mirror 457 458 // Check class loader constraints 459 static bool add_loader_constraint(Symbol* name, Handle loader1, 460 Handle loader2, TRAPS); 461 static Symbol* check_signature_loaders(Symbol* signature, Handle loader1, 462 Handle loader2, bool is_method, TRAPS); 463 464 // JSR 292 465 // find a java.lang.invoke.MethodHandle.invoke* method for a given signature 466 // (asks Java to compute it if necessary, except in a compiler thread) 467 static Method* find_method_handle_invoker(Klass* klass, 468 Symbol* name, 469 Symbol* signature, 470 Klass* accessing_klass, 471 Handle *appendix_result, 472 TRAPS); 473 // for a given signature, find the internal MethodHandle method (linkTo* or invokeBasic) 474 // (does not ask Java, since this is a low-level intrinsic defined by the JVM) 475 static Method* find_method_handle_intrinsic(vmIntrinsics::ID iid, 476 Symbol* signature, 477 TRAPS); 478 479 // compute java_mirror (java.lang.Class instance) for a type ("I", "[[B", "LFoo;", etc.) 480 // Either the accessing_klass or the CL/PD can be non-null, but not both. 481 static Handle find_java_mirror_for_type(Symbol* signature, 482 Klass* accessing_klass, 483 Handle class_loader, 484 Handle protection_domain, 485 SignatureStream::FailureMode failure_mode, 486 TRAPS); 487 static Handle find_java_mirror_for_type(Symbol* signature, 488 Klass* accessing_klass, 489 SignatureStream::FailureMode failure_mode, 490 TRAPS) { 491 // callee will fill in CL/PD from AK, if they are needed 492 return find_java_mirror_for_type(signature, accessing_klass, Handle(), Handle(), 493 failure_mode, THREAD); 494 } 495 |