Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong order of PUTGET operands in JS interpreter #2

Open
stasoid opened this issue Nov 16, 2021 · 0 comments
Open

Wrong order of PUTGET operands in JS interpreter #2

stasoid opened this issue Nov 16, 2021 · 0 comments

Comments

@stasoid
Copy link

stasoid commented Nov 16, 2021

PUTGET in JS interpreter first pops x, then y. John's and Milo's interpreters pop y first.
Looking at the code one might think that John's interpreter pops x first, but because of this bug it's the other way around.

The following program prints A in John's and Milo's interpreters, but JS interpreter prints Z instead.

xA                      x
Zx                     xx
  x                   x x
   x                 x  x
    x               x   x
     x             x    x
      x      x    x     x
       x      x  x    xx
        x      x x   x
         x      xx   x
          x      x  x
           x        x
            x      x
             x     x
              x  xx
               xx

Try John's online.
Try Milo's online.
Try Chris's online.

@stasoid stasoid mentioned this issue Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant