about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
| * javascript: replace old jsgetprop with new onebptato2025-01-132-39/+2
| |
| * javascript: take cstring in getClass, hasClassbptato2025-01-131-3/+3
| |
| * Conform to strict defsbptato2025-01-139-88/+130
| | | | | | | | Breaks compatibility with 1.6.14.
| * optshim: remove valType, optbptato2025-01-132-4/+1
| |
| * javascript: remove $ -> toString conversionbptato2025-01-101-5/+1
| | | | | | | | Undocumented and fairly surprising behavior. Just do it manually.
| * javascript: drop union types and non-JSValue varargsbptato2025-01-102-249/+60
| | | | | | | | Untested and unused since forever.
| * javascript: remove undocumented & broken defineConstsbptato2025-01-011-19/+0
| | | | | | | | | | | | | | I have a mostly working version in Chawan (in src/html/script.nim), but it still has to work around the fact that we define prototypes differently than mainstream browsers. So I won't try to fix it here if I'll have to change what it does *yet again* in the future.
| * Make it work with abiCheckbptato2024-12-291-4/+4
| | | | | | | | | | Nim doesn't distinguish between function pointers and functions, but C does.
| * Fix casingbptato2024-12-292-2/+2
| |
| * Version 0.8.0bptato2024-12-263-3/+6
| |
| * Update to QuickJS-NG 0.8.0bptato2024-12-266-418/+461
| |
| * Version 0.7.2bptato2024-11-253-2/+7
| |
| * javascript: fix refc deinitialization bugsbptato2024-11-258-24/+89
| | | | | | | | | | | | | | | | | | We advertise refc support only, and yet we were testing for orc. Whoops. I'm not 100% sure why the GC_fullCollect is needed in free, but it probably makes sense. Also, I haven't seen any actual bugs related to pointers being collected into seqs, but in theory they are possible. Better safe than sorry.
| * Version 0.7.1bptato2024-11-223-2/+6
| |
| * jspropenumlist: fix wrong allocation sizebptato2024-11-223-2/+4
| |
| * Version 0.7.0bptato2024-11-183-2/+6
| |
| * javascript: complete exotic pragmasbptato2024-11-184-63/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | .jsgetprop is now deprecated. Its replacement, .jsgetownprop, provides the same functionality and more, so that it's now equivalent in power to the QJS API: * instead of JS_NULL, it's JS_UNINITIALIZED that signals "not found" * it allows you to set the property descriptor (for returning get/set functions) Also, .jsgetrealprop was added to wrap get_property. This will be renamed to .jsgetprop in the future.
| * Version 0.6.0bptato2024-11-163-3/+7
| |
| * javascript, jsopaque: get rid of some useless tablesbptato2024-11-164-21/+35
| | | | | | | | these work better as seqs; I was just being lazy...
| * Update to quickjs-ng 0.7.0bptato2024-11-1610-2257/+4224
| | | | | | | | | | Includes a patch to adjust the JS_SetOpaque API to continue supporting opaques on the global object.
| * fromjs: remove leftover debugging codebptato2024-11-161-2/+0
| |
| * Version 0.5.5bptato2024-11-093-2/+6
| |
| * fromjs, quickjs: fix and use JS_FreePropertyEnum APIbptato2024-11-092-4/+2
| |
| * fromjs: fix crash on fromJS with seqbptato2024-11-093-2/+13
| |
| * Version 0.5.4bptato2024-11-084-3/+7
| |
| * Fix some C warnings; do not link pthread with threads:offbptato2024-11-083-6/+9
| |
| * Version 0.5.3bptato2024-10-283-2/+5
| |
| * update eprintbptato2024-10-281-3/+6
| |
| * jspropenumlist: avoid zero-length mallocbptato2024-10-281-3/+7
| | | | | | | | qjs-ng asserts on it
| * Version 0.5.2bptato2024-10-123-2/+5
| |
| * libregexp: fix incorrect patchbptato2024-10-122-2/+6
| | | | | | | | | | | | The loop runs until we hit a prefix byte, and unconditionally decrements the pointer. However, we started i from 0 (instead of the correct 1), meaning we always lost at least one char.
| * Version 0.5.1bptato2024-10-023-2/+5
| |
| * quickjs: fix build without threadsbptato2024-10-026-7/+16
| |
| * Version 0.5.0bptato2024-09-293-3/+13
| |
| * Switch to QuickJS-NG 0.6.1bptato2024-09-2925-11623/+10883
| | | | | | | | | | qjs-ng is more actively maintained than qjs, and has some very useful features like column tracking.
| * Version 0.4.3bptato2024-09-175-12/+24
| |
| * Version 0.4.2bptato2024-09-175-7/+40
| |
| * javascript: fix crash on missing opaquebptato2024-09-174-3/+13
| | | | | | | | | | | | | | | | | | Prototype objects don't have an opaque, so handle those. This does mean that leaving out setGlobal after having set a global type will no longer run; this behavior was undocumented and likely undesirable in all cases, so I'll call it a bug. While we're at it, fix inherited jsgetprop as well.
| * javascript: don't use SetProperty in newJSClassbptato2024-09-172-2/+2
| | | | | | | | | | SetProperty has undesirable effects like calling GetOwnProperty. Define it instead.
| * Version 0.4.1bptato2024-08-224-5/+9
| |
| * Version 0.4.0bptato2024-08-153-3/+10
| |
| * Misc. fixes & refactoringbptato2024-08-1515-106/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix JS_NewObjectClass binding * fix JS exception handling in jsgetprop * fix incorrect varargs slice end * strict exception tracking everywhere except fromjs & tojs -> fromjs & tojs call user-defined procs, which possibly do not care about exception tracking. in theory, we should error out on this, because unwinding QJS stack breaks everything. in practice, I can't even make it work in Chawan so meh * remove dependency on std/unicode -> this removes the toJS(Rune) overload. users who need it can easily add it themselves. * remove setInterruptHandler wrapper (just use the QJS API) * fromJS(int) now converts to int64 or int32 based on the architecture * move isSequence into fromJS * add some doc strings to the API
| * Version 0.3.1bptato2024-08-094-4/+5
| |
| * fromjs, tojs: fix compilation, NUL char handlingbptato2024-08-094-18/+37
| | | | | | | | | | | | | | | | * use string in ident maps instead of cstring, as the latter doesn't work on some arch's * fix toJS with strings including a NUL char * skip an unnecessary copy in enum conversion * update todo
| * Version 0.3.0bptato2024-08-094-4/+15
| |
| * javascript: allow omitting file namebptato2024-08-093-30/+32
| |
| * Use malloc_usable_size() on any OS based on GNU libcPino Toscano2024-08-091-2/+2
| | | | | | | | | | malloc_usable_size() is a GNU extension in GNU libc; hence, use it every time GNU libc is used, rather than only on Linux.
| * Fix `JS_HasException()` when `null` is thrown (#313)Kasper Isager Dalsgarð2024-08-091-5/+5
| | | | | | | | Use `JS_UNINITIALIZED` instead of `JS_NULL` when no exception is pending, so `null` can be thrown and distinguished from no exception pending.
| * Fix GC leak in `js_proxy_get()` (#302)Dmitry Volyntsev2024-08-091-1/+3
| | | | | | | | Fixes #277
| * fromjs: re-design APIbptato2024-08-0914-609/+707
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a breaking change. * fromJS now returns `Opt[void]' (effectively a `bool'), and only sets the result if the conversion was successful. An unsuccessful conversion may leave the result in an unspecified state. This makes fromJS much lighter, both in terms of generated code as well as unnecessary overhead introduced by copying. It's also not much less ergonomic than the previous signature, since the ? syntax still works. * Improved JS_UNDEFINED/global object handling: instead of special- casing the global object, we special-case the `this' value conversion so that it fixes up `undefined' automatically. * fromJS on JSDict now throws on missing properties. Default values can be set through the new .jsdefault pragma.