Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8176705

Remove static functions in InstanceKlass

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      From [~mgerdin] There are still a bunch of *Klass methods which are static and have an InstanceKlass* (which used to be a handle) as their first parameter. Do you want to leave that to a future cleanup or fold it into this change?

      Example:
      1309 // Static methods that are used to implement member methods where an exposed this pointer
      1310 // is needed due to possible GCs
      1311 static bool link_class_impl (instanceKlassHandle this_k, bool throw_verifyerror, TRAPS);
      1312 static bool verify_code (instanceKlassHandle this_k, bool throw_verifyerror, TRAPS);
      1313 static void initialize_impl (instanceKlassHandle this_k, TRAPS);
      1314 static void initialize_super_interfaces (instanceKlassHandle this_k, TRAPS);
      1315 static void eager_initialize_impl (instanceKlassHandle this_k);
      1316 static void set_initialization_state_and_notify_impl (instanceKlassHandle this_k, ClassState state, TRAPS);
      1317 static void call_class_initializer_impl (instanceKlassHandle this_k, TRAPS);
      1318 static Klass* array_klass_impl (instanceKlassHandle this_k, bool or_null, int n, TRAPS);
      1319 static void do_local_static_fields_impl (instanceKlassHandle this_k, void f(fieldDescriptor* fd, Handle, TRAPS), Handle, TRAPS);
      1320 /* jni_id_for_impl for jfieldID only */
      1321 static JNIid* jni_id_for_impl (instanceKlassHandle this_k, int offset);
      1322

      All the above should probably be nonstatic member functions on InstanceKlass instead but had to be made static since a permgen gc could have moved "this" out from under the execution.

      Fix this after push for removing KlassHandles

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hseigel Harold Seigel
                Reporter:
                coleenp Coleen Phillimore
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: