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

(regex) Minor Pattern cleanup

    Details

      Backports

        Description

        When building Pattern with character classes, e.g., "[a-z]", we redundantly create two different - but identical - BmpCharPredicate lambdas; we could instead turn the simple BitClass class into a BmpCharPredicate instead (it currently extends from CharProperty/Node, but is no longer used as such). Fixing this reduces allocations when compiling a common type of regexes.

        This inefficiency is technically a regression since JDK-6328855 et al, but the impact is small.

        There are also a few instances of other smells, like unused variables/classes etc, that should be cleaned up.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  redestad Claes Redestad
                  Reporter:
                  redestad Claes Redestad
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: