[Snek] [keith-packard/snek] efd988: Use snek_code_prev_insn() instead of snek_compile_...

Keith Packard noreply at github.com
Sun Oct 10 19:16:38 PDT 2021


  Branch: refs/heads/debian
  Home:   https://github.com/keith-packard/snek
  Commit: efd988437f09f2a2bd42af08c793ffe32362f5df
      https://github.com/keith-packard/snek/commit/efd988437f09f2a2bd42af08c793ffe32362f5df
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M snek-gram.ll

  Log Message:
  -----------
  Use snek_code_prev_insn() instead of snek_compile_prev

Be more consistent about using accessor functions.

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


  Commit: 8f5c7c8f101aab4da71eb3107e455edaadaf6888
      https://github.com/keith-packard/snek/commit/8f5c7c8f101aab4da71eb3107e455edaadaf6888
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M chips/atmega/snek-atmega.h
    M chips/avr/snek-avr.h
    M snek-print.c
    M snek.h

  Log Message:
  -----------
  Use strfromf for explicit float formats too

The default float format was using strfromf, but when a float format
was explicitly selected, sprintf was being used.

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


  Commit: 17aaba4da9ad3c4fe62a5afae7526ad4e3dfa9b1
      https://github.com/keith-packard/snek/commit/17aaba4da9ad3c4fe62a5afae7526ad4e3dfa9b1
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M chips/samd21/ao-stdio.c
    M chips/samd21/snek-eeprom.c

  Log Message:
  -----------
  chips/samd21: Prepare for picolibc stdio change

Picolibc is changing how stdio is initialized, removing the __iob
array and using three globals (stdin/stdout/stderr). Prepare for that
by allowing either new or old libraries to work with snek.

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


  Commit: b425a5710bdde44977adeab1b96616e651d2bac7
      https://github.com/keith-packard/snek/commit/b425a5710bdde44977adeab1b96616e651d2bac7
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M snek-parse.c

  Log Message:
  -----------
  Use new lola PARSE_TOP feature

Replace some static variables that aren't used outside of the parse
function with locals declared in the PARSE_TOP fragment.

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


  Commit: 34342a173a64b914b8496c18ba3db85b18729a34
      https://github.com/keith-packard/snek/commit/34342a173a64b914b8496c18ba3db85b18729a34
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M snek-gram.ll
    M snek-parse.c

  Log Message:
  -----------
  Share action code more effectively

Restructure action code to match equivalent code better, create
another static function to outline code and shrink binary.

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


  Commit: 845f4fb272a43475eb7e20bc17edad77fd00682d
      https://github.com/keith-packard/snek/commit/845f4fb272a43475eb7e20bc17edad77fd00682d
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

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

  Log Message:
  -----------
  Make snek_is_nan a global function

Saves a bunch of memory on avr devices

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


  Commit: 774e0d0d5010706696188f25c7e96140c67c64ae
      https://github.com/keith-packard/snek/commit/774e0d0d5010706696188f25c7e96140c67c64ae
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M snek-poly.c

  Log Message:
  -----------
  Fully order NaN

NaN is unordered in IEEE754, but we need all values to be ordered.
Make NaN larger than any other float (including inf) so that
dicts with NaN keys work correctly.

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


  Commit: 232aa788f13af9f0cc28c8488d593f95eaa63859
      https://github.com/keith-packard/snek/commit/232aa788f13af9f0cc28c8488d593f95eaa63859
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M snek-exec.c

  Log Message:
  -----------
  Fix compares with NaN

For NaN, all compares except for != are False.

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


  Commit: 8e0c91662efd5000030d7f840e0508520e07db78
      https://github.com/keith-packard/snek/commit/8e0c91662efd5000030d7f840e0508520e07db78
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M test/Makefile
    A test/pass-nan.py

  Log Message:
  -----------
  test: Test compares against NaN

Make sure that floats compare correctly with NaN

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


  Commit: 381c5391a73ee55e9d150515034f2dee84438438
      https://github.com/keith-packard/snek/commit/381c5391a73ee55e9d150515034f2dee84438438
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M test/pass-op.py

  Log Message:
  -----------
  test: Add test for all compare operators on numbers

Make sure all compare operators work against a range of numeric
values.

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


  Commit: 7b93916daf1b6cbef6049af2a7ca9b6fd1b9f6a2
      https://github.com/keith-packard/snek/commit/7b93916daf1b6cbef6049af2a7ca9b6fd1b9f6a2
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M chips/atmega/snek-atmega.defs
    M chips/atmega/snek-atmega.h
    M chips/avr/snek-avr.defs
    M chips/avr/snek-avr.h
    A snek-atof.c
    R snek-strtof.c

  Log Message:
  -----------
  chips/{avr,atmega}: Parse inf/nan for avr and atmega

Replace strtod with atof to save space while adding parsing of "inf"
and "nan". Also switch to using __flash attribute instead of PROGMEM
as that provides typechecking.

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


  Commit: 18fd50ce333433a40bbc00e63de4c228f8381627
      https://github.com/keith-packard/snek/commit/18fd50ce333433a40bbc00e63de4c228f8381627
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M README.md

  Log Message:
  -----------
  Note NaN fixes in README.md

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


  Commit: 89ce85a85063e4145ed4146318db8a0ded31cd4d
      https://github.com/keith-packard/snek/commit/89ce85a85063e4145ed4146318db8a0ded31cd4d
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M ports/nano-every/Makefile
    M ports/nano-every/snek-nano-every.builtin

  Log Message:
  -----------
  ports/nano-every: Add math funcs to nano-every port

