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

4.10.1.9: Wrong order of operands in dup2 rule

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: specification
    • Labels:
    • Subcomponent:
      vm

      Description

      In rule
          dup2Form1IsTypeSafe(Environment, InputOperandStack, OutputOperandStack):-
              popCategory1(InputOperandStack, Type1, TempStack),
              popCategory1(TempStack, Type2, _),
              canSafelyPushList(Environment, InputOperandStack, [Type1, Type2],
                                OutputOperandStack).
      [Type1, Type2] needs to be [Type2, Type1].

      canSafelyPushList pushes types one by one so that the tail of the list becomes the top of the stack.
      In case of this dup2 rule, Type1 needs to be on top of the stack after the operation.

        Attachments

          Activity

            People

            • Assignee:
              abuckley Alex Buckley
              Reporter:
              slukyanov Stanislav Lukyanov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: