Commit graph

912 commits

Author SHA1 Message Date
Justin Ethier
ffaa9b263a Added CPS versions of mutation primitives 2020-01-16 22:43:07 -05:00
Justin Ethier
3e9da5e291 Added Cyc_file_last_modified_time 2020-01-03 13:35:38 -05:00
Justin Ethier
02fcad76f6 Added write-bytevector 2019-12-28 18:22:35 -05:00
Justin Ethier
63d009ca02 Fix compiler warnings 2019-12-23 18:50:38 -05:00
Justin Ethier
f091d0267e Unsafe (length) 2019-11-26 23:06:01 -05:00
Justin Ethier
0651716196 Unsafe vector-set 2019-11-26 22:58:24 -05:00
Justin Ethier
acb50614ee Issue #305 2019-11-25 14:20:26 -05:00
Justin Ethier
e9815b4028 Handle return values of bignum calls
Created a macro BIGNUM_CALL to make it easier to handle BN retun values. This also eliminates warnings from libtommath 1.2.0 :)
2019-10-22 19:01:17 -04:00
Justin Ethier
25acf652c2 mp_get_i32 already handles the sign 2019-10-22 16:39:00 -04:00
Justin Ethier
03abd758b5 Begin to handle tommath return values 2019-10-22 13:35:08 -04:00
Justin Ethier
e3a90cb3b1 Replace deprecated functions in tommath 1.2.0 2019-10-22 13:29:21 -04:00
Justin Ethier
864dc9f9c5 No need for duplicate definition of mp_get_double 2019-10-18 12:55:18 -04:00
Justin Ethier
8cf0745c62 Updated comment 2019-10-10 13:54:27 -04:00
Justin Ethier
4cb5b1db40 Added vpbuffer utility functions 2019-10-09 19:01:53 -04:00
Justin Ethier
c9428bcd90 Code cleanup 2019-10-09 13:04:29 -04:00
Justin Ethier
7786181722 Micro-optimization: speed up equal() a bit
Just see if x and y are the same before type checking; this shaves off a bit of time in the benchmark (IE, under heavy loads).
2019-10-03 16:22:01 -04:00
Justin Ethier
17daa82bb9 Issue #340 - Fix u8 operations to work on integers 2019-09-27 13:38:44 -04:00
Justin Ethier
f7e6c11108 Port gc_is_stack_obj to a macro
This avoids function calls and can improve performance in extreme cases.
2019-09-26 17:24:27 -04:00
Justin Ethier
51919cfdf8 Speed up object mutation
No need to track for minor GC purposes unless we are mutating a heap variable to point to a stack var.
2019-09-26 10:07:10 -04:00
Justin Ethier
e6c23e25c1 Issue #337
Added `open-binary-input-file` and `open-binary-output-file` from R7RS.
2019-09-15 10:40:06 -04:00
Justin Ethier
60e9007d57 Speed up (complex?) 2019-09-13 12:31:18 -04:00
Justin Ethier
e099fe7860 Refactoring
Use a macro name that makes more sense, as we are trying to determine if obj is a closure.
2019-08-22 21:28:57 -04:00
Justin Ethier
9ee7c49334 Issue #297 - Complete validation for closures
Renumbered the type tags such that we can quickly check if an object is a closure or not. This will prevent crashes where an object of the wrong type (such as NULL or boolean) is passed in place of a closure. Previously we did not distinguish these objects, leading to segfaults and undefined behavior.
2019-08-22 13:41:20 -04:00
Justin Ethier
99c5bee97a Issue #297 - Friendlier error behavior for apply
When apply attempts to execute an object of the wrong type, we now raise a useful error instead of aborting the whole program (!)
2019-08-22 13:25:34 -04:00
Justin Ethier
1edb877c5f Speed up vector for five args or less 2019-08-02 12:13:30 -04:00
Justin Ethier
0c050a3065 Added platform to (features) 2019-07-31 13:06:31 -04:00
Justin Ethier
574cc630d0 Fixed exit when boolean is passed
Return abnomal status code when false is passed, per R7RS
2019-07-20 17:00:52 -04:00
Justin Ethier
4b6b672892 Added Cyc_is_immutable 2019-06-11 17:46:16 -04:00
Justin Ethier
22ca4ff85a Issue #320 - Ensure caller has ref to child thread 2019-06-07 16:12:31 -04:00
Justin Ethier
80daff6dd4 Cleanup 2019-06-06 13:30:43 -04:00
Justin Ethier
bcea7ce1ef Fix logical error 2019-06-06 13:05:09 -04:00
Justin Ethier
092409cb53 Fix syntax errors 2019-06-05 17:29:56 -04:00
Justin Ethier
49dbd0160a Build-out of make-shared 2019-06-05 17:26:03 -04:00
Justin Ethier
567e9dd2df WIP 2019-06-04 18:46:21 -04:00
Justin Ethier
273e4ccc88 WIP - Cyc_make_shared_object 2019-06-04 12:54:46 -04:00
Justin Ethier
7bd77e1ac3 Added checks for immutable objs 2019-06-03 13:18:08 -04:00
Justin Ethier
ddd057f97b WIP 2019-05-30 13:18:50 -04:00
Justin Ethier
d3e679fd03 Added atomic_type 2019-05-29 18:53:53 -04:00
Justin Ethier
0941d43f4f Added TODO 2019-05-28 13:31:08 -04:00
Justin Ethier
3f6e9655bd Set the 'immutable' field when constructing objs 2019-05-01 13:37:02 -04:00
Justin Ethier
3cb234402d Added checks for immutable flag 2019-05-01 13:11:05 -04:00
Justin Ethier
7bc59f3ded Allow (exit) to return integer values to OS 2019-04-11 13:21:31 -04:00
Justin Ethier
549bb59937 Micro-optimization - turn Cyc_st_add into a macro 2019-03-28 12:21:15 -04:00
Justin Ethier
b73f68cc8a Qualify static function 2019-03-21 22:59:58 -04:00
Justin Ethier
3706647583 Refactoring 2019-03-21 17:16:21 -04:00
Justin Ethier
c357663f0a Issue #310 - Fix type checking for member/assoc 2019-03-20 22:56:33 -04:00
Justin Ethier
41eaf8008b Add "bin" support to Cyc-installation-dir 2019-03-17 18:45:55 -04:00
Justin Ethier
f64d429ab8 WIP 2019-02-28 09:43:58 -05:00
Justin Ethier
ec7c3c3308 Revert change to (integer?) for now
Causes unit test failures, need to sort this out separately.
2019-02-18 17:18:02 -05:00
Justin Ethier
204e31e362 Issue #303 - Handle numeric predicate edge cases
Add edge cases to (real?) for complex numbers, and (integer?) for reals.
2019-02-18 16:48:11 -05:00