Commit Graph

  • cfb4df66f9 Added optional os.* library, fixed cosmoB_loadLibrary cpunch 2021-02-10 17:10:03 -06:00
  • 7db0782991 Added support for multiline comments using '/*' and '*/' cpunch 2021-02-10 15:39:36 -06:00
  • 78e21a0f28 refactored cosmoV_set & cosmoV_get, renamed COSMO_TOBJ->COSMO_TREF CPunch 2021-02-07 14:32:39 -06:00
  • 0d344f65df renamed cosmoV_pushObj->cosmoV_pushRef & cosmoV_newObj->cosmoV_newRef CPunch 2021-02-07 14:05:53 -06:00
  • 8d37f1f243 Renamed cosmoV_readObj to cosmoV_readRef to reduce ambiguity CPunch 2021-02-07 14:00:00 -06:00
  • 5faa40bdef Minor CObj* refactor, added cosmoO_lock and cosmoO_unlock CPunch 2021-02-06 18:51:47 -06:00
  • 8151cde6f3 Refactored cosmo_pushFString CPunch 2021-02-06 16:01:59 -06:00
  • 2f9ff08cd3 Added object.* library; added cosmoO_isDescendant to cobj.[ch] CPunch 2021-02-03 13:43:26 -06:00
  • 88d41d7db8 Fixed minor GC freeze bug in pcall() CPunch 2021-02-03 13:03:24 -06:00
  • ff1804ca36 Removed .charAt(), added .char() & .byte() CPunch 2021-02-01 21:07:43 -06:00
  • 3a28de6b2a Added 'local' support for 'proto', fixed DOS bug in proto parser CPunch 2021-01-31 12:06:20 -06:00
  • 300ffb89e9 Added basic math.* library, fixed number lexer edgecase CPunch 2021-01-29 15:45:24 -06:00
  • cff26574bb Fixed table iteration bug, added vm.globals to debug lib CPunch 2021-01-25 16:14:51 -06:00
  • cd6744ab65 Minor refactor, added vm.* library CPunch 2021-01-25 15:04:16 -06:00
  • 0be6e7dff1 Minor OP_NEWARRAY fix CPunch 2021-01-24 20:33:37 -06:00
  • 336e57e269 Added basic control.md docs CPunch 2021-01-24 20:26:54 -06:00
  • e38e8f335f Added operator docs CPunch 2021-01-24 12:28:53 -06:00
  • c82a01c968 Minor refactoring, fixed 'or' and 'and' logical operators CPunch 2021-01-24 12:17:46 -06:00
  • e699005a74 Added datatype docs CPunch 2021-01-24 12:00:21 -06:00
  • fd1481fa43 Minor VM refactor + GC bug fix CPunch 2021-01-23 17:16:45 -06:00
  • 0ad0df5fba Added '__tonumber' metamethod CPunch 2021-01-23 15:30:30 -06:00
  • 7c92749e0d Added '__count' metamethod to objects CPunch 2021-01-22 15:22:30 -06:00
  • 6b407534c0 basic docs CPunch 2021-01-20 23:29:05 -06:00
  • 185e6027e7 whoops CPunch 2021-01-19 22:56:52 -06:00
  • 71e9331551 Minor baselib.c refactor; added string.charAt() CPunch 2021-01-19 22:54:06 -06:00
  • d690c3040d Added hex and binary character encoding to strings CPunch 2021-01-19 12:22:20 -06:00
  • c7116ab752 fix for one digit numbers CPunch 2021-01-18 21:54:31 -06:00
  • f8884c494c Added Hexadecimal encoding and binary encoding to numbers using '0x' and '0b' CPunch 2021-01-18 19:42:15 -06:00
  • 85503025dd Added strings.cosmo example CPunch 2021-01-17 14:11:05 -06:00
  • 3c19079262 Added string.split() & string.find() CPunch 2021-01-17 14:07:30 -06:00
  • 2864c7be53 Minor refactoring, added OP_GETMETHOD CPunch 2021-01-16 15:40:58 -06:00
  • e995bb75fb added tonumber() and tostring() to base lib CPunch 2021-01-13 14:13:55 -06:00
  • 8cd0112c48 fixed __getter and __setter tables CPunch 2021-01-12 18:27:29 -06:00
  • 32162ce50c Updated examples and README to use proper syntax CPunch 2021-01-12 17:49:16 -06:00
  • ab86e19cfe Added ':' invoke operator CPunch 2021-01-12 17:46:22 -06:00
  • c510c9aebf Minor table refactor, added cosmoV_compileString and loadstring() to baselib CPunch 2021-01-10 14:38:53 -06:00
  • 8dc8cef7dc better increment test CPunch 2021-01-10 13:20:09 -06:00
  • f0b666f623 better README CPunch 2021-01-08 23:53:02 -06:00
  • aaa37c61d0 updated increment.cosmo example CPunch 2021-01-08 23:07:44 -06:00
  • 75b571c09a Added table support to the parser CPunch 2021-01-08 22:47:36 -06:00
  • 824c0e89b9 Dictionaries -> Tables CPunch 2021-01-08 14:37:36 -06:00
  • e57c194837 minor fix for OP_INVOKE CPunch 2021-01-07 20:04:42 -06:00
  • c5ee704317 optimized OP_INVOKE, embedded the identifier in the instruction CPunch 2021-01-07 20:02:19 -06:00
  • 1351ff63b1 Added CObj->proto support, state->protoObjects defines default protos for each COBJ type CPunch 2021-01-07 19:50:36 -06:00
  • c5bd0c2478 More performant OP_GETOBJECT & OP_SETOBJECT CPunch 2021-01-07 17:19:17 -06:00
  • ea4654cb6e fixed multiple assignments from function calls() CPunch 2021-01-06 01:26:42 -06:00
  • 860f30f201 removed printStack() from cosmoB_pcall() CPunch 2021-01-05 22:46:04 -06:00
  • eb2f50e456 Added CObjError, cosmoV_throw(), pcall(), and cosmoV_printError() CPunch 2021-01-05 22:27:59 -06:00
  • 417a1f15f1 fixed multiple assignment CPunch 2021-01-05 17:05:49 -06:00
  • ec3552a155 organized flags CPunch 2021-01-04 16:20:05 -06:00
  • 752bd533e9 Minor VM refactor, added cosmoV_pcall() CPunch 2021-01-04 16:04:38 -06:00
  • 4e968529dc __tostring example added CPunch 2021-01-03 17:35:52 -06:00
  • adb2381b4f added __tostring IString, added expressionPrecedence() to cparse.c CPunch 2021-01-03 17:33:10 -06:00
  • cb1d287c93 added type() to baselib CPunch 2021-01-02 14:33:11 -06:00
  • 0b415ad49d addUpvalue() now checks for UInt overflows CPunch 2021-01-01 23:14:47 -06:00
  • 7e9b61e018 minor refactor, fixed many warnings CPunch 2021-01-01 23:06:24 -06:00
  • bccabdebd7 Fixed OP_INCOBJECT to properly handle dicts CPunch 2021-01-01 22:52:54 -06:00
  • c96b155412 better unary increment support for indexes & fields CPunch 2021-01-01 22:09:42 -06:00
  • be7a291ff2 added SAFE_STACK flag CPunch 2021-01-01 20:02:36 -06:00
  • 509823e1bc detect stack overflows CPunch 2021-01-01 19:20:24 -06:00
  • 84f7895684 Added modulo operator '%' CPunch 2021-01-01 00:47:15 -06:00
  • 58485d9375 better iterator example CPunch 2020-12-31 13:57:02 -06:00
  • e253129e50 added string.sub() CPunch 2020-12-31 02:26:06 -06:00
  • e993cdd9fa Added . get/set support for dictionaries. CPunch 2020-12-30 17:51:59 -06:00
  • 9012f9231b Added assert() to base library CPunch 2020-12-27 13:36:17 -06:00
  • e7212b939d Makefile now specifies C11 CPunch 2020-12-26 22:03:14 -06:00
  • 090cc62cce Added variadic functions CPunch 2020-12-26 22:01:22 -06:00
  • db8ed21746 fixed typo in 'break' and 'continue' err. msg CPunch 2020-12-24 13:55:27 -06:00
  • 42eec149f6 added comments to break.cosmo CPunch 2020-12-24 00:47:21 -06:00
  • a408353c25 added "break" and "continue" statements CPunch 2020-12-24 00:41:00 -06:00
  • 31a852a127 Added cosmoV_pushFString(), and cosmoO_pushVFString(). CPunch 2020-12-22 15:13:11 -06:00
  • de3a89ad4f cosmoV_register now uses the stack to pass params CPunch 2020-12-19 21:15:12 -06:00
  • f6aaeb3417 fixed typos CPunch 2020-12-19 13:32:43 -06:00
  • 0beeee0fdf Added dictionary support to OP_ITER CPunch 2020-12-17 19:44:04 -06:00
  • b2c1f73e01 moved the results cap check in callCFunction CPunch 2020-12-16 03:58:56 -06:00
  • eede892eb0 made OP_ITER and OP_NEXT use CObjMethods CPunch 2020-12-16 03:51:50 -06:00
  • e5eca7bed6 Added iterable objects CPunch 2020-12-15 21:21:51 -06:00
  • 4f3f594b82 added multiple return value support to the parser CPunch 2020-12-14 14:38:46 -06:00
  • 48ceca1834 multiple return value support added to VM CPunch 2020-12-12 21:53:12 -06:00
  • bf59f70598 added IS_METHOD to IS_CALLABLE CPunch 2020-12-12 21:17:31 -06:00
  • ec8f5e7e4f added foreach() CPunch 2020-12-12 18:16:31 -06:00
  • 219a87c79c added IS_DICT() CPunch 2020-12-12 17:36:55 -06:00
  • d03175c9c5 OP_COUNT expects a dictionary CPunch 2020-12-12 17:34:54 -06:00
  • b1facfc92f smarter caching CPunch 2020-12-09 20:46:20 -06:00
  • 181ef8a18c Added dictionaries {} CPunch 2020-12-09 20:32:42 -06:00
  • 6445dae04c added module names for functions CPunch 2020-12-09 12:23:16 -06:00
  • 9aa7fa1381 replaced facttest.lua with fibtest.lua Optimized the NaN box to be byte aligned, performance under the fibtest.lua script improved by ~2.5 seconds (~31 before ~28.5 after on cpunch's machine) also cleaned up some misc. comments CPunch 2020-12-07 23:26:55 -06:00
  • f8a062919f added cosmoM_addRoot & cosmoM_removeRoot CPunch 2020-12-07 15:53:23 -06:00
  • aff011a8d1 minor refactoring CPunch 2020-12-07 14:35:14 -06:00
  • d00b803e6f added __setter and __getter CPunch 2020-12-06 14:11:33 -06:00
  • 005e2acd1e added cosmoO_setUserData and cosmoO_getUserData CPunch 2020-12-06 13:38:05 -06:00
  • 9ca67c8408 changed class -> proto CPunch 2020-12-05 17:58:56 -06:00
  • e0d51c191f renamed cosmoV_makeObject CPunch 2020-12-05 17:55:09 -06:00
  • 3a18d14a80 removed stale comments CPunch 2020-12-04 12:30:01 -06:00
  • d154d71163 improved nan box performance CPunch 2020-12-04 12:19:07 -06:00
  • b936827cc6 added support for NaN boxing (8 byte CValues!) CPunch 2020-12-04 00:04:14 -06:00
  • 495f1d7272 more minor refactoring CPunch 2020-11-30 12:50:55 -06:00
  • 0f138abedd minor refactoring CPunch 2020-11-30 12:40:36 -06:00
  • 08c640cd58 added # operator, improved error messages CPunch 2020-11-30 12:32:04 -06:00
  • 9dcd1c909a fixed needless pop in _main chunk CPunch 2020-11-27 19:42:00 -06:00