]> code.bitgloo.com Git - clyne/forspll.git/commitdiff
readme update; use CC in Makefile
authorClyne Sullivan <clyne@bitgloo.com>
Sun, 16 Jun 2024 01:13:42 +0000 (21:13 -0400)
committerClyne Sullivan <clyne@bitgloo.com>
Sun, 16 Jun 2024 01:13:42 +0000 (21:13 -0400)
Makefile
README.md
support.c

index caa1558868f9546dddc41565b3d42056ffa29783..fcba1f53523a23cd64b4692f67b1cb8a6fe4358f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,8 @@ main: $(subst .cpp,.o,$(CXXFILES))
 prog: main test.fp
        ./main < test.fp > forsp.ir
        llc -march=x86 -filetype=obj --relocation-model=pic forsp.ir -O1
-       clang -c support.c -m32 -Os
-       clang support.o forsp.ir.o -m32 -Os
+       $(CC) -c support.c -m32 -Os
+       $(CC) support.o forsp.ir.o -m32 -Os
 
 clean:
        rm -f a.out main *.ir *.o
index 11c76e99e8f6f0df40e8a6541b1484542e5fe6a4..da2908c3216892295878cc544f8963eee13bd981 100644 (file)
--- a/README.md
+++ b/README.md
@@ -7,11 +7,13 @@ forspll features:
 * Lisp-style S-expression syntax
 * Forth-style data stack for parameters/values
 * Linking with C functions (see `support.c`)
+* Recursion: `$self` gets pointer to current function
 
 Missing features:
 
+* Captured variables: Functions/lambdas are *not dynamic* and do not capture the state of previously declared variables
 * Quote operator: `quote`/`'`
-* Lists and atoms or any dynamic allocations
+* Built-in dynamic allocations (implement them via platform-specific `support.c`)
 
 ## Building
 
index 44a39e47050e57299fa7ca603e57c169ae55d6fc..44b45838521a5d03296ffc04d9829e3c82841fce 100644 (file)
--- a/support.c
+++ b/support.c
@@ -43,7 +43,7 @@ void eq()
 void cons()
 {
     int32_t *st = &stack;
-    int32_t *pair = malloc(2 * sizeof(int32_t));
+    int32_t *pair = (int32_t *)malloc(2 * sizeof(int32_t));
     --sp;
     pair[0] = st[sp];
     pair[1] = st[sp - 1];