< prev index next >

src/share/vm/classfile/klassFactory.cpp

Print this page

        

@@ -35,18 +35,18 @@
 #include "prims/jvmtiEnvBase.hpp"
 #include "prims/jvmtiRedefineClasses.hpp"
 #include "trace/traceMacros.hpp"
 
 // called during initial loading of a shared class
-instanceKlassHandle KlassFactory::check_shared_class_file_load_hook(
-                                          instanceKlassHandle ik,
+InstanceKlass* KlassFactory::check_shared_class_file_load_hook(
+                                          InstanceKlass* ik,
                                           Symbol* class_name,
                                           Handle class_loader,
                                           Handle protection_domain, TRAPS) {
 #if INCLUDE_CDS && INCLUDE_JVMTI
-  assert(ik.not_null(), "sanity");
-  assert(ik()->is_shared(), "expecting a shared class");
+  assert(ik != NULL, "sanity");
+  assert(ik->is_shared(), "expecting a shared class");
 
   if (JvmtiExport::should_post_class_file_load_hook()) {
     assert(THREAD->is_Java_thread(), "must be JavaThread");
 
     // Post the CFLH

@@ -82,11 +82,11 @@
                              protection_domain,
                              NULL,
                              NULL,
                              ClassFileParser::BROADCAST, // publicity level
                              CHECK_NULL);
-      instanceKlassHandle new_ik = parser.create_instance_klass(true /* changed_by_loadhook */,
+      InstanceKlass* new_ik = parser.create_instance_klass(true /* changed_by_loadhook */,
                                                                 CHECK_NULL);
       if (cached_class_file != NULL) {
         new_ik->set_cached_class_file(cached_class_file);
       }
 

@@ -126,18 +126,15 @@
     // avoid the bug described by 7126851.
 
     JvmtiThreadState* state = jt->jvmti_thread_state();
 
     if (state != NULL) {
-      KlassHandle* h_class_being_redefined =
-        state->get_class_being_redefined();
+      Klass* k = state->get_class_being_redefined();
 
-      if (h_class_being_redefined != NULL) {
-        instanceKlassHandle ikh_class_being_redefined =
-          instanceKlassHandle(THREAD, (*h_class_being_redefined)());
-
-        *cached_class_file = ikh_class_being_redefined->get_cached_class_file();
+      if (k != NULL) {
+        InstanceKlass* class_being_redefined = InstanceKlass::cast(k);
+        *cached_class_file = class_being_redefined->get_cached_class_file();
       }
     }
 
     unsigned char* ptr = const_cast<unsigned char*>(stream->buffer());
     unsigned char* end_ptr = ptr + stream->length();

@@ -161,11 +158,11 @@
 
   return stream;
 }
 
 
-instanceKlassHandle KlassFactory::create_from_stream(ClassFileStream* stream,
+InstanceKlass* KlassFactory::create_from_stream(ClassFileStream* stream,
                                                      Symbol* name,
                                                      ClassLoaderData* loader_data,
                                                      Handle protection_domain,
                                                      const InstanceKlass* host_klass,
                                                      GrowableArray<Handle>* cp_patches,

@@ -198,14 +195,14 @@
                          host_klass,
                          cp_patches,
                          ClassFileParser::BROADCAST, // publicity level
                          CHECK_NULL);
 
-  instanceKlassHandle result = parser.create_instance_klass(old_stream != stream, CHECK_NULL);
+  InstanceKlass* result = parser.create_instance_klass(old_stream != stream, CHECK_NULL);
   assert(result == parser.create_instance_klass(old_stream != stream, THREAD), "invariant");
 
-  if (result.is_null()) {
+  if (result == NULL) {
     return NULL;
   }
 
   if (cached_class_file != NULL) {
     // JVMTI: we have an InstanceKlass now, tell it about the cached bytes
< prev index next >