new release

This commit is contained in:
Fabrice Bellard 2025-04-26 12:30:26 +02:00
parent 1b13fa6450
commit 19abf1888d
7 changed files with 84 additions and 23 deletions

View File

@ -1,9 +1,17 @@
2025-04-26:
- removed the bignum extensions and qjscalc
- new BigInt implementation optimized for small numbers
- added WeakRef, FinalizationRegistry and symbols as weakrefs
- added builtin float64 printing and parsing functions for more correctness
- faster repeated string concatenation
- qjs: promise unhandled rejections are fatal errors by default
- added column number in debug information
- removed the "use strip" extension
- qjs: added -s and --strip-source options
- qjsc: added -s and --keep-source options
- added JS_GetAnyOpaque()
- added more callbacks for exotic objects in JSClassExoticMethods
- misc bug fixes
2024-01-13:

View File

@ -423,10 +423,13 @@ build_doc: $(DOCS)
clean_doc:
rm -f $(DOCS)
doc/%.pdf: doc/%.texi
doc/version.texi: VERSION
@echo "@set VERSION `cat $<`" > $@
doc/%.pdf: doc/%.texi doc/version.texi
texi2pdf --clean -o $@ -q $<
doc/%.html.pre: doc/%.texi
doc/%.html.pre: doc/%.texi doc/version.texi
makeinfo --html --no-headers --no-split --number-sections -o $@ $<
doc/%.html: doc/%.html.pre

8
TODO
View File

@ -37,16 +37,16 @@ REPL:
- close all predefined methods in repl.js and jscalc.js
Optimization ideas:
- 64-bit atoms in 64-bit mode ?
- use 64 bit JSValue in 64 bit mode
- use JSValue as atoms and use a specific constant pool in functions to
reference atoms from the bytecode
- reuse stack slots for disjoint scopes, if strip
- add heuristic to avoid some cycles in closures
- small String (0-2 charcodes) with immediate storage
- small String (1 codepoint) with immediate storage
- perform static string concatenation at compile time
- optimize string concatenation with ropes or miniropes?
- add implicit numeric strings for Uint32 numbers?
- optimize `s += a + b`, `s += a.b` and similar simple expressions
- ensure string canonical representation and optimise comparisons and hashes?
- remove JSObject.first_weak_ref, use bit+context based hashed array for weak references
- property access optimization on the global object, functions,
prototypes and special non extensible objects.
- create object literals with the correct length by backpatching length argument

View File

@ -1 +1 @@
2024-02-14
2025-04-26

View File

