Commit Graph

45 Commits

Author SHA1 Message Date
Benjamin Vedder 6ccae99cb5 Squashed 'lispBM/lispBM/' changes from f3605d21..33093e6e
33093e6e dynamic loading of symbol mappings now perform gc if lbm memory if close to full
b7b35f0c Some amount of cleaning

git-subtree-dir: lispBM/lispBM
git-subtree-split: 33093e6e3fe4d8c99eb773a04f111ebe92161b5f
2022-03-26 16:05:53 +01:00
Benjamin Vedder 9ce71962f7 Squashed 'lispBM/lispBM/' changes from 43ebce71..f3605d21
f3605d21 fix bug in if. If required 't instead of accepting anything other than 'nil as true. Added null check to cont_closure_application_args
cba089b3 giving closure applications their own code-path separate from built-in fundamentals and extensions.
3856726f extendd functionality of dec_as functions

git-subtree-dir: lispBM/lispBM
git-subtree-split: f3605d21badf939007237e547dba785e1be2283b
2022-03-26 11:13:06 +01:00
Benjamin Vedder 9a62433015 Squashed 'lispBM/lispBM/' changes from 6199703d..43ebce71
43ebce71 Fix formatting int print.c and constants that default to float/double
fa220f0b update gc statistics collection a small bit
25b20686 fix get_heap_state
783d774e Arrays of 64bit values passes the associated tests. More tests are needed though
ff40d02f working on 64bit arrays. more testing needed
204bea39 CMP as a macro instead of 8 different functions
44bb152d added a set of math extensions grabbed from  Benjamin's bldc repo
9c34b4cd added string extensions from benjamins bldc repo
b4370155 merge in changes on master into dev64bit
c129344b fixed masking bug in fundamentals
ed3ab5be closed down ome warnings when building 64bit
d46564c9 expanded functionality of type-of to cover 64bit types and preparations for arrays of 64bit values
f7cb5538 added more 64bit functionality to fundamentals and a tiny amount of tests
4dafbe6c added decoders for 64bit values
63026a8a added 64bit value literals
8c1f0f0f made GC aware of lbm_memory allocated values
17148ada 64 bit values allocated on lbm_memory on 32 bit version
4445e5a8 sketch of encoders for 64 bit values
f636e64d suffix for the lisp size of int and uint are now i and u instead of i28 and u28
840723ca preparations and planning for 64bit types in both 32 and 64 bit versions.
13675dda 64bit up and running. but there are many TODOs
033bfd9a small fixes following bug hunt
f5c984de fix bug in representation of important masks and constants
d40b2437 Merge branch 'master' into dev64bit
06f9603f Merge branch 'master' into dev64bit
69950ba1 32 bit tests are ok
46b6fa28 Merge branch 'master' into dev64bit
b9e2c993 work in progress
8dff9b4d work in progress
a241aded work in progress
4738e0da update year in lbm_types
ca469923 made it possible to run the same tests as on the 32 bit version on the 64 bit code
85acec30 small tweaks tp create_ctx, use correct type
bf0286a7 Merge branch 'master' into dev64bit
824e1634 Merge branch 'master' into dev64bit
04a97f17 lots of testing needed
ea862cce a bunch of changes in preparation for 64bit compatibility.

git-subtree-dir: lispBM/lispBM
git-subtree-split: 43ebce71a281f4a158b8d2dec3fc537c26766ec3
2022-03-25 15:47:05 +01:00
Benjamin Vedder 58daf1b609 Squashed 'lispBM/lispBM/' changes from 78047efe..6199703d
6199703d removed left over debug residue from destructive reverse
5f3257f4 added a destructive list reverse function
421d5a61 returning an error from an extension now terminates the context in which the error happened. There is still one retry in the case of merrot
c6d9a3cb update changelog
6332a158 added a way to register an error reason string from extensions. pretty untested at the moment
e9a7fa5d update README
f9a66bfc fix left over num-eq in doc
52c4e05f doc update
b54230f8 md doc test
80125f23 experiment
1278aa24 update
e576c4f2 md doc

