readme update; use CC in Makefile

main
Clyne 6 months ago
parent 6be79eda61
commit c278aa4e69
Signed by: clyne
GPG Key ID: 1B74EE6C49C96795

@ -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

@ -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

@ -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];

Loading…
Cancel
Save