Commit Graph

31 Commits

Author SHA1 Message Date
cpunch 4816e64612 cvalue.c:printValue renamed to cosmoV_printValue 2023-12-28 22:52:20 -06:00
CPunch 0df56bd42a ctable: hash COBJ_CFUNCTION based on cfunc and not the actual <obj> 2023-12-28 19:56:25 -06:00
cpunch 7a54230cb9 hated the styling of this
consistency is nice to have
2023-11-03 22:36:59 -05:00
CPunch 6a47c82179 fix more GC bugs 2023-08-29 23:21:52 -05:00
CPunch 7c5d2f6b65 minor CTable refactoring 2023-08-25 19:57:16 -05:00
CPunch 155e0829fb minor refactoring 2023-06-03 01:39:35 -05:00
CPunch 6056f8eb5b added clang-format 2023-02-09 12:32:48 -06:00
cpunch 3890c9dd1e Refactored cosmoO_equals
This sets up room for the '__equal' metamethod to be added

- cosmoO_equals now requires the state to be passed
- cosmoV_equals now requires the state to be passed
- cosmoT_get now requires the state to be passed
2021-02-19 17:04:23 -06:00
CPunch 78e21a0f28 refactored cosmoV_set & cosmoV_get, renamed COSMO_TOBJ->COSMO_TREF
also changed print() to print raw primitives instead of generating a <string> needlessly. helped performance immensely in scripts like `examples/increment.cosmo`
2021-02-07 14:32:39 -06:00
CPunch 8d37f1f243 Renamed cosmoV_readObj to cosmoV_readRef to reduce ambiguity
also fixed several typos
2021-02-07 14:00:00 -06:00
CPunch c510c9aebf Minor table refactor, added cosmoV_compileString and loadstring() to baselib
cosmoV_compileString is recommended since it'll push the result (<error> or <closure>) onto the stack.

also, fixed some GC-related bugs, so yay!
2021-01-10 14:38:53 -06:00
CPunch c5bd0c2478 More performant OP_GETOBJECT & OP_SETOBJECT
constant indexes are now embedded in the instruction
2021-01-07 17:19:17 -06:00
CPunch 7e9b61e018 minor refactor, fixed many warnings 2021-01-01 23:06:24 -06:00
CPunch f6aaeb3417 fixed typos 2020-12-19 13:32:43 -06:00
CPunch b936827cc6 added support for NaN boxing (8 byte CValues!) 2020-12-04 00:04:14 -06:00
CPunch 08c640cd58 added # operator, improved error messages 2020-11-30 12:32:04 -06:00
CPunch 9dcd1c909a fixed needless pop in _main chunk 2020-11-27 19:42:00 -06:00
CPunch fe2bcf8ae6 fixed GC bug, extended strings 2020-11-27 19:34:54 -06:00
CPunch 0745fd10a9 extended lexer, fixed table shrinking 2020-11-25 23:34:02 -06:00
CPunch bb11b3b309 added support for __newindex 2020-11-24 15:16:37 -06:00
CPunch 46b99ab390 minor refactoring, added inc and dec operators 2020-11-19 14:41:21 -06:00
CPunch e6a377dfd0 added comments 2020-11-17 14:39:02 -06:00
CPunch c1854bdcf1 shrink based on count 2020-11-17 14:34:30 -06:00
CPunch 7182f5ccd1 do GC before table array is allocated 2020-11-17 14:32:20 -06:00
CPunch ef8218996c fix clang warning 2020-11-17 03:38:00 -06:00
CPunch 1189dc4b78 correctly mark tombstones 2020-11-17 03:36:56 -06:00
CPunch 1329b72fcd fixed GC bug 2020-11-17 03:10:55 -06:00
CPunch aa975b7330 minor refactoring + non-zero int fixed 2020-11-05 19:53:55 -06:00
CPunch ffa6ca22e3 +NUM to getValueHash() 2020-11-04 21:37:45 -06:00
CPunch e1d33855c3 added basic objects 2020-11-03 22:10:51 -06:00
CPunch 2e1b745624 Initial commit 2020-10-28 00:16:30 -05:00