QuickJS, the Next Generation: a mighty JavaScript engine
Find a file
Charlie Gordon 59462214cb Improve column number tracking
- simplify column number tracking using a pointer to the beginning of line
  instead of `eol` + `mark`.
- add `js_parse_error_pos` to report syntax errors with exact source position
  for token parsing errors. This makes the syntax error reports much more precise.
  eg: exact position of UTF-8 encoding error, invalid escape sequence, etc.
- add `JSSourcePos` type to use single opaque object for token source position
- add `emit_pos` to set the precise source position in code generation
- change `emit_op` to no longer emit source positions from `s->last_line_num` and `s->last_col_num`.
- remove `last_line_num` and `last_col_num` `JSParserState` members
- runtime errors on calls report the column number of calling function or method name.
- runtime errors on `new` expressions report the column number of the `neẁ` keyword.
- do not show source position in backtrace if debug information is missing
- fix spurious parsing bugs when `js_parse_skip_parens_token` could not reparse
  the current token because of stack overflow detection.
- `js_parse_save_pos` now saves the current token and `js_parse_seek_back` always
  restores the token, hence never fails, while `js_parse_seek_token` reparses the
  saved token. This is needed to handle the weird semantics of `"\1"; "use strict";`
- simplify html comment detection
- update **tests/test_builtin,js** with more informative messages
- improve `assert()` and **tests/test_language.js** tests
- update **v8.txt** for updated column numbers in remaining errors
2024-05-27 11:15:52 +02:00
.github/workflows Make sure repos are updated before installing valgrind in CI 2024-04-23 19:54:12 +02:00
doc Handle serialization endianness transparently (#152) 2023-11-28 22:49:01 +01:00
examples Replace JSValueConst with JSValue (#195) 2023-12-10 15:15:42 +01:00
gen Improve column number tracking 2024-05-27 11:15:52 +02:00
test262@c1281dba45 Enable test262 on CI (#11) 2023-11-04 10:27:57 +01:00
tests Improve column number tracking 2024-05-27 11:15:52 +02:00
.gitignore Add support for compiling with Microsoft Visual Studio C++ (MSVC) (#246) 2024-01-16 12:42:05 +01:00
.gitmodules Enable test262 on CI (#11) 2023-11-04 10:27:57 +01:00
CMakeLists.txt Fixed CMakeLists.txt for Emscripten builds (#403) 2024-05-14 08:44:46 +02:00
cutils.c Simpler utf8_decode (#414) 2024-05-27 08:15:52 +02:00
cutils.h Simpler utf8_decode (#414) 2024-05-27 08:15:52 +02:00
dirent_compat.h Add support for building with ClangCL on Windows 2023-11-30 01:23:09 +01:00
getopt_compat.h Add support for building with ClangCL on Windows 2023-11-30 01:23:09 +01:00
libbf.c Fix UB in bf_set_ui() 2023-12-02 16:05:10 +01:00
libbf.h Fix building with tcc (#170) 2023-12-03 13:36:51 +01:00
libregexp-opcode.h Optimize RegExp ASCII literal matching (#94) 2023-11-19 17:26:45 +01:00
libregexp.c Simpler utf8_decode (#414) 2024-05-27 08:15:52 +02:00
libregexp.h Implement RegExp 'v' flag, part 1 (#229) 2023-12-21 19:37:31 +01:00
libunicode-table.h Drop CONFIG_ALL_UNICODE and enable it by default 2023-11-20 10:52:04 +01:00
libunicode.c Add NetBSD support (#177) 2023-12-07 15:48:31 +01:00
libunicode.h Drop CONFIG_ALL_UNICODE and enable it by default 2023-11-20 10:52:04 +01:00
LICENSE Update LICENSE 2023-12-06 00:00:15 +01:00
list.h Add container_of macro 2023-12-23 00:11:41 +01:00
Makefile Add utility functions for string to integer conversions (#366) 2024-04-19 11:35:44 +02:00
qjs.c Accept "kmg" suffixes for memory limits 2024-05-06 11:22:16 +02:00
qjsc.c Add strip option in qjsc to reduce object size (#388) 2024-04-19 08:41:12 +02:00
quickjs-atom.h Add cross-platform Atomics support 2024-04-02 21:50:42 +02:00
quickjs-c-atomics.h Enable support for GCC compler v < 4.9 2023-11-29 09:22:27 +01:00
quickjs-libc.c Simpler utf8_decode (#414) 2024-05-27 08:15:52 +02:00
quickjs-libc.h Replace JSValueConst with JSValue (#195) 2023-12-10 15:15:42 +01:00
quickjs-opcode.h Don't serialize IC opcodes (#334) 2024-03-27 12:07:11 +01:00
quickjs.c Improve column number tracking 2024-05-27 11:15:52 +02:00
quickjs.h Add JS_ThrowPlainError 2024-05-27 10:11:49 +02:00
README.md Update README, add fork information 2024-03-12 20:00:41 +01:00
repl.js Add util.inspect emulation in REPL (#387) 2024-04-21 08:46:17 +02:00
run-test262.c Improve parsing error messages (#405) 2024-05-14 20:36:10 +02:00
test262-fast.conf Add faster test262 test target (#362) 2024-04-09 10:36:49 +02:00
test262.conf Add cross-platform Atomics support 2024-04-02 21:50:42 +02:00
test262_errors.txt Fix evaluation order of computed properties 2024-01-16 12:43:35 +01:00
unicode_download.sh updated to Unicode 14.0.0 2022-03-06 19:00:24 +01:00
unicode_gen.c Fix typo in #undef (#222) 2023-12-16 15:11:28 +01:00
unicode_gen_def.h Update to Unicode 15.0.0 (#89) 2023-11-18 22:29:53 +01:00
v8-tweak.js Improve string parsing and JSON parsing (#316) 2024-03-22 11:19:36 +01:00
v8.js Accept "kmg" suffixes for memory limits 2024-05-06 11:22:16 +02:00
v8.sh Fix more v8 errors (#336) 2024-03-30 13:11:37 +01:00
v8.txt Improve column number tracking 2024-05-27 11:15:52 +02:00

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.