Commit graph

31 commits

Author SHA1 Message Date
Ben Noordhuis
36227a5310
Fix cyclic import/export segfault (#568)
Before this commit it segfaulted, now it throws a SyntaxError.
That's still not correct behavior but better than segfaulting.
To be continued.

Includes a small run-test262 fix to handle Windows line endings.

Refs: https://github.com/quickjs-ng/quickjs/issues/567
2024-10-16 10:13:38 +02:00
Ben Noordhuis
b9be6d4ff2 Run local tests with run-test262 2024-10-10 21:52:34 +02:00
Ben Noordhuis
79eee54b22 Remove obsolete run-test262 style option
We always run the test262 suite in new-style mode.
2024-10-10 21:52:34 +02:00
Ben Noordhuis
3c3c487e11 Build and run run-test262 on Windows
The ulterior motive here is not that I want to increase CI times
further but that I want to repurpose run-test262 for running our
own tests.
2024-10-10 21:52:34 +02:00
Ben Noordhuis
e1564526ea
Run test262 tests in parallel (#564)
This commit introduces a couple of changes in order to make run-test262
go brr and execute tests in parallel:

- Remove CONFIG_AGENT build option. The disabled version of the build
  was already broken and no one noticed, Remove the define altogether.

- Remove the -C switch. Hard to support in multi-threaded mode.
  I may bring it back some day because it _is_ useful.

- Remove the -r switch. Also hard to support and I never look at
  test262_report.txt anyway so on the chopping block it goes.

- Judicious use of thread-local storage so I don't have to thread
  through state everywhere and embiggen the diff even more.

This is what Real Programmers(TM) do: stay up coding way past midnight
just so the test suite finishes in one minute instead of four.

Fixes: https://github.com/quickjs-ng/quickjs/issues/547
2024-09-30 18:35:35 +02:00
Ben Noordhuis
6d63b36c0a
Fix printing of slow tests with -T in run-test262 (#563)
It's currently printing them whenever a test takes one millisecond or
longer to complete.

Introduced in commit 7db24cc0da from earlier today, mea culpa.
2024-09-28 22:26:18 +02:00
Ben Noordhuis
7db24cc0da
Add -vv verboser mode switch to run-test262 (#561)
Prints the test name and running time in milliseconds. Supersedes
`-T <ms>` because that switch prints the same info, only for slow
tests.
2024-09-28 14:37:16 +02:00
Ben Noordhuis
4d4dbcf37e
Add -C compact mode switch to run-test262 (#560)
Turns on the reporting mode that is the default on the CI.
2024-09-28 14:01:40 +02:00
Ben Noordhuis
4e52027fe7
Fix invalid free() in run-test262 (#487) 2024-08-23 17:53:02 +02:00
Andrew Johnson
e8ef9d6072 Avoid function name collisions 2024-06-27 22:54:40 +02:00
Tom Lienard
d3da56b630 Sync TLA implementation with upstream
Fixes: https://github.com/quickjs-ng/quickjs/issues/339
2024-06-07 15:46:44 +02:00
Charlie Gordon
5a7e578482
Improve parsing error messages (#405)
- output more informative error messages in `js_parse_expect`.

The previous code was bogus:
```
    return js_parse_error(s, "expecting '%c'", tok);
```
this was causing a bug on `eval("do;")` where `tok` is `TOK_WHILE` (-70, 0xBA)
creating an invalid UTF-8 encoding (lone trailing byte).
This would ultimately have caused a failure in `JS_ThrowError2` if `JS_NewString`
failed when converting the error message to a string if the conversion detected the invalid
UTF-8 encoding and throwed an error (it currently does not, but should).

- test for `JS_NewString` failure in `JS_ThrowError2`
- test for `JS_FreeCString` failure in run-test262.c
- add more test cases
2024-05-14 20:36:10 +02:00
Charlie Gordon
02c06d0036
fix memory leaks in run-test262 (#345) 2024-04-05 12:06:40 +02:00
Ben Noordhuis
64c9ac5392
Fix run-test262 dynamic import (#237)
Make basename imports resolve relative to the file under test.
2023-12-27 10:19:58 +01:00
Saúl Ibarra Corretgé
d1852b5ea2 Remove unnecessary casts
Follow-up to https://github.com/quickjs-ng/quickjs/pull/195
2023-12-20 09:02:28 +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
Ben Noordhuis
a5b9e54151
Re-enable stack depth checks under ASan (#161)
The default 256 kb stack is too small to run some of the test262 tests
when ASAN is enabled.

Double it to 512 kb and ensure threads created by quickjs have big
enough stacks.
2023-11-30 22:18:23 +01:00
Ben Noordhuis
0ecb2c86b5
Unbreak run-test262 (#151)
Commit 8be0358dd7 broke `run-test262 -c test262.conf -a`, the delayed
parsing of the config file overwrote the effect of the `-a` flag.
2023-11-28 22:42:22 +01:00
Ben Noordhuis
8be0358dd7
Ignore testdir config when -d or -f is passed (#145)
Otherwise it runs the whole test262 suite even though I just want to run
a select few.
2023-11-27 00:59:30 +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
Saúl Ibarra Corretgé
55e845c5dd Add JS_GetVersion 2023-11-10 16:48:49 +01:00
Saúl Ibarra Corretgé
e2ae8746ca
Drop support for "use strip"
Ref: https://github.com/quickjs-ng/quickjs/issues/20
2023-11-07 00:29:11 +01:00
Ben Noordhuis
a59faac8c4
Improve interactive output on GHA (#15)
Before this commit the output of the test262 step was only visible in
the web interface at the end of the test run. Now it prints a status
update every few seconds.
2023-11-05 13:48:44 +01:00
Ben Noordhuis
7be933ebca
Enable test262 on CI (#11)
Fixes: https://github.com/quickjs-ng/quickjs/issues/3
2023-11-04 10:27:57 +01:00
Saúl Ibarra Corretgé
a9ac7a07ff Add top-level await support
Original author: zamfofex <zamfofex@twdb.moe>
2023-11-01 22:42:59 +01:00
bellard
b5e62895c6 2021-03-27 release 2021-03-27 11:17:31 +01:00
bellard
7c312df422 2020-09-06 release 2020-09-06 19:10:15 +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
91459fb672 2020-01-05 release 2020-09-06 18:53:08 +02:00