Unified · Split
| @@ -4,7 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | *.bak |
| 5 | 5 | instructions.sl |
| 6 | 6 | builtins.sl |
| 7 | −docs_ops.sl | |
| 7 | +src/docs/ops.sl | |
| 8 | 8 | builtin_fns.h |
| 9 | 9 | *.core |
| 10 | 10 | sl.boot.s |
| @@ -21,7 +21,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE · 20 unmodified lines | ||
| 21 | 21 | SOFTWARE 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 | 26 | // straight from musl |
| 27 | 27 | int |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | #include "platform.h" |
| 2 | 2 | #include "mp.h" |
| 3 | −#include "nan.h" | |
| 3 | +#include "inc/nan.h" | |
| 4 | 4 | |
| 5 | 5 | double |
| 6 | 6 | mptod(mpint *a) |
| @@ -16,7 +16,7 @@ · 15 unmodified lines | ||
| 16 | 16 | * 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 | |
| 21 | 21 | struct width_interval { |
| 22 | 22 | int start; |
| @@ -1154,4 +1154,4 @@ vec->list #fn("A17080z2:" #(list) 6) vinfo · 1153 unmodified lines | ||
| 1154 | 1154 | #6# vinfo:sym #.car void |
| 1155 | 1155 | #3# void? #fn("A180DIQ:" 6) zero? |
| 1156 | 1156 | #fn("A180El2:" 6) zip #fn("r0707180z3:" #(map list) 7) zip-with |
| 1157 | −#fn("r1708081z3:" #(map) 7)) | |
| 1157 | +#fn("r1708081z3:" #(map) 7)) | |
| @@ -11,12 +11,34 @@ CFLAGS=$CFLAGS -p -Isrc -I3rd -I3rd/brieflz -I3rd/pcg-c -Isrc/plan9 \ · 10 unmodified lines | ||
| 11 | 11 | CLEANFILES=src/plan9/sl.boot.s src/plan9/builtin_fns.h |
| 12 | 12 | |
| 13 | 13 | HFILES=\ |
| 14 | − src/equal.h\ | |
| 15 | − src/sl.h\ | |
| 16 | − src/slpriv.h\ | |
| 17 | − src/opcodes.h\ | |
| 18 | − src/plan9/platform.h\ | |
| 14 | + src/inc/arith.h\ | |
| 15 | + src/inc/bitvector.h\ | |
| 16 | + src/inc/cc.h\ | |
| 17 | + src/inc/cvalues.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 | 40 | src/plan9/lsd.h\ |
| 41 | + src/plan9/platform.h\ | |
| 20 | 42 | |
| 21 | 43 | OFILES=\ |
| 22 | 44 | 3rd/brieflz/brieflz.$O\ |
| @@ -77,10 +99,6 @@ src/plan9/builtin_fns.h:D: · 54 unmodified lines | ||
| 77 | 99 | {attr=""}' \ |
| 78 | 100 | `{ls $CFILES >[2]/dev/null} | sort >$target |
| 79 | 101 | |
| 80 | −src/cvalues.$O: src/sl_arith_any.h | |
| 81 | −src/equal.$O: src/htable_c.h | |
| 82 | −src/ptrhash.$O: src/htable_c.h | |
| 83 | − | |
| 84 | 102 | OFILES_lzpack=\ |
| 85 | 103 | 3rd/brieflz/brieflz_lzpack.$O\ |
| 86 | 104 | 3rd/brieflz/depacks_lzpack.$O\ |
| @@ -1,4 +1,4 @@ | ||
| 1 | −#include "slpriv.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | 2 | |
| 3 | 3 | void |
| 4 | 4 | bcc_init(void) |
| @@ -1,7 +1,7 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "cvalues.h" | |
| 3 | −#include "print.h" | |
| 4 | −#include "types.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/cvalues.h" | |
| 3 | +#include "inc/print.h" | |
| 4 | +#include "inc/types.h" | |
| 5 | 5 | #include "libtcc.h" |
| 6 | 6 | |
| 7 | 7 | static sl_v ccsym, vtbtypesym[VT_BTYPE+1]; |
| @@ -1,5 +1,5 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "bitvector.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/bitvector.h" | |
| 3 | 3 | |
| 4 | 4 | u32int * |
| 5 | 5 | bitvector_resize(u32int *b, u64int oldsz, u64int newsz) |
| @@ -1,13 +1,13 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "sl_io.h" | |
| 3 | −#include "str.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/io.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 | 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 | |
| 12 | 12 | usize |
| 13 | 13 | llength(sl_v v) |
| @@ -1,6 +1,6 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "cvalues.h" | |
| 3 | −#include "types.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/cvalues.h" | |
| 3 | +#include "inc/types.h" | |
| 4 | 4 | #include "brieflz.h" |
| 5 | 5 | |
| 6 | 6 | static sl_v sl_sizesym, sl_tosym; |
| @@ -1,9 +1,9 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "operators.h" | |
| 3 | −#include "cvalues.h" | |
| 4 | −#include "types.h" | |
| 5 | −#include "sl_io.h" | |
| 6 | −#include "equal.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/operators.h" | |
| 3 | +#include "inc/cvalues.h" | |
| 4 | +#include "inc/types.h" | |
| 5 | +#include "inc/io.h" | |
| 6 | +#include "inc/equal.h" | |
| 7 | 7 | |
| 8 | 8 | enum { |
| 9 | 9 | MAX_INL_SIZE = 384, |
| @@ -1064,7 +1064,7 @@ return_from_s64(s64int Saccum) · 1054 unmodified lines | ||
| 1064 | 1064 | sl_v |
| 1065 | 1065 | sl_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 | 1070 | #define ACCUM_DEFAULT 1 |
| @@ -1075,7 +1075,7 @@ sl_add_any(sl_v *args, u32int nargs) · 4 unmodified lines | ||
| 1075 | 1075 | sl_v |
| 1076 | 1076 | sl_mul_any(sl_v *args, u32int nargs) |
| 1077 | 1077 | { |
| 1078 | −#include "sl_arith_any.h" | |
| 1078 | +#include "inc/arith.h" | |
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 1081 | 1081 | sl_v |
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -52,21 +52,21 @@ · 51 unmodified lines | ||
| 52 | 52 | (doc-group doc |
| 53 | 53 | «Writing and reading documentation.») |
| 54 | 54 | |
| 55 | −(load "../src/docs_array.sl") | |
| 56 | −(load "../src/docs_compress.sl") | |
| 57 | −(load "../src/docs_debug.sl") | |
| 58 | −(load "../src/docs_io.sl") | |
| 59 | −(load "../src/docs_list.sl") | |
| 60 | −(load "../src/docs_misc.sl") | |
| 61 | −(load "../src/docs_number.sl") | |
| 62 | −(load "../src/docs_ops.sl") | |
| 63 | −(load "../src/docs_process.sl") | |
| 64 | −(load "../src/docs_random.sl") | |
| 65 | −(load "../src/docs_seq.sl") | |
| 66 | −(load "../src/docs_string.sl") | |
| 67 | −(load "../src/docs_struct.sl") | |
| 68 | −(load "../src/docs_sys.sl") | |
| 69 | −(load "../src/docs_table.sl") | |
| 70 | −(load "../src/docs_time.sl") | |
| 71 | −(load "../src/docs_type.sl") | |
| 72 | −(load "../src/docs_vm.sl") | |
| 55 | +(load "../src/docs/array.sl") | |
| 56 | +(load "../src/docs/compress.sl") | |
| 57 | +(load "../src/docs/debug.sl") | |
| 58 | +(load "../src/docs/io.sl") | |
| 59 | +(load "../src/docs/list.sl") | |
| 60 | +(load "../src/docs/misc.sl") | |
| 61 | +(load "../src/docs/number.sl") | |
| 62 | +(load "../src/docs/ops.sl") | |
| 63 | +(load "../src/docs/process.sl") | |
| 64 | +(load "../src/docs/random.sl") | |
| 65 | +(load "../src/docs/seq.sl") | |
| 66 | +(load "../src/docs/string.sl") | |
| 67 | +(load "../src/docs/struct.sl") | |
| 68 | +(load "../src/docs/sys.sl") | |
| 69 | +(load "../src/docs/table.sl") | |
| 70 | +(load "../src/docs/time.sl") | |
| 71 | +(load "../src/docs/type.sl") | |
| 72 | +(load "../src/docs/vm.sl") | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -45,7 +45,7 @@ void sys_seed(void *p, int sz); · 44 unmodified lines | ||
| 45 | 45 | #define sl_segfree(s, sz) MEM_FREE(s) |
| 46 | 46 | #define sl_segused(s, sz, used) do{}while(0) |
| 47 | 47 | |
| 48 | −#include "cc.h" | |
| 49 | −#include "mem.h" | |
| 48 | +#include "inc/cc.h" | |
| 49 | +#include "inc/mem.h" | |
| 50 | 50 | #include "mp.h" |
| 51 | 51 | #include "utf.h" |
| @@ -1,8 +1,8 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "timefuncs.h" | |
| 3 | 1 | #include <fcntl.h> |
| 4 | 2 | #include <time.h> |
| 5 | 3 | #include <locale.h> |
| 4 | +#include "inc/priv.h" | |
| 5 | +#include "inc/time.h" | |
| 6 | 6 | |
| 7 | 7 | u64int |
| 8 | 8 | sec_realtime(void) |
| @@ -1,8 +1,8 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "operators.h" | |
| 3 | −#include "cvalues.h" | |
| 4 | −#include "equal.h" | |
| 5 | −#include "hashing.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/operators.h" | |
| 3 | +#include "inc/cvalues.h" | |
| 4 | +#include "inc/equal.h" | |
| 5 | +#include "inc/hashing.h" | |
| 6 | 6 | |
| 7 | 7 | enum { |
| 8 | 8 | BOUNDED_COMPARE_BOUND = 128, |
| @@ -410,4 +410,4 @@ hash_lispvalue(sl_v a) · 401 unmodified lines | ||
| 410 | 410 | #define HFUNC(v) hash_lispvalue((sl_v)(v)) |
| 411 | 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" | |
| @@ -1,5 +1,5 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "hashing.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/hashing.h" | |
| 3 | 3 | #if defined(USE_XXHASH) |
| 4 | 4 | #include <xxhash.h> |
| 5 | 5 | #else |
| @@ -1,10 +1,6 @@ | ||
| 1 | −/* | |
| 2 | − functions common to all hash table instantiations | |
| 3 | −*/ | |
| 4 | − | |
| 5 | −#include "slpriv.h" | |
| 6 | −#include "htable.h" | |
| 7 | −#include "hashing.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/htable.h" | |
| 3 | +#include "inc/hashing.h" | |
| 8 | 4 | |
| 9 | 5 | sl_htable * |
| 10 | 6 | htable_new(sl_htable *h, usize numpairs) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | #pragma once |
| 2 | 2 | |
| 3 | −#include "sl.h" | |
| 4 | −#include "ios.h" | |
| 5 | −#include "htable_h.h" | |
| 3 | +#include "inc/sl.h" | |
| 4 | +#include "inc/ios.h" | |
| 5 | +#include "inc/htable_h.h" | |
| 6 | 6 | HTPROT(ptrhash) |
| 7 | 7 | |
| 8 | 8 | // all allocations on the heap are 8-byte aligned |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -1,9 +1,9 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "cvalues.h" | |
| 3 | −#include "types.h" | |
| 4 | −#include "print.h" | |
| 5 | −#include "read.h" | |
| 6 | −#include "sl_io.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/cvalues.h" | |
| 3 | +#include "inc/types.h" | |
| 4 | +#include "inc/print.h" | |
| 5 | +#include "inc/read.h" | |
| 6 | +#include "inc/io.h" | |
| 7 | 7 | |
| 8 | 8 | static sl_v iosym, rdsym, wrsym, apsym, crsym, truncsym; |
| 9 | 9 | static sl_v linesym, blocksym, memorysym; |
| @@ -1,6 +1,6 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "str.h" | |
| 3 | −#include "timefuncs.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/str.h" | |
| 3 | +#include "inc/time.h" | |
| 4 | 4 | |
| 5 | 5 | #define MOST_OF(x) ((x) - ((x)>>4)) |
| 6 | 6 | |
| @@ -43,8 +43,8 @@ void sys_seed(void *p, int sz); · 42 unmodified lines | ||
| 43 | 43 | #define HEAP_SIZE0 128*1024 |
| 44 | 44 | #define STACK_SIZE0 8*1024 |
| 45 | 45 | |
| 46 | −#include "cc.h" | |
| 47 | −#include "mem_dlmalloc.h" | |
| 48 | −#include "mem.h" | |
| 46 | +#include "inc/cc.h" | |
| 47 | +#include "inc/mem_dlmalloc.h" | |
| 48 | +#include "inc/mem.h" | |
| 49 | 49 | #include "mp.h" |
| 50 | 50 | #include "utf.h" |
| @@ -1,9 +1,9 @@ | ||
| 1 | −#include <OSUtils.h> | |
| 2 | −#include "slpriv.h" | |
| 3 | −#include "timefuncs.h" | |
| 4 | 1 | #include <fcntl.h> |
| 5 | 2 | #include <sys/time.h> |
| 6 | 3 | #include <time.h> |
| 4 | +#include <OSUtils.h> | |
| 5 | +#include "inc/priv.h" | |
| 6 | +#include "inc/time.h" | |
| 7 | 7 | |
| 8 | 8 | u64int |
| 9 | 9 | sec_realtime(void) |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | #include "platform.h" |
| 2 | −#include "nan.h" | |
| 3 | −#include "ieee754.h" | |
| 2 | +#include "inc/nan.h" | |
| 3 | +#include "inc/ieee754.h" | |
| 4 | 4 | |
| 5 | 5 | double D_NNAN, D_NINF; |
| 6 | 6 | #if defined(__TINYC__) || defined(__plan9__) |
| @@ -1,4 +1,4 @@ | ||
| 1 | −#include "slpriv.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | 2 | |
| 3 | 3 | const sl_builtin builtins[N_OPCODES] = { |
| 4 | 4 | [OP_BUILTINP] = {"builtin?", 1}, |
| @@ -1,5 +1,5 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "operators.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/operators.h" | |
| 3 | 3 | |
| 4 | 4 | mpint * |
| 5 | 5 | conv_to_bignum(sl_v v, const void *data, sl_numtype tag) |
| @@ -1,11 +1,11 @@ | ||
| 1 | −#include "slpriv.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | 2 | #include <draw.h> |
| 3 | 3 | #include <bio.h> |
| 4 | 4 | #include <ctype.h> |
| 5 | 5 | #include <mach.h> |
| 6 | −#include "cvalues.h" | |
| 7 | −#include "types.h" | |
| 8 | −#include "sl_io.h" | |
| 6 | +#include "inc/cvalues.h" | |
| 7 | +#include "inc/types.h" | |
| 8 | +#include "inc/io.h" | |
| 9 | 9 | |
| 10 | 10 | static char aout[1024]; |
| 11 | 11 | static sl_v gpregsym, fpregsym, mkregsym, mksymbolsym, mkframesym; |
| @@ -139,5 +139,5 @@ int ftruncate(int f, soffset sz); · 138 unmodified lines | ||
| 139 | 139 | #define sl_enum_flags |
| 140 | 140 | #define sl_offsetof(x, y) offsetof(x, y) |
| 141 | 141 | |
| 142 | −#include "mem.h" | |
| 143 | −#include "overflow.h" | |
| 142 | +#include "inc/mem.h" | |
| 143 | +#include "inc/overflow.h" | |
| @@ -1,9 +1,9 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "lsd.h" | |
| 3 | −#include "nan.h" | |
| 4 | −#include "sl_process.h" | |
| 5 | −#include "timefuncs.h" | |
| 1 | +#include "inc/priv.h" | |
| 6 | 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 | |
| 8 | 8 | u64int |
| 9 | 9 | sec_realtime(void) |
| @@ -84,7 +84,7 @@ void sys_seed(void *p, int sz); · 83 unmodified lines | ||
| 84 | 84 | #endif |
| 85 | 85 | #endif |
| 86 | 86 | |
| 87 | −#include "cc.h" | |
| 88 | −#include "mem.h" | |
| 87 | +#include "inc/cc.h" | |
| 88 | +#include "inc/mem.h" | |
| 89 | 89 | #include "mp.h" |
| 90 | 90 | #include "utf.h" |
| @@ -1,6 +1,6 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "sl_process.h" | |
| 3 | −#include "timefuncs.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/process.h" | |
| 3 | +#include "inc/time.h" | |
| 4 | 4 | #include <errno.h> |
| 5 | 5 | #include <fcntl.h> |
| 6 | 6 | #include <locale.h> |
| @@ -1,11 +1,11 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "str.h" | |
| 3 | −#include "bitvector.h" | |
| 4 | −#include "operators.h" | |
| 5 | −#include "cvalues.h" | |
| 6 | −#include "ieee754.h" | |
| 7 | −#include "print.h" | |
| 8 | −#include "read.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/str.h" | |
| 3 | +#include "inc/bitvector.h" | |
| 4 | +#include "inc/operators.h" | |
| 5 | +#include "inc/cvalues.h" | |
| 6 | +#include "inc/ieee754.h" | |
| 7 | +#include "inc/print.h" | |
| 8 | +#include "inc/read.h" | |
| 9 | 9 | |
| 10 | 10 | enum { |
| 11 | 11 | SMALL_STR_LEN = 24, |
| @@ -1,9 +1,9 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "cvalues.h" | |
| 3 | −#include "print.h" | |
| 4 | −#include "sl_io.h" | |
| 5 | −#include "sl_process.h" | |
| 6 | −#include "types.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/cvalues.h" | |
| 3 | +#include "inc/print.h" | |
| 4 | +#include "inc/io.h" | |
| 5 | +#include "inc/process.h" | |
| 6 | +#include "inc/types.h" | |
| 7 | 7 | |
| 8 | 8 | static const sl_type *processtype; |
| 9 | 9 | static sl_v runningsym, exitedsym, streamsym; |
| @@ -1,10 +1,11 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "sl_process.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/process.h" | |
| 3 | 3 | |
| 4 | 4 | int |
| 5 | 5 | sys_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 | 9 | return -1; |
| 9 | 10 | } |
| 10 | 11 | |
| @@ -1,9 +1,4 @@ | ||
| 1 | −/* | |
| 2 | − pointer hash table | |
| 3 | − optimized for storing info about particular values | |
| 4 | −*/ | |
| 5 | − | |
| 6 | −#include "slpriv.h" | |
| 1 | +#include "inc/priv.h" | |
| 7 | 2 | |
| 8 | 3 | static inline sl_v |
| 9 | 4 | ptrhash(sl_v a) |
| @@ -15,4 +10,4 @@ ptrhash(sl_v a) · 5 unmodified lines | ||
| 15 | 10 | #define HFUNC(v) ptrhash((sl_v)(v)) |
| 16 | 11 | #define EQFUNC(x, y) ((x) == (y)) |
| 17 | 12 | |
| 18 | −#include "htable_c.h" | |
| 13 | +#include "inc/htable_c.h" | |
| @@ -1,8 +1,8 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "cvalues.h" | |
| 3 | −#include "equal.h" | |
| 4 | −#include "operators.h" | |
| 5 | −#include "types.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/cvalues.h" | |
| 3 | +#include "inc/equal.h" | |
| 4 | +#include "inc/operators.h" | |
| 5 | +#include "inc/types.h" | |
| 6 | 6 | #include "pcg_variants.h" |
| 7 | 7 | |
| 8 | 8 | typedef pcg32x2_random_t pcg_t; |
| @@ -1,11 +1,11 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "cvalues.h" | |
| 3 | −#include "read.h" | |
| 4 | −#include "nan.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/cvalues.h" | |
| 3 | +#include "inc/read.h" | |
| 4 | +#include "inc/nan.h" | |
| 5 | +#include "inc/str.h" | |
| 6 | +#include "inc/table.h" | |
| 7 | +#include "inc/equal.h" | |
| 5 | 8 | #include "tbl.h" |
| 6 | −#include "str.h" | |
| 7 | −#include "table.h" | |
| 8 | −#include "equal.h" | |
| 9 | 9 | |
| 10 | 10 | enum { |
| 11 | 11 | TOK_NONE, TOK_OPEN, TOK_CLOSE, TOK_DOT, TOK_QUOTE, TOK_SYM, TOK_NUM, |
| @@ -1,18 +1,18 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "bitvector.h" | |
| 3 | −#include "cvalues.h" | |
| 4 | −#include "equal.h" | |
| 5 | −#include "hashing.h" | |
| 6 | −#include "operators.h" | |
| 7 | −#include "print.h" | |
| 8 | −#include "read.h" | |
| 9 | −#include "sl_io.h" | |
| 10 | −#include "sl_process.h" | |
| 11 | −#include "str.h" | |
| 12 | −#include "table.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/bitvector.h" | |
| 3 | +#include "inc/cvalues.h" | |
| 4 | +#include "inc/equal.h" | |
| 5 | +#include "inc/hashing.h" | |
| 6 | +#include "inc/operators.h" | |
| 7 | +#include "inc/print.h" | |
| 8 | +#include "inc/read.h" | |
| 9 | +#include "inc/io.h" | |
| 10 | +#include "inc/process.h" | |
| 11 | +#include "inc/str.h" | |
| 12 | +#include "inc/table.h" | |
| 13 | +#include "inc/time.h" | |
| 14 | +#include "inc/types.h" | |
| 13 | 15 | #include "tbl.h" |
| 14 | −#include "timefuncs.h" | |
| 15 | −#include "types.h" | |
| 16 | 16 | |
| 17 | 17 | sl_v sl_builtinssym, sl_quote, sl_lambda, sl_comma, sl_commaat; |
| 18 | 18 | sl_v sl_commadot, sl_trycatch, sl_backquote; |
| @@ -1,9 +1,9 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "cvalues.h" | |
| 3 | −#include "print.h" | |
| 4 | −#include "sl_io.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/cvalues.h" | |
| 3 | +#include "inc/print.h" | |
| 4 | +#include "inc/io.h" | |
| 5 | +#include "inc/nan.h" | |
| 5 | 6 | #include "brieflz.h" |
| 6 | −#include "nan.h" | |
| 7 | 7 | |
| 8 | 8 | #if !defined(ARGBEGIN) |
| 9 | 9 | /* straight from 9front */ |
| @@ -1,5 +1,5 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "cvalues.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/cvalues.h" | |
| 3 | 3 | |
| 4 | 4 | BUILTIN("atan", atan) |
| 5 | 5 | { |
| @@ -1,11 +1,11 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "operators.h" | |
| 3 | −#include "cvalues.h" | |
| 4 | −#include "print.h" | |
| 5 | −#include "read.h" | |
| 6 | −#include "equal.h" | |
| 7 | −#include "sl_io.h" | |
| 8 | −#include "str.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/operators.h" | |
| 3 | +#include "inc/cvalues.h" | |
| 4 | +#include "inc/print.h" | |
| 5 | +#include "inc/read.h" | |
| 6 | +#include "inc/equal.h" | |
| 7 | +#include "inc/io.h" | |
| 8 | +#include "inc/str.h" | |
| 9 | 9 | |
| 10 | 10 | static sl_v basesym; |
| 11 | 11 | |
| @@ -1,9 +1,9 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "equal.h" | |
| 3 | −#include "cvalues.h" | |
| 4 | −#include "types.h" | |
| 5 | −#include "print.h" | |
| 6 | −#include "table.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/equal.h" | |
| 3 | +#include "inc/cvalues.h" | |
| 4 | +#include "inc/types.h" | |
| 5 | +#include "inc/print.h" | |
| 6 | +#include "inc/table.h" | |
| 7 | 7 | |
| 8 | 8 | const sl_type *sl_tabletype; |
| 9 | 9 | |
| @@ -1,7 +1,7 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "cvalues.h" | |
| 3 | −#include "equal.h" | |
| 4 | −#include "types.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/cvalues.h" | |
| 3 | +#include "inc/equal.h" | |
| 4 | +#include "inc/types.h" | |
| 5 | 5 | |
| 6 | 6 | sl_type * |
| 7 | 7 | get_type(sl_v t, usize sz) |
| @@ -1,7 +1,7 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "equal.h" | |
| 3 | −#include "cvalues.h" | |
| 4 | −#include "sl_io.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/equal.h" | |
| 3 | +#include "inc/cvalues.h" | |
| 4 | +#include "inc/io.h" | |
| 5 | 5 | |
| 6 | 6 | #define OP_ARGS \ |
| 7 | 7 | int nargs, const u8int *ip, usize top_frame, usize obp, \ |
| @@ -1,7 +1,7 @@ | ||
| 1 | −#include "slpriv.h" | |
| 2 | −#include "equal.h" | |
| 3 | −#include "cvalues.h" | |
| 4 | −#include "sl_io.h" | |
| 1 | +#include "inc/priv.h" | |
| 2 | +#include "inc/equal.h" | |
| 3 | +#include "inc/cvalues.h" | |
| 4 | +#include "inc/io.h" | |
| 5 | 5 | |
| 6 | 6 | #define ENTER do{ \ |
| 7 | 7 | sl.stack[ipd] = (uintptr)ip; \ |
| @@ -52,7 +52,7 @@ int vdprintf(int fd, const char *fmt, va_list args); · 51 unmodified lines | ||
| 52 | 52 | #define sl_segfree(s, sz) MEM_FREE(s) |
| 53 | 53 | #define sl_segused(s, sz, used) do{}while(0) |
| 54 | 54 | |
| 55 | −#include "cc.h" | |
| 56 | −#include "mem.h" | |
| 55 | +#include "inc/cc.h" | |
| 56 | +#include "inc/mem.h" | |
| 57 | 57 | #include "mp.h" |
| 58 | 58 | #include "utf.h" |
| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | #define _CRT_RAND_S // rand_s |
| 2 | 2 | #define _GNU_SOURCE // vasprintf |
| 3 | −#include "slpriv.h" | |
| 4 | −#include "timefuncs.h" | |
| 5 | −#undef MEM_FREE | |
| 6 | 3 | #include <time.h> |
| 7 | 4 | #include <fcntl.h> |
| 8 | 5 | #include <locale.h> |
| 9 | 6 | #include <windows.h> |
| 7 | +#undef MEM_FREE | |
| 8 | +#include "inc/priv.h" | |
| 9 | +#include "inc/time.h" | |
| 10 | 10 | |
| 11 | 11 | static void __stdcall (*get_sys_time)(LPFILETIME); |
| 12 | 12 | |
| @@ -12,5 +12,6 @@ ninja -C "$B" && \ · 11 unmodified lines | ||
| 12 | 12 | cd "$P/boot" && \ |
| 13 | 13 | $* "$T/mkboot1.sl" && \ |
| 14 | 14 | sed -E 's/^ +//g' <sl.boot >sl.boot.cut && \ |
| 15 | +echo >>sl.boot.cut && | |
| 15 | 16 | mv sl.boot.cut sl.boot && \ |
| 16 | 17 | ninja -C "$B" || { cp "$P/boot/sl.boot.bak" "$P/boot/sl.boot"; exit 1; } |
| @@ -498,7 +498,7 @@ · 497 unmodified lines | ||
| 498 | 498 | (c-code (buffer)) |
| 499 | 499 | (instructions (new "instructions.sl")) |
| 500 | 500 | (builtins (new "builtins.sl")) |
| 501 | − (docs-ops (new "docs_ops.sl")) | |
| 501 | + (docs-ops (new "docs/ops.sl")) | |
| 502 | 502 | (op-to-u8 (table)) |
| 503 | 503 | (c-op-to-op-arg (table)) |
| 504 | 504 | (op-to-argc (table)) |
| @@ -536,7 +536,7 @@ · 31 unmodified lines | ||
| 536 | 536 | (io-write c-header "\tN_OPCODES\n}sl_op;\n\n") |
| 537 | 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 | 540 | (io-write c-code "const sl_builtin builtins[N_OPCODES] = {\n") |
| 541 | 541 | (for-each |
| 542 | 542 | (λ (c la) (begin (io-write c-code (str "\t[" c)) |
| @@ -573,6 +573,6 @@ · 30 unmodified lines | ||
| 573 | 573 | |
| 574 | 574 | ;; at last, copy the buffers to the actual files in git repo. |
| 575 | 575 | (io-pos! c-header 0) |
| 576 | − (io-copy (new "opcodes.h") c-header) | |
| 576 | + (io-copy (new "inc/opcodes.h") c-header) | |
| 577 | 577 | (io-pos! c-code 0) |
| 578 | 578 | (io-copy (new "opcodes.c") c-code)) |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | (load "../src/builtins.sl") |
| 2 | 2 | (load "../src/instructions.sl") |
| 3 | 3 | (load "../src/system.sl") |
| 4 | −#.(load "../src/docs.sl") | |
| 5 | −#.(load "../src/docs_ops.sl") | |
| 4 | +#.(load "../src/docs/docs.sl") | |
| 5 | +#.(load "../src/docs/ops.sl") | |
| 6 | 6 | (load "../src/compiler.sl") |
| 7 | 7 | (make-system-image "sl.boot") |