]> git.kaiwu.me - quickjs.git/commitdiff
new release
authorFabrice Bellard <fabrice@bellard.org>
Sat, 26 Apr 2025 10:30:26 +0000 (12:30 +0200)
committerFabrice Bellard <fabrice@bellard.org>
Sat, 26 Apr 2025 10:30:26 +0000 (12:30 +0200)
Changelog
Makefile
TODO
VERSION
doc/quickjs.texi
readme-cosmo.txt [new file with mode: 0644]
release.sh

index 77805c0849c6195d432c01bc3cc3fa4248174839..7cc33993d970adfec032a6661b1c3e0999aabc4a 100644 (file)
--- 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:
index d9aaad1730ec073e03793af127c8685d6ac056f1..3b1c745947f11de9747ab2b1141a13b153b5e0d6 100644 (file)
--- 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 10c5228d9cc8e6dc7dff08aba522b7d4646405dd..6501fece74bd9f128a3aaddd27544f113878aa89 100644 (file)
--- 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 e32e065c954752196796ce062e4d7ea5ffc412eb..c76e76d1f10a1049cf10e6b9f45b2847f9c5f0be 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2024-02-14
+2025-04-26
index f9ffab4225caf3005818c0bade83bef71d0ef831..eef00b79cf63dc59fd0649ad9b599d362e7be4d9 100644 (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
 
 @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 (file)
index 0000000..fb524a2
--- /dev/null
@@ -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.
index cc74ab21a03d519a6c6897efa066aa1c978c8aec..f66e928c7a92442cfeb87aceafc3b85ef74114a5 100755 (executable)
@@ -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} )