Commit Graph

160 Commits

Author SHA1 Message Date
Benjamin Vedder d5c3736ba7 Squashed 'lispBM/lispBM/' changes from 86722c10..2d281d94
2d281d94 added a allocate_list_init function and implemented mk_closure using it

git-subtree-dir: lispBM/lispBM
git-subtree-split: 2d281d94325a6e5b95833ecf0d5a370424cc09b7
2022-12-19 20:16:54 +01:00
Benjamin Vedder e96f03514f Squashed 'lispBM/lispBM/' changes from dd848f86..86722c10
86722c10 fix an off by one error in allocate_list

git-subtree-dir: lispBM/lispBM
git-subtree-split: 86722c105a3d623752002bbac9a3f387fbbd4ef6
2022-12-19 09:26:30 +01:00
Benjamin Vedder 842f70e983 Squashed 'lispBM/lispBM/' changes from cf1214d8..dd848f86
dd848f86 small readability refactor
3853cb02 removing a dead-store in qq_expand.c
8f26a7b0 Refactoring symrepr.c for readability and code-reuse

git-subtree-dir: lispBM/lispBM
git-subtree-split: dd848f86f03698c9f34097d0e37d14841e8fcfb3
2022-12-19 00:20:54 +01:00
Benjamin Vedder 64aeaa0429 Squashed 'lispBM/lispBM/' changes from d77214e9..cf1214d8
cf1214d8 added lbm_get_max_extensions and lbm_get_num_extensions

git-subtree-dir: lispBM/lispBM
git-subtree-split: cf1214d8ad595d4e1cb33ad9d64d874e3deef415
2022-12-18 13:58:47 +01:00
Benjamin Vedder 8b336eecd8 Squashed 'lispBM/lispBM/' changes from c94f3404..d77214e9
d77214e9 a cleaning pass that removes some now dead code and fixes some comments. Also removed a pointless clearing of gc mark bit in allocate_cell and allocate_list
115b38f5 adding closing of read channel in case of errors while reading
9a0fb3ca added some gc tormenting tests that also uses the new list allocator
a75c10a7 fix bug in heap_allocate_list and fix bug in reader (read channel not closed if reading fails)
ad8243d2 rewrote fundamental_range using heap_allocate_list.
b7320588 added lbm_heap_allocate_list and adapted fundamental_list to use it.
20906de7 Rearrangement of heap_allocate_cell. May make cons slightly more efficient

git-subtree-dir: lispBM/lispBM
git-subtree-split: d77214e93497506118add4ff6b3f63520239a445
2022-12-16 15:38:41 +01:00
Benjamin Vedder 0576e2dba1 Squashed 'lispBM/lispBM/' changes from 328c7f59..c94f3404
c94f3404 simplifying some code by making lbm_gc_mark_phase variable args.

git-subtree-dir: lispBM/lispBM
git-subtree-split: c94f340407b7abb3361c277419cb16fcc68169a1
2022-12-03 15:33:45 +01:00
Benjamin Vedder ad5f08e2f4 Squashed 'lispBM/lispBM/' changes from 2deb1f0c..328c7f59
328c7f59 removed dev-plans
71d7ad62 qq expansion now calls GC when needed
05364c36 added qq and multiarg append tests
8c1abdf6 Quasiquotation minimization experimentation
035d3734 typo
726b9260 added a dev-plans
cc47bb3a Merge branch 'master' into dev
84911dae fix bug where quasiquotation returns an error as if it was a value instead of terminating the process
54e937f9 added dev-plans

git-subtree-dir: lispBM/lispBM
git-subtree-split: 328c7f59d335d5b4b1a73981fd86883c77954746
2022-11-30 17:04:31 +01:00
Benjamin Vedder b0ee928437 Squashed 'lispBM/lispBM/' changes from 98858aab..2deb1f0c
2deb1f0c removed an unnecessary conditional from eval_symbol
f2ecf875 fix typo in lbmref
e20c9180 tweak typo in comment and add comment

