History

move headers and docs to their own dirs to declutter src/

Sigrid Solveig Haflínudóttir committed 3 months ago

Commit 77a7e801 parent 6e4532193 files · +221 −210Browse files

Unified · Split

93 files
  1. .gitignore +1 −1
  2. 3rd/iswprint.c +1 −1
  3. 3rd/mp/mptod.c +1 −1
  4. 3rd/wcwidth.c +1 −1
  5. boot/sl.boot +1 −1
  6. mkfile +27 −9
  7. src/bcc_null.c +1 −1
  8. src/bcc_tcc.c +4 −4
  9. src/bitvector.c +2 −2
  10. src/builtins.c +9 −9
  11. src/compress.c +3 −3
  12. src/cvalues.c +8 −8
  13. src/docs/array.sl +0 −0
  14. src/docs/compress.sl +0 −0
  15. src/docs/debug.sl +0 −0
  16. src/docs/docs.sl +18 −18
  17. src/docs/io.sl +0 −0
  18. src/docs/list.sl +0 −0
  19. src/docs/misc.sl +0 −0
  20. src/docs/number.sl +0 −0
  21. src/docs/process.sl +0 −0
  22. src/docs/random.sl +0 −0
  23. src/docs/seq.sl +0 −0
  24. src/docs/string.sl +0 −0
  25. src/docs/struct.sl +0 −0
  26. src/docs/sys.sl +0 −0
  27. src/docs/table.sl +0 −0
  28. src/docs/time.sl +0 −0
  29. src/docs/type.sl +0 −0
  30. src/docs/vm.sl +0 −0
  31. src/dos/platform.h +2 −2
  32. src/dos/sys.c +2 −2
  33. src/equal.c +6 −6
  34. src/hashing.c +2 −2
  35. src/htable.c +3 −7
  36. src/inc/arith.h +0 −0
  37. src/inc/bitvector.h +0 −0
  38. src/inc/cc.h +0 −0
  39. src/inc/cvalues.h +0 −0
  40. src/inc/equal.h +0 −0
  41. src/inc/hashing.h +0 −0
  42. src/inc/htable.h +0 −0
  43. src/inc/htable_c.h +0 −0
  44. src/inc/htable_h.h +0 −0
  45. src/inc/ieee754.h +0 −0
  46. src/inc/io.h +0 −0
  47. src/inc/ios.h +0 −0
  48. src/inc/mem.h +0 −0
  49. src/inc/mem_dlmalloc.h +0 −0
  50. src/inc/nan.h +0 −0
  51. src/inc/opcodes.h +0 −0
  52. src/inc/operators.h +0 −0
  53. src/inc/overflow.h +0 −0
  54. src/inc/print.h +0 −0
  55. src/inc/priv.h +3 −3
  56. src/inc/process.h +0 −0
  57. src/inc/read.h +0 −0
  58. src/inc/sl.h +0 −0
  59. src/inc/str.h +0 −0
  60. src/inc/table.h +0 −0
  61. src/inc/time.h +0 −0
  62. src/inc/types.h +0 −0
  63. src/io.c +6 −6
  64. src/ios.c +3 −3
  65. src/macos/platform.h +3 −3
  66. src/macos/sys.c +3 −3
  67. src/nan.c +2 −2
  68. src/opcodes.c +1 −1
  69. src/operators.c +2 −2
  70. src/plan9/lsd.c +4 −4
  71. src/plan9/platform.h +2 −2
  72. src/plan9/sys.c +5 −5
  73. src/posix/platform.h +2 −2
  74. src/posix/sys.c +3 −3
  75. src/print.c +8 −8
  76. src/process.c +6 −6
  77. src/process_null.c +4 −3
  78. src/ptrhash.c +2 −7
  79. src/random.c +5 −5
  80. src/read.c +7 −7
  81. src/sl.c +14 −14
  82. src/slmain.c +5 −5
  83. src/slmath.c +2 −2
  84. src/str.c +8 −8
  85. src/table.c +6 −6
  86. src/types.c +4 −4
  87. src/vm_funcs.c +4 −4
  88. src/vm_jmptbl.c +4 −4
  89. src/windows/platform.h +2 −2
  90. src/windows/sys.c +3 −3
  91. tools/bootstrap.sh +1 −0
  92. tools/gen.sl +3 −3
  93. tools/mkboot1.sl +2 −2
