4.10.1.9: Wrong order of operands in dup2 rule

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P5
    • 10
    • Affects Version/s: 9
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: