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

Allow some VM.isXXX queries to be constant-foldable

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      Peter Levart suggests, in his review for JDK-8261407, to patch VM::isModuleSystemInited(), VM::isBooted(), and VM::isShutdown() to be constant foldable by the hotspot compiler.

      https://github.com/openjdk/jdk/pull/6889/files#r804436642

      It appears a few APIs, including FileSystems.getDefault(), would be thus foldable. A few other users checking for the integer initialization level, such as ClassLoader.getSystemClassLoader(), may be migrated and become foldable as well.

      Peter also has a first draft: https://github.com/plevart/jdk/commit/e918ccc52bbc288f6721af5fa66d8f7a8cc880cf


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: