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
Justin Ethier
04c11eabfb
Replacing __sum macro with Cyc_sum
2015-04-10 14:56:47 -04:00
Justin Ethier
010d3e6a18
Modified code to account for numeric tower, fixed up number->string
2015-04-09 21:52:49 -04:00
Justin Ethier
d9add7ab54
WIP
2015-04-09 18:04:06 -04:00
Justin Ethier
b2cc35e141
Added real?
and integer?
2015-04-09 17:54:35 -04:00
Justin Ethier
ea8f56a4ee
Allow (string->number) to return common type (int and double)
2015-04-08 22:59:22 -04:00
Justin Ethier
503770a899
Only emit funcall macros that are used by the generated code
2015-04-01 15:11:19 -04:00
Justin Ethier
96b5037449
Removed obsolete macro generation
2015-03-31 22:58:39 -04:00
Justin Ethier
c41608af7c
Removed DEBUG_ALWAYS_GC
2015-03-30 13:33:02 -04:00
Justin Ethier
f23b89a05f
Two fixes:
...
- Renamed 'Cyc-has-cycle?'
- Fixed Cyc_has_cycle to prevent an infinite loop
2015-03-25 21:58:02 -04:00
Justin Ethier
19ccf7cda3
Added remaining list/pair functions
2015-03-25 14:09:49 -04:00
Justin Ethier
582524af81
Moving core exception handler code from C to Scheme
2015-03-21 22:01:14 -04:00
Justin Ethier
1d5409b4ae
Initial version of (raise-continuable)
2015-03-19 22:20:12 -04:00
Justin Ethier
f819b9e055
WIP
2015-03-18 15:12:50 -04:00
Justin Ethier
35dd277080
WIP
2015-03-17 22:52:15 -04:00
Justin Ethier
6a27bd44ad
WIP - raise
2015-03-17 22:32:52 -04:00
Justin Ethier
5bd3deefa1
Added (exit)
2015-03-13 23:42:41 -04:00
Justin Ethier
b886fd8871
Store printable name of primitives to improve display
2015-03-03 22:39:12 -05:00
Justin Ethier
4dff6070ce
Use CYC_EVAL to selectively include eval code
2015-03-03 21:07:20 -05:00
Justin Ethier
a2fe40b348
Recognize cons types in funcall's
2015-03-02 22:50:40 -05:00