aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Add missing null checks for promise code.Dmitry Sviridkin6 days
|
* Fetch: QuickJS support.Zhidao HONG13 days
|
* Version bump.Dmitry Volyntsev13 days
|
* HTTP: fixed GCC 15 build with -Wunterminated-string-initialization.Dmitry Volyntsev2025-05-05
| | | | | | | ngx_http_js_module.c:936:22: error: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (16 chars into 15 available) [-Werror=unterminated-string-initialization] 936 | .value = "PeriodicSession", | ^~~~~~~~~~~~~~~~~
* Fixed GCC 15 build with -Wunterminated-string-initialization.Dmitry Volyntsev2025-05-01
| | | | | | | | | | In file included from src/njs_main.h:48, from src/njs_diyfp.c:12: src/njs_string.h: In function ‘njs_string_encode’: src/njs_string.h:229:36: error: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute ( 17 chars into 16 available) [-Werror=unterminated-string-initialization] 229 | static const u_char hex[16] = "0123456789ABCDEF";
* Fixed regexp undefined value of captured group.Vadim Zhestikov2025-04-30
| | | | Found by OSS-Fuzz.
* Using invalid UTF-8 string as atom number 0.Dmitry Volyntsev2025-04-30
| | | | This prevents a clash with possible valid UTF-8 strings.
* Fixed building with --debug=YES after b28e50b1.Dmitry Volyntsev2025-04-30
| | | | | | | | | | | In file included from src/njs_main.h:37, from src/njs_diyfp.c:12: src/njs_atom.h: In function ‘njs_atom_to_value’: src/njs_atom.h:54:31: error: invalid use of incomplete typedef ‘njs_flathsh_descr_t’ {aka ‘struct njs_flathsh_descr_s’} 54 | njs_assert(atom_id < h->elts_count); | ^~ src/njs_assert.h:14:15: note: in definition of macro ‘njs_assert’
* Introduced NJS_VMCODE_PROPERTY_ATOM_SET instruction.Dmitry Volyntsev2025-04-29
|
* Introduced NJS_VMCODE_PROPERTY_ATOM_GET instruction.Dmitry Volyntsev2025-04-29
|
* Refactored working with built-in strings, symbols and small integers.Vadim Zhestikov2025-04-29
| | | | | | | | | | | | | | | | - Implemented atom IDs for strings, symbols and small numbers, enabling equality checks via ID comparison - Optimized string operations for faster property lookups and comparisons - Removed short string inlining from njs_value_t structure Performance improvements (arewefastyet/benchmarks/v8-v7 benchmark): - Richards: +57% (631 → 989) - Crypto: +7% (1445 → 1551) - RayTrace: +37% (562 → 772) - NavierStokes: +20% (2062 → 2465) - Overall score: +29% (1014 → 1307) In collaboration with Dmitry Volyntsev.
* Replaced vm with mp in NJS_CHB_MP_INIT().Zhidao HONG2025-04-22
|
* Version bump.Dmitry Volyntsev2025-04-09
|
* QuickJS: fixed compatibility issues with QuickJS-NG 0.9.0.Dmitry Volyntsev2025-03-27
| | | | This fixes #872 on Github.
* QuickJS: added xml module.Dmitry Volyntsev2025-03-27
|
* QuickJS: fixed compatibility with recent change in upstream.Dmitry Volyntsev2025-03-25
| | | | JS_VALUE_GET_OBJ(v) was made hidden in 156d981.
* QuickJS: introduced qjs_promise_result().Dmitry Volyntsev2025-03-25
|
* QuickJS: using JS_AddIntrinsicBigInt() if detected.Vadim Zhestikov2025-03-19
|
* QuickJS: calling njs_chb_destroy() in qjs_string_create_chb() internally.hongzhidao2025-03-19
| | | | No functional changes.
* QuickJS: fixed njs_qjs_object_completions().hongzhidao2025-03-19
| | | | This commit also exposed qjs_free_prop_enum() as public.
* QuickJS: added error checks in modules initialization.Vadim Zhestikov2025-03-18
|
* QuickJS: crypto module.Vadim Zhestikov2025-03-18
|
* QuickJS: using helper to declare Symbol.toStringTag properties.Dmitry Volyntsev2025-02-25
|
* Fixed typo introduced in 75ca26f.Dmitry Volyntsev2025-02-24
|
* QuickJS: fixed non-NULL terminated strings formatting in exceptions.Dmitry Volyntsev2025-02-18
| | | | | | | | | When "%*s" is specified, the first integer is interpreted as width. Width specifies *minimum* number of characters to output. The next string is expected to be NULL-terminated. When "%.*s" is specified, the first integer is interpreted as precision. Precision specifies *maximum* number of characters to output.
* Add missed syntax error for await in template literal.Vadim Zhestikov2025-02-18
| | | | This fixes issues #836 on github.
* QuickJS: added querystring module.Dmitry Volyntsev2025-02-07
|
* QuickJS: added WebCrypto module.Dmitry Volyntsev2025-01-24
|
* QuickJS: added support for QuickJS-NG library.Dmitry Volyntsev2025-01-24
|
* QuickJS: reimplemented process.argv.Dmitry Volyntsev2025-01-24
| | | | | Without using JS_SetOpaque(), because in QuickJS-NG opaque pointer cannot be set for internal classes, including ordinary objects.
* Version bump.Dmitry Volyntsev2025-01-24
|
* QuickJS: fixed Buffer.concat() with a single argument.Dmitry Volyntsev2025-01-22
|
* QuickJS: added TextDecoder and TextEncoder.Dmitry Volyntsev2025-01-22
|
* QuickJS: accept ArrayBuffer as an arument for qjs_typed_array_data().Dmitry Volyntsev2025-01-22
|
* Version bump.Dmitry Volyntsev2025-01-06
|
* QuickJS: added fs module.Dmitry Volyntsev2024-12-18
|
* Allow to execute some code before cloning.Dmitry Volyntsev2024-11-22
|
* Fixed absolute scope in cloned VMs.Dmitry Volyntsev2024-11-22
|
* Throwing exception when prototype is not found.Dmitry Volyntsev2024-11-22
|
* Fixed resolving when Promise is inherited.Dmitry Volyntsev2024-11-08
| | | | | | | | | Previously, njs_promise_resolve() might return njs_object_t instead of njs_promise_t. Later an instance of njs_object_t was put into a NJS_PROMISE value. Whereas njs_promise_t is always expected to be inside of a NJS_PROMISE value. This closes #813 issue on Github.
* Fixed building by Clang.Dmitry Volyntsev2024-11-07
| | | | | | | | | | | | | src/qjs.c:347:19: error: variable 'signo' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] 347 | if (kill(pid, signo) < 0) { | ^~~~~ src/qjs.c:294:31: note: initialize the variable 'signo' to silence this warning 294 | int signo, pid; | ^ | = 0 1 error generated.
* Introduced process.kill() function.Stefan Sundin2024-11-06
|
* QuickJS: introduced process.kill().Dmitry Volyntsev2024-11-06
|
* QuickJS: reworked process object.Dmitry Volyntsev2024-11-06
|
* Version bump.Dmitry Volyntsev2024-10-22
|
* Improved error messages for module loading failures.Dmitry Volyntsev2024-10-21
| | | | | | | | | There are several reasons why a file cannot be opened. Without extra information, especially in containerized environments, these problems are difficult to debug. Adding errno status to the error output helps identify the root cause. Additionally, error messages are now aligned between njs and QuickJS.
* Implemented lazy stack symbolization.Dmitry Volyntsev2024-10-16
| | | | | | | | | | | | Previously, when an exception was thrown, the exception got 'stack' property attached which contained the backtrace information about where the exception happened. This could be a heavy operation and it was not always needed. To optimize it, the process is split into 2 phases. The first phase collects all the necessary info about the current stack. The second phase, where the stack symbolization happens, occurs only when this property is referenced.
* Fixed Buffer.prototype.indexOf() on 32bits platforms.Dmitry Volyntsev2024-10-10
|
* Fixed Buffer.prototype.indexOf() and friends.Dmitry Volyntsev2024-10-10
| | | | With empty buffers in both the self and search cases.
* Fixed Buffer.prototype.lastIndexOf() when `from` is provided.Dmitry Volyntsev2024-10-10
| | | | Previous incorrect fix was introduced in 5d15a8d6 (0.8.5).