| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Some JS modules use this to check if they are running in a browser.
|
|
|
|
|
|
| |
* separate params with ; (semicolon) instead of , (colon)
* reduce screaming snake case use
* wrap long lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's a bad idea for several reasons:
* it's inefficient; must allocate an environment for a closure in Nim,
even though we already have one in JS
* writing macros for automatically creating functions with variadic
arguments is suprisingly difficult (see the entire `js/javascript'
module)
* it never really worked properly, because we never freed the associated
function pointer.
We hardly used it anyway, so the easiest fix is to get rid of it
completely.
|
| |
|
|
|
|
|
|
|
|
| |
This way they are no longer compatible, but we no longer need them to
be compatible anyway.
(This also forces us to throw out the old serialize module, and use
packet writers everywhere.)
|
| |
|
|
|
|
| |
instead of trying to evaluate exceptions...
|
|
|
|
|
|
|
| |
I've gotten tired of not being able to search for forward slashes.
Now it works like in vim, and you can also set default ignore case in
the config.
|
|
|
|
| |
See https://forum.nim-lang.org/t/10807
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* static function names can now be defined using the syntax
`Class:functionName' (or just use `Class' to take the default name
* fix URL.canParse with 1 argument only
* do not store JSFuncGenerator for constructors; just put the function
node in BoundFunctions
|
|
|
|
|
| |
* turn JSFuncGenerator into a ref object (it's faster this way)
* remove strformat dependency
|
| |
|
| |
|
| |
|
|
|
|
| |
much better
|
|
|
|
| |
(still no module support in buffer...)
|
|
|
|
|
|
| |
cint was incorrect :/
Makes me wonder if maybe we should just use futhark after all...
|
|
|
|
| |
Turns out desc can in fact be nil.
|
|
|
|
|
| |
Instead, make finalizers optionally pass their runtime for resource
deallocation.
|
|
|
|
| |
now I know how to :P
|
|
|
|
| |
just use an UncheckedArray in the binding
|
| |
|
|
|
|
|
|
|
| |
* 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)
|
| |
|
| |
|
|
|
|
| |
Special case the global object, check for inheritance, etc.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
still non-functional
|
|
|
|
|
|
|
| |
If a fallback argument has been specified, treat undefined as if no
argument had been given.
This removes the need for the ?? 1 checks in the config.
|
|
|
|
|
|
|
|
| |
* Fix an issue with Collection cache invalidation (we must invalidate
collections of the parent node on insertion, so that it triggers
a refresh).
* Remove circular reference of document.document, now we use a function
instead.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* ips -> io/
* loader related stuff -> loader/
* tempfile -> extern/
* buffer, forkserver -> server/
* lineedit, window -> display/
* cell -> types/
* opt -> types/
|
|
|
|
|
|
|
| |
GC_unref may indirectly call nim_finalize_for_js, which could mess up
execution of checkDestroy.
I haven't encountered it in refc, but it's definitely present in orc.
|
|
|
|
|
| |
Conceptually, seqs are by-value. In practice I they are by-ref,
but let's not depend on this.
|
|
|
|
|
|
|
| |
Mostly a proof of concept. Just bubble it unconditionally for now
and never prevent default.
Also, fix fromJSFunction by Dup'ing its closure JSValue.
|
|
|
|
|
|
| |
* fromJSFunction: dup the value, so that it cannot go out of context.
* setOpaque no longer calls GC_ref, so no need for it to be generic
instead of just taking a pointer.
|
| |
|
| |
|
| |
|
|
|
|
| |
mostly for symmetry with real objects
|
|
|
|
|
|
|
|
|
| |
jssetprop just adds the set_property exotic function.
ActionMap is now editable from JS; the setter is implemented in the
same way as bindPagerKey/bindLineKey. (In fact, now those two just
call the setter.) But this is still rather inefficient and subject
to change.
|
| |
|
|
|
|
|
|
|
| |
Split out parts of the JS module, because it was starting to confuse
the compiler a little.
(Peakmem is back at 750M. Interesting.)
|
|
|
|
|
|
|
| |
Also, make ActionMap use getters/hasprop instead of a table copy.
peakmem remains up +200M at 950M after commit
9991bd3393483158ab0d1b9d995f695dee3c65dc. :(
|
|
|
|
|
|
|
|
| |
This makes not creating separate reference types for SameObject
attributes possible.
Also add a fromJS2 "hook" to allow defining fromJS behavior in modules
other than javascript.
|