git-subtree-dir: lispBM/lispBM
git-subtree-split: 2deb1f0c1205eaa4644262bca4389909047e419e
2022-11-23 18:29:01 +01:00
Benjamin Vedder 18fb8bfd08 Squashed 'lispBM/lispBM/' changes from 37274020..98858aab
98858aab Bugfix in array-create where (array-create 0) returns memory_error and may lead to unnecessary GC invokation. Now returns eval-error with reason incorrect argument

git-subtree-dir: lispBM/lispBM
git-subtree-split: 98858aab0eec13201d754ea9103de6bb227f8755
2022-11-21 20:39:29 +01:00
Benjamin Vedder cc9b128720 Squashed 'lispBM/lispBM/' changes from 186807fd..37274020
37274020 small tweaks and some addition of extension programming helpers from vedderb/bldc

git-subtree-dir: lispBM/lispBM
git-subtree-split: 37274020afda6c6dbb691a8f5ab8fc213d34c676
2022-11-18 12:44:05 +01:00
Benjamin Vedder 79a86520fd Squashed 'lispBM/lispBM/' changes from 2cfb2a8e..186807fd
186807fd update lbmref spawn

git-subtree-dir: lispBM/lispBM
git-subtree-split: 186807fde90eef09191cb0d41bc850913d554c07
2022-11-18 10:47:13 +01:00
Benjamin Vedder 7dc38f0b56 Squashed 'lispBM/lispBM/' changes from e9de3516..2cfb2a8e
2cfb2a8e removed left ovver debugging code

git-subtree-dir: lispBM/lispBM
git-subtree-split: 2cfb2a8efcf09148b0124ebf25779358be1d7ee6
2022-11-16 12:41:35 +01:00
Benjamin Vedder 67e31df279 Squashed 'lispBM/lispBM/' changes from 639eb007..e9de3516
e9de3516 small cleanup, commenting, and fixing bug where errors end up as part of a result instead of killing the process

git-subtree-dir: lispBM/lispBM
git-subtree-split: e9de351627e205fd37310c9571ce0d9ee10c578b
2022-11-16 12:31:09 +01:00
Benjamin Vedder 6315a66e83 Squashed 'lispBM/lispBM/' changes from 075fd296..639eb007
639eb007 typo
b73a54df fix problem in map
9cdd9f88 fix bug in map when applied to the empty list
594e2290 tweak some error reasons and error conditions
875c4b5c Updated behaviours of eval, eval-program and read-program at zero arguments, eval-error with reason
3a7b54fb fix bug: strange behaviour of eval-program when given NO arguments
341bcb28 eval-program can now be applied to an empty list of programs
5ed43637 tweak to testing framework and addition of a test
cfff78b7 added some spawn-trap tests and slight tweaks to testing framework to accomodate concurrent LBM programs a tiny bit better
c49e6295 added two more tests of match with guards

git-subtree-dir: lispBM/lispBM
git-subtree-split: 639eb007af3c8692abc5df97e5b449b080219858
2022-11-14 14:45:27 +01:00
Benjamin Vedder 807ff48e8d Squashed 'lispBM/lispBM/' changes from a5683c69..075fd296
075fd296 fix bug related to pattern matching guards
02b38d42 update lbmref
fb312618 update lbmref
884a0973 update lbmref
32af7455 update lbmref

git-subtree-dir: lispBM/lispBM
git-subtree-split: 075fd296a8c6061ae8c5a45b017392700675b1d8
2022-11-10 12:08:00 +01:00
Benjamin Vedder 54b662c15b Squashed 'lispBM/lispBM/' changes from 31d4edfd..a5683c69
a5683c69 bug fix related to string literal lengths
53aeb0bf tweak changelog
6a8ef376 added tests
7bbd22e7 updated lbmref and changelog

git-subtree-dir: lispBM/lispBM
git-subtree-split: a5683c692e2f005495db2baee9a90d86798151e9
2022-11-09 15:48:58 +01:00
Benjamin Vedder 84e25a1fcf Squashed 'lispBM/lispBM/' changes from f4fd81b3..31d4edfd
31d4edfd Reverting some recent changes that introduced problems

