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

Templatize literal_size

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • b08

    Description

      In the implementation of Hashtable<> there is a helper function named literal_size, which returns the "size" of the argument. It is used in the calculation of certain statistics about tables. Currently there is a set of overloads for specific "uninteresting" types, all of which return 0. This set needs to be modified as such uninteresting types are added or removed from the set of supported Hashtable value types.

      It would be much simpler to have a single "default" template for uninteresting types, and explicit overloads only for the interesting types.

      There is a comment suggesting such an approach was tried but ran into problems getting the desired specialization to be used. There seems to be no such problem now; there may have been a problem with some old compiler that is no longer used.

      Attachments

        Issue Links

          Activity

            People

              kbarrett Kim Barrett
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: