mescc: Have micro-mes use if not to segfault.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 3 Jan 2017 17:22:56 +0000 (18:22 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 3 Jan 2017 17:22:56 +0000 (18:22 +0100)
commit38dc229a012ac6b4633a39bc081e62b1204ee5da
treeb87d5b488a849d8890762a2c7a1c969176f3b979
parent296449c6158de0e6cf79dedc246e3282780568c9
mescc: Have micro-mes use if not to segfault.

* module/language/c99/compiler.mes (write-any): Check explicitly on
  number?, report error otherwise.
  (statement->text+symbols+locals): Remove statement-offset.
  Handle compounds.  Handle very specific if.
  (function->symbols): Remove unused text-offset.
* doc/examples/micro-mes.c (main): If argc > 1 print argv1.  Fixes
  segfault :-)
* module/mes/elf-util.mes (symbols->text): Loop rather than map,
  feed text-offset.
* module/mes/libc-i386.mes (i386:local-test, i386:jump-le): New
  functions.
* module/mes/libc-i386.scm: Export them.
module/language/c99/compiler.mes
module/mes/elf-util.mes
module/mes/libc-i386.mes
module/mes/libc-i386.scm
scaffold/micro-mes.c