git-subtree-dir: lispBM/lispBM
git-subtree-split: 31d4edfdf777a6de099aa8c07ce0550387add7d8
2022-11-08 18:21:28 +01:00
Benjamin Vedder f50a52ad40 Squashed 'lispBM/lispBM/' changes from d59e9d5d..f4fd81b3
f4fd81b3 microoptimizations in closure application argument handling. Fix bugs in allocate_list

git-subtree-dir: lispBM/lispBM
git-subtree-split: f4fd81b3ddaba585f5cc7fe102c4f3e772d6ebf4
2022-11-08 11:41:35 +01:00
Benjamin Vedder cbd07fd0ae Squashed 'lispBM/lispBM/' changes from 3a8a7237..d59e9d5d
d59e9d5d  reusing code of eq and = in not-eq and !=
d30f44d3 added != and not-eq
a576cf2f removed unused initialization

git-subtree-dir: lispBM/lispBM
git-subtree-split: d59e9d5de9a503fd398e68ec6c7a04a505be0daa
2022-11-07 21:06:49 +01:00
Benjamin Vedder 378490e865 Squashed 'lispBM/lispBM/' changes from 4199111d..3a8a7237
3a8a7237 added an lbm_allocate_list function and reimplemented mk_closure by using it
28d6e821 added lbm_cddr to heap.h
e4851e7d fixed bug in lbm_memory_free that snuck in while adding the mutices
19f220b8 changed behaviour for eval when given no argument
26d27c86 refactoring of function application. mostly a code organization and naming change
866feeef small tweak README
e6d84578 slight refactoring in lbm_memory and checking if a pointer is inside lbm_memory before attempting to free it

git-subtree-dir: lispBM/lispBM
git-subtree-split: 3a8a7237643617a7e8fdafa9c791d041f3bfb676
2022-11-07 10:44:47 +01:00
Benjamin Vedder 7d5f408054 Squashed 'lispBM/lispBM/' changes from 0242183a..4199111d
4199111d protecting all lbm_memory interfacing functions with mutex
576e99f0 lbm_memory allocate and free are now protected by mutex
7a5cdebc Merge branch 'master' of github.com:svenssonjoel/lispbm
88bc0f17 added some send recv tests
2bb4d318 Merge pull request #4 from svenssonjoel/add-code-of-conduct-1
6a8e1948 Create CODE_OF_CONDUCT.md

git-subtree-dir: lispBM/lispBM
git-subtree-split: 4199111d8de551ade495794a88b976d13f26064c
2022-11-04 18:08:08 +01:00
Benjamin Vedder ba71a9d059 Squashed 'lispBM/lispBM/' changes from 7392b499..0242183a
0242183a Eval-program destructively updated the program to evaluate. This is OK only if there are no other references to this program.
712714d3 fix typo lbmref
e3c7b29a update lbmref entry on eval-program

git-subtree-dir: lispBM/lispBM
git-subtree-split: 0242183af30661ba58d9616a35419403b14b4560
2022-11-03 15:44:43 +01:00
Benjamin Vedder 0e62aa9501 Squashed 'lispBM/lispBM/' changes from 9011df7f..7392b499
7392b499 tweak to eval-program to remove unintuitive behaviour
3683b038 tweak lbmref
79e26fd3 small tweak lbmref
b62983d2 some additions and typo-fixes in lbmref
566fb8ce added more text about cond to lbmref

git-subtree-dir: lispBM/lispBM
git-subtree-split: 7392b4994dfadcc97ebb9e2ca8da552204495c9d
2022-11-02 18:49:31 +01:00
Benjamin Vedder 16e352ca34 Squashed 'lispBM/lispBM/' changes from 39930fdf..9011df7f
9011df7f fix typos in lbmref
d197432c update lbmref
3a233c36 added another cond test
cae5da5f new tests for cond
8c6e98cb added test for cond
fccd42fa first draft of cond, more tests are needed

