[Snek] [keith-packard/snek] 8294a1: snek-duino: Shrink arduino GPIO code

Keith Packard noreply at github.com
Wed Feb 6 23:21:11 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/keith-packard/snek
  Commit: 8294a102b595f2b2f514d329cb72ef40f8d78a3c
      https://github.com/keith-packard/snek/commit/8294a102b595f2b2f514d329cb72ef40f8d78a3c
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M snek-duino/snek-duino.c

  Log Message:
  -----------
  snek-duino: Shrink arduino GPIO code

Change pin type to uint8_t everywhere.
Create arrays full of GPIO reg addrs in progmem.

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


  Commit: 0708cd6688f3b20bf1b768f8bcf011f82797b683
      https://github.com/keith-packard/snek/commit/0708cd6688f3b20bf1b768f8bcf011f82797b683
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M snek-duino/snek-duino.h
    M snek-memory.c
    M snek.h

  Log Message:
  -----------
  Move snek_mems to PROGMEM for arduino

Save a bit of data space.

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


  Commit: 7fc972434f2957ab18f4a8bf3e2cf5d80ac83c0e
      https://github.com/keith-packard/snek/commit/7fc972434f2957ab18f4a8bf3e2cf5d80ac83c0e
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M snek-memory.c
    M snek-parse.c
    M snek-poly.c

  Log Message:
  -----------
  Remove 'inline' annotation from a pile of functions

Let the compiler sort out whether these should be inlined.

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


  Commit: 792b98a291571e839a158aa3c59ab5e2405969c7
      https://github.com/keith-packard/snek/commit/792b98a291571e839a158aa3c59ab5e2405969c7
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M snek-duino/Makefile

  Log Message:
  -----------
  snek-duino: Correct __DATA_REGION_LENGTH

For some reason, the data area on arduino starts at 0x60, leaving
0x7a0 bytes for data.

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


  Commit: d1d32b362dc416db92453e5e6f1e5c6314de4c25
      https://github.com/keith-packard/snek/commit/d1d32b362dc416db92453e5e6f1e5c6314de4c25
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M snek-code.c
    M snek-duino/snek-duino.c
    M snek-duino/snek-duino.h
    M snek-error.c
    M snek-list.c
    M snek-string.c
    M snek.h

  Log Message:
  -----------
  Fix in list iterator. Report string bounds errors.

Sharing the string/list fetch functions caused errors at the end of
the tuple due to the intentional out of bounds access. Add a
'report_error' to both list and string fetch functions so that errors
can be suppressed in the 'in list' case and also now report string
bounds errors in other cases.

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


  Commit: 4c8ac132cdc2c1fd3062621a3379369e3dc68a90
      https://github.com/keith-packard/snek/commit/4c8ac132cdc2c1fd3062621a3379369e3dc68a90
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M examples/snek.py

  Log Message:
  -----------
  examples: Shrink snek.py game board. Keep user from going backwards

Going backwards never ends well, so just prevent it. Shrink the board
to make the game harder.

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


  Commit: 53cdbdd29f54de577bcbfbc9a1b7757e895e4485
      https://github.com/keith-packard/snek/commit/53cdbdd29f54de577bcbfbc9a1b7757e895e4485
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M snek-code.c
    M snek-func.c
    M snek-gram.ll
    M snek-list.c
    M snek-memory.c
    M snek-poly.c
    M snek-string.c
    M snek.h

  Log Message:
  -----------
  Simplify memory roots.

Use execution stack to root poly objects during allocation.
Export snek_code and snek_a and add them to the root list.

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


  Commit: 12ceb3b234cac285cb26d05c343d15d7cc5de012
      https://github.com/keith-packard/snek/commit/12ceb3b234cac285cb26d05c343d15d7cc5de012
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M snek-code.c
    M snek-gram.ll
    M snek-lex.c
    M snek-list.c
    M snek-poly.c
    M snek.h
    M test/Makefile
    A test/equal_is.py

  Log Message:
  -----------
  Fix is vs == comparisons. Parse 'in' operator.

'is' works like == for everything except lists where it's a shallow
compare. For tuples and strings, it's a deep compare.

Also parse 'in' operator; it's another CMPOP, except we need a
separate token so we can use it in the FOR statement.

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


  Commit: b3dfb6bd42dc04a9d3c48074a943737e19b673e6
      https://github.com/keith-packard/snek/commit/b3dfb6bd42dc04a9d3c48074a943737e19b673e6
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M snek-code.c
    M snek-frame.c
    M snek-func.c
    M snek-gram.ll
    M snek-parse.c
    M snek.h

  Log Message:
  -----------
  Delete some constant global parameters

Several functions are called with parameters which are always the same
global variables. Stop passing those and just fetch the global in the
function directly.

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


  Commit: 6de3d64cfbfec9c50215a463895fa7c1f04e905b
      https://github.com/keith-packard/snek/commit/6de3d64cfbfec9c50215a463895fa7c1f04e905b
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-02-06 (Wed, 06 Feb 2019)

  Changed paths:
    M test/Makefile

  Log Message:
  -----------
  Have 'make check' fail if any test fails.

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


Compare: https://github.com/keith-packard/snek/compare/fdf9f2625da9...6de3d64cfbfe


More information about the Snek mailing list