git-subtree-dir: lispBM/lispBM
git-subtree-split: 6199703df06c4a5709c84cb17102a8e088caa847
2022-03-10 16:29:11 +01:00
Benjamin Vedder 1b64651a9a Squashed 'lispBM/lispBM/' changes from eead0b27..78047efe
78047efe update
615f0d3c = now behaves as num-eq did and num-eq has been removed. for structural equality use eq
25cd006a define will give evaluation error if given more than 2 arguments

git-subtree-dir: lispBM/lispBM
git-subtree-split: 78047efe2b9ce60c841f85179539a62e1b1c48e5
2022-03-08 17:48:01 +01:00
Benjamin Vedder 0f002ca397 Squashed 'lispBM/lispBM/' changes from e81f234f..eead0b27
eead0b27 removed a case of shadowing
4f744f8b Added more escape characters, not sure it is safe.. It does something though

git-subtree-dir: lispBM/lispBM
git-subtree-split: eead0b27dd8f8ee2d7f2029b9b9af03b18bcc502
2022-03-06 21:41:39 +01:00
Benjamin Vedder 9a20ef543b Squashed 'lispBM/lispBM/' changes from 9b375671..e81f234f
e81f234f create_ctx changes to when it invokes gc to free up enough space for a context
55d7617d a first go at some escape characters. newline and backslash so far

git-subtree-dir: lispBM/lispBM
git-subtree-split: e81f234fdcac5728ef04ae9144e3aa7ed55306fa
2022-03-06 20:14:10 +01:00
Benjamin Vedder 3d7749c5f2 Squashed 'lispBM/lispBM/' changes from 1420777c..9b375671
9b375671 create_ctx fix: could get stuck in an state where there is no memory for any more contexts. not even a context to start the GC from! create_ctx now checks if there is enough memory for a context or it will automatically run GC
ebab83eb added a gc and retry in setvar

git-subtree-dir: lispBM/lispBM
git-subtree-split: 9b37567197de0f38bda5a3391c9255e49e2102f3
2022-03-06 19:32:20 +01:00
Benjamin Vedder 1deca768b5 Squashed 'lispBM/lispBM/' changes from 29cd280a..1420777c
1420777c removed left over array pieces in case array-create fails

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1420777c4e24ff3e914f0ce93f8a1a43075d798c
2022-03-06 14:41:39 +01:00
Benjamin Vedder 6976ac76bc Squashed 'lispBM/lispBM/' changes from 4a498667..29cd280a
29cd280a remove GC from finish_ctx

git-subtree-dir: lispBM/lispBM
git-subtree-split: 29cd280aa1cbedd61ebe7e3fd0e5275fd4b2e9d5
2022-03-06 14:11:14 +01:00
Benjamin Vedder 0f109bd0c7 Squashed 'lispBM/lispBM/' changes from 8a9ff6cc..4a498667
4a498667 fix odd slip-up in fundamental related to array-create

git-subtree-dir: lispBM/lispBM
git-subtree-split: 4a49866769b628f424adde78554da2523ebdc6b6
2022-03-06 13:00:50 +01:00
Benjamin Vedder ba0a6ec008 Squashed 'lispBM/lispBM/' changes from fb7d3503..8a9ff6cc
8a9ff6cc remove commented out code from gc
68562022 added a way to start gc from a lisp program
3e35264a just removed a small commented piece of code that has not been active for a long time
5c84c5af update benchmarks runner slightly
87a5e88c delete benchmarks
70716612 chibios examples build and run
e3e6ab65 chibios-repl compiles and runs again
01462c32 updated the llama

git-subtree-dir: lispBM/lispBM
git-subtree-split: 8a9ff6cc69e4fcb54fd197256509c9d1c554db7c
2022-03-06 02:01:41 +01:00
Benjamin Vedder 16307e5e9d Squashed 'lispBM/lispBM/' changes from 1c1bd9e6..fb7d3503
fb7d3503 added a llama
744ca079 Fixed an environment handling bug in conditionals
b448596c small tweaks (warnings)