@ -5,11 +5,14 @@
@headings double
@end iftex
@include version.texi
@titlepage
@afourpaper
@sp 7
@center @titlefont{QuickJS Javascript Engine}
@sp 3
@center Version: @value{VERSION}
@end titlepage
@setfilename spec.info
@ -19,10 +22,10 @@
@chapter Introduction
QuickJS is a small and embeddable Javascript engine. It supports most of the
ES2023 specification
@footnote{@url{https://tc39.es/ecma262/2023 }}
including modules, asynchronous generators, proxies and BigInt.
QuickJS (version @value{VERSION}) is a small and embeddable Javascript
engine. It supports most of the ES2023 specification
@footnote{@url{https://tc39.es/ecma262/2023 }} including modules,
asynchronous generators, proxies and BigInt.
@section Main Features

21
readme-cosmo.txt Normal file
View File

@ -0,0 +1,21 @@
The executables included in this archive run on Linux, Mac, Windows,
FreeBSD, OpenBSD and NetBSD for both the ARM64 and x86_64
architectures.
Platform Notes:
- if you get errors on Linux, you should disable the binfmt_misc
module which automatically invokes wine with Windows executable:
sudo sh -c 'echo -1 > /proc/sys/fs/binfmt_misc/cli' # remove Ubuntu's MZ interpreter
sudo sh -c 'echo -1 > /proc/sys/fs/binfmt_misc/status' # remove ALL binfmt_misc entries
- Under Windows, you can rename the executables with a .exe extension.
- Use the --assimilate option to build a platform specific binary for
better startup time:
./qjs --assimilate
- See https://github.com/jart/cosmopolitan for more information about
platform specific issues.

View File

@ -8,12 +8,12 @@ version=`cat VERSION`
if [ "$1" = "-h" ] ; then
echo "release.sh [release_list]"
echo ""
echo "release_list: extras binary win_binary quickjs"
echo "release_list: extras binary win_binary cosmo_binary quickjs"
exit 1
fi
release_list="extras binary win_binary quickjs"
release_list="extras binary win_binary cosmo_binary quickjs"
if [ "$1" != "" ] ; then
release_list="$1"
@ -53,7 +53,10 @@ outdir="/tmp/${d}"
rm -rf $outdir
mkdir -p $outdir
make CONFIG_WIN32=y qjs.exe
make clean
make CONFIG_WIN32=y clean
make CONFIG_WIN32=y CONFIG_LTO=y qjs.exe
cp qjs.exe $outdir
${cross_prefix}strip $outdir/qjs.exe
cp $dlldir/libwinpthread-1.dll $outdir
@ -75,7 +78,7 @@ mkdir -p $outdir
make clean
make CONFIG_WIN32=y clean
make CONFIG_WIN32=y CONFIG_M32=y qjs.exe
make CONFIG_WIN32=y CONFIG_M32=y CONFIG_LTO=y qjs.exe
cp qjs.exe $outdir
${cross_prefix}strip $outdir/qjs.exe
cp $dlldir/libwinpthread-1.dll $outdir
@ -91,9 +94,8 @@ if echo $release_list | grep -w -q binary ; then
make clean
make CONFIG_WIN32=y clean
make -j4 qjs run-test262
make -j4 CONFIG_M32=y qjs32 run-test262-32
strip qjs run-test262 qjs32 run-test262-32
make -j4 CONFIG_LTO=y qjs run-test262
strip qjs run-test262
d="quickjs-linux-x86_64-${version}"
outdir="/tmp/${d}"
@ -105,14 +107,39 @@ cp qjs run-test262 $outdir
( cd /tmp/$d && rm -f ../${d}.zip && zip -r ../${d}.zip . )
make clean
make -j4 CONFIG_LTO=y CONFIG_M32=y qjs run-test262
strip qjs run-test262
d="quickjs-linux-i686-${version}"
outdir="/tmp/${d}"
rm -rf $outdir
mkdir -p $outdir
cp qjs32 $outdir/qjs
cp run-test262-32 $outdir/run-test262
cp qjs run-test262 $outdir
( cd /tmp/$d && rm -f ../${d}.zip && zip -r ../${d}.zip . )
fi
#################################################"
# Cosmopolitan binary release
if echo $release_list | grep -w -q cosmo_binary ; then
export PATH=$PATH:$HOME/cosmocc/bin
d="quickjs-cosmo-${version}"
outdir="/tmp/${d}"
rm -rf $outdir
mkdir -p $outdir
make clean
make CONFIG_COSMO=y -j4 qjs run-test262
cp qjs run-test262 $outdir
cp readme-cosmo.txt $outdir/readme.txt
( cd /tmp/$d && rm -f ../${d}.zip && zip -r ../${d}.zip . )
@ -133,13 +160,13 @@ mkdir -p $outdir $outdir/doc $outdir/tests $outdir/examples
cp Makefile VERSION TODO Changelog readme.txt LICENSE \
release.sh unicode_download.sh \
qjs.c qjsc.c qjscalc.js repl.js \
qjs.c qjsc.c repl.js \
quickjs.c quickjs.h quickjs-atom.h \
quickjs-libc.c quickjs-libc.h quickjs-opcode.h \
cutils.c cutils.h list.h \
libregexp.c libregexp.h libregexp-opcode.h \
libunicode.c libunicode.h libunicode-table.h \
libbf.c libbf.h \
dtoa.c dtoa.h \
unicode_gen.c unicode_gen_def.h \
run-test262.c test262o.conf test262.conf \
test262o_errors.txt test262_errors.txt \
@ -150,7 +177,6 @@ cp tests/*.js tests/*.patch tests/bjson.c $outdir/tests
cp examples/*.js examples/*.c $outdir/examples
cp doc/quickjs.texi doc/quickjs.pdf doc/quickjs.html \
doc/jsbignum.texi doc/jsbignum.html doc/jsbignum.pdf \
$outdir/doc
( cd /tmp && tar Jcvf /tmp/${d}.tar.xz ${d} )