QuickJS, the Next Generation: a mighty JavaScript engine
9e67b47c0d
integer conversions: - improve `u32toa_radix` and `u64toa_radix`, add `i32toa_radix` - use `i32toa_radix` for small ints in `js_number_toString` floating point conversions (`js_dtoa`): - complete rewrite with fewer calls to `snprintf` - remove `JS_DTOA_FORMAT`, define 4 possible modes for `js_dtoa` - remove the radix argument in `js_dtoa` - merge `js_dtoa1` into `js_dtoa` - add `js_dtoa_infinite` for non finite values - simplify sign handling - handle locale specific decimal point transparently helper function `js_fcvt`: - simplify `js_fcvt`, remove `js_fcvt1`, reduce overhead - round up manually instead of using `fesetround(FE_UPWARD)`. helper function `js_ecvt`: - document `js_ecvt` and `js_ecvt1` behavior - avoid redundant `js_ecvt1` calls in `js_ecvt` - fixed buffer contents, no buffer copies - simplify decimal point handling - round up manually instead of using `fesetround(FE_UPWARD)`. miscellaneous: - remove `CONFIG_PRINTF_RNDN`. This fixes some of the conversion errors on Windows. Updated the tests accordingly - this fixes a v8.sh bug on macOS: `0.5.toFixed(0)` used to produce `0` instead of `1` - add regression tests, update test_conv unit tests - add benchmarks for `toFixed`, `toPrecision` and `toExponential` number methods - benchmarks show all conversions are now 40 to 45% faster (M2) |
||
---|---|---|
.github/workflows | ||
doc | ||
examples | ||
gen | ||
test262@c1281dba45 | ||
tests | ||
.gitignore | ||
.gitmodules | ||
CMakeLists.txt | ||
cutils.c | ||
cutils.h | ||
dirent_compat.h | ||
getopt_compat.h | ||
libbf.c | ||
libbf.h | ||
libregexp-opcode.h | ||
libregexp.c | ||
libregexp.h | ||
libunicode-table.h | ||
libunicode.c | ||
libunicode.h | ||
LICENSE | ||
list.h | ||
Makefile | ||
qjs.c | ||
qjsc.c | ||
quickjs-atom.h | ||
quickjs-c-atomics.h | ||
quickjs-libc.c | ||
quickjs-libc.h | ||
quickjs-opcode.h | ||
quickjs.c | ||
quickjs.h | ||
README.md | ||
repl.js | ||
run-test262.c | ||
test262-fast.conf | ||
test262.conf | ||
test262_errors.txt | ||
unicode_download.sh | ||
unicode_gen.c | ||
unicode_gen_def.h | ||
v8-tweak.js | ||
v8.js | ||
v8.sh | ||
v8.txt |
⚡️ QuickJS - A mighty JavaScript engine
Friendly QuickJS fork focused on reigniting the project.
Overview
In October 2023 @bnoordhuis and @saghul decided to fork the QuickJS project with the aim of reigniting it. They reached out to the original authors (@bellard and @chqrlie) about their intentions.
As of December 2023 the initial goal was somewhat accomplished. @bellard resumed working on the project and both parties have been pulling patches from each other since.
As of early 2024 both projects agree the proper path forward involves merging both projects and combining the efforts. While that may take a while, since both projects diverged in certain areas, there is willingness to go in this direction from both sides.