git-subtree-dir: lispBM/lispBM
git-subtree-split: 9011df7f4fbcc5a336100f1f18b9aef680bea97b
2022-11-01 21:14:30 +01:00
Benjamin Vedder 7204cdccf5 Squashed 'lispBM/lispBM/' changes from 8b64ae8b..39930fdf
39930fdf upped the version a minor
2a75e41f fix bug in eval_receive, typo

git-subtree-dir: lispBM/lispBM
git-subtree-split: 39930fdf8ddd85128012ca833464762f27033811
2022-11-01 15:15:55 +01:00
Benjamin Vedder 05cbd569a6 Squashed 'lispBM/lispBM/' changes from c81eb021..8b64ae8b
8b64ae8b added some tests for matching with guards.
62e2c688 update lbm_ref
14ec7847 error message on malformed recv patterns
e9ea4e4e match with guards
0e3a29fc Pattern matching now support optional boolean guard expressions
4af283e8 some precautionary changes to certain fundamentals
a4435fb0 added a test of built in map

git-subtree-dir: lispBM/lispBM
git-subtree-split: 8b64ae8b1193fee0f9f9ca361c25ca9357a3384a
2022-10-31 21:52:58 +01:00
Benjamin Vedder 058bea75a5 Squashed 'lispBM/lispBM/' changes from bd485f20..c81eb021
c81eb021 tweak error message
12a8b067 added a built in reverse

git-subtree-dir: lispBM/lispBM
git-subtree-split: c81eb02194e1c556eef52811c11b2679bfb40908
2022-10-28 17:41:09 +02:00
Benjamin Vedder 35f0ead585 Squashed 'lispBM/lispBM/' changes from 81a5990a..bd485f20
bd485f20 bugfixes to built in map

git-subtree-dir: lispBM/lispBM
git-subtree-split: bd485f2033bad547be0e1fba7513f190b1838fcc
2022-10-28 13:11:09 +02:00
Benjamin Vedder 3ce9000abc Squashed 'lispBM/lispBM/' changes from 1b286c45..81a5990a
81a5990a added a built in map

git-subtree-dir: lispBM/lispBM
git-subtree-split: 81a5990af2bccbbd7284d980a2f9504ef014699d
2022-10-28 11:44:54 +02:00
Benjamin Vedder 85e4aae57b Squashed 'lispBM/lispBM/' changes from 4233bafe..1b286c45
1b286c45 variable_not_bound error prints the variable that is not bound
edc731ae Atomic behaves as progn does now
73ddfc5a removed the type-based pattern binders, ?i, ?i32 ...

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1b286c454af350df93fda02f86e356861e06a399
2022-10-26 17:34:07 +02:00
Benjamin Vedder 0db54cab8b Squashed 'lispBM/lispBM/' changes from c2bd0cd0..4233bafe
4233bafe added aliases true and false, for t and nil
3e183b84 Match now uses the same structural equality to determine a match as eq does

git-subtree-dir: lispBM/lispBM
git-subtree-split: 4233bafe57b82fedab760c7cc7d1837ffb264fd0
2022-10-25 11:01:49 +02:00
Benjamin Vedder 1e2b53cbbc Squashed 'lispBM/lispBM/' changes from dde9b593..c2bd0cd0
c2bd0cd0 added some more range tests and updated the refman
d96fd1a3 reversing range if end point is smaller than starting point
15bd7eb4 update ref man and added a test of range
e83d6ca8 Added fundamental operation that creates a list numbers in a range. range
f0641f43 added a built in operation that computes the length of a proper list
952fb423 added indexing into lists from the rear. Use a negaive index to index from the rear of a list using ix
f6618b69 bugfix related to environment handling in match

git-subtree-dir: lispBM/lispBM
git-subtree-split: c2bd0cd0745acdc078e541a717ccc82642036018
2022-10-24 09:58:05 +02:00
Benjamin Vedder e65998ddaa Squashed 'lispBM/lispBM/' changes from fe7a709d..dde9b593
dde9b593 small cleaning
6bf9d942 bugfix related to new handling of freelist when not empty at GC. and some slight refactoring

