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

Update Bytecodes data to be mostly compile time constants

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • hotspot
    • b16

      Bytescodes contains various arrays which are all effectively compile time constants, but are not defined as such. Instead the data is filled in by bytecodes_init() during VM initialization. We can make everything except _flags compile time constants easily by using some macros and C++14 constexpr. We can also ensure the bytecodes data is in the right order by asserting such in debug builds removing the reasoning for not making it a compile time constant in the first place.

      _flags might be able to be made compile time constant using some constexpr tricks, but that will not be tackled in this enhancement.

            jcking Justin King
            jcking Justin King
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: