Jan Nieuwenhuizen
7a7bcda79e
mlibc: Tinycc support: __udivdi3, __umoddi3.
...
* lib/libc+tcc-gcc.c (__udivdi3, __umoddi3): Fix signature, do not
crash on simple integer devisions.
2017-12-03 20:40:49 +01:00
Jan Nieuwenhuizen
808af5001f
mlibc: New library layout; remove duplication.
...
* lib/libc+tcc-gcc.c: New file: Libc bits for GCC from libc-mes+tcc.c.
* lib/libc+tcc-mes.c: New file: Libc bits for MesCC from libc-mes+tcc.c.
* lib/libc+tcc.c: New file: Libc bits from libc-mes+tcc.c.
* lib/libc.c: New file: Merged from libc-mes.c, libc-gcc.c.
(abtoi): New function: Rename from _atoi.
* lib/linux+tcc-gcc.c: New file: Linux bits from libc-gcc+tcc.c.
* lib/linux+tcc-mes.c: New file: Linux bits from libc-mes+tcc.c.
* lib/linux-gcc.c: New file: Linux bits from libc-gcc.c.
* lib/linux-mes.c: New file: Linux bits from libc-mes.c.
* lib/mini-libc-gcc.c: New file.
* lib/mini-libc.c: New file: Libc bits from mini-libc-mes.c.
* lib/mini-linux-gcc.c: New file.
* lib/mini-linux-mes.c: New file: Linux bits from mini-libc-mes.c.
* lib/libc-gcc.c: Remove duplication using include now.
* lib/libc-mes.c: Likewise.
* lib/mini-libc-mes.c: Likewise.
* include/stdio.h (puts)[POSIX]: Remomve macro.
(fputc, fputs)[!POSIX]: New macro.
(fputc, fputs): Remove declaration.
* scaffold/tests/7j-strtoull.c (strtoull, test): Use abtoi.
* src/lib.c (fputs)[__MESC__]: Remove define.
* guile/guix/make.scm: Update for new library layout.
* make.scm: Likewise.
* build.sh: Likewise.
* install.sh: Likewise.
2017-12-03 13:56:21 +01:00
Jan Nieuwenhuizen
d7b35f6b1e
mlibc: Tinycc support: itoab, for debugging.
...
* lib/libc-gcc.c (itoab): New function.
* lib/libc-mes.c (itoab): New function.
2017-12-03 10:33:05 +01:00
Jan Nieuwenhuizen
01af41e6f7
mlibc: Mescc-tools support: fix for [v]fprintf.
...
* lib/libc-mes+tcc.c (vfprintf): Bugfix: print to fd.
2017-12-02 08:46:41 +01:00
Jan Nieuwenhuizen
49d01a46fa
mlibc: Mescc-tools support: chmod.
...
* stage0/x86.M1 (SYS_chmod): New define.
* lib/libc-gcc.c (chmod): New function.
* lib/libc-mes.c (chmod): New function.
2017-11-26 18:45:10 +01:00
Jan Nieuwenhuizen
e8884d83e1
mlibc: GNU Gcc support: setjmp, longjmp.
...
* stage0/x86.M1 (jmp____*%ebx): New macro.
(mov____0x8(%ebp),%ebp): New macro.
(mov____0x8(%ebp),%esp): New macro.
* include/setjmp.h (jmp_buf): Redefine as struct.
* lib/libc-mes+tcc.c (longjmp, setjmp): Implement.
* scaffold/tests/80-setjmp.c: Test it.
* make.scm ("80-setjmp"): Build it.
* .gitignore: Ignore *.tcc-guile.
2017-11-26 13:10:46 +01:00
Jan Nieuwenhuizen
83f2a55c2c
mlibc: GNU Gcc support: ferror.
...
* lib/libc-mes+tcc.c (ferror): New function.
* include/stdio.h (ferror): Declare it.
2017-11-25 22:57:18 +01:00
Jan Nieuwenhuizen
0fa18b338d
build: mlib/include to include, move mlib to lib.
...
* include: Move from mlib/include.
* lib: Move from mlib.
* BOOTSTRAP: Update.
* HACKING: Update.
* guile/guix/make.scm: Update.
* make.scm: Update.
* module/language/c99/compiler.mes: Update.
2017-11-22 16:23:48 +01:00
Jan Nieuwenhuizen
d114634203
Prepare for 0.1 release: new directory structure.
...
* scripts/elf.mes: New file.
* scripts/include.mes: New file.
* scripts/mescc.mes: New file.
* scripts/paren.mes: New file.
* scripts/repl.mes: New file.
* doc/examples/main.c: Move from ./main.c.
* module/mes/base-0.mes: Move from ./base0.mes.
* module/mes/base.mes: Move from top.
* module/mes/elf.mes: Likewise.
* module/mes/let-syntax.mes: Likewise.
* module/mes/let.mes: Likewise.
* module/mes/mes.mes: Likewise.
* module/mes/quasiquote.mes: Likewise.
* module/mes/repl.mes: Likewise.
* module/mes/scm.mes: Likewise.
* module/mes/syntax.mes: Likewise.
* module/mes/lalr-0.mes: Move from lib/lalr.mes.
* module/mes/lalr.mes: Move from lib/lalr.scm.
* module/mes/match.mes: Move from lib/match.scm.
* module/mes/record-0.mes: Move from lib/record.mes.
* module/mes/record.mes: Move from lib/record.scm.
* module/mes/test.mes: Move flom lib/.
* module/rnrs/bytevectors.mes: Move from lib/rnrs.
* module/srfi/srfi-0.mes: Move from lib/srfi.
* module/srfi/srfi-1.mes: Likewise.
* module/srfi/srfi-9.mes: Likewise.
* module/language/c/lexer.mes: Move from ./c-lexer.scm.
* module/language/c/parser.mes: Move from ./mescc.scm.
* module/language/c/compiler.mes: New file, split from parser.mes.
* module/language/paren.mes: Move from ./paren.scm.
* module/mes/libc-i386.mes: New file, split from elf.mes.
* tests/base.test: Move from test/.
* tests/closure.test: Likewise.
* tests/let-syntax.test: Likewise.
* tests/let.test: Likewise.
* tests/match.test: Likewise.
* tests/quasiquote.test: Likewise.
* tests/record.test: Likewise.
* tests/scm.test: Likewise.
* hello.S: Remove.
* hello.c: Remove.
* loop2.mes: Remove.
* test/foo.test: Remove.
2016-10-12 23:40:11 +02:00
Jan Nieuwenhuizen
c38ae1ebc5
lib/match: ugly hygiene hack. FIXME.
2016-10-10 20:53:42 +02:00
Jan Nieuwenhuizen
2c7f26dbe6
mescc.scm: first a.out produced from main.c.
2016-08-14 01:44:42 +02:00
Jan Nieuwenhuizen
85f3d40e71
lib/match.scm: import.
2016-08-14 01:40:55 +02:00
Jan Nieuwenhuizen
da27cf183a
lib/srfi/srfi-1.scm: add append-map, filter, find.
2016-08-14 01:40:45 +02:00
Jan Nieuwenhuizen
1ddb703265
lib/rnrs/bytevectors.scm: minimal rnrs bytevectors.
2016-08-13 17:05:29 +02:00
Jan Nieuwenhuizen
066deeb183
remove debug output to stdout.
2016-08-12 12:06:59 +02:00
Jan Nieuwenhuizen
287c0284fe
Use IF iso COND as primitive; keep COND primitive as option.
2016-07-27 08:49:45 +02:00
Jan Nieuwenhuizen
ccb1d842f3
Revert "lib/lalr-debug.scm"
...
This reverts commit 084d1bea33d45f0653cdc6bef44dc295faef6b72.
2016-07-27 00:05:02 +02:00
Jan Nieuwenhuizen
300c997d43
lib/lalr-debug.scm
2016-07-26 23:34:00 +02:00
Jan Nieuwenhuizen
3864d434fc
split-up test suite, implement quasiquote in scheme.
2016-07-25 14:39:56 +02:00
Jan Nieuwenhuizen
07a5f716fc
lalr paren test
2016-07-24 12:08:21 +02:00
Jan Nieuwenhuizen
7c6283a6eb
lib/lalr.scm
2016-10-18 22:41:39 +02:00
Jan Nieuwenhuizen
d4e335b447
mes.c: add syntax, quasisyntax to reader....
2016-07-24 00:40:37 +02:00
Jan Nieuwenhuizen
28ae662e0e
srfi-9 records!
2016-07-24 00:14:40 +02:00
Jan Nieuwenhuizen
5126e16e66
trying to get records up....WIP
2016-07-23 14:39:33 +02:00
Jan Nieuwenhuizen
f61a6c2228
srfi-9
2016-07-23 13:13:21 +02:00
Jan Nieuwenhuizen
460a060423
lib/record.scm: import.
2016-07-23 12:58:25 +02:00
Jan Nieuwenhuizen
502336bf30
lib/srfi/srfi-0.scm: add.
2016-07-23 12:54:34 +02:00