Commit graph

282 commits

Author SHA1 Message Date
Justin Ethier
9a464e002e Bugfix - Allow read-bytevector to return EOF 2020-03-05 23:00:20 -05:00
Justin Ethier
098b30133f Added TODO 2020-01-02 13:41:19 -05:00
Justin Ethier
40894ecb3e Added define-values 2020-01-02 13:41:04 -05:00
Justin Ethier
837954b310 Use read-bytevector! from Chibi 2019-12-29 18:10:05 -05:00
Justin Ethier
48ce2709b9 Placeholders for bin/txt port prims 2019-12-29 17:58:30 -05:00
Justin Ethier
123c20d60d WIP: (read-bytevector!) 2019-12-28 19:37:15 -05:00
Justin Ethier
e5dca1835f Added read-bytevector 2019-12-28 18:55:19 -05:00
Justin Ethier
02fcad76f6 Added write-bytevector 2019-12-28 18:22:35 -05:00
Justin Ethier
734d40a44d Faster constructor for record types
TODO: validate number of args passed to record type constructor
2019-11-06 13:30:36 -05:00
Justin Ethier
838240fceb Avoid computing (length args) twice 2019-11-06 12:07:42 -05:00
Justin Ethier
c9921ce69a Fix libtommath warnings 2019-10-23 13:24:13 -04:00
Justin Ethier
e211e3f64d Issue #339 - Fix fast path in make-string
We need to ensure the code point buffer only contains a single byte in order to use the fast path for string creation. For example if there is one code point that is 2 bytes large we need to use the slow path.
2019-09-23 13:28:52 -04:00
Justin Ethier
f3c83e42a4 Optimized versions of (map) and (for-each)
These versions are optimized for when the function is being called with two list arguments.
2019-08-09 16:00:46 -04:00
Justin Ethier
ec25eddc28 Issue #331 - Prevent syntax error during eval
Prevent an unquoted symbol from throwing a syntax error when evaluating a define-record-type form. Note there are still other issues with creating a record type in the interpreter at this time.
2019-08-05 14:09:14 -04:00
Justin Ethier
0c050a3065 Added platform to (features) 2019-07-31 13:06:31 -04:00
Justin Ethier
f0b84ce122 Set immutable flag 2019-05-01 17:41:47 -04:00
Justin Ethier
12d6cbce5a Use explicit if's instead of memv for case
Theory is the generated code can make better use of the processor cached when using explicit if statements than aggregating over a list via memv, since pairs in the list can be located anywhere across memory.
2019-03-20 17:39:55 -04:00
Justin Ethier
1f7212a964 Faster version of _list-index 2019-03-14 15:43:36 -04:00
Justin Ethier
d9f63a85b4 Revert previous change 2019-02-27 16:03:19 -05:00
Justin Ethier
1f8a824bda More efficient record type construction 2019-02-27 15:44:50 -05:00
Justin Ethier
8772c5355b Faster initialization of objects create via define-record-type 2019-02-27 14:31:14 -05:00
Justin Ethier
0f0beb024c Do not use vector-set when creating record types
This improves performance as mutations force the GC to do more work.
2019-02-27 10:29:18 -05:00
Justin Ethier
6bfff4b6ed Perform fixnum type check 2019-02-19 13:17:33 -05:00
Justin Ethier
2d9ba5a9e3 New version of (list?) 2018-12-12 13:43:47 -05:00
Justin Ethier
74e56aeb2f Issue #280 - Cyc-add-feature! 2018-11-10 06:39:13 -05:00
Justin Ethier
d9b0adc8c1 Issue #277 2018-10-01 17:05:52 -04:00
Justin Ethier
4cf407ebe6 Issue #275 - Return #f instead of raising error 2018-09-05 17:41:47 -04:00
Justin Ethier
75b50d8269 Slightly faster (exact-integer?) 2018-06-21 17:55:27 -04:00
Justin Ethier
48845ce23b Experimenting with faster versions of map, for-each 2018-06-20 13:35:39 -04:00
Justin Ethier
75e48f999f Issue #55 - Support (inexact) for complex 2018-05-15 13:15:53 -04:00
Justin Ethier
335be69a12 Make (complex? z) work 2018-05-10 13:39:30 -04:00
Justin Ethier
1d91ace450 Fix slot-ref 2018-02-01 13:25:19 -05:00
Justin Ethier
aafe5f0d68 Record type enhancements 2018-01-31 19:08:47 -05:00
Justin Ethier
cf4877acd7 Bug fixes 2017-12-18 23:56:07 +00:00
Justin Ethier
44af2e8d98 Issue #236 - Added single-byte I/O functions 2017-12-18 23:39:15 +00:00
Justin Ethier
584b31460b Added TODO 2017-12-18 17:34:18 -05:00
Justin Ethier
24b10e9d6a Added full-unicode feature 2017-12-18 14:49:07 -05:00
Justin Ethier
8750696e17 cleanup 2017-11-19 18:43:37 -05:00
Justin Ethier
a492ca379d Handle the null character 2017-11-09 19:00:21 -05:00
Justin Ethier
02014322b7 Properly count bytes in make-string 2017-11-07 17:47:08 -05:00
Justin Ethier
6aaa600ebc Bugfixes:
- Avoid unnecessary calls to `strlen`
- Type check the `fill` parameter to `make-string`
2017-10-27 13:01:04 +00:00
Justin Ethier
77e391cabc Uncomment fast path 2017-10-26 22:35:11 +00:00
Justin Ethier
703f863e48 Fixes for make-string 2017-10-26 21:56:35 +00:00
Justin Ethier
0bd0eeb7a6 WIP 2017-10-26 17:04:52 +00:00
Justin Ethier
722d077367 WIP 2017-10-24 19:01:20 -04:00
Justin Ethier
6c4dd4b740 Compute number of code points and byte len 2017-10-24 17:53:09 -04:00
Justin Ethier
c339234632 Issue #225 - Added error-object interfaces
This is only a rough-cut of the actual implementation, though.
2017-09-15 12:14:26 +00:00
Vasilij Schneidermann
d731f92e7d read-string: return EOF if nothing can be read
R7RS states that there's three possible scenarios for read-string:

- More characters can be read than asked for (return string)
- Less characters can be read than asked for (return string)
- No characters can be read (return EOF)

This commit ensures the last scenario works as intended.
2017-09-07 17:07:05 +02:00
Justin Ethier
db011aa1af Issue #220 - make-string - use heap for large strs 2017-09-05 17:32:04 -04:00
Justin Ethier
2647ceb4ae WIP 2017-09-05 13:44:16 +00:00