Saúl Ibarra Corretgé
e5812862f9
Fix 'return' handling with 'yield' in 'for of' or with finally blocks
...
Ref: 4bb8c35da7
2023-12-14 11:49:14 +01:00
Ben Noordhuis
bace4f635e
Record source column positions ( #193 )
...
And:
- display them in stack traces
- expose them as Function.prototype.columnNumber
OP_line_num is renamed to OP_source_loc and the pc2line data structure
is extended with the column number in zigzag encoding.
The bytecode version number BC_VERSION is incremented because pc2line
data is read and written by JS_ReadObject() and JS_WriteObject() when
it is present.
Fixes: https://github.com/quickjs-ng/quickjs/issues/149
2023-12-11 22:36:13 +01:00
Ben Noordhuis
40771c9103
Disable flaky test on Cygwin ( #202 )
...
Unclear why sending a SIGQUIT signal sometimes works and sometimes
doesn't but it's probably some kind of race condition in Cygwin's
emulation layer.
Fixes: https://github.com/quickjs-ng/quickjs/issues/184
2023-12-11 22:02:32 +01:00
Ben Noordhuis
f7f1906989
Switch to SIGTERM in child process test ( #203 )
...
The hope is that switching from SIGQUIT to SIGTERM will resolve the
test's flakiness on Cygwin.
Refs: https://github.com/quickjs-ng/quickjs/issues/184
2023-12-11 09:21:19 +01:00
Ben Noordhuis
67d90092fe
Add regression test for previous commit
2023-12-10 21:03:48 +01:00
Ben Noordhuis
f1b7b6da71
Replace JSValueConst with JSValue ( #195 )
...
JSValueConst was only used for the now removed CONFIG_CHECK_JSVALUE
build mode. It is kept around as an alias for JSValue in quickjs.h to
avoid breaking everyone's source builds but remove it everywhere else.
2023-12-10 15:15:42 +01:00
Felipe Gasper
56738d8b4b
Add Cygwin compatibility
2023-12-03 18:15:07 +01:00
Nick Vatamaniuc
6b3bed1740
Fix stack overflow in CVE-2023-31922 ( #157 )
...
isArray and proxy isArray can call each other indefinitely in a mutually
recursive loop.
Add a stack overflow check in the js_proxy_isArray function before calling
`JS_isArray(ctx, s->target)`.
Original issue: https://github.com/bellard/quickjs/issues/178
CVE: https://nvd.nist.gov/vuln/detail/CVE-2023-31922
2023-12-01 16:31:36 +01:00
Saúl Ibarra Corretgé
bfd8c381cb
Add support for building with ClangCL on Windows
...
Since ClangCL is compatible with MSVC this should get us almost there.
Ref: https://clang.llvm.org/docs/MSVCCompatibility.html
2023-11-30 01:23:09 +01:00
Ben Noordhuis
b6b70e471c
Add os.cputime() ( #159 )
...
And use it in microbench to get slightly more accurate results.
2023-11-30 00:05:48 +01:00
Ben Noordhuis
5c3077e091
Implement RegExp serialization ( #153 )
...
JS_WriteObject() and JS_ReadObject() now support RegExp objects.
2023-11-29 08:50:53 +01:00
Ben Noordhuis
8df335a7b9
Expose class name to static initializers ( #139 )
...
Fixes: https://github.com/quickjs-ng/quickjs/issues/138
2023-11-26 01:09:18 +01:00
Saúl Ibarra Corretgé
8d496b3e3c
Add queueMicrotask
...
Ref: https://github.com/quickjs-ng/quickjs/issues/16
2023-11-21 23:43:17 +01:00
Ben Noordhuis
e2bc6441f8
Optimize RegExp ASCII literal matching ( #94 )
...
Add REOP_char8 that matches single bytes. Compresses bytecode for the
ASCII common case by 33% and reduces regexp_ascii benchmark running time
by 4%. The regexp_utf16 benchmark is unaffected.
2023-11-19 17:26:45 +01:00
Ben Noordhuis
e49da8e96f
Unbreak microbench, add os.now() ( #93 )
...
The removal of the high-precision but non-standard clock source in
commit 5af98ca
broke microbench because Date.now() is not granular
enough for the benchmark runner to make forward progress.
This commit adds a new method to the os module that returns time
with microsecond precision.
2023-11-19 17:26:25 +01:00
Ben Noordhuis
5af98ca858
Remove non-standard Date.__date_clock method ( #88 )
2023-11-18 19:15:05 +01:00
Saúl Ibarra Corretgé
54a4f2907e
Refactor build system to use CMake only
2023-11-17 13:10:18 +01:00
Ben Noordhuis
d2e632e77a
Allow symbols as WeakMap and WeakSet keys ( #58 )
2023-11-16 09:07:59 +01:00
Ben Noordhuis
162a8b7409
Remove trailing whitespace ( #46 )
...
Not purely cosmetic because it breaks navigation with { and } in the
One True Editor.
2023-11-12 10:01:40 +01:00
Ben Noordhuis
7b64da2325
Improve BigInt hashing ( #38 )
...
Fixes: https://github.com/quickjs-ng/quickjs/issues/35
2023-11-10 21:01:09 +01:00
Ben Noordhuis
8d62210e7d
Remove non-standard BigInt methods ( #37 )
...
Fixes: https://github.com/quickjs-ng/quickjs/issues/20
2023-11-10 20:10:52 +01:00
Ben Noordhuis
38f88c0898
Remove CONFIG_BIGNUM, always enable BigInt ( #34 )
...
Fixes: https://github.com/quickjs-ng/quickjs/issues/17
2023-11-10 16:09:54 +01:00
Ben Noordhuis
ae17b8522d
Remove operator overloading ( #32 )
...
Part of https://github.com/quickjs-ng/quickjs/issues/17
2023-11-10 10:23:40 +01:00
Ben Noordhuis
e449cb08ef
Remove BigFloat ( #31 )
...
Part of https://github.com/quickjs-ng/quickjs/issues/17
2023-11-08 22:23:06 +01:00
Saúl Ibarra Corretgé
c1ed688610
Drop non-standard JSON extension
...
Ref: https://github.com/quickjs-ng/quickjs/issues/20
2023-11-08 22:14:25 +01:00
Ben Noordhuis
5d5b3cc21f
Remove BigDecimal ( #29 )
...
Part of https://github.com/quickjs-ng/quickjs/issues/17
2023-11-08 21:07:16 +01:00
Ben Noordhuis
0068db8a11
Avoid UB when checking if float fits in int32
2023-11-08 19:17:13 +01:00
Saúl Ibarra Corretgé
2f51cbc4e6
Add CI for MinGW on Windows
2023-11-08 11:12:54 +01:00
Saúl Ibarra Corretgé
1fb9a5010f
Drop support for "use math"
...
Ref: https://github.com/quickjs-ng/quickjs/issues/20
2023-11-06 23:07:31 +01:00
Ben Noordhuis
d6fbd6b744
Fix UB signed integer overflow
2023-11-01 09:31:30 +01:00
Ben Noordhuis
2f7fd38f68
ci: add linux build+test workflow ( #2 )
2023-10-31 18:01:52 +01:00
bellard
b5e62895c6
2021-03-27 release
2021-03-27 11:17:31 +01:00
bellard
b1f67dfc1a
2020-11-08 release
2020-11-08 14:30:56 +01:00
bellard
7c312df422
2020-09-06 release
2020-09-06 19:10:15 +02:00
bellard
8900766099
2020-07-05 release
2020-09-06 19:07:30 +02:00
bellard
1722758717
2020-04-12 release
2020-09-06 19:04:20 +02:00
bellard
383e2b06c8
2020-03-16 release
2020-09-06 19:02:03 +02:00
bellard
0e8fffd4de
2020-01-19 release
2020-09-06 18:57:11 +02:00
bellard
91459fb672
2020-01-05 release
2020-09-06 18:53:08 +02:00