quickjs/tests
Charlie Gordon 9e67b47c0d
Improve number to string conversions (#400)
integer conversions:
- improve `u32toa_radix` and `u64toa_radix`, add `i32toa_radix`
- use `i32toa_radix` for small ints in `js_number_toString`

floating point conversions (`js_dtoa`):
- complete rewrite with fewer calls to `snprintf`
- remove `JS_DTOA_FORMAT`, define 4 possible modes for `js_dtoa`
- remove the radix argument in `js_dtoa`
- merge `js_dtoa1` into `js_dtoa`
- add `js_dtoa_infinite` for non finite values
- simplify sign handling
- handle locale specific decimal point transparently

helper function `js_fcvt`:
- simplify `js_fcvt`, remove `js_fcvt1`, reduce overhead
- round up manually instead of using `fesetround(FE_UPWARD)`.

helper function `js_ecvt`:
- document `js_ecvt` and `js_ecvt1` behavior
- avoid redundant `js_ecvt1` calls in `js_ecvt`
- fixed buffer contents, no buffer copies
- simplify decimal point handling
- round up manually instead of using `fesetround(FE_UPWARD)`.

miscellaneous:
- remove `CONFIG_PRINTF_RNDN`. This fixes some of the conversion errors
  on Windows. Updated the tests accordingly
- this fixes a v8.sh bug on macOS: `0.5.toFixed(0)` used to produce `0` instead of `1`
- add regression tests, update test_conv unit tests
- add benchmarks for `toFixed`, `toPrecision` and `toExponential` number methods
- benchmarks show all conversions are now 40 to 45% faster (M2)
2024-05-26 08:06:36 +02:00
..
bjson.c Replace JSValueConst with JSValue (#195) 2023-12-10 15:15:42 +01:00
function_source.js Retain function source code in serialized bytecode (#218) 2023-12-16 01:01:26 +01:00
microbench.js Improve number to string conversions (#400) 2024-05-26 08:06:36 +02:00
test262.patch 2020-01-05 release 2020-09-06 18:53:08 +02:00
test_bigint.js Remove trailing whitespace (#46) 2023-11-12 10:01:40 +01:00
test_bjson.js Improve Date.parse (#289) 2024-03-10 10:34:26 +01:00
test_builtin.js Improve number to string conversions (#400) 2024-05-26 08:06:36 +02:00
test_closure.js Remove trailing whitespace (#46) 2023-11-12 10:01:40 +01:00
test_conv.c Improve number to string conversions (#400) 2024-05-26 08:06:36 +02:00
test_language.js Simplify number parsing (#386) 2024-05-26 00:17:04 +02:00
test_loop.js Remove trailing whitespace (#46) 2023-11-12 10:01:40 +01:00
test_queue_microtask.js Add queueMicrotask 2023-11-21 23:43:17 +01:00
test_std.js Implement setInterval() (#338) 2024-03-30 09:36:38 +01:00
test_worker.js Refactor build system to use CMake only 2023-11-17 13:10:18 +01:00
test_worker_module.js Remove trailing whitespace (#46) 2023-11-12 10:01:40 +01:00