git-subtree-dir: lispBM/lispBM
git-subtree-split: fb7d35031649049a618cb1fc0c690edbfe45d7f6
2022-03-03 10:24:42 +01:00
Benjamin Vedder 8e3a8a909d Squashed 'lispBM/lispBM/' changes from bd9b9c77..1c1bd9e6
1c1bd9e6 changed order of arguments to ix and bufset. added some tests
7ead0c7f tweak
3ba22ae5 align with master
ef69471f troubleshooting segfaults, heap was freed (on C side before evaluation thread finished running GC

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1c1bd9e6ff776d4e0009a1b0231f0b9eea89e262
2022-03-02 14:01:01 +01:00
Benjamin Vedder 346f321b9f Squashed 'lispBM/lispBM/' changes from ced143b0..bd9b9c77
bd9b9c77 fix bug in context initialization that caused segfault under odd-but-very-repeatable conditions
93a186e7 update behaviour of set!

git-subtree-dir: lispBM/lispBM
git-subtree-split: bd9b9c7772ef6f773a7f3080ef25546dbc3827ec
2022-03-02 09:57:01 +01:00
Benjamin Vedder e9e8db8597 Squashed 'lispBM/lispBM/' changes from ffbedbdf..ced143b0
ced143b0 set!
3e054ca0 troubleshooting segfaults, heap was freed (on C side before evaluation thread finished running GC

git-subtree-dir: lispBM/lispBM
git-subtree-split: ced143b0f6bb2cdc2e7a1c7575055a5fb8e0fab6
2022-03-01 19:10:34 +01:00
Benjamin Vedder 3a3ab9dae1 Squashed 'lispBM/lispBM/' changes from 19c6ca34..ffbedbdf
ffbedbdf remove left over debug print

git-subtree-dir: lispBM/lispBM
git-subtree-split: ffbedbdfab30b4df1d1385ecf069d28f66200132
2022-03-01 11:59:55 +01:00
Benjamin Vedder 0e09e51a45 Squashed 'lispBM/lispBM/' changes from f700e1a7..19c6ca34
19c6ca34 context ids are now set to the index into lbm_memory where the context structure is stored
1d92e257 tweak changelog
7bd40932 Process stack and context are now immediately removed from lbm_memory upon completion
3cf4ed9a Tests nolonger relies on wait_ctx to get the result of the test-program
9b21bc98 removing the context stack as soon as a process finishes

git-subtree-dir: lispBM/lispBM
git-subtree-split: 19c6ca34cfddc951f7eddcf55e4ece1cd8218462
2022-03-01 00:53:55 +01:00
Benjamin Vedder 2805adbf85 Squashed 'lispBM/lispBM/' changes from 34faf757..f700e1a7
f700e1a7 fix the evaluator in the examples directory
7706d296 builds without warning

git-subtree-dir: lispBM/lispBM
git-subtree-split: f700e1a7df3c02f1e381e7b608da82260e9e8b16
2022-02-28 13:31:55 +01:00
Benjamin Vedder f8d35e71f1 Squashed 'lispBM/lispBM/' changes from a7e04542..34faf757
34faf757 removed some dead code and made is_error more efficient (probably)
417731d4 tweak error message for eval error
30b01841 added a first version of more human-readable error messages. This will be improved over time
8337c4b6 align with master

git-subtree-dir: lispBM/lispBM
git-subtree-split: 34faf75787b62bcfe1a2785749fe4155ca12b83d
2022-02-27 23:16:13 +01:00
Benjamin Vedder 1ed1b7a2c4 Squashed 'lispBM/lispBM/' changes from 5f2a3f36..a7e04542
a7e04542 Fix: Closures now evaluate into themselves which is more in line with expected behaviour

git-subtree-dir: lispBM/lispBM
git-subtree-split: a7e045423ae289ce0f7b1aaeffd1cbb79cdd4f86
2022-02-25 10:54:47 +01:00
Benjamin Vedder a067399ea7 Squashed 'lispBM/lispBM/' changes from c1b59b75..5f2a3f36
5f2a3f36 added macro-expand

git-subtree-dir: lispBM/lispBM
git-subtree-split: 5f2a3f3622031e4b7f8b162a8e714db4c0f96a79
2022-02-24 22:12:32 +01:00
Benjamin Vedder 7bc9e908fe Squashed 'lispBM/lispBM/' changes from 2d78c54b..c1b59b75
c1b59b75 fix some bugs in array_extensions

git-subtree-dir: lispBM/lispBM
git-subtree-split: c1b59b75293608ee78fd2eb2e2d9c386db58f71e
2022-02-24 10:25:00 +01:00
Benjamin Vedder 22ef0a5861 Squashed 'lispBM/lispBM/' changes from 0a38cb96..2d78c54b
2d78c54b added callback mechanism for loading dynamic loading of missing functions

git-subtree-dir: lispBM/lispBM
git-subtree-split: 2d78c54b3aa16c2ac0a02c45b42dc991143cfa7a
2022-02-23 20:30:52 +01:00
Benjamin Vedder a2885343a3 Squashed 'lispBM/lispBM/' changes from 29e7f221..0a38cb96
0a38cb96 fix silly bug

git-subtree-dir: lispBM/lispBM
git-subtree-split: 0a38cb9639f62be53a98db576c06ffafcaa477dc
2022-02-23 14:52:58 +01:00
Benjamin Vedder 73b7f7ac0d Squashed 'lispBM/lispBM/' changes from 72f05666..29e7f221
29e7f221 added a symrepr char* iterator function

git-subtree-dir: lispBM/lispBM
git-subtree-split: 29e7f221b3e0f072e629b484008ed1f5e779edf7
2022-02-23 14:50:38 +01:00
Benjamin Vedder 0a2eb07a6d Squashed 'lispBM/lispBM/' changes from ccc08bc3..72f05666
72f05666 extended setvar functionality to heap defined variables

git-subtree-dir: lispBM/lispBM
git-subtree-split: 72f05666afed4bd3a506803724f98f17ce4300c5
2022-02-22 21:39:18 +01:00
Benjamin Vedder b880b5f0d8 Squashed 'lispBM/lispBM/' changes from d820e066..ccc08bc3
ccc08bc3 tweak to spawn
7a9ca078 doc tweak

git-subtree-dir: lispBM/lispBM
git-subtree-split: ccc08bc3c689231a11c939fc77b0c31c5c842311
2022-02-22 21:22:44 +01:00
Benjamin Vedder 78ca6b2cb3 Squashed 'lispBM/lispBM/' changes from f6ae1498..d820e066
d820e066 renamed the array extensions
f80d5936 some additions to documentation
4c499d52 version

git-subtree-dir: lispBM/lispBM
git-subtree-split: d820e066e98d90ec94b91f16f43b809d10bbd1f3
2022-02-21 20:02:27 +01:00
Benjamin Vedder 2fed9fe162 Squashed 'lispBM/lispBM/' changes from 7930b985..f6ae1498
f6ae1498 gc should free array header always
ee321014 fix in unsafe-free
1e9f2399 test of unsafe-free
c97eb831 added unsafe-free to array_extensions
0076f553 fix bug in gc sweep related to arrays allocated in lbm_memory
9c414d5a fix bug in c function for creating array in lbm

git-subtree-dir: lispBM/lispBM
git-subtree-split: f6ae1498908a8c1364479d24b434669ca59a6300
2022-02-21 18:36:00 +01:00
Benjamin Vedder 21f14aea66 Squashed 'lispBM/lispBM/' changes from 6a219e20..7930b985
7930b985 tweak change log
e8869883 small amounts of optimization to eval_cps
ac3bd152 silly call-cc test
8dba90e3 Merge branch 'master' into dev
f4cf6a54 added one more test of array_extensions, packing and upacking floats
b27895cb added test for hex numbers
337c0eda fix bug in compression that applies to hexadecimal numnbers.
a55c5857 added another array_extensions test and fixed one bug
d255d69b added another array_extensions test
983024d4 array creation from lisp and one test added
65d8a498 bug fix array_extensions
47ddb8ae updates to array_extensions
cb5c3421 small tweaks to array-extensions, starting to maybe make sense
01233e92 some small additions to array_extensions
fb9db7ab mini-tweak array_extensions
a05aa268 fix bugs in lispbm.mk and add a test of variables2
ddca1665 small tweaks array-extensions
2466abc6 work in progress
0dc7ec7c work in progress with a library of array extensions
df142ceb added .clang_complete
5229ca5e planning, no code yet
cd6f5e3f Merge branch 'master' into dev
0f4c9bf2 added a rule for running tests from the makefile and tweaks test-script to only fail if there are unexpected failures
7a61f4e1 Merge branch 'master' into dev
9f8c9caf update lbm_version
feab23d3 Merge branch 'master' into dev
112c01df added array creation from C on the lbm_memory. GC will remove these
ca70c70a Merge branch 'master' into dev
f8e38cc2 Merge branch 'master' into dev
fc203669 Merge branch 'master' into dev
57af7182 Merge branch 'master' into dev
037e2352 commenting and version
977cd92a Merge branch 'master' into dev
34322bcf small tweak readme
1f22da9e fix recursion issue with macros
fec81a7b version tweak
8548884b macros and callcc
7eadf3cc added a macro test2
8152930d improvement to macro subsystem
cce45228 first sketch of macro expansion

git-subtree-dir: lispBM/lispBM
git-subtree-split: 7930b9854a05a8d09b40d078da94bb3743ef977b
2022-02-21 12:02:15 +01:00
Benjamin Vedder 1f0c09151c Squashed 'lispBM/lispBM/' changes from 83d186cc..6a219e20
6a219e20 listing of variables is possible

git-subtree-dir: lispBM/lispBM
git-subtree-split: 6a219e20ecc20615d9aada81379c8e20682394a7
2022-02-16 13:14:47 +01:00
Benjamin Vedder 25010609df Squashed 'lispBM/lispBM/' changes from 0a69a489..83d186cc
83d186cc define can now be used to bind #var variables
3012709f Spawn takes an optional first argument that specifies stack size

git-subtree-dir: lispBM/lispBM
git-subtree-split: 83d186cc62a82fc333a15677a876a7a5cd7e8253
2022-02-16 12:24:45 +01:00
Benjamin Vedder 98d71b26fa Squashed 'lispBM/lispBM/' changes from da9fb6cd..0a69a489
0a69a489 small rephrasing of a conditional in eval_define
4a0d6b9f redefining any non-RUNTIME_SYMBOL is now an error.
dbc4bb71 removed left over printf

git-subtree-dir: lispBM/lispBM
git-subtree-split: 0a69a4896c83c1dc0ef4577cf54d42b5614de5b9
2022-02-15 21:01:47 +01:00
Benjamin Vedder 501c754606 Squashed 'lispBM/lispBM/' changes from c6d5de99..da9fb6cd
da9fb6cd added missing files

git-subtree-dir: lispBM/lispBM
git-subtree-split: da9fb6cd2dd6f98ddbac52e359d2b036efdb3206
2022-02-15 19:31:41 +01:00
Benjamin Vedder 7c57a0111f Squashed 'lispBM/lispBM/' changes from 1c2be895..c6d5de99
c6d5de99 GC is variable aware, pretty untested but does not break existing tests
1a872278 variables that GC is NOT aware of
b4a83ec4 fix tests and symrepr_init
6b5bee7d clear out extension table upon init

git-subtree-dir: lispBM/lispBM
git-subtree-split: c6d5de99af47caabc6ecd3fcbb49bd5584c08a1f
2022-02-15 19:09:10 +01:00
Benjamin Vedder cb919480b6 Squashed 'lispBM/lispBM/' changes from 0c09634e..1c2be895
1c2be895 extensions lookup is in an array and extensions occupy a specific range of symbol values

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1c2be8958f937edf8a5fed394f88f55ca9eab382
2022-02-15 09:29:40 +01:00
Benjamin Vedder 4a8e60e198 Squashed 'lispBM/lispBM/' changes from 7ed6fa3f..0c09634e
0c09634e added LEQ and GEQ comparisons
01fd1ec4 update change log

git-subtree-dir: lispBM/lispBM
git-subtree-split: 0c09634ea2ed217ecea0682feb314e0e45db1b64
2022-02-14 19:07:01 +01:00
Benjamin Vedder 629bd3702c Squashed 'lispBM/lispBM/' changes from 0535cf11..7ed6fa3f
7ed6fa3f bugfix  related to environment handling and progn

git-subtree-dir: lispBM/lispBM
git-subtree-split: 7ed6fa3f0ae89d11273abfb93e6a962ddf561d94
2022-02-13 21:11:18 +01:00
Benjamin Vedder 84a79f8109 Squashed 'lispBM/lispBM/' changes from 1108de58..0535cf11
0535cf11 version 0.1.0
f7c1b0d1 fix bug in last commit and remove dead code
305d3dce change behaviour of spawn to take a closure + arguments. No multi-spawn in one call anymore
93697f7a cleaning and restructuring in the evaluator
1e0d70f8 tuning evaluation of functions some
419e34fd small tweaks doxy
84bec750 Removed the nil-entry from the environment. It should make no difference
09868fea update doxy
f02a9087 fixes to doxy
d2087165 more doxy and fix fundamental array operation
488a4c35 update doxy
799328fc update language ref man
050c34b9 more doxy work and some small tweaks to reader when it comes to quotes
3948e566 added bitwise operations
e777189b zephyr example compiles, testing needed
426b71e4 doxy planning
8264fd37 shift left and right
5a61bf41 tweak readme
c82f587e accepting that eval-program is a very predatory operation
728b6511 doc tweaks
41aedc57 update to doxy
7a53228e added function for sharing of arrays from C to lbm. little bit of doc.  TODO: test arrays
c4931b4a small update to doc
3e7f31fb small additions to doc
8325bf09 user now has to provide a recursion stack fro the print_value function
f1fdd5f7 The GC recursion stack has to be provided by the user now

git-subtree-dir: lispBM/lispBM
git-subtree-split: 0535cf11214a6ba8c81f86929deaad34c30b3790
2022-02-13 14:25:39 +01:00
Benjamin Vedder 6aa01e2cfc Squashed 'lispBM/lispBM/' changes from 18d9001b..1108de58
1108de58 added possibility to take n steps in the evaluator
9fb1863e added match-binders for u32 and i32
b591bd3e fix to match that allows matching on boxed types

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1108de58965232fcfb2cb173db6e8696319f1bb5
2022-02-03 12:49:33 +01:00
Benjamin Vedder 3307ff377b Squashed 'lispBM/lispBM/' changes from 046eb52e..18d9001b
18d9001b fixes the to the eval_state statemachine

git-subtree-dir: lispBM/lispBM
git-subtree-split: 18d9001b32052a3de09517ae4e954c221155ef27
2022-02-01 21:51:54 +01:00
Benjamin Vedder d48a2e0f78 Squashed 'lispBM/lispBM/' changes from 9559204f..046eb52e
046eb52e Change the eval_state state machine to not go into pause mode (visible outside) until after gc if instructed to run GC

git-subtree-dir: lispBM/lispBM
git-subtree-split: 046eb52e068c6f8ec15c8f8e7bd7b0c348edde1c
2022-02-01 21:35:41 +01:00
Benjamin Vedder 0af11fc982 Squashed 'lispBM/lispBM/' changes from 748477b9..9559204f
9559204f added lbm_define to allow definitions to be added from C
d5390ade added a pause function that performs GC if less than N elements are free
9f7f015b mostly just rearrangements
2e96957d bugfix related to read after changes to array representation. New test added that shows a problem with read-program, this is a bit of a puzzle to solve. Something to ponder on for a while
aa6bfff9 can read multiple values from array to a list.
8b8daa6d Nothing of magnitude
313806c9 more preparations for lbm arrays pointing to C memory
9b361ba8 preparing for arrays that are shared between C and lbm. Dont know yet what to do about the possibility of concurrent modifications to these arrays
39257a5a doxy fix renamed files
955a5a2c update to doxy, still lots to do. Rename one file.
ae0d140f adding some built in functions for encoding and decoding to and from lists of value representing bytes

git-subtree-dir: lispBM/lispBM
git-subtree-split: 9559204fcfd0b403fdec524910c10d8bd57d0437
2022-02-01 20:40:07 +01:00
Benjamin Vedder fafa5c9779 Squashed 'lispBM/lispBM/' content from commit 748477b9
git-subtree-dir: lispBM/lispBM
git-subtree-split: 748477b953fbd06094fc17c1c6332bf5f9cea7d0
2022-01-29 17:26:45 +01:00