mescc: Support pointer arrays and some arithmetic.
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 17 Apr 2017 00:15:11 +0000 (02:15 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 17 Apr 2017 00:15:11 +0000 (02:15 +0200)
commitd47f0f65c51e0eb32da867c8668694a57df983dd
tree64314c5f7e71d0c9bbfa375eed02c4ef3d223e9d
parent27327e7bc9df5bd26aaa998fbb397351424c5332
mescc: Support pointer arrays and some arithmetic.

* module/language/c99/compiler.mes (.name): Support **; handle type size.
  (.statements): Likewise.
  (push-local-de-ref): Likewise.
  (push-ident-de-ref): Likewise.
  (expr->arg): Likewise.
  (ident->accu):  Likewise.
  (base->ident-address):  Likewise.
  (ident-add): Likewise.
  (expr->accu):  Likewise.
  (decl->type):  Likewise.
  (formal->text):  Likewise.
  (int->global, ident-address->accu, ident-address->base): New functions.
  (ast->info): Support *, *[] ** declarations.
  (push-local-de-de-ref,  push-ident-de-de-ref): New functions.
* module/mes/as-i386.mes (i386:push-byte-local-de-ref): Rename from
  i386:push-local-de-ref.  Update callers.
  (i386:push-local-de-ref, i386:push-byte-local-de-de-ref,
  i386:accu-mem-add): New functions.
* module/mes/as-i386.scm (mes): Export them.
* scaffold/t.c (array_test): Test it.
module/language/c99/compiler.mes
module/mes/as-i386.mes
module/mes/as-i386.scm
scaffold/m.c
scaffold/t.c