QuickJS, the Next Generation: a mighty JavaScript engine
1baa6763f8
Ensure proper UTF-8 encoding (1 to 4 bytes). Handle invalid encodings (return 0xFFFD and consume a single byte) Individually encoded surrogate code points are accepted. - add `utf8_scan()` to analyze a byte array for UTF-8 contents detects invalid encoding, computes number of codepoints and content kind: plain ASCII, 8-bit, 16-bit or larger codepoints. - add `utf8_encode_len(c)` to compute the number of bytes to encode `c` - rename `unicode_to_utf8` as `utf8_encode` - rename `unicode_from_utf8` as `utf8_decode` - add `utf8_decode_buf8(dest, size, src, len)` to decode a UTF-8 encoded byte array known to contain only ASCII and 8-bit codepoints. - add `utf8_decode_buf16(dest, size, src, len)` to decode a UTF-8 encoded byte array into an array of 16-bit codepoints using UTF-16 surrogate pairs for non-BMP1 codepoints. - add `utf8_encode_buf8(dest, size, src, len)` to encode an array of 8-bit codepoints as a UTF-8 encoded null terminated string - add `utf16_encode_buf8(dest, size, src, len)` to decode an array of 16-bit codepoints (including surrogate pairs) as a UTF-8 encoded null terminated string - detect invalid UTF-8 encoding in RegExp parser - simplify `JS_AtomGetStrRT`, `JS_NewStringLen` using the above functions - simplify UTF-8 decoding and error testing |
||
---|---|---|
.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.