about summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert "reworked set property and fixed corner cases of typed array set ↵bptato2023-12-092-113/+169
| | | | | | | | property" This reverts commit 1b38f7b7a7709c3fe21f1adcf1d5de6b2e0e48f7. Breaks tostring setter for some reason; we'll have to investigate...
* Update QJS versionbptato2023-12-091-1/+1
| | | | now fully rebased on the latest release
* added Array.prototype.findLast{Index} and ↵Fabrice Bellard2023-12-091-16/+61
| | | | TypeArray.prototype.findLast{index} (initial patch by bnoordhuis)
* fixed duplicate static private setter/getter testFabrice Bellard2023-12-091-7/+12
|
* fixed delete super.x errorFabrice Bellard2023-12-091-12/+4
|
* reworked set property and fixed corner cases of typed array set propertyFabrice Bellard2023-12-092-169/+113
|
* Retrieve RegExp 'g' flag in spec conformant way (original patch by bnoordhuis)Fabrice Bellard2023-12-092-17/+41
|
* fixed lexical scope of 'this' with eval (github issue #192)Fabrice Bellard2023-12-091-6/+7
|
* fixed negative zero dateFabrice Bellard2023-12-091-12/+14
|
* Revert "add_eval_variables: do not close over `this' twice"bptato2023-12-091-2/+1
| | | | | | This reverts commit 9ff482dd8d5b1b252e77712e9418b5b253f4bbf8. Importing fix from upstream instead.
* fixed private field setters (github issue #194)Fabrice Bellard2023-12-082-2/+3
|
* added missing bignum error tests (github issue #159)Fabrice Bellard2023-12-081-12/+64
|
* added String.prototype.at, Array.prototype.at and TypedArray.prototype.atFabrice Bellard2023-12-081-3/+72
|
* Revert "quickjs: add Array.prototype.at"bptato2023-12-081-30/+0
| | | | | | This reverts commit b7367506fa05e9396e69b1db7277e011722af6b0. Importing upstream patch instead.
* updated to unicode 15.0.0Fabrice Bellard2023-12-081-1198/+1237
|
* quickjs/libbf: add missing ifdefbptato2023-12-051-0/+2
|
* the BigInt support is now always includedbellard2023-12-054-846/+509
|
* bf_set_ui() fix (github issue #133)bellard2023-12-051-16/+16
|
* Revert "fix undefined behavior: shift 32 bits for uint32_t in bf_set_ui"bptato2023-12-051-6/+1
| | | | | | This reverts commit 821693c4374d9895f462fa29644905c61dbb241d. (Importing fix from upstream instead.)
* quickjs: improve can_destroy hookbptato2023-12-051-19/+40
| | | | | | Use a separate list for tracking potential can_destroy targets. This lets us skip unnecessarily calling can_destroy for non-platform objects, and gets rid of exponential complexity in the loop.
* Update chamebptato2023-12-031-0/+0
|
* qjs: fix a warningbptato2023-12-021-1/+1
| | | | | We want to check if d is larger than INT64_MAX, but the conversion rounds it up, so we actually need to use greater-equals.
* js: simplify toJSP0bptato2023-11-302-0/+8
| | | | | | | * 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)
* fix chakasu submodule refbptato2023-11-201-0/+0
|
* Update chakasubptato2023-11-171-0/+0
|
* Add innerHTML setterbptato2023-10-231-0/+0
| | | | yay
* update chakasubptato2023-10-221-0/+0
|
* base64: reduce pointless re-coding using JSStringbptato2023-10-212-1/+35
| | | | | We now expose some functions from QuickJS to interact with JavaScript strings without re-encoding them into UTF-8.
* javascript: add TextEncoder, TextDecoderbptato2023-10-211-0/+0
|
* add_eval_variables: do not close over `this' twicebptato2023-10-131-1/+2
| | | | | See https://github.com/bellard/quickjs/issues/192. (Thanks to @dchest for the proposed fix.)
* Update chamebptato2023-09-301-0/+0
|
* update chamebptato2023-09-241-0/+0
|
* update chakasubptato2023-09-241-0/+0
|
* Fix stack overflow in CVE-2023-31922Nick Vatamaniuc2023-09-231-0/+6
| | | | | | | | | | | | | | | | | | | isArray and proxy isArray can call each other indefinitely in a mutually recursive loop. Add a stack overflow check in the js_proxy_isArray function before calling JS_isArray(ctx, s->target). With ASAN the the poc.js from issue 178: ``` ./qjs ./poc.js InternalError: stack overflow at isArray (native) at <eval> (./poc.js:4) ``` Fix: https://github.com/bellard/quickjs/issues/178
* fix undefined behavior: shift 32 bits for uint32_t in bf_set_uiBo Yao2023-09-231-1/+6
|
* update chamebptato2023-09-191-0/+0
| | | | and with that, resolve the unknown input type issue
* Update submodulesbptato2023-09-142-0/+0
|
* quickjs: add Array.prototype.atbptato2023-09-031-0/+30
|
* Move HTML parsing into Chamebptato2023-08-151-0/+0
| | | | Operation "modularize Chawan somewhat" part 2
* Update chakasubptato2023-08-151-0/+0
|
* Move charsets into chakasubptato2023-08-141-0/+0
| | | | Operation "modularize Chawan somewhat" part 1
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-011-0/+211
| | | | | | | | | | | | | | * Import punycode, as it has been removed from stdlib. * Fix some syntax errors * Apparently you can no longer compare distinct pointers with nil. Add explicit comparisons with typeof(nil) instead. * htmlparser: rename _ to other, as semantics of _ have changed. (Quite a shame, it looked better with _. Oh well.) * Explicitly specify mm:refc, as the browser OOMs with orc for some reason. Confirmed to compile & run on 2.0.0, 1.6.14, 1.6.12, 1.6.10 and 1.6.8. (<1.6.8 it's broken & wontfix.)
* Add utf-8 support to libregexpbptato2023-07-041-6/+14
| | | | | | | This allows us to greatly simplify exec(Regex). In particular, we no longer have to convert any line containing non-ascii characters into UTF-16 (which was a significant inefficiency in regex search until now).
* Remove getClassID hackbptato2023-06-272-0/+10
| | | | Add a JS_GetClassID function to QJS instead.
* Working Nim-QuickJS GC integrationbptato2023-06-242-2/+60
| | | | I believe this works correctly. Hopefully I'm not wrong.
* Include QuickJS sources in the repositorybptato2023-06-2216-0/+74804
| | | | Taken from txiki.js, so it includes zamofex's top-level await patch.
* Add indexed color, other png improvementsbptato2023-06-091-186/+0
|
* Add support for canvas and multipartbptato2023-06-051-0/+186
Quite incomplete canvas implementation. Crucially, the layout engine can't do much with whatever is drawn because it doesn't support images yet. I've re-introduced multipart as well, with the FormData API. For the append function I've also introduced a hack to the JS binding generator that allows requesting the JSContext pointer in nim procs. Really I should just fix the union generator thing and add support for overloading. In conclusion, for now the only thing canvas can be used for is exporting it as PNG and uploading it somewhere. Also, we now have PNG encoding and decoding too. (Now if only we had sixels as well...)