.gitignore+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
4*.bak4*.bak
5instructions.sl5instructions.sl
6builtins.sl6builtins.sl
7docs_ops.sl7src/docs/ops.sl
8builtin_fns.h8builtin_fns.h
9*.core9*.core
10sl.boot.s10sl.boot.s
3rd/iswprint.c+1−1
@@ -21,7 +21,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE · 20 unmodified lines
21SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.21SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/22*/
23 23
24#include "slpriv.h"24#include "inc/priv.h"
25 25
26// straight from musl26// straight from musl
27int27int
3rd/mp/mptod.c+1−1
@@ -1,6 +1,6 @@
1#include "platform.h"1#include "platform.h"
2#include "mp.h"2#include "mp.h"
3#include "nan.h"3#include "inc/nan.h"
4 4
5double5double
6mptod(mpint *a)6mptod(mpint *a)
3rd/wcwidth.c+1−1
@@ -16,7 +16,7 @@ · 15 unmodified lines
16 * https://github.com/termux/termux-packages/tree/master/packages/libandroid-support16 * https://github.com/termux/termux-packages/tree/master/packages/libandroid-support
17 */17 */
18 18
19#include "slpriv.h"19#include "inc/priv.h"
20 20
21struct width_interval {21struct width_interval {
22 int start;22 int start;
boot/sl.boot+1−1
@@ -1154,4 +1154,4 @@ vec->list #fn("A17080z2:" #(list) 6) vinfo · 1153 unmodified lines
1154#6# vinfo:sym #.car void1154#6# vinfo:sym #.car void
1155#3# void? #fn("A180DIQ:" 6) zero?1155#3# void? #fn("A180DIQ:" 6) zero?
1156#fn("A180El2:" 6) zip #fn("r0707180z3:" #(map list) 7) zip-with1156#fn("A180El2:" 6) zip #fn("r0707180z3:" #(map list) 7) zip-with
1157#fn("r1708081z3:" #(map) 7))1157#fn("r1708081z3:" #(map) 7))
mkfile+27−9
@@ -11,12 +11,34 @@ CFLAGS=$CFLAGS -p -Isrc -I3rd -I3rd/brieflz -I3rd/pcg-c -Isrc/plan9 \ · 10 unmodified lines
11CLEANFILES=src/plan9/sl.boot.s src/plan9/builtin_fns.h11CLEANFILES=src/plan9/sl.boot.s src/plan9/builtin_fns.h
12 12
13HFILES=\13HFILES=\
14 src/equal.h\14 src/inc/arith.h\
15 src/sl.h\15 src/inc/bitvector.h\
16 src/slpriv.h\16 src/inc/cc.h\
17 src/opcodes.h\17 src/inc/cvalues.h\
18 src/plan9/platform.h\18 src/inc/equal.h\
19 src/inc/hashing.h\
20 src/inc/htable.h\
21 src/inc/htable_c.h\
22 src/inc/htable_h.h\
23 src/inc/ieee754.h\
24 src/inc/io.h\
25 src/inc/ios.h\
26 src/inc/mem.h\
27 src/inc/nan.h\
28 src/inc/opcodes.h\
29 src/inc/operators.h\
30 src/inc/overflow.h\
31 src/inc/print.h\
32 src/inc/priv.h\
33 src/inc/process.h\
34 src/inc/read.h\
35 src/inc/sl.h\
36 src/inc/str.h\
37 src/inc/table.h\
38 src/inc/time.h\
39 src/inc/types.h\
19 src/plan9/lsd.h\40 src/plan9/lsd.h\
41 src/plan9/platform.h\
20 42
21OFILES=\43OFILES=\
22 3rd/brieflz/brieflz.$O\44 3rd/brieflz/brieflz.$O\
@@ -77,10 +99,6 @@ src/plan9/builtin_fns.h:D: · 54 unmodified lines
77 {attr=""}' \99 {attr=""}' \
78 `{ls $CFILES >[2]/dev/null} | sort >$target100 `{ls $CFILES >[2]/dev/null} | sort >$target
79 101
80src/cvalues.$O: src/sl_arith_any.h
81src/equal.$O: src/htable_c.h
82src/ptrhash.$O: src/htable_c.h
83
84OFILES_lzpack=\102OFILES_lzpack=\
85 3rd/brieflz/brieflz_lzpack.$O\103 3rd/brieflz/brieflz_lzpack.$O\
86 3rd/brieflz/depacks_lzpack.$O\104 3rd/brieflz/depacks_lzpack.$O\
src/bcc_null.c+1−1
@@ -1,4 +1,4 @@
1#include "slpriv.h"1#include "inc/priv.h"
2 2
3void3void
4bcc_init(void)4bcc_init(void)
src/bcc_tcc.c+4−4
@@ -1,7 +1,7 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "cvalues.h"2#include "inc/cvalues.h"
3#include "print.h"3#include "inc/print.h"
4#include "types.h"4#include "inc/types.h"
5#include "libtcc.h"5#include "libtcc.h"
6 6
7static sl_v ccsym, vtbtypesym[VT_BTYPE+1];7static sl_v ccsym, vtbtypesym[VT_BTYPE+1];
src/bitvector.c+2−2
@@ -1,5 +1,5 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "bitvector.h"2#include "inc/bitvector.h"
3 3
4u32int *4u32int *
5bitvector_resize(u32int *b, u64int oldsz, u64int newsz)5bitvector_resize(u32int *b, u64int oldsz, u64int newsz)
src/builtins.c+9−9
@@ -1,13 +1,13 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "sl_io.h"2#include "inc/io.h"
3#include "str.h"3#include "inc/str.h"
4#include "inc/operators.h"
5#include "inc/cvalues.h"
6#include "inc/time.h"
7#include "inc/table.h"
8#include "inc/nan.h"
9#include "inc/ieee754.h"
4#include "tbl.h"10#include "tbl.h"
5#include "operators.h"
6#include "cvalues.h"
7#include "timefuncs.h"
8#include "table.h"
9#include "nan.h"
10#include "ieee754.h"
11 11
12usize12usize
13llength(sl_v v)13llength(sl_v v)
src/compress.c+3−3
@@ -1,6 +1,6 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "cvalues.h"2#include "inc/cvalues.h"
3#include "types.h"3#include "inc/types.h"
4#include "brieflz.h"4#include "brieflz.h"
5 5
6static sl_v sl_sizesym, sl_tosym;6static sl_v sl_sizesym, sl_tosym;
src/cvalues.c+8−8
@@ -1,9 +1,9 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "operators.h"2#include "inc/operators.h"
3#include "cvalues.h"3#include "inc/cvalues.h"
4#include "types.h"4#include "inc/types.h"
5#include "sl_io.h"5#include "inc/io.h"
6#include "equal.h"6#include "inc/equal.h"
7 7
8enum {8enum {
9 MAX_INL_SIZE = 384,9 MAX_INL_SIZE = 384,
@@ -1064,7 +1064,7 @@ return_from_s64(s64int Saccum) · 1054 unmodified lines
1064sl_v1064sl_v
1065sl_add_any(sl_v *args, u32int nargs)1065sl_add_any(sl_v *args, u32int nargs)
1066{1066{
1067#include "sl_arith_any.h"1067#include "inc/arith.h"
1068}1068}
1069 1069
1070#define ACCUM_DEFAULT 11070#define ACCUM_DEFAULT 1
@@ -1075,7 +1075,7 @@ sl_add_any(sl_v *args, u32int nargs) · 4 unmodified lines
1075sl_v1075sl_v
1076sl_mul_any(sl_v *args, u32int nargs)1076sl_mul_any(sl_v *args, u32int nargs)
1077{1077{
1078#include "sl_arith_any.h"1078#include "inc/arith.h"
1079}1079}
1080 1080
1081sl_v1081sl_v
src/docs/array.slrenamed from src/docs_array.sl+0−0

File renamed without changes.

src/docs/compress.slrenamed from src/docs_compress.sl+0−0

File renamed without changes.

src/docs/debug.slrenamed from src/docs_debug.sl+0−0

File renamed without changes.

src/docs/docs.slrenamed from src/docs.sl+18−18
@@ -52,21 +52,21 @@ · 51 unmodified lines
52(doc-group doc52(doc-group doc
53 «Writing and reading documentation.»)53 «Writing and reading documentation.»)
54 54
55(load "../src/docs_array.sl")55(load "../src/docs/array.sl")
56(load "../src/docs_compress.sl")56(load "../src/docs/compress.sl")
57(load "../src/docs_debug.sl")57(load "../src/docs/debug.sl")
58(load "../src/docs_io.sl")58(load "../src/docs/io.sl")
59(load "../src/docs_list.sl")59(load "../src/docs/list.sl")
60(load "../src/docs_misc.sl")60(load "../src/docs/misc.sl")
61(load "../src/docs_number.sl")61(load "../src/docs/number.sl")
62(load "../src/docs_ops.sl")62(load "../src/docs/ops.sl")
63(load "../src/docs_process.sl")63(load "../src/docs/process.sl")
64(load "../src/docs_random.sl")64(load "../src/docs/random.sl")
65(load "../src/docs_seq.sl")65(load "../src/docs/seq.sl")
66(load "../src/docs_string.sl")66(load "../src/docs/string.sl")
67(load "../src/docs_struct.sl")67(load "../src/docs/struct.sl")
68(load "../src/docs_sys.sl")68(load "../src/docs/sys.sl")
69(load "../src/docs_table.sl")69(load "../src/docs/table.sl")
70(load "../src/docs_time.sl")70(load "../src/docs/time.sl")
71(load "../src/docs_type.sl")71(load "../src/docs/type.sl")
72(load "../src/docs_vm.sl")72(load "../src/docs/vm.sl")
src/docs/io.slrenamed from src/docs_io.sl+0−0

File renamed without changes.

src/docs/list.slrenamed from src/docs_list.sl+0−0

File renamed without changes.

src/docs/misc.slrenamed from src/docs_misc.sl+0−0

File renamed without changes.

src/docs/number.slrenamed from src/docs_number.sl+0−0

File renamed without changes.

src/docs/process.slrenamed from src/docs_process.sl+0−0

File renamed without changes.

src/docs/random.slrenamed from src/docs_random.sl+0−0

File renamed without changes.

src/docs/seq.slrenamed from src/docs_seq.sl+0−0

File renamed without changes.

src/docs/string.slrenamed from src/docs_string.sl+0−0

File renamed without changes.

src/docs/struct.slrenamed from src/docs_struct.sl+0−0

File renamed without changes.

src/docs/sys.slrenamed from src/docs_sys.sl+0−0

File renamed without changes.

src/docs/table.slrenamed from src/docs_table.sl+0−0

File renamed without changes.

src/docs/time.slrenamed from src/docs_time.sl+0−0

File renamed without changes.

src/docs/type.slrenamed from src/docs_type.sl+0−0

File renamed without changes.

src/docs/vm.slrenamed from src/docs_vm.sl+0−0

File renamed without changes.

src/dos/platform.h+2−2
@@ -45,7 +45,7 @@ void sys_seed(void *p, int sz); · 44 unmodified lines
45#define sl_segfree(s, sz) MEM_FREE(s)45#define sl_segfree(s, sz) MEM_FREE(s)
46#define sl_segused(s, sz, used) do{}while(0)46#define sl_segused(s, sz, used) do{}while(0)
47 47
48#include "cc.h"48#include "inc/cc.h"
49#include "mem.h"49#include "inc/mem.h"
50#include "mp.h"50#include "mp.h"
51#include "utf.h"51#include "utf.h"
src/dos/sys.c+2−2
@@ -1,8 +1,8 @@
1#include "slpriv.h"
2#include "timefuncs.h"
3#include <fcntl.h>1#include <fcntl.h>
4#include <time.h>2#include <time.h>
5#include <locale.h>3#include <locale.h>
4#include "inc/priv.h"
5#include "inc/time.h"
6 6
7u64int7u64int
8sec_realtime(void)8sec_realtime(void)
src/equal.c+6−6
@@ -1,8 +1,8 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "operators.h"2#include "inc/operators.h"
3#include "cvalues.h"3#include "inc/cvalues.h"
4#include "equal.h"4#include "inc/equal.h"
5#include "hashing.h"5#include "inc/hashing.h"
6 6
7enum {7enum {
8 BOUNDED_COMPARE_BOUND = 128,8 BOUNDED_COMPARE_BOUND = 128,
@@ -410,4 +410,4 @@ hash_lispvalue(sl_v a) · 401 unmodified lines
410#define HFUNC(v) hash_lispvalue((sl_v)(v))410#define HFUNC(v) hash_lispvalue((sl_v)(v))
411#define EQFUNC(x, y) equal_lispvalue((sl_v)(x), (sl_v)(y))411#define EQFUNC(x, y) equal_lispvalue((sl_v)(x), (sl_v)(y))
412 412
413#include "htable_c.h"413#include "inc/htable_c.h"
src/hashing.c+2−2
@@ -1,5 +1,5 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "hashing.h"2#include "inc/hashing.h"
3#if defined(USE_XXHASH)3#if defined(USE_XXHASH)
4#include <xxhash.h>4#include <xxhash.h>
5#else5#else
src/htable.c+3−7
@@ -1,10 +1,6 @@
1/*1#include "inc/priv.h"
2 functions common to all hash table instantiations2#include "inc/htable.h"
3*/3#include "inc/hashing.h"
4
5#include "slpriv.h"
6#include "htable.h"
7#include "hashing.h"
8 4
9sl_htable *5sl_htable *
10htable_new(sl_htable *h, usize numpairs)6htable_new(sl_htable *h, usize numpairs)
src/inc/arith.hrenamed from src/sl_arith_any.h+0−0

File renamed without changes.

src/inc/bitvector.hrenamed from src/bitvector.h+0−0

File renamed without changes.

src/inc/cc.hrenamed from src/cc.h+0−0

File renamed without changes.

src/inc/cvalues.hrenamed from src/cvalues.h+0−0

File renamed without changes.

src/inc/equal.hrenamed from src/equal.h+0−0

File renamed without changes.

src/inc/hashing.hrenamed from src/hashing.h+0−0

File renamed without changes.

src/inc/htable.hrenamed from src/htable.h+0−0

File renamed without changes.

src/inc/htable_c.hrenamed from src/htable_c.h+0−0

File renamed without changes.

src/inc/htable_h.hrenamed from src/htable_h.h+0−0

File renamed without changes.

src/inc/ieee754.hrenamed from src/ieee754.h+0−0

File renamed without changes.

src/inc/io.hrenamed from src/sl_io.h+0−0

File renamed without changes.

src/inc/ios.hrenamed from src/ios.h+0−0

File renamed without changes.

src/inc/mem.hrenamed from src/mem.h+0−0

File renamed without changes.

src/inc/mem_dlmalloc.hrenamed from src/mem_dlmalloc.h+0−0

File renamed without changes.

src/inc/nan.hrenamed from src/nan.h+0−0

File renamed without changes.

src/inc/opcodes.hrenamed from src/opcodes.h+0−0

File renamed without changes.

src/inc/operators.hrenamed from src/operators.h+0−0

File renamed without changes.

src/inc/overflow.hrenamed from src/overflow.h+0−0

File renamed without changes.

src/inc/print.hrenamed from src/print.h+0−0

File renamed without changes.

src/inc/priv.hrenamed from src/slpriv.h+3−3
@@ -1,8 +1,8 @@
1#pragma once1#pragma once
2 2
3#include "sl.h"3#include "inc/sl.h"
4#include "ios.h"4#include "inc/ios.h"
5#include "htable_h.h"5#include "inc/htable_h.h"
6HTPROT(ptrhash)6HTPROT(ptrhash)
7 7
8// all allocations on the heap are 8-byte aligned8// all allocations on the heap are 8-byte aligned
src/inc/process.hrenamed from src/sl_process.h+0−0

File renamed without changes.

src/inc/read.hrenamed from src/read.h+0−0

File renamed without changes.

src/inc/sl.hrenamed from src/sl.h+0−0

File renamed without changes.

src/inc/str.hrenamed from src/str.h+0−0

File renamed without changes.

src/inc/table.hrenamed from src/table.h+0−0

File renamed without changes.

src/inc/time.hrenamed from src/timefuncs.h+0−0

File renamed without changes.

src/inc/types.hrenamed from src/types.h+0−0

File renamed without changes.

src/io.c+6−6
@@ -1,9 +1,9 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "cvalues.h"2#include "inc/cvalues.h"
3#include "types.h"3#include "inc/types.h"
4#include "print.h"4#include "inc/print.h"
5#include "read.h"5#include "inc/read.h"
6#include "sl_io.h"6#include "inc/io.h"
7 7
8static sl_v iosym, rdsym, wrsym, apsym, crsym, truncsym;8static sl_v iosym, rdsym, wrsym, apsym, crsym, truncsym;
9static sl_v linesym, blocksym, memorysym;9static sl_v linesym, blocksym, memorysym;
src/ios.c+3−3
@@ -1,6 +1,6 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "str.h"2#include "inc/str.h"
3#include "timefuncs.h"3#include "inc/time.h"
4 4
5#define MOST_OF(x) ((x) - ((x)>>4))5#define MOST_OF(x) ((x) - ((x)>>4))
6 6
src/macos/platform.h+3−3
@@ -43,8 +43,8 @@ void sys_seed(void *p, int sz); · 42 unmodified lines
43#define HEAP_SIZE0 128*102443#define HEAP_SIZE0 128*1024
44#define STACK_SIZE0 8*102444#define STACK_SIZE0 8*1024
45 45
46#include "cc.h"46#include "inc/cc.h"
47#include "mem_dlmalloc.h"47#include "inc/mem_dlmalloc.h"
48#include "mem.h"48#include "inc/mem.h"
49#include "mp.h"49#include "mp.h"
50#include "utf.h"50#include "utf.h"
src/macos/sys.c+3−3
@@ -1,9 +1,9 @@
1#include <OSUtils.h>
2#include "slpriv.h"
3#include "timefuncs.h"
4#include <fcntl.h>1#include <fcntl.h>
5#include <sys/time.h>2#include <sys/time.h>
6#include <time.h>3#include <time.h>
4#include <OSUtils.h>
5#include "inc/priv.h"
6#include "inc/time.h"
7 7
8u64int8u64int
9sec_realtime(void)9sec_realtime(void)
src/nan.c+2−2
@@ -1,6 +1,6 @@
1#include "platform.h"1#include "platform.h"
2#include "nan.h"2#include "inc/nan.h"
3#include "ieee754.h"3#include "inc/ieee754.h"
4 4
5double D_NNAN, D_NINF;5double D_NNAN, D_NINF;
6#if defined(__TINYC__) || defined(__plan9__)6#if defined(__TINYC__) || defined(__plan9__)
src/opcodes.c+1−1
@@ -1,4 +1,4 @@
1#include "slpriv.h"1#include "inc/priv.h"
2 2
3const sl_builtin builtins[N_OPCODES] = {3const sl_builtin builtins[N_OPCODES] = {
4 [OP_BUILTINP] = {"builtin?", 1},4 [OP_BUILTINP] = {"builtin?", 1},
src/operators.c+2−2
@@ -1,5 +1,5 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "operators.h"2#include "inc/operators.h"
3 3
4mpint *4mpint *
5conv_to_bignum(sl_v v, const void *data, sl_numtype tag)5conv_to_bignum(sl_v v, const void *data, sl_numtype tag)
src/plan9/lsd.c+4−4
@@ -1,11 +1,11 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include <draw.h>2#include <draw.h>
3#include <bio.h>3#include <bio.h>
4#include <ctype.h>4#include <ctype.h>
5#include <mach.h>5#include <mach.h>
6#include "cvalues.h"6#include "inc/cvalues.h"
7#include "types.h"7#include "inc/types.h"
8#include "sl_io.h"8#include "inc/io.h"
9 9
10static char aout[1024];10static char aout[1024];
11static sl_v gpregsym, fpregsym, mkregsym, mksymbolsym, mkframesym;11static sl_v gpregsym, fpregsym, mkregsym, mksymbolsym, mkframesym;
src/plan9/platform.h+2−2
@@ -139,5 +139,5 @@ int ftruncate(int f, soffset sz); · 138 unmodified lines
139#define sl_enum_flags139#define sl_enum_flags
140#define sl_offsetof(x, y) offsetof(x, y)140#define sl_offsetof(x, y) offsetof(x, y)
141 141
142#include "mem.h"142#include "inc/mem.h"
143#include "overflow.h"143#include "inc/overflow.h"
src/plan9/sys.c+5−5
@@ -1,9 +1,9 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "lsd.h"
3#include "nan.h"
4#include "sl_process.h"
5#include "timefuncs.h"
6#include <tos.h>2#include <tos.h>
3#include "inc/nan.h"
4#include "inc/process.h"
5#include "inc/time.h"
6#include "lsd.h"
7 7
8u64int8u64int
9sec_realtime(void)9sec_realtime(void)
src/posix/platform.h+2−2
@@ -84,7 +84,7 @@ void sys_seed(void *p, int sz); · 83 unmodified lines
84#endif84#endif
85#endif85#endif
86 86
87#include "cc.h"87#include "inc/cc.h"
88#include "mem.h"88#include "inc/mem.h"
89#include "mp.h"89#include "mp.h"
90#include "utf.h"90#include "utf.h"
src/posix/sys.c+3−3
@@ -1,6 +1,6 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "sl_process.h"2#include "inc/process.h"
3#include "timefuncs.h"3#include "inc/time.h"
4#include <errno.h>4#include <errno.h>
5#include <fcntl.h>5#include <fcntl.h>
6#include <locale.h>6#include <locale.h>
src/print.c+8−8
@@ -1,11 +1,11 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "str.h"2#include "inc/str.h"
3#include "bitvector.h"3#include "inc/bitvector.h"
4#include "operators.h"4#include "inc/operators.h"
5#include "cvalues.h"5#include "inc/cvalues.h"
6#include "ieee754.h"6#include "inc/ieee754.h"
7#include "print.h"7#include "inc/print.h"
8#include "read.h"8#include "inc/read.h"
9 9
10enum {10enum {
11 SMALL_STR_LEN = 24,11 SMALL_STR_LEN = 24,
src/process.c+6−6
@@ -1,9 +1,9 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "cvalues.h"2#include "inc/cvalues.h"
3#include "print.h"3#include "inc/print.h"
4#include "sl_io.h"4#include "inc/io.h"
5#include "sl_process.h"5#include "inc/process.h"
6#include "types.h"6#include "inc/types.h"
7 7
8static const sl_type *processtype;8static const sl_type *processtype;
9static sl_v runningsym, exitedsym, streamsym;9static sl_v runningsym, exitedsym, streamsym;
src/process_null.c+4−3
@@ -1,10 +1,11 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "sl_process.h"2#include "inc/process.h"
3 3
4int4int
5sys_pipe(int fd[2], bool rd, bool wr)5sys_pipe(int fd[2], bool rd, bool wr)
6{6{
7 USED(fd); USED(rd); USED(wr);7 USED(rd); USED(wr);
8 fd[0] = fd[1] = -1;
8 return -1;9 return -1;
9}10}
10 11
src/ptrhash.c+2−7
@@ -1,9 +1,4 @@
1/*1#include "inc/priv.h"
2 pointer hash table
3 optimized for storing info about particular values
4*/
5
6#include "slpriv.h"
7 2
8static inline sl_v3static inline sl_v
9ptrhash(sl_v a)4ptrhash(sl_v a)
@@ -15,4 +10,4 @@ ptrhash(sl_v a) · 5 unmodified lines
15#define HFUNC(v) ptrhash((sl_v)(v))10#define HFUNC(v) ptrhash((sl_v)(v))
16#define EQFUNC(x, y) ((x) == (y))11#define EQFUNC(x, y) ((x) == (y))
17 12
18#include "htable_c.h"13#include "inc/htable_c.h"
src/random.c+5−5
@@ -1,8 +1,8 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "cvalues.h"2#include "inc/cvalues.h"
3#include "equal.h"3#include "inc/equal.h"
4#include "operators.h"4#include "inc/operators.h"
5#include "types.h"5#include "inc/types.h"
6#include "pcg_variants.h"6#include "pcg_variants.h"
7 7
8typedef pcg32x2_random_t pcg_t;8typedef pcg32x2_random_t pcg_t;
src/read.c+7−7
@@ -1,11 +1,11 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "cvalues.h"2#include "inc/cvalues.h"
3#include "read.h"3#include "inc/read.h"
4#include "nan.h"4#include "inc/nan.h"
5#include "inc/str.h"
6#include "inc/table.h"
7#include "inc/equal.h"
5#include "tbl.h"8#include "tbl.h"
6#include "str.h"
7#include "table.h"
8#include "equal.h"
9 9
10enum {10enum {
11 TOK_NONE, TOK_OPEN, TOK_CLOSE, TOK_DOT, TOK_QUOTE, TOK_SYM, TOK_NUM,11 TOK_NONE, TOK_OPEN, TOK_CLOSE, TOK_DOT, TOK_QUOTE, TOK_SYM, TOK_NUM,
src/sl.c+14−14
@@ -1,18 +1,18 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "bitvector.h"2#include "inc/bitvector.h"
3#include "cvalues.h"3#include "inc/cvalues.h"
4#include "equal.h"4#include "inc/equal.h"
5#include "hashing.h"5#include "inc/hashing.h"
6#include "operators.h"6#include "inc/operators.h"
7#include "print.h"7#include "inc/print.h"
8#include "read.h"8#include "inc/read.h"
9#include "sl_io.h"9#include "inc/io.h"
10#include "sl_process.h"10#include "inc/process.h"
11#include "str.h"11#include "inc/str.h"
12#include "table.h"12#include "inc/table.h"
13#include "inc/time.h"
14#include "inc/types.h"
13#include "tbl.h"15#include "tbl.h"
14#include "timefuncs.h"
15#include "types.h"
16 16
17sl_v sl_builtinssym, sl_quote, sl_lambda, sl_comma, sl_commaat;17sl_v sl_builtinssym, sl_quote, sl_lambda, sl_comma, sl_commaat;
18sl_v sl_commadot, sl_trycatch, sl_backquote;18sl_v sl_commadot, sl_trycatch, sl_backquote;
src/slmain.c+5−5
@@ -1,9 +1,9 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "cvalues.h"2#include "inc/cvalues.h"
3#include "print.h"3#include "inc/print.h"
4#include "sl_io.h"4#include "inc/io.h"
5#include "inc/nan.h"
5#include "brieflz.h"6#include "brieflz.h"
6#include "nan.h"
7 7
8#if !defined(ARGBEGIN)8#if !defined(ARGBEGIN)
9/* straight from 9front */9/* straight from 9front */
src/slmath.c+2−2
@@ -1,5 +1,5 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "cvalues.h"2#include "inc/cvalues.h"
3 3
4BUILTIN("atan", atan)4BUILTIN("atan", atan)
5{5{
src/str.c+8−8
@@ -1,11 +1,11 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "operators.h"2#include "inc/operators.h"
3#include "cvalues.h"3#include "inc/cvalues.h"
4#include "print.h"4#include "inc/print.h"
5#include "read.h"5#include "inc/read.h"
6#include "equal.h"6#include "inc/equal.h"
7#include "sl_io.h"7#include "inc/io.h"
8#include "str.h"8#include "inc/str.h"
9 9
10static sl_v basesym;10static sl_v basesym;
11 11
src/table.c+6−6
@@ -1,9 +1,9 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "equal.h"2#include "inc/equal.h"
3#include "cvalues.h"3#include "inc/cvalues.h"
4#include "types.h"4#include "inc/types.h"
5#include "print.h"5#include "inc/print.h"
6#include "table.h"6#include "inc/table.h"
7 7
8const sl_type *sl_tabletype;8const sl_type *sl_tabletype;
9 9
src/types.c+4−4
@@ -1,7 +1,7 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "cvalues.h"2#include "inc/cvalues.h"
3#include "equal.h"3#include "inc/equal.h"
4#include "types.h"4#include "inc/types.h"
5 5
6sl_type *6sl_type *
7get_type(sl_v t, usize sz)7get_type(sl_v t, usize sz)
src/vm_funcs.c+4−4
@@ -1,7 +1,7 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "equal.h"2#include "inc/equal.h"
3#include "cvalues.h"3#include "inc/cvalues.h"
4#include "sl_io.h"4#include "inc/io.h"
5 5
6#define OP_ARGS \6#define OP_ARGS \
7 int nargs, const u8int *ip, usize top_frame, usize obp, \7 int nargs, const u8int *ip, usize top_frame, usize obp, \
src/vm_jmptbl.c+4−4
@@ -1,7 +1,7 @@
1#include "slpriv.h"1#include "inc/priv.h"
2#include "equal.h"2#include "inc/equal.h"
3#include "cvalues.h"3#include "inc/cvalues.h"
4#include "sl_io.h"4#include "inc/io.h"
5 5
6#define ENTER do{ \6#define ENTER do{ \
7 sl.stack[ipd] = (uintptr)ip; \7 sl.stack[ipd] = (uintptr)ip; \
src/windows/platform.h+2−2
@@ -52,7 +52,7 @@ int vdprintf(int fd, const char *fmt, va_list args); · 51 unmodified lines
52#define sl_segfree(s, sz) MEM_FREE(s)52#define sl_segfree(s, sz) MEM_FREE(s)
53#define sl_segused(s, sz, used) do{}while(0)53#define sl_segused(s, sz, used) do{}while(0)
54 54
55#include "cc.h"55#include "inc/cc.h"
56#include "mem.h"56#include "inc/mem.h"
57#include "mp.h"57#include "mp.h"
58#include "utf.h"58#include "utf.h"
src/windows/sys.c+3−3
@@ -1,12 +1,12 @@
1#define _CRT_RAND_S // rand_s1#define _CRT_RAND_S // rand_s
2#define _GNU_SOURCE // vasprintf2#define _GNU_SOURCE // vasprintf
3#include "slpriv.h"
4#include "timefuncs.h"
5#undef MEM_FREE
6#include <time.h>3#include <time.h>
7#include <fcntl.h>4#include <fcntl.h>
8#include <locale.h>5#include <locale.h>
9#include <windows.h>6#include <windows.h>
7#undef MEM_FREE
8#include "inc/priv.h"
9#include "inc/time.h"
10 10
11static void __stdcall (*get_sys_time)(LPFILETIME);11static void __stdcall (*get_sys_time)(LPFILETIME);
12 12
tools/bootstrap.sh+1−0
@@ -12,5 +12,6 @@ ninja -C "$B" && \ · 11 unmodified lines
12cd "$P/boot" && \12cd "$P/boot" && \
13$* "$T/mkboot1.sl" && \13$* "$T/mkboot1.sl" && \
14sed -E 's/^ +//g' <sl.boot >sl.boot.cut && \14sed -E 's/^ +//g' <sl.boot >sl.boot.cut && \
15echo >>sl.boot.cut &&
15mv sl.boot.cut sl.boot && \16mv sl.boot.cut sl.boot && \
16ninja -C "$B" || { cp "$P/boot/sl.boot.bak" "$P/boot/sl.boot"; exit 1; }17ninja -C "$B" || { cp "$P/boot/sl.boot.bak" "$P/boot/sl.boot"; exit 1; }
tools/gen.sl+3−3
@@ -498,7 +498,7 @@ · 497 unmodified lines
498 (c-code (buffer))498 (c-code (buffer))
499 (instructions (new "instructions.sl"))499 (instructions (new "instructions.sl"))
500 (builtins (new "builtins.sl"))500 (builtins (new "builtins.sl"))
501 (docs-ops (new "docs_ops.sl"))501 (docs-ops (new "docs/ops.sl"))
502 (op-to-u8 (table))502 (op-to-u8 (table))
503 (c-op-to-op-arg (table))503 (c-op-to-op-arg (table))
504 (op-to-argc (table))504 (op-to-argc (table))
@@ -536,7 +536,7 @@ · 31 unmodified lines
536 (io-write c-header "\tN_OPCODES\n}sl_op;\n\n")536 (io-write c-header "\tN_OPCODES\n}sl_op;\n\n")
537 (io-write c-header "extern const sl_builtin builtins[N_OPCODES];\n")537 (io-write c-header "extern const sl_builtin builtins[N_OPCODES];\n")
538 538
539 (io-write c-code "#include \"slpriv.h\"\n\n")539 (io-write c-code "#include \"inc/priv.h\"\n\n")
540 (io-write c-code "const sl_builtin builtins[N_OPCODES] = {\n")540 (io-write c-code "const sl_builtin builtins[N_OPCODES] = {\n")
541 (for-each541 (for-each
542 (λ (c la) (begin (io-write c-code (str "\t[" c))542 (λ (c la) (begin (io-write c-code (str "\t[" c))
@@ -573,6 +573,6 @@ · 30 unmodified lines
573 573
574 ;; at last, copy the buffers to the actual files in git repo.574 ;; at last, copy the buffers to the actual files in git repo.
575 (io-pos! c-header 0)575 (io-pos! c-header 0)
576 (io-copy (new "opcodes.h") c-header)576 (io-copy (new "inc/opcodes.h") c-header)
577 (io-pos! c-code 0)577 (io-pos! c-code 0)
578 (io-copy (new "opcodes.c") c-code))578 (io-copy (new "opcodes.c") c-code))
tools/mkboot1.sl+2−2
@@ -1,7 +1,7 @@
1(load "../src/builtins.sl")1(load "../src/builtins.sl")
2(load "../src/instructions.sl")2(load "../src/instructions.sl")
3(load "../src/system.sl")3(load "../src/system.sl")
4#.(load "../src/docs.sl")4#.(load "../src/docs/docs.sl")
5#.(load "../src/docs_ops.sl")5#.(load "../src/docs/ops.sl")
6(load "../src/compiler.sl")6(load "../src/compiler.sl")
7(make-system-image "sl.boot")7(make-system-image "sl.boot")

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t