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

4.10.1.9: Wrong order of operands in dup2 rule

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 10
    • 9
    • specification
    • vm

      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.

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

              Created:
              Updated:
              Resolved: