Commit Graph

36 Commits

Author SHA1 Message Date
Richard Davison
d9c699f528
fix class method with name get (#258)
Co-authored-by: Richard Davison <ridaviso@amazon.com>
2024-05-05 18:46:30 +02:00
Charlie Gordon
6a89d7c270
Add CI targets, fix test_std.js (#247)
This switches the exec test to `SIGTERM` rather than `SIGQUIT` since the
latter didn’t seem to work in QEMU, and the distinction doesn’t really
matter for this test.

This also makes the `isatty()` check smarter by checking whether `STDIN`
is, in fact, a terminal.

Added qemu-alpine targets i386, arm32v6, arm32v7, arm64v8, s390x

Co-authored-by: Felipe Gasper <felipe@felipegasper.com>
2024-03-03 21:57:38 +01:00
Ben Noordhuis
e17cb9fc7a Add github CI tests
- disable `isatty()` test in `test_os()`
- add `.github/workflows/ci.yml` with 8 targets
2024-03-03 14:14:23 +01:00
Charlie Gordon
3dd93eb4e4
fix microbench when microbench.txt is missing (#246) 2024-03-03 03:38:49 +01:00
Charlie Gordon
35b7b3c379 Improve Date.parse
- accept many more alternative date/time formats
- add test cases in tests/test_builtin.js
- match month and timezone names case insensitively
- accept AM and PM markers
- recognize US timezone names
- skip parenthesized stuff
- fix almost all v8 test cases
2024-03-03 02:59:08 +01:00
Charlie Gordon
8180d3dd87 Improve microbench.js
- ensure handler behavior does not depend on n argument
- load and save reference file in node.js
- add -s filename option to name the output reference file
- add targets in Makefile for tests and bencharks using node.js
- fix incorrect timings when not using high resolution timer
- use performance timer in node.js
- output performance factor instead of percentage
- use smaller threshold by default
- add benchmarks for:
    date_parse(), prop_update(), prop_clone(), array_slice()
    global_func_call(),
2024-02-26 00:14:31 +01:00
Charlie Gordon
78db49cf95 Improve Date.parse
- rewrite Date.parse() with separate parsers
- return `NaN` for out of bounds field values as specified
- accept up to 9 decimals for millisecond fraction but truncate at 3
- accept many more alternative date/time formats
- add test cases in tests/test_builtin.js
2024-02-25 23:47:26 +01:00
Charlie Gordon
27928ce491 Fix Map hash bug
- `map_hash_key` must generate the same key for JS_INT and JS_FLOAT64
   with the same value
- add test cases in tests/test_builtin.js
2024-02-22 19:31:57 +01:00
Charlie Gordon
b70e764427 Rewrite set_date_fields to match the ECMA specification
- use `double` arithmetic where necessary to match the spec
- use `volatile` to ensure correct order of evaluation
  and prevent FMA code generation
- reject some border cases.
- avoid undefined behavior in `double` -> `int64_t` conversions
- improved tests/test_builtin.js `assert` function to compare
  values more reliably.
- added some tests in `test_date()`
- disable some of these tests on win32 and cygwin targets
2024-02-21 21:22:10 +01:00
Charlie Gordon
74bdb4967c Improve tests
- split test_bigfloat.js from test_bignum.js
- make test_date() compatible with node
- document Date constructor string argument format:
  should add test cases for invalid strings
- test_argument_scope(): only test this syntax error in strict mode:
  `var f = function(a = eval("var arguments")) {};`
2024-02-17 21:54:19 +01:00
Charlie Gordon
85fb2caeae Fix UB signed integer overflow in js_math_imul
- Use uint32_t arithmetics and Standard conformant conversion to
  avoid UB in js_math_imul.
- add builtin tests
- use specific object directories for SAN targets
2024-02-17 21:15:29 +01:00
Charlie Gordon
8e21b96738 pass node-js command line arguments to microbench 2024-02-15 09:59:50 +01:00
Ben Noordhuis
626e0d4e60 Unbroke tests/test_test_bjson.js 2024-02-11 18:38:47 +01:00
Ben Noordhuis
2e1013429a Add more tests
- add regexp tests in tests/microbench.js
- add bjson_test_regexp in tests/test_test_bjson.js
2024-02-11 16:20:39 +01:00
Charlie Gordon
c9e6c56c70 Improve microbench
- remove import statements (invoke with qjs --std)
- fix compatibility issues with node
- add more loop styles
- add more string concatenation tests
- use === and !=== where appropriate
- fix sort timing log
- add `-r ref_file` command line option to specify reference file
- add .gitignore file with target file patterns
2024-02-11 12:11:53 +01:00
Charlie Gordon
37bd4ae62d Strip trailing spaces 2024-02-10 16:19:17 +01:00
Fabrice Bellard
cd666a851f simplified and fixed arrow function parsing (github issue #226) 2024-01-27 13:12:54 +01:00
Fabrice Bellard
10fc744ae4 regexp: fixed the zero advance logic in quantifiers (github issue #158) 2024-01-10 14:36:19 +01:00
Fabrice Bellard
f25e5d4094 optional chaining fixes (github issue #103) 2024-01-09 19:15:40 +01:00
Fabrice Bellard
aac24640b1 fix worker termination in example (github issue #98) 2024-01-08 18:41:03 +01:00
Fabrice Bellard
c06c399f4f fixed next token parsing after a function definition (github issue #77) 2024-01-08 18:40:35 +01:00
Fabrice Bellard
5935a26eae fixed class name init in static initializers 2024-01-08 18:39:58 +01:00
Fabrice Bellard
df3781d082 make for in faster and spec compliant (github issue #137) 2024-01-06 14:43:29 +01:00
Fabrice Bellard
2ee6be705f added os.now() 2023-12-27 19:09:29 +01:00
Fabrice Bellard
2785ede778 fixed JS module autodetection with shebang (github issue #91) 2023-12-27 18:19:46 +01:00
Fabrice Bellard
7414e5f67f fixed the garbage collection of async functions with closures (github issue #156) 2023-12-27 17:21:46 +01:00
Fabrice Bellard
a96f440746 fixed js_strtod with large integers (github issue #206) 2023-12-22 11:02:39 +01:00
Fabrice Bellard
4bb8c35da7 fixed 'return' handling with 'yield' in 'for of' or with finally blocks (gihub ticket #166) 2023-12-13 19:02:47 +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