summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2025-04-26 12:30:26 +0200
committerFabrice Bellard <fabrice@bellard.org>2025-04-26 12:30:26 +0200
commit19abf1888db5884a5758036ff6e7fa2b340acedc (patch)
tree3e1db1c74e1765a11ecf47705c9873e858608ef2
parent1b13fa6450ac040e4b171291280f87f169c1c6ad (diff)
downloadquickjs-19abf1888db5884a5758036ff6e7fa2b340acedc.tar.gz
quickjs-19abf1888db5884a5758036ff6e7fa2b340acedc.zip
new release
-rw-r--r--Changelog8
-rw-r--r--Makefile7
-rw-r--r--TODO8
-rw-r--r--VERSION2
-rw-r--r--doc/quickjs.texi11
-rw-r--r--readme-cosmo.txt21
-rwxr-xr-xrelease.sh50
7 files changed, 84 insertions, 23 deletions
diff --git a/Changelog b/Changelog
index 77805c0..7cc3399 100644
--- a/Changelog
+++ b/Changelog
@@ -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:
diff --git a/Makefile b/Makefile
index d9aaad1..3b1c745 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/TODO b/TODO
index 10c5228..6501fec 100644
--- a/TODO
+++ b/TODO
@@ -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
diff --git a/VERSION b/VERSION
index e32e065..c76e76d 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2024-02-14
+2025-04-26
diff --git a/doc/quickjs.texi b/doc/quickjs.texi
index f9ffab4..eef00b7 100644
--- a/doc/quickjs.texi
+++ b/doc/quickjs.texi
@@ -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
diff --git a/readme-cosmo.txt b/readme-cosmo.txt
new file mode 100644
index 0000000..fb524a2
--- /dev/null
+++ b/readme-cosmo.txt
@@ -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.
diff --git a/release.sh b/release.sh
index cc74ab2..f66e928 100755
--- a/release.sh
+++ b/release.sh
@@ -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} )