about summary refs log tree commit diff stats
path: root/lib/quickjs/quickjs.h
Commit message (Collapse)AuthorAgeFilesLines
* Prevent UB on memcpy and floating point conversionsCharlie Gordon2024-03-131-11/+9
| | | | | | | - add `memcpy_no_ub` that accepts null pointers for 0 count - prevent 0 length allocation in `js_worker_postMessage` - use safer test for `int` value in `JS_NewFloat64`, `JS_ToArrayLengthFree` and `js_typed_array_indexOf`
* Add C API function JS_GetClassID()Tyler Rockwood2024-03-021-0/+3
| | | | | | | | | If you want to extend a built-in class you need it's class ID and there is no robust way to get that without this accessor. * add JS_INVALID_CLASS_ID constant for invalid class ID. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
* Strip trailing spacesCharlie Gordon2024-03-021-4/+4
|
* export JS_GetModuleNamespace (github issue #34)Fabrice Bellard2024-03-021-0/+1
|
* quickjs: reduce diff with upstreambptato2024-03-021-7/+2
| | | | | | * the uint8array thing is probably from txiki.js, but we never used it * upstream now has JS_GetClassID, importing that instead... (so this commit won't build :/)
* allow 'await' in the REPL and added os.sleepAsync()Fabrice Bellard2024-01-111-0/+3
|
* top-level-await support - follow the spec in the implementation of the ↵Fabrice Bellard2023-12-281-2/+10
| | | | module linking and evaluation to avoid errors with cycling module dependencies
* Revert TLA support patchbptato2023-12-281-11/+0
| | | | | | Importing it from upstream. (Hoping this revert actually worked...)
* Reapply "reworked set property and fixed corner cases of typed array set ↵bptato2023-12-091-3/+3
| | | | | | | | property" This reverts commit 82aa85ef0458e1b97917ffe2626e5631bb444c58. A-ha, it was just a linking error. We have to fix the Makefile instead.
* Revert "reworked set property and fixed corner cases of typed array set ↵bptato2023-12-091-3/+3
| | | | | | | | property" This reverts commit 1b38f7b7a7709c3fe21f1adcf1d5de6b2e0e48f7. Breaks tostring setter for some reason; we'll have to investigate...
* reworked set property and fixed corner cases of typed array set propertyFabrice Bellard2023-12-091-3/+3
|
* js: simplify toJSP0bptato2023-11-301-0/+2
| | | | | | | * Expose js_create_from_ctor from QuickJS and directly use that (instead of badly recreating it) * Do not call defineUnforgeable twice (it is inevitably called in toJSP0, so jsctor does not need it)
* base64: reduce pointless re-coding using JSStringbptato2023-10-211-0/+7
| | | | | We now expose some functions from QuickJS to interact with JavaScript strings without re-encoding them into UTF-8.
* Remove getClassID hackbptato2023-06-271-0/+1
| | | | Add a JS_GetClassID function to QJS instead.
* Working Nim-QuickJS GC integrationbptato2023-06-241-0/+2
| | | | I believe this works correctly. Hopefully I'm not wrong.
* Include QuickJS sources in the repositorybptato2023-06-221-0/+1061
Taken from txiki.js, so it includes zamofex's top-level await patch.