* module/language/c99/compiler.mes (expr->arg): Also push parameter,
always return info.
(ast->info): Loop over args. Fixes using function calls in arguments.
* module/mes/libc-i386.mes (i386:push-arg): Remove.
(i386:call, i386:call-accu): Remove arguments parameter.
* doc/examples/t.c: Test it.
* module/mes/libc-i386.mes (XXjump): New function.
* module/mes/libc-i386.scm: Export it.
* module/language/c99/compiler.mes (case->jump-info, ast->info): Use it.
* scaffold/t.c: Test it.
* GNUmakefile (cons-mes): New target.
* scaffold/cons-mes.c: New file.
* scaffold/mini-mes.c:
* module/mes/libc-i386.mes (i386:Xjump-z, i386:Xjump-c,
i386:Xjump-nc): New functions.
* module/mes/libc-i386.scm: Export them.
* module/language/c99/compiler.mes (case->jump-info, test-jump->info,
ast->info): Use them.
* doc/examples/t.c: Test it.
* doc/examples/mini-mes.c: Run it.
* lib.c (dump)[MES_HACK]: Dump small hello-world sexp, to be handled by
* doc/examples/tiny-mes.c (display_): New function.
* module/mes/libc-i386.mes (i386:accu->base, i386:mem->accu,
i386:mem+n->accu): New functions.
* module/mes/libc-i386.scm: Export them.
* GNUmakefile (mes-32): New target.
* module/language/c99/compiler.mes (write-any): Catch writing of
procedure and give more debug information.
(ref-local, ref-global): Remove.
(push-global-ref, push-global, push-ident-ref): New functions.
(push-ident): New function.
(expr->arg): Use them.
(ident->accu, ident->accu, accu->ident, value->ident, ident->base):
Take info parameter, also handle globals.
(ident-address->accu, ident->global, cstring->number): New functions.
(ast->info): Update.
* module/mes/libc-i386.mes (i386:ret-local): Remove.
(i386:push-global-ref): Rename from i386:ref-global.
(i386:push-local): Rename from i386:ref-local.
(i386:value->local): Rename from i386:local-assign.
(i386:push-global, i386:push-local-ref, i386:value->global,
i386:local-address->accu): New functions.
* module/mes/libc-i386.scm: Export them.
* module/language/c99/compiler.mes (ast->info): Bugfix: locals.
Add i--, --i. Properly support i++, ++i.
* module/mes/libc-i386.mes (i386:function-locals): Support 8 local vars.
* scaffold/t.c (test): Test it.
* module/language/c99/compiler.mes (ast->info): Handle for, pre-inc.
* GNUmakefile (main): New target.
* doc/examples/main.c:
(exit, write, strlen,puts)[__GNUC__]: New functions; import from micro-mes.c
(_start): New function.
* module/language/c99/compiler.mes (expr->arg): Bugfix argv: Use
size=4 (int).
(statement->text+symbols+locals): Bugfixes: array-ref, initialize with
immediate, initialize with local.
(formals->locals): Bugfix: formals counted down from -1 [WAS: down to
-1].
* module/mes/libc-i386.mes (i386:call): Reverse args pushes to match
formals index changes.
(i386:write): Update for changed formals push order.
(i386:mem->accu, i386:value->accu): New functions.
* module/mes/libc-i386.scm (mes): Export them.
* doc/examples/micro-mes.c (eputs, puts, fputs): Make identical with
mescc's implementations.
(main): Print argv[0] and (unconditionally; crash if not given) argv[1].
* module/language/c99/compiler.mes (accu->ident): New function.
(statement->text+symbols+locals): Use it to implement initialization
with immediate, local.
(_start): Call main with argc,argv [WAS: 0,0].
* module/mes/libc-i386.mes (i386:push-accu, i386:accu->local): New
functions.
* module/mes/libc-i386.scm: Export them.
* doc/examples/micro-mes.c (main): Return argc as exit status.
* module/language/c99/compiler.mes (expr->arg): Handle array-ref (int
only).
(byte->hex, asm->hex): New functions.
(statement->text+symbols+locals): Use it to implement asm ().
* module/mes/libc-i386.mes (eputs, exit, puts): Save stack pointer,
fill parameter registers from stack.
* module/language/c99/compiler.mes (formal->text): Fill parameter
registers from stack memory.
(formals->text): Save stack pointer.
* module/mes/bytevectors.mes
* module/mes/elf-util.mes: New file.
* module/mes/elf.mes: Use it.
(make-elf): Generate symbol-table string-table.
* module/mes/elf-util.scm: New file.
* module/mes/elf.scm: Use it.
* module/language/c99/compiler.mes: Include it.
* module/language/c99/compiler.scm: Include it.
* module/mes/libc-i386.mes (call, eputs, exit, puts): New functions.
* module/mes/libc-i386.scm: Export them.
* module/language/c99/compiler.mes: New file.
* module/language/c99/compiler.scm: Include it.
* module/mes/elf.mes: Move (mes-use-module) into cond-expand.
* module/mes/elf.scm: New file.
* module/mes/libc-i386.scm: New file.
* module/nyacc/lang/c99/parser.mes: Add missing module includes.
* module/nyacc/lang/util.mes: Add missing module include.
* scripts/mescc.mes: Use Nyacc.
* guile/mescc.scm: New file.
* GNUmakefile (guile-mescc): Run it.
* build-aux/mes-snarf.scm (symbol->names): New function
(function->environment): Initialize symbol.
(generate-includes): Also write .symbol-names.i.
* mes.c (mes_symbols): Include it. Remove internal_lookup_symbol.
* display.c (display): Handle display of nil in symbol list.
* reader.c (internal_lookup_symbol): Remove name-fu.