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

Evaluation order for binary operators can be improved

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 8
    • 8
    • core-libs
    • None
    • b115
    • generic
    • generic

    Description

      JDK-8026137 fixed evaluation order to conform to the ECMA specification, but there are more cases where we can over-go strict order:

       - when loading right hand side from a local slot
       - when right hand side is a unary/binary/ternary operator whose children have no side effects
       - when left hand side already is JS-primitive or does not have to be converted to JS-primitive (already partially implemented)

      Also, currently string is treated as object type while it is a primitive type as far as ECMA/JS is concerned.

      Attachments

        Activity

          People

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: