aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/ucode
Commit message (Collapse)AuthorAgeFilesLines
* ucode: update to latest Git HEADJo-Philipp Wich2021-09-011-9/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 929c862 vm: fix toplevel function call protocol 8f34d70 fs: fix chown() and rename() error return values 03ca445 tests: disable fuzz tests for now 3b1be3d types: mark further GC roots d49af4e types: fix comparison of differently signed integers c79ff39 types: handle conversion errors when dealing with negative error indexes 3315b1f types: allow negative array indexes d5b25f9 treewide: harmonize function naming cc4ce8d module: remove unused defines f5d7526 examples: add libucode usage examples 559eff2 types, vm: adjust GC api e5e7e62 treewide: move header files into dedicated directory ff6168a build: install header files 7e6ce0f main: introduce new flag `-x` to allow disabling specific functions b1817b3 vm: fix invalid memory access on GC'ing uninitialized VM context 498fe87 main: refactor option parsing and VM setup ff52440 treewide: consolidate typedef naming 1d60418 vm: add API to control trace mode 48f33ad vm: make root exception handler configurable 0f69f09 vm: fix invalid memory access on toplevel function calls 6bcc318 vm: fix handling exceptions in top-level function calls 4ae0568 lib, vm: reimplement exit() as exception type 2f77657 vm: extend API to allow returning result value from VM execution 111645a vm: remove module preloading logic 38ff6de main: preload modules ourselves d5bc223 vm: add uc_vm_invoke() helper ef0baf1 vm: cosmetic fix for outputting exceptions without source context b11a2fa vm: move global scope allocation into uc_vm_init() 900b2a3 vm: add getter and setter for vm globals scope 0179576 lib: rename uc_add_proto_functions() to uc_add_functions() 98b9c84 lib: expose stdlib function array 1adfba0 treewide: eliminate dead code and unused functions 3974e71 treewide: replace a number of unnecessary type casts bf85226 treewide: move ressource type registry into vm instance e2b3d2e build: split into libucode and ucode cli dad8f3a types: properly deal with circular data in GC mark phase 62dbd64 lexer: rename UT_ prefixed constants to UC_ bc8e465 types: fix wrong assert() on tearing down object trees 853b9f1 vm: fix potential invalid memory access in uc_vm_get_error_context() 6f05cdd lib: fix refcount imbalance in uc_require_path() 96f140b lib, vm: ensure that require() compiles modules only once df5db5f compiler: don't segfault on invalid declaration expressions a97c7a1 lexer: transition into EOF state on unrecognized character 2a838d1 compiler: improve mapping of binary operator tokens to instructions 9872f65 vm: add support for I_LE and I_GE instructions 4e410c3 treewide: let uc_cmp() use instruction instead of token numbers ce6081d lexer, vm: reorder token and instruction numbers 234a4f6 lib: implement b64enc() and b64dec() functions 856a0c0 lib: only consider context of calling function for callbacks 86fb130 lib: implement min() and max() functions 3e893e6 lib: pass-through "this" context to library function callbacks 42de7ab lib: implement `sourcepath()` function 05c80a7 lib: fix negative uc_index() return value on 32bit systems 9874562 lexer: implement raw code mode 3b665c8 lexer: drop value union from keyword table 44354cf lexer, compiler: separate TK_BOOL token into TK_TRUE and TK_FALSE tokens 5879bdf syntax: drop Infinity and NaN keywords d4edadc lib: rename uc_lib_init() to uc_load_stdlib() d81bad7 main, lib: move allocation of globals object into lib function c4f4b38 main: simplify REQUIRE_SEARCH_PATH initialization 54ca3aa types: fix uninitialized memory on setting non-contiguous array indexes cbc0d78 build: let require search patch default to CMAKE_INSTALL_PREFIX 5714705 syntax: introduce `const` support ed32c42 compiler, lexer: add NO_LEGACY define to disable legacy syntax features ff6811f syntax: implement `delete` as proper operator 5803d86 lib: implement wildcard() function dfb7379 fs: implement chmod(), chown(), rename() and glob() functions 1ddf5b6 lexer: skip interpreter line in any source buffer 9951a00 build: lower minimum required CMake version to v3.13 7b81ab2 main: expose argv as global ARGV array to ucode scripts 7283a70 tests: rename misnamed testcases for consistency 3f80116 compiler: fix local for-loop initializer variable declarations f20b56f compiler: properly parse slashes in parenthesized division expressions 5c4e1ea lib: implement regexp(), a function to construct regexp instances at runtime e546bba lib: implement render(), an include variant capturing output in a string 0cb10c6 vm: implement mechanism to change output file descriptor eb8a64d lib: fix uc_sort() f1ffc9f vm: truncate long values after 60 chars in trace output 850612f compiler: properly handle break/continue in nested scopes f0a9875 compiler: properly handle keyword in parenthesized property access expression 1660433 compiler: fix stack mismatch on compiling `use strict` statements a36e0df syntax: implement support for 'use strict' pragma 827a34a vm, compiler: get rid of unused struct members 594cdf3 lib: implement assert() c4d1648 lib: add support for pretty printing JSON to printf() and sprintf() f2eaea3 lib: gracefully handle truncated format strings in uc_printf_common() 02629b8 lexer: fix infinite loop on parsing unterminated comments 2bc9bac lexer: fix infinite loop on parsing unterminated expression blocks f73e201 lexer: fix infinite loop when parsing regexp literal at EOF 86b4863 compiler: fix segfault on parsing invalid pre/post increment expressions 0e24509 lib: fix reporting source context lines at EOF e66b2ad compiler, lexer: improve lexical state handling e29b574 lib: fix uc_split() quirks 64eec7f treewide: ISO C / pedantic compliance 4af803d build: output error messages on test failures 9ef693e vm: improve context for early errors 6def9fc tests: pass ucode library path through environment d5dd183 treewide: address various sign-compare warnings 28825ac types: support creating ressource values without associated type 9c5106a types: fix potential memory leaks and null pointer accesses c51934a types: fix potential leak of key in ucv_object_add() 7b28727 main: fix ineffective EOF check in parse() 4cf897c lib: uc_system(): fix invalid free() of non-heap memory 35af4ba treewide: rework internal data type system f2c4b79 treewide: fix issues reported by clang code analyzer 93ededb tests: allow executing run_tests.sh from any directory 0e4a387 Add initial GitLab and GitHub CI support df73b25 tests: add more tests 41d33d0 tests: custom: return exit code if tests fails 1c548a6 cmake: do not output binaries into lib directory 2b59097 tests: create custom tests from current tests cases 8039361 main: provide just binary name in help output 778e4f7 lexer: fix incomplete struct initializers 502ecdc cmake: enable extra compiler checks 3c2aeff cmake: fix includes and libraries 617a114 cmake: make 3.0 minimum version f360350 lib: implement sleep(ms) function 7f0ff91 lib: allow parsing non-array, non-object value in json() Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ucode: update to latest Git HEADJo-Philipp Wich2021-04-011-3/+3
| | | | | | | | 973cc6c compiler: actually expand block scope fix to for/while alt syntax 97bf297 compiler: ensure that alternative if/for/while syntax has own block scope f0e2a64 tests: add missing test case for fixed switch codegen Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ucode: update to latest Git HEADJo-Philipp Wich2021-03-291-3/+3
| | | | | | | | | | | | | | | | | | | aa9621d compiler: rework switch statement code generation b5f0de1 vm: add trace mode instruction dump output fixes 0341d64 vm: fix another for-loop memory leak 00d9419 vm: fix further memory leaks in trace mode 20a3763 vm: fix loop variable memory leak in NEXTK/NEXTKV instruction 9a6ef2b lib: prevent use-after-free after uc_shift() 03f1324 object: free prototype object when registering existing ressource type b3d758b compiler: fix for/break miscompilation 86e3970 lib: fix value refcount of uc_unshift() return value fe464ea run_tests.sh: allow passing tests to run as arguments 091ae1b compiler: fix another try/catch miscompilation fcedb19 lib: fix passing uninitialized memory to sigprocmask() 0d0357d vm: fix leaking source context strings in trace mode 7a41fb3 lib: use execvp() in system() Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ucode: fix PKG_MIRROR_HASHDaniel Golle2021-03-241-1/+1
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ucode: introduce packageJo-Philipp Wich2021-03-191-0/+116
This commit introduces ucode, a tiny template processor utilizing a syntax closely resembling ECMA Script for embedded script blocks. Signed-off-by: Jo-Philipp Wich <jo@mein.io>