Jan Nieuwenhuizen
4b6d11e990
core: append2, append_reverse, reverse, reverse!: Create less garbage.
...
* src/mes.c (append_reverse): New function.
(reverse_x_): New function.
(append2): Use them to create less garbage.
* module/mes/scm.mes (reverse): Create less garbage.
* module/srfi/srfi-1.mes (reverse!): Rewrite, use core:reverse!.
(append-reverse): Remove.
2018-04-20 14:38:24 +02:00
Jan Nieuwenhuizen
62a369e6de
core: vector_to_list: Create less garbage.
...
* src/vector.c (vector_to_list): Create less garbage.
2018-04-20 13:22:47 +02:00
Jan Nieuwenhuizen
3330948a90
core: Optimize vector-map, vector-for-each.
...
* module/srfi/srfi-43.mes (vector-map): Optimize.
(vector-for-each): Optimize.
* tests/srfi-43.test: New file.
* tests/srfi-43.test-guile: New file.
* check.sh (tests): Add it.
* make.scm (mes-tests): Add it.
2018-04-20 13:06:00 +02:00
Jan Nieuwenhuizen
04d90849e1
Revert "build-32.sh"
...
This reverts commit ace8b6f1b52de58c9ab404ed13234f397dac6bdc.
2018-04-18 19:35:25 +02:00
Jan Nieuwenhuizen
53838fb6b6
build-32.sh
2018-04-16 20:25:31 +02:00
Jan Nieuwenhuizen
ac0baf84d4
core: Cleanup make_cell, remove tmp cells.
...
* src/mes.c (make_cell__): New function.
(make_cell_): Use it.
(length__): New function.
(tmp, tmp_num, tmp_num2, tmp_num_, tmp_num2_, make_tmps): Remove.
Update callers to use make_cell__ directly.
* src/vector.c (make_vector__): New function.
(make_vector_): Use it.
2018-04-14 08:15:49 +02:00
Jan Nieuwenhuizen
7cad0671f3
Revert "mlibc: Use memmove in realloc."
...
This reverts commit f47a21e3cb4814c4a30d10ff59e5c947441725e9.
2018-04-21 13:42:16 +02:00
Jan Nieuwenhuizen
1270c767cd
mlibc: Use memmove in realloc.
...
* src/libc.c (memmove): New function.
(realloc): Use it.
* src/libc+tcc.c (memmove): Remove.
2018-04-15 08:13:36 +02:00
Jan Nieuwenhuizen
d052876f85
mes: Add char-whitespace?
...
* module/srfi/srfi-14.mes (char-whitespace?): New function.
2018-04-15 08:04:09 +02:00
Jan Nieuwenhuizen
0d0c7a415b
mes: Move base-0.mes int boot-0.scm.
...
* module/mes/boot-02.scm: New file, rename from boot-0.scm.
* module/mes/boot-0.scm: Add base-0.mes.
* module/mes/base-0.mes: Remove.
2018-04-14 22:06:28 +02:00
Jan Nieuwenhuizen
b200366f27
mes: Unify mlibc-gcc and mes builds.
...
* make.scm (bin.gcc): Remove stray slash.
* src/mes.c: Unify mlibc-gcc and mes builds.
(gc_init_cells):
(gc_init_news):
(bload_env):
* src/reader.c (reader_read_character):
(reader_read_string):
2018-04-13 08:18:19 +02:00
Jan Nieuwenhuizen
3dc72ce20d
core: Remove local variables from gc.
...
* src/gc.c (gl_loop): Remove local variables.
2018-04-12 21:33:38 +02:00
Jan Nieuwenhuizen
a342791f2b
core: Listen to MES_SAFETY environment variable.
2018-04-12 07:08:09 +02:00
Jan Nieuwenhuizen
1bc4bc7894
core: Remove local variables from eval/apply.
...
* src/mes.c (eval_apply): Move all variables to global scope.
2018-04-12 07:07:24 +02:00
Jan Nieuwenhuizen
9b9a27b743
core: Remove MesCC reminder.
2018-04-12 07:06:40 +02:00
Jan Nieuwenhuizen
5b30d234cb
core: Update default memory settings.
...
* src/mes.c (MAX_ARENA_SIZE)[__MESC__]: Set to maximum 172100000.
2018-04-11 20:46:06 +02:00
Jan Nieuwenhuizen
b65e57be31
core: Tune debug printing.
...
* src/mes.c: Tune debug printing.
* src/gc.c: Likewise.
* module/mes/guile.mes: Likewise.
* HACKING: Describe it.
2018-04-09 07:12:38 +02:00
Jan Nieuwenhuizen
72fc46a572
core: Rewrite reader to create less garbage.
...
* src/reader.c (reader_read_line_comment): Rename from read_line_comment.
(reader_identifier_p): New function.
(reader_end_of_word_p): New function.
(reader_read_identifier_or_number): New function.
(reader_read_sexp_): Rewrite. Update callers.
(reader_read_list): Rewrite.
(reader_lookup_): Remove.
2018-04-09 08:41:30 +02:00
Jan Nieuwenhuizen
25907f514c
core: Add isspace.
...
* include/ctype.h (isspace): Declare.
* lib/libc.c (isspace): New function.
2018-04-10 21:51:15 +02:00
Jan Nieuwenhuizen
45e347588c
core: Rewrite string reader.
...
* src/reader.c (reader_read_string): Rewrite, create much less
garbage.
(append_char): Remove.
2018-04-08 23:14:45 +02:00
Jan Nieuwenhuizen
7d32ecd906
install: Fix prefix confusion.
...
* install.sh: Substitute @PREFIX@ with MES_PREFIX.
* scripts/mescc.mes: Grok PREFIX as MES_PREFIX.
2018-04-08 17:01:59 +02:00
Jan Nieuwenhuizen
87302af14e
guix.scm: Update mes to 0.12.
...
* guix.scm (mes, mes.git): Update to 0.12.
2018-04-08 14:43:44 +02:00
Jan Nieuwenhuizen
0330aab202
Release 0.12.
...
* configure (VERSION): Bump to 0.12.
2018-04-06 07:24:05 +02:00
Jan Nieuwenhuizen
ad135d3752
doc: Release udpate.
...
* HACKING: Update.
* INSTALL: Update.
* NEWS: Update.
* README: Update.
* doc/ANNOUNCE-0.12: New file.
* throughout: (janneke) coming out.
2017-11-21 19:22:26 +01:00
Jan Nieuwenhuizen
e2c2c1f78f
guix.scm: Update mescc-tools to 0.4.
...
* guix.scm (mescc-tools): Update to 0.4.
2018-04-08 07:51:14 +02:00
Jan Nieuwenhuizen
20f66238c5
core: Workaround for mescc.
...
* src/mes.c (eval_apply)[__MESC__]: Add reminder for macro_p, global_p.
2018-04-08 07:50:12 +02:00
Jan Nieuwenhuizen
28b3ec954b
build: Remove scripts/mes symlink.
2018-04-07 18:27:26 +02:00
Jan Nieuwenhuizen
4958921abc
mes: Add string-fold, string-fold-right.
...
* module/srfi/srfi-13.mes (string-fold, string-fold-right): New
function.
* tests/srfi-13.test ("string-fold"): Test it.
("string-fold-right"): Test it.
2018-04-07 13:37:07 +02:00
Jan Nieuwenhuizen
c4b0879bc9
mes: Allow tick as part of identifier.
...
* src/reader.c (reader_read_sexp_): Do not treat tick as special.
2018-04-07 13:36:23 +02:00
Jan Nieuwenhuizen
cd0e3f8ba5
mescc: Remove debugging.
...
* module/language/c99/compiler.mes: Remove debugging.
2018-04-07 13:14:58 +02:00
Jan Nieuwenhuizen
83549786ed
mescc: No comments in M1 when running on Mes.
...
* module/language/c99/compiler.mes (ast-comment): If mes?, return nil.
2018-04-07 13:13:26 +02:00
Jan Nieuwenhuizen
5867ac4afe
mescc: Trace globals.
...
* module/language/c99/compiler.mes (mescc:trace): New function. Use
throughout.
2018-04-07 12:56:17 +02:00
Jan Nieuwenhuizen
da724cdaa1
Revert "core: Add member."
...
This reverts commit 921686a0a3b06281f1804d04e6d4a0344dda507a.
2018-04-07 13:15:26 +02:00
Jan Nieuwenhuizen
f33d23bca1
core: Add member.
...
* src/lib.c (member): New function.
* module/mes/scm.mes (member): Remove.
2018-04-07 12:18:50 +02:00
Jan Nieuwenhuizen
5e9c539f57
mescc: trace M1 dumping.
...
* module/language/c99/compiler.mes (info->object): Add tracing.
* module/mes/M1.mes (object->M1): Add tracing.
2018-04-07 10:24:57 +02:00
Jan Nieuwenhuizen
f199694a66
Revert "guix: Update nyacc to 0.83.31."
...
This reverts commit 624b85d6b1dd876542f7ad342d6beb8a92408397.
2018-04-07 13:41:32 +02:00
Jan Nieuwenhuizen
a6454e9e72
guix: Update nyacc to 0.83.31.
...
* guix.scm (nyacc): Update to 0.83.31.
2018-04-07 09:48:47 +02:00
Jan Nieuwenhuizen
8481b54097
mescc: Have Nyacc trace functions while parsing.
...
* guile/mescc.scm (main): Set NYACC_TRACE.
* scripts/mescc.mes (main): Set NYACC_TRACE.
2018-04-07 09:35:08 +02:00
Jan Nieuwenhuizen
6932d83d82
mes: Add setenv.
...
* src/posix.c (setenv_): New function.
* tests/base.test ("setenv, getenv"): Test it.
2018-04-07 09:34:02 +02:00
Jan Nieuwenhuizen
bd82d5988d
core: Add setenv.
...
* lib/libc.c (setenv): New function.
* include/stdlib.h (setenv): Declare it.
* scaffold/tests/61-array.c (test): Test it.
2018-04-07 09:21:51 +02:00
Jan Nieuwenhuizen
0fe6dc1f66
guix: Add manifest.
...
* build-aux/manifest.scm: New file.
2018-04-05 23:13:23 +02:00
Jan Nieuwenhuizen
70b98a8c15
guix: Update Nyacc to 0.80.42.
...
* guix.scm (nyacc): Update to 0.80.42.
2018-04-05 21:24:11 +02:00
Jan Nieuwenhuizen
30262dcdc1
mescc: Also print `parsing: input' when using -E.
...
* module/language/c99/compiler.mes (c99-input->ast): Print `parsing:
input'.
(c99-input->info): Remove that.
2018-04-06 07:18:19 +02:00
Jan Nieuwenhuizen
b5c2bdec00
core: Cleanup reader.
...
* src/reader.c (reader_read_sexp_): Rename from reader_read_word_. Cleanup.
(read_hash): Cleanup.
2018-04-05 22:41:53 +02:00
Jan Nieuwenhuizen
35bb5869f9
mes: Cleanup formatting.
2018-04-05 21:35:31 +02:00
Jan Nieuwenhuizen
0a4030838c
core: Add equal2?.
...
* src/lib.c (equal2_p): New function.
* module/mes/base.mes (equal2?): Remove.
2018-04-05 20:01:04 +02:00
Jan Nieuwenhuizen
6a9621ebf3
core: Add memq.
...
* lib/mes.c (memq): New function.
* module/mes/scm.mes (memq): Remove.
2018-04-05 11:03:09 +02:00
Jan Nieuwenhuizen
76e1b0582f
mes: Remove duplicate memq.
...
* module/mes/base-0.mes (memq): Remove.
2018-04-05 11:02:06 +02:00
Jan Nieuwenhuizen
9fc27ee25a
mes: Single environment lookup for variables, SICP chapter 3.
...
* src/mes.c (t): Add TVARIABLE.
(scm_vm_eval_deref): New vm special.
(make_vref_): New internal function.
(eval_apply): WIP: replace symbols with their variable reference.
* src/gc.c (gc_loop): Handle TVARIABLE.
* src/lib.c (display_helper): Handle TVARIABLE.
* module/mes/type-0.mes (<cell:variable>): New variable.
(cell:type-alist): Add it.
(variable?): New function.
* module/mes/display.mes (display): Handle <variable>.
2017-12-09 08:33:50 +01:00
Jan Nieuwenhuizen
d1444ead65
core: Remove override hook for read-input-file.
...
* src/reader.c (read_input_file_env): Remove override hook for
read-input-file.
2018-04-03 07:45:12 +02:00