git-subtree-dir: lispBM/lispBM
git-subtree-split: dde9b593787a2621bda4e0bc3ddb27bb63e73f6c
2022-10-18 01:16:36 +02:00
Benjamin Vedder b924552400 Squashed 'lispBM/lispBM/' changes from e76a3deb..fe7a709d
fe7a709d added some benchresults and twear benchmark code to remove the reference to the stepping functionality
965c2543 uninlined stack popping procedures
7ea5f3bd Change GC treatment of freelist when GC is invoked and freelist is non-empty
7bc24eef update changelog
d7d158e0 added 5 tests related to quasiquotation
b26bf5f8 update
5309b8e7 Update README
918b4aee update README

git-subtree-dir: lispBM/lispBM
git-subtree-split: fe7a709d1942fbc88461e9313d91220ba97ab3e8
2022-10-17 14:42:17 +02:00
Benjamin Vedder 898e4df503 Squashed 'lispBM/lispBM/' changes from ca26715a..e76a3deb
e76a3deb removed GC from finish_ctx. Can be taken care of from the C interface
91924e68 clean up heap after an error. Most important after an out_of_memory a bit dependent on how one interacts with the RTS
ba1c57ad new test on setvar together with let - passes.
df38cde4 small cleaning around bug fix area

git-subtree-dir: lispBM/lispBM
git-subtree-split: e76a3debc2abfd8528becb4295eb6f22492b3826
2022-10-11 19:12:37 +02:00
Benjamin Vedder c30054a533 Squashed 'lispBM/lispBM/' changes from b741c823..ca26715a
ca26715a fixed environemt handling bug related to function applications

git-subtree-dir: lispBM/lispBM
git-subtree-split: ca26715a429d1b7b5f0351ace1c8fedc09d7f4af
2022-10-10 19:35:30 +02:00
Benjamin Vedder 681ac73df7 Squashed 'lispBM/lispBM/' changes from b3d8a6b2..b741c823
b741c823 update README
589639e9 removed old unused track of thought
7b64298a updated readme
b1a0b8f2 update lbmref
258d3547 update lbmref
080196da changed behaviour of mailbox when receiving on full. oldest mail is replaced

git-subtree-dir: lispBM/lispBM
git-subtree-split: b741c823bafd4d316feff99f0ebadaedb16f550a
2022-10-10 17:07:58 +02:00
Benjamin Vedder dccfe15135 Squashed 'lispBM/lispBM/' changes from 7756d581..b3d8a6b2
b3d8a6b2 removed functions that nolonger have a purpose
306722dc remove the possibility to step through program and reorganize the most critical loop structure
aa6eb5ca  remove encode, decode from refman
899d8579 update README and plot script
132e9364 updated readme with more detailed intro

git-subtree-dir: lispBM/lispBM
git-subtree-split: b3d8a6b21af4683af8837ad1a5106cf0d2d7eac9
2022-10-06 13:58:38 +02:00
Benjamin Vedder e8748c33d6 Squashed 'lispBM/lispBM/' changes from 1be203ec..7756d581
7756d581 update benchresults
bf99ae97 removed seldom used fundamental operations, is_fundamental, encode, decode

git-subtree-dir: lispBM/lispBM
git-subtree-split: 7756d5819e4dd18a4907f9ae68a5e8e752b962f1
2022-10-04 11:17:07 +02:00
Benjamin Vedder 63e050c452 Squashed 'lispBM/lispBM/' changes from 82dd1b77..1be203ec
1be203ec added is_symbol_true
fbdbbc54 added is_byte_array and renamed lbm_is_list to lbm_is_cons, then created a new lbm_is_list which is also true for nil

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1be203ecb48333c872f9056142d74a6f3c99b9c6
2022-10-03 11:48:35 +02:00
Benjamin Vedder 219f29dd7a Squashed 'lispBM/lispBM/' changes from be53df12..82dd1b77
82dd1b77 removing old broken macro-expansion routine
b888dc8e various tweaks and de-inlinings of functions

