Commit graph

79 commits

Author SHA1 Message Date
Justin Ethier
cf0b0b1560 Save argc/argv for later 2015-07-01 01:47:50 -04:00
Justin Ethier
6e1e4b56be Allow primitives to take a continuation argument
Also stubbed out the command-line-args function as such.
2015-06-30 21:44:23 -04:00
Justin Ethier
8f32841878 Added (string-ref) and a stub for (command-line-arguments) 2015-06-29 22:08:30 -04:00
Justin Ethier
96e777743c Bugfixes for pure varargs
More is still needed, but this is enough to at least get the compiler to build.
2015-06-29 21:06:49 -04:00
Justin Ethier
ba38bcd8a7 Added string-length and substring
substring still needs more error handling though, before it is complete.
2015-06-25 21:44:49 -04:00
Justin Ethier
0740f2da7a Added util module 2015-06-24 22:28:09 -04:00
Justin Ethier
a5acb43cf1 Added (file-exists?) and (delete-file) 2015-06-24 21:42:14 -04:00
Justin Ethier
3d7adf0a9f Fix compiler warning 2015-06-23 22:05:41 -04:00
Justin Ethier
8d72cfaff1 Added more I/O functions 2015-06-22 22:40:49 -04:00
Justin Ethier
8fa6ecf7bf Added close-port and close-output-port 2015-06-22 22:02:45 -04:00
Justin Ethier
bebacfb985 Added current-input-port and current-error-port 2015-06-22 21:08:20 -04:00
Justin Ethier
25f02522d5 Added (port?) 2015-06-11 22:57:00 -04:00
Justin Ethier
9b6596e146 (write-char) 2015-06-12 01:43:09 -04:00
Justin Ethier
a77c6562d8 WIP - optional argument for (display) 2015-06-12 01:27:51 -04:00
Justin Ethier
335f3e86d5 Use a scheme version of (write) 2015-06-11 21:43:55 -04:00
Justin Ethier
e8ff0509ea Added Cyc-stdout 2015-06-10 23:02:39 -04:00
Justin Ethier
111cf6f3a6 WIP 2015-06-08 23:01:16 -04:00
Justin Ethier
30619d8709 Full vector compilation 2015-06-04 21:19:00 -04:00
Justin Ethier
bc01c9dd19 Added stubs for compiling/evaluating vectors 2015-06-03 23:00:40 -04:00
Justin Ethier
0e8cd6a94e Added (vector-set!) 2015-06-02 21:33:03 -04:00
Justin Ethier
c5a219ffe1 Added vector-ref 2015-06-01 22:46:26 -04:00
Justin Ethier
6c095e23aa Added vector-length 2015-06-01 22:25:16 -04:00
Justin Ethier
ae3bdfbe0a Added (vector) 2015-06-01 21:53:13 -04:00
Justin Ethier
fec8262285 Added list->vector and vector? 2015-06-01 21:48:16 -04:00
Justin Ethier
66e69f2c29 WIP - make-vector
Working on this, code does not compile yet due to issues with the C macro. There are still lower-level changes required to support vectors, though. Especially changes to the GC.
2015-05-31 22:58:05 -04:00
Justin Ethier
b2568e6e09 Added string-cmp 2015-05-26 21:25:09 -04:00
Justin Ethier
7537d41e26 WIP - (system) 2015-05-25 22:59:38 -04:00
Justin Ethier
1af80a9331 Cleanup of symbol code 2015-05-22 21:54:24 -04:00
Justin Ethier
695131a4d8 First-cut of fixes to make symbols work with libraries 2015-05-22 21:46:20 -04:00
Justin Ethier
23096cd3b5 Ensure libraries are initialized in the right order 2015-05-22 21:41:39 -04:00
Justin Ethier
753c2a9b3b Do not use (string-append) when emitting code 2015-05-21 01:30:54 -04:00
Justin Ethier
36d0485288 Removed debug code 2015-05-21 01:20:27 -04:00
Justin Ethier
2ce058bf12 Call into lib "top-level" for init's 2015-05-21 01:19:39 -04:00
Justin Ethier
a804e048fd Create a function for library inits
This is done at the top-level for programs, but libraries need a dedicated function for it so we can chain inits across multiple libraries on program startup.
2015-05-20 21:21:38 -04:00
Justin Ethier
1eb8a22995 Set Cyc_global_variables correctly in lib2 2015-05-18 22:38:48 -04:00
Justin Ethier
2e16c27b42 Get hello example to work 2015-05-18 22:22:20 -04:00
Justin Ethier
9b1b833b89 WIP 2015-05-18 22:11:56 -04:00
Justin Ethier
d2049f0f7e Adding code to call into library entry pt's 2015-05-18 18:08:45 -04:00
Justin Ethier
c9af448be2 More library integration 2015-05-12 18:20:48 -04:00
Justin Ethier
e51ca308ff Renamed to 'imports' 2015-05-11 10:11:00 -04:00
Justin Ethier
842ddb597b Library compilation changes 2015-05-08 17:55:44 -04:00
Justin Ethier
4b211430c4 Allow generated C files to compile 2015-05-07 15:15:17 -04:00
Justin Ethier
cd45021b2b Pass lib args to cgen 2015-05-06 13:14:08 -04:00
Justin Ethier
4230295683 Fix load_varargs to prevent local var corruption
Assigning to a varargs variable that is not passed by the C caller can result in corruption of another parameter. EG: the var contains data for another parameter, which is then changed unexpectedly. The code was rewritten to assign to a new variable, to prevent this from happening.
2015-04-23 15:06:49 -04:00
Justin Ethier
538a010893 Allow varargs for - * / as well as + 2015-04-20 13:55:26 -04:00
Justin Ethier
388d0c3017 WIP - move Cyc-current-exception-handler to runtime 2015-04-15 22:58:39 -04:00
Justin Ethier
6cadac2be8 Renamed cyc_sum family of functions 2015-04-15 13:43:02 -04:00
Justin Ethier
abac04c58e Replace set-cell! with set-car!
Set-cell was just a wrapper on set-car anyway, but it was failing to record a mutation, which would cause problems later on for the GC. By using set-car directly we avoid GC issues and simplify the runtime code a bit.
2015-04-15 13:30:28 -04:00
Justin Ethier
98fc7fa642 Added varargs sum, but working through issues with segfaults 2015-04-14 13:52:14 -04:00
Justin Ethier
88ad7b614e Moved code to group together primitive config 2015-04-13 17:56:57 -04:00