aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2022-08-23Change argument passing to use lists.Rose Hogenson5-329/+87
Using vectors is just horribly complicated combined with builtins like apply, or procedures that take a rest parameter. Now we pass all arguments in a list. Hopefully optimization can undo this for known functions in the future.
2022-08-23Insert references, not values into the map.Rose Hogenson1-7/+4
This fixes a bug in compiler.csc.
2022-08-22Add a few primitive list operations.Rose Hogenson1-4/+14
2022-08-12Fix bugs in the macro expander.Rose Hogenson2-84/+125
Now I'm following the rule that you should ignore marks that were added after the binding was defined. I also introduced a lexical environment to handle lambdas.
2022-08-10Subtract int-min instead of adding int-max + 1.Rose Hogenson1-11/+3
2022-08-09Fix a few small bugs.Rose Hogenson2-3/+3
N lines of code will have about 2N bugs.
2022-08-08Fix the bugs in the number library.Rose Hogenson1-170/+218
I did some extensive manual testing. Hopefully there are no bugs left :)
2022-08-08Unexport case-lambda.Rose Hogenson1-1/+2
case-lambda is actually defined in the (scheme case-lambda) library, but it's too convenient so I'm just going to define two copies.
2022-08-07Misc test fixup in the compiler.Rose Hogenson5-21/+28
2022-08-07Add a needed import to 10-define.csc.Rose Hogenson1-1/+2
2022-08-07Add include-library-declarations.Rose Hogenson1-13/+50
2022-08-07Fix hoist.Rose Hogenson1-2/+4
Hoist needs to hoist the function bodies as well.
2022-08-07Add int<? and eq?.Rose Hogenson1-0/+5
2022-08-07Fix a bug in expand-body for an empty body.Rose Hogenson1-1/+2
2022-08-07Define last-index.Rose Hogenson2-0/+26
2022-08-07Fix a typo in codegen.Rose Hogenson1-3/+1
2022-08-07Activate the new libraries.Rose Hogenson1-1/+3
2022-08-07Add numbers.Rose Hogenson1-0/+821
2022-08-07Add vectors.Rose Hogenson1-0/+156
2022-08-07Add map and for-each.Rose Hogenson1-1/+35
2022-08-07Fix a bug in the records library.Rose Hogenson1-1/+2
We have to check if it's a pointer before dereferencing.
2022-08-07Add booleans.Rose Hogenson1-2/+25
2022-08-05Check that records are the correct type.Rose Hogenson1-9/+15
To avoid selecting the wrong field, or reading out of bounds, we should ensure that a record is the correct type before reading a field.
2022-08-05Add more of the standard library.Rose Hogenson10-386/+774
2022-08-05Add call-with-values.Rose Hogenson2-1/+21
2022-08-05Add call-with-current-continuation.Rose Hogenson2-0/+15
2022-08-04Add if, and, or, when and friends.Rose Hogenson3-2/+90
2022-08-04Add begin.Rose Hogenson1-1/+12
2022-08-04Add if and set!.Rose Hogenson3-5/+67
2022-08-03Start the scheme base library.Rose Hogenson3-0/+94
2022-08-01Remove mutable globals.Rose Hogenson2-7/+12
Per a closer reading of R7RS, it's an error to mutate an imported binding with set!. My apologies to Guile when I said they had a bug.
2022-08-01Modify the project structure.Rose Hogenson37-0/+6441
Now the lib directory contains what will eventually end up on the user's /usr/lib/csc. When I write make install, it will copy all of the .csc files from lib into the destination lib directory. This means I can start working on the standard library in lib/scheme.