git-subtree-dir: lispBM/lispBM
git-subtree-split: 82dd1b77135220091118162c9032009948e6a4d8
2022-10-02 23:17:59 +02:00
Benjamin Vedder 76400e7ca0 Squashed 'lispBM/lispBM/' changes from 42aa0d95..be53df12
be53df12 refactoring for evaluation speed

git-subtree-dir: lispBM/lispBM
git-subtree-split: be53df12441590b855a7f706f2319447f15cba80
2022-10-02 17:51:48 +02:00
Benjamin Vedder 67837017be Squashed 'lispBM/lispBM/' changes from ebfa4c83..42aa0d95
42aa0d95 added some historical benchmark results
d1f5782e closed warning apply_error
d7520f41 added simple tests2

git-subtree-dir: lispBM/lispBM
git-subtree-split: 42aa0d952638a4dc23a9457a712f27e6da8a3b60
2022-10-02 09:28:56 +02:00
Benjamin Vedder 4105a02e10 Squashed 'lispBM/lispBM/' changes from 337ecc93..ebfa4c83
ebfa4c83 bugfix related to allowing parsing of underscore symbols, read_error specifically
926121ae bugfix related to allocation of arrays
603a58ea added spawn-trap and exit-ok and exit-error functions. All tests pass

git-subtree-dir: lispBM/lispBM
git-subtree-split: ebfa4c8393c071ce1babdf873d3adef17968b217
2022-10-02 08:36:11 +02:00
Benjamin Vedder 7059ee97ac Squashed 'lispBM/lispBM/' changes from 8293dc85..337ecc93
337ecc93 fix bugs related to wait

git-subtree-dir: lispBM/lispBM
git-subtree-split: 337ecc930ca82869096543128d93843a961b4dfa
2022-10-01 10:58:20 +02:00
Benjamin Vedder 55ff24d348 Squashed 'lispBM/lispBM/' changes from aa297a80..8293dc85
8293dc85 making infer static analysis 100% happy
dc577f26 added undefine
1ee941fb upped version and added recent changes
b0eb427a removed namespaces from the refman
62f65367 added 2 mail tests

git-subtree-dir: lispBM/lispBM
git-subtree-split: 8293dc85deb67a62fa337f2f53b0f5586fce3521
2022-09-27 12:12:54 +02:00
Benjamin Vedder 0a2b6d9baf Squashed 'lispBM/lispBM/' changes from ee23f4ab..aa297a80
aa297a80 fix bug in eval_receive

git-subtree-dir: lispBM/lispBM
git-subtree-split: aa297a806a52451dc493618155f89dec3c51c793
2022-09-25 12:05:18 +02:00
Benjamin Vedder 39a306bed0 Squashed 'lispBM/lispBM/' changes from efc1dbb7..ee23f4ab
ee23f4ab mailboxes are now arrays and of a finite size

git-subtree-dir: lispBM/lispBM
git-subtree-split: ee23f4abaf11468d0714e9ff69f881255575a711
2022-09-25 11:32:52 +02:00
Benjamin Vedder 04f6b67217 Squashed 'lispBM/lispBM/' changes from 2d48bed5..efc1dbb7
efc1dbb7 remove bufget-i24
28b30eed update to tokpar. Hopefully doesnt break things, all tests ok

git-subtree-dir: lispBM/lispBM
git-subtree-split: efc1dbb7a6f597ba519ae670d84e5dc0d0c462cd
2022-09-24 23:25:37 +02:00
Benjamin Vedder 6a2f1a7875 Squashed 'lispBM/lispBM/' changes from 0801bea4..2d48bed5
2d48bed5 found bug related to malformed tokens, should be better now but maybe not perfect
fafa3cd0 added 24bit variants of array extensions

git-subtree-dir: lispBM/lispBM
git-subtree-split: 2d48bed5b6a1bfa31427406cffaa6b7cca2b558b
2022-09-24 19:18:54 +02:00