| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| | |
|
| |
| |
| |
| | |
Breaks compatibility with 1.6.14.
|
| | |
|
| |
| |
| |
| | |
Undocumented and fairly surprising behavior. Just do it manually.
|
| |
| |
| |
| | |
Untested and unused since forever.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Nim doesn't distinguish between function pointers and functions, but
C does.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
.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.
|
| | |
|
| |
| |
| |
| | |
these work better as seqs; I was just being lazy...
|
| |
| |
| |
| |
| | |
Includes a patch to adjust the JS_SetOpaque API to continue supporting
opaques on the global object.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
qjs-ng asserts on it
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
qjs-ng is more actively maintained than qjs, and has some very useful
features like column tracking.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
SetProperty has undesirable effects like calling GetOwnProperty.
Define it instead.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
malloc_usable_size() is a GNU extension in GNU libc; hence, use it
every time GNU libc is used, rather than only on Linux.
|
| |
| |
| |
| | |
Use `JS_UNINITIALIZED` instead of `JS_NULL` when no exception is pending, so `null` can be thrown and distinguished from no exception pending.
|
| |
| |
| |
| | |
Fixes #277
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|