[Snek] [keith-packard/snek] 78ba8f: Check for spurious break/continue statements

Keith Packard noreply at github.com
Mon Feb 11 09:20:08 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/keith-packard/snek
  Commit: 78ba8f068d829ffbf3861bee0cf5e17dbb3f24e3
      https://github.com/keith-packard/snek/commit/78ba8f068d829ffbf3861bee0cf5e17dbb3f24e3
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-11 (Mon, 11 Feb 2019)

  Changed paths:
    M snek-code.c

  Log Message:
  -----------
  Check for spurious break/continue statements

These result in snek_op_forward instructions left in the code as they
won't get patched into regular branches.

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: 29a98e88018af7efc3f860bc7a3bc8dd96bddb88
      https://github.com/keith-packard/snek/commit/29a98e88018af7efc3f860bc7a3bc8dd96bddb88
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-11 (Mon, 11 Feb 2019)

  Changed paths:
    M snek-gram.ll

  Log Message:
  -----------
  Don't print value of assignment instructions

These aren't printed by python, so don't print them in snek.

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: 863800b36dc0319107c897eaece503405e58851d
      https://github.com/keith-packard/snek/commit/863800b36dc0319107c897eaece503405e58851d
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-11 (Mon, 11 Feb 2019)

  Changed paths:
    M test/Makefile
    A test/float.py
    M test/for-nested.py

  Log Message:
  -----------
  Add test for large (maximal exponent) floating point values

If we only test the top 7 bits of the exponent, large floating point
values which are not inf or nan will masquerade as offsets and cause
chaos in the interpreter.

This test checks to make sure the interpreter tests all 8 bits of the
exponent.

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: 95d61b51d9c4c314abf8695e85c3231379774377
      https://github.com/keith-packard/snek/commit/95d61b51d9c4c314abf8695e85c3231379774377
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-11 (Mon, 11 Feb 2019)

  Changed paths:
    M snek-poly.c
    M snek.h

  Log Message:
  -----------
  Fix NaN generation and test by adding 8th exponent bit

32-bit IEEE floats have 1 sign bit, 8 exponent bits and 23 mantissa
bits. The exponent bits aren't in the top 8 bits, so we need to add
the 8th bit in all of our NaN testing and generation logic. This
reduces the possible offset range from 16MB to only 8MB. We could get
back the other bit by using the sign bit.

Signed-off-by: Keith Packard <keithp at keithp.com>


Compare: https://github.com/keith-packard/snek/compare/a23f6dda65bd...95d61b51d9c4


More information about the Snek mailing list