There's plenty of ROM on this board.

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


  Commit: 6d15a6c7c87e164e82aa64edc70e9b6762c06bee
      https://github.com/keith-packard/snek/commit/6d15a6c7c87e164e82aa64edc70e9b6762c06bee
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M ports/xiao/Makefile

  Log Message:
  -----------
  ports/xiao: Update USB ids

Use an ID in the seeed vendor space

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


  Commit: ceb66bbbfdcfa877ce6807fd14ea45ff393ec37c
      https://github.com/keith-packard/snek/commit/ceb66bbbfdcfa877ce6807fd14ea45ff393ec37c
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M ports/ev3/snekserver.c

  Log Message:
  -----------
  ports/ev3: Avoid warnings about _GNU_SOURCE being redefined

Include snek.h before any other files as that header defines
_GNU_SOURCE. Doing this avoids having it be redefined later.

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


  Commit: ec14aad3692735375822203c74016f51113cdc25
      https://github.com/keith-packard/snek/commit/ec14aad3692735375822203c74016f51113cdc25
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M build-snek
    M snek-install.defs

  Log Message:
  -----------
  ports/nano-every: Include in build-snek script

The nano-every board uses a processor that current debian avr-gcc
doesn't support, so it isn't built by default. Add conditional rules
to allow it to be built form the build-snek script.

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


  Commit: 60a15438078577e5759f9003c576d0619ce44f9e
      https://github.com/keith-packard/snek/commit/60a15438078577e5759f9003c576d0619ce44f9e
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M snek-atof.c

  Log Message:
  -----------
  Shrink built-in atof function a bit

Skip 'nan' and 'inf' parsing when the float() builtin
is not present as those won't be needed for the lexer.

Use x*10+c instead of shifts as it's smaller. Use more efficient check
for exponent character.

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


  Commit: 5b2d578c954f8a0d71f73cef21810a99332874e8
      https://github.com/keith-packard/snek/commit/5b2d578c954f8a0d71f73cef21810a99332874e8
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M ports/duemilanove/Makefile
    M ports/grove/Makefile

  Log Message:
  -----------
  duemilanove, grove: Keep ROM image within limits

While the atmega32p rom holds 32kB, the upper 512B hold the boot
loader, so we need to make sure the image fits within the remaining space.

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


  Commit: b5307df770ac9c39bf3b0b79a4200a259816759a
      https://github.com/keith-packard/snek/commit/b5307df770ac9c39bf3b0b79a4200a259816759a
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M snek.defs

  Log Message:
  -----------
  Snek version 1.7

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


  Commit: 455f851bae7b6f5f750ae85d3369030e62b5c859
      https://github.com/keith-packard/snek/commit/455f851bae7b6f5f750ae85d3369030e62b5c859
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-10-10 (Sun, 10 Oct 2021)

  Changed paths:
    M README.md
    M build-snek
    M chips/atmega/snek-atmega.defs
    M chips/atmega/snek-atmega.h
    M chips/avr/snek-avr.defs
    M chips/avr/snek-avr.h
    M chips/samd21/ao-stdio.c
    M chips/samd21/snek-eeprom.c
    M ports/duemilanove/Makefile
    M ports/ev3/snekserver.c
    M ports/grove/Makefile
    M ports/nano-every/Makefile
    M ports/nano-every/snek-nano-every.builtin
    M ports/xiao/Makefile
    A snek-atof.c
    M snek-exec.c
    M snek-gram.ll
    M snek-install.defs
    M snek-parse.c
    M snek-poly.c
    M snek-print.c
    R snek-strtof.c
    M snek.defs
    M snek.h
    M test/Makefile
    A test/pass-nan.py
    M test/pass-op.py

  Log Message:
  -----------
  Merge branch 'main' into debian


  Commit: 8a58f65e583aa57821548d35f34ae1f745aaddae
      https://github.com/keith-packard/snek/commit/8a58f65e583aa57821548d35f34ae1f745aaddae
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-10-10 (Sun, 10 Oct 2021)

  Changed paths:
    M debian/control

  Log Message:
  -----------
  debian: Switch python3 depends to python3:any

Some kind of update

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


  Commit: 380e78dcefdb0fe1b505733878bb8322569e7913
      https://github.com/keith-packard/snek/commit/380e78dcefdb0fe1b505733878bb8322569e7913
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-10-10 (Sun, 10 Oct 2021)

  Changed paths:
    M debian/control

  Log Message:
  -----------
  debian: Update standards to 4.6.0.1

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


  Commit: 1a0f481959bba85fe3059e787850bdc8a3342c30
      https://github.com/keith-packard/snek/commit/1a0f481959bba85fe3059e787850bdc8a3342c30
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-10-10 (Sun, 10 Oct 2021)

  Changed paths:
    M debian/changelog

  Log Message:
  -----------
  debian: Version 1.7-1

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


  Commit: a7c9d9517242fd9b830e51cca7be864ccf17068f
      https://github.com/keith-packard/snek/commit/a7c9d9517242fd9b830e51cca7be864ccf17068f
  Author: Keith Packard <keithp at keithp.com>
  Date:   2021-10-10 (Sun, 10 Oct 2021)

  Changed paths:
    M debian/changelog

  Log Message:
  -----------
  debian: Version 1.7-2

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


Compare: https://github.com/keith-packard/snek/compare/5ea9275bde3a...a7c9d9517242


More information about the Snek mailing list