Update Bytecodes data to be mostly compile time constants

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: