mes/build-aux
Ekaitz 1ec88d0109 mescc: Fix switch statements' fallthrough
Flattens case structures as nyacc is giving consecutive cases as a
nested block like:

    (case testA
      (case testB
        (case testC BODY)))

We convert to:

    ((case testA (expr-stmt))
     (case testB (expr-stmt))
     (case testC BODY))

And then treat them as independent cases. For the fallthrough we just
add a jump to each case's body right before its clause (each of the case
blocks is responsible of adding its own jump to its body):

        // This doesn't have it because it's the first
    CASE1:
        testA
    CASE1_BODY:

        goto CASE2_BODY
    CASE2:
        testB
    CASE2_BODY:

        goto CASE3_BODY
    CASE3:
        testB
    CASE3_BODY:

This enables complex fallthrough schemes comparing to what was done
before.

* module/mescc/compile.scm
  (ast->info)[switch]{flatten-cases}: New variable.
  (ast->info)[switch]{statements}: Use flatten-cases on it.
  (switch->expr): Remove unneeded matchers and add jumps to body.
* build-aux/check-mescc.sh(xfail-tests): Remove
  lib/tests/scaffold/66-local-char-array.c
2023-09-13 13:48:33 +02:00
..
GNUmakefile.in build: Generate reproducible doc/version.texi. 2023-09-09 14:05:28 +02:00
bootstrap.sh.in build: Cater for colliding basename in C sources. 2023-05-02 10:22:45 +02:00
build-guile.sh mescc: RISC-V64 code generation. 2023-09-12 11:04:11 +02:00
build-lib.sh build: Cater for colliding basename in C sources. 2023-05-02 10:22:45 +02:00
build-mes.sh mescc: Support --bootstrap build on ARM. 2021-05-01 16:10:49 +02:00
build-scaffold.sh build: Drop support for mescc-tools 0.5.2. 2023-05-03 14:52:25 +02:00
build-source-lib.sh ARM: libtcc1: Add div.c, __memcpy, __memmove, __memset. 2021-01-23 08:43:44 +01:00
build.sh.in riscv64: Cater for M2-Planet. 2023-09-12 11:04:11 +02:00
cc.sh build: Cater for colliding basename in C sources. 2023-05-02 10:22:45 +02:00
cflags.sh riscv64: Cater for M2-Planet. 2023-09-12 11:04:11 +02:00
check-boot.sh boot: Add gc test. 2020-08-16 17:36:55 +02:00
check-mes.sh tests: Add gc.test. 2020-04-25 16:39:43 +02:00
check-mescc.sh mescc: Fix switch statements' fallthrough 2023-09-13 13:48:33 +02:00
check.sh.in Distinguish between gcc and mescc; select LIBS accordingly. 2020-10-06 10:04:41 +02:00
config.make.in configure: Use GUILD_OPTIMIZE=-O1 for Guile-3. 2020-10-07 14:09:24 +02:00
config.sh.in x86_64: build: Cater for M2-Planet. 2023-09-12 11:04:02 +02:00
configure-lib.sh x86: lib: Use __init_io. 2023-09-12 11:04:11 +02:00
export.make x86_64: build: Cater for M2-Planet. 2023-09-12 11:04:02 +02:00
gendocs.sh build: web: New target. 2018-07-28 11:37:47 +02:00
gitlog-to-changelog build: Generate ChangeLog reproducibly. Thanks, Timothy! 2019-12-13 21:52:29 +01:00
indent.sh mes: Grand indent: prepare. 2019-05-13 01:07:32 +02:00
install.sh.in lib: stat: Use SYS_stat64 for 32bit platforms. 2022-10-29 13:17:58 +02:00
manifest.scm guix: Update packaging. 2019-09-09 16:04:16 +02:00
mes-snarf.scm build: Update snarfer. 2020-09-27 19:07:00 +02:00
pointer.sh kaem.run: Remove --bootstrap-mode. 2023-05-03 08:03:48 +02:00
pre-inst-env.in build: Resurrect running mescc from elsewhere. 2020-10-06 10:44:50 +02:00
setup-mes.sh Add missing copyright headers. 2018-07-23 19:10:34 +02:00
snarf.sh core: Split-out stack.c 2020-07-19 08:53:46 +02:00
test-boot.sh build: Simplify. 2019-06-08 15:36:22 +02:00
test-c.sh mescc: Mes C Library: Support gcc-10. 2020-10-06 13:13:44 +02:00
test-driver build: Simplify. 2019-06-08 15:36:22 +02:00
test-suite.sh build: Use bash if available to avoid dash problems. 2019-06-25 21:40:43 +02:00
trace.sh build: Simplify. 2019-06-08 15:36:22 +02:00
uninstall.sh.in build: Simplify. 2019-06-08 15:36:22 +02:00