pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang Update duktape and libduktape to 2.3.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fb05ca86768d
branches:  trunk
changeset: 393588:fb05ca86768d
user:      agc <agc%pkgsrc.org@localhost>
date:      Wed Mar 20 18:29:20 2019 +0000

description:
Update duktape and libduktape to 2.3.0

Changes since previous version (2.2.0):

pkgsrc: use the included Makefile.cmdline to build duktape, rather
than custom command in pkgsrc Makefile. Don't assume ${CC} is gcc
while doing so

XXX - it looks like the ABI has changed (silently) from 2.2.0 without
a corresponding libtool version bump from upstream. caveat buildor

2.3.0 (2018-08-04)
+ When C++ exception support is enabled use a separate
duk_fatal_exception (inherits from std::runtime_error) to propagate
fatal errors (uncaught errors, assertions) out of Duktape when using
the default fatal error handler (GH-1915)
+ Update UnicodeData.txt and SpecialCasing.txt used for building
internal Unicode control data to Unicode version 10.0.0 (GH-1851)
+ Add support for Symbol.hasInstance (@@hasInstance) check for
'instanceof' operator and duk_instanceof() API call; also add
Symbol.hasInstance and Function.prototype[@@hasInstance] (GH-1821)
+ Add support for Symbol.toStringTag (@@toStringTag) in
Object.prototype.toString() (GH-1822)
+ Add support for Symbol.isConcatSpreadable (@@isConcatSpreadable) in
Array.prototype.concat() (GH-1823)
+ Add support for Symbol.toPrimitive (@@toPrimitive) in ToPrimitive()
internal algorithm and duk_to_primitive() API call (GH-1825)
+ Invoke Proxy 'has' trap in Array.prototype.concat() when inspecting
the elements of the Proxy target (GH-1823)
+ Remove DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER because the underlying
ES5.1 specification "bug" was fixed in ES2015 (GH-1823)
+ Remove DUK_USE_NONSTD_ARRAY_MAP_TRAILER because ES5.0/ES5.1 behavior
actually did match the "non-standard" behavior provided by the option
(GH-1823)
+ Add duk_random() to allow C code access to the same random number
source as ECMAScript code (GH-1815)
+ Add duk_push_new_target() to allow C code to access new.target; at
present this is for completeness because without actual class support
it's only useful to detect constructor calls which can already be done
using duk_is_constructor_call() (GH-1745)
+ Add experimental API call variants for plain C literals, for example
duk_push_literal(ctx, "key") and duk_get_prop_literal(ctx,
"propname"), which allow e.g.  better performance; calls added:
duk_push_literal(), duk_get_prop_literal(), duk_put_prop_literal(),
duk_has_prop_literal(), duk_del_prop_literal(),
duk_get_global_literal(), duk_put_global_literal() (GH-1805)
+ Add duk_get_global_heapptr() and duk_put_global_heapptr() for
completeness (GH-1805)
+ Automatically pin strings accessed using the C literal API call
variants such as duk_get_prop_literal(ctx, "propname") between
mark-and-sweep rounds to facilitate literal caching and to reduce
string table traffic; this behavior can be disabled by disabling
DUK_USE_LITCACHE_SIZE in configure.py (GH-1813)
+ Add a lookup cache for C literals to speed up string table lookups
when using API call variants such as duk_get_prop_literal(ctx,
"propname"); the cache relies on literals being pinned between
mark-and-sweep rounds, and can be disabled by disabling
DUK_USE_LITCACHE_SIZE in configure.py (GH-1813)
+ ES2015 Number constructor properties:  EPSILON, MIN_SAFE_INTEGER,
MAX_SAFE_INTEGER, isFinite(), isInteger(), isNaN(), isSafeInteger(),
parseInt(), parseFloat() (GH-1756, GH-1761)
+ Assume only natural alignment (DUK_USE_ALIGN_BY=8) on all platforms
to minimize compiler assumptions regarding unaligned accesses (which
can be an issue even on x86); applications working with a low memory
target may want to force DUK_USE_ALIGN_BY in configuration (GH-1783,
GH-1784)
+ Base64 decoder is now more lenient for padding:  accepts missing
padding ('Zm'), partial padding ('Zm='), standard padding ('Zm=='),
and extra padding ('Zm===' etc), also for concatenated documents
('Zm===Zm' decodes to 'ff' for example) (GH-1789)
+ Base64 encoder and decoder performance improvements for both fast
path and slow path variants (GH-1789)
+ Make base64 support optional and drop it from lowmem base
configuration; define DUK_USE_BASE64_SUPPORT to enable it (GH-1789)
+ Make hex support optional and drop it from lowmem base
configuration; define DUK_USE_BASE64_SUPPORT to enable it (GH-1789)
+ Add C++ name mangling wrappers (extern "C") for extras (GH-1780,
GH-1782)
+ Add a duk_uint64_t to duk_hbuffer_fixed forced alignment union trick
just in case double and uint64_t alignment requirements differ
(GH-1799)
+ Add a CBOR encoder/decoder as an extra (GH-1781, GH-1800, GH-1801)
+ Add a minimal ES2015 Promise polyfill into the distribution
(GH-1865)
+ Include <exception> only when compiling as C++ with C++ exception
support enabled (GH-1838, GH-1839)
+ Allow undefined timeout in eventloop example setTimeout() and
setInterval() bindings, minor cleanups and improvements (GH-1866,
GH-1879, GH-1884)
+ Revise Number.prototype.toFixed() 'this' binding and fractionDigits
argument validation order to match ES2015 where the 'this' binding is
validated first (GH-1887)
+ Add Makefile.jsoncbor to the distributable (GH-1885)
+ Makefile.sharedlibrary portability improvements (GH-1922, GH-1923)
+ Change spelling from ECMAScript to ECMAScript throughout the
internal source code; as far as external behavior is concerned this
only affects a few debug prints (GH-1894)
+ Fix NULL pointer dereference in error augmentation when
DUK_USE_TRACEBACKS was disabled (GH-1909)
+ Fix potential dangling pointer use in Duktape thread termination
handling; the dangling pointer could cause unsafe memory behavior
(GH-1845, GH-1868)
+ Fix performance.now() property attributes to 'wec' (earlier 'wc')
(GH-1821)
+ Fix debugger StepOver behavior when a tailcall happens in a nested
function (not the function where stepping started from) (GH-1786,
GH-1787)
+ Fix trailing single line comment handling for Function constructor;
new Function('return "foo" //') previously failed with SyntaxError
(GH-1757)
+ Fix some lexer bugs related to parsing in RegExp mode (interpret
leading '/' as part of a RegExp) or not (interpret '/' as division)
(GH-1779)
+ Fix DUK_BOOL_{MIN,MAX} defines for unsigned duk_bool_t (GH-1769)
+ Fix 'defined but not used' warning for Windows (GH-1775)
+ Fix potential uninitialized data use when Windows Date provider
FileTimeToSystemTime() or FileTimeToLocalFileTime() failed (GH-1953)
+ Fix some Clang warnings by avoiding undefined behavior by default,
define DUK_USE_ALLOW_UNDEFINED_BEHAVIOR to reduce the explicit
undefined behavior checks for better footprint/performance (GH-1777,
GH-1795, GH-1796, GH-1797, GH-1798)
+ Fix some compilation warnings triggered when DUK_NORETURN is not
defined; the internal DUK_WO_NORETURN() is used to include unreachable
dummy statements when the noreturn attribute is not available, e.g.
DUK_WO_NORETURN(return 0;); (GH-1790)
+ Fix a few casts in duk_trans_socket_windows.c to avoid errors in a
C++ build (GH-1773)
+ Fix harmless -Wcast-align warnings on armhf (GH-1793)
+ Various compiler warning fixes (GH-1788, GH-1932, GH-1924, GH-1950,
GH-1951, etc)
+ Add automatic workaround for union aliasing issues with FreeBSD +
-m32 + Clang prior to 5.0; the aliasing issues cause packed duk_tval
to work incorrectly (see
https://github.com/svaarala/duktape/blob/master/misc/clang_aliasing.c),
and the workaround is to use unpacked duk_tval prior to Clang 5.0
(GH-1764)

2.2.1 (2018-04-26)
+ Fix trailing single line comment handling for Function constructor;
new Function('return "foo" //') previously failed with SyntaxError
(GH-1757)
+ Fix DUK_BOOL_{MIN,MAX} defines for unsigned duk_bool_t (GH-1769)
+ Fix debugger StepOver behavior when a tailcall happens in a nested
function (not the function where stepping started from) (GH-1786,
GH-1787)
+ Fix potential dangling pointer use in Duktape thread termination
handling; the dangling pointer could cause unsafe memory behavior
(GH-1845, GH-1868)

diffstat:

 lang/duktape/Makefile                       |  10 ++++------
 lang/duktape/distinfo                       |  11 ++++++-----
 lang/duktape/patches/patch-Makefile.cmdline |  15 +++++++++++++++
 lang/libduktape/Makefile                    |   4 ++--
 lang/libduktape/distinfo                    |  10 +++++-----
 5 files changed, 32 insertions(+), 18 deletions(-)

diffs (87 lines):

diff -r 087700247081 -r fb05ca86768d lang/duktape/Makefile
--- a/lang/duktape/Makefile     Wed Mar 20 16:35:26 2019 +0000
+++ b/lang/duktape/Makefile     Wed Mar 20 18:29:20 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2017/10/29 22:26:56 leot Exp $
+# $NetBSD: Makefile,v 1.3 2019/03/20 18:29:20 agc Exp $
 
-DISTNAME=      duktape-2.2.0
+DISTNAME=      duktape-2.3.0
 CATEGORIES=    devel
 MASTER_SITES=  http://duktape.org/
 EXTRACT_SUFX=  .tar.xz
@@ -10,10 +10,8 @@
 COMMENT=       Embeddable Javascript engine
 LICENSE=       mit
 
-do-build:
-       (cd ${WRKSRC} && \
-               ${CC} ${CFLAGS} examples/cmdline/duk_cmdline.c \
-               -Wl,-R${PREFIX}/lib -L${PREFIX}/lib -lduktape -lm -o duk)
+MAKE_FILE=     Makefile.cmdline
+BUILD_TARGET=  duk
 
 do-install:
        mkdir -p ${DESTDIR}${PREFIX}/bin
diff -r 087700247081 -r fb05ca86768d lang/duktape/distinfo
--- a/lang/duktape/distinfo     Wed Mar 20 16:35:26 2019 +0000
+++ b/lang/duktape/distinfo     Wed Mar 20 18:29:20 2019 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2017/10/29 22:26:56 leot Exp $
+$NetBSD: distinfo,v 1.3 2019/03/20 18:29:20 agc Exp $
 
-SHA1 (duktape-2.2.0.tar.xz) = 059d8f6ce4537bfca5689da693225802bb482706
-RMD160 (duktape-2.2.0.tar.xz) = cd341d62ed4f2ec3a1969426dec8ef82ede47925
-SHA512 (duktape-2.2.0.tar.xz) = 6fe67660ad4cfbab37b9048840bd8c42ee9585441c17253e1f17cb06e4527d1413851bc167d8b013990d5cae9f8e6eb4cb6ff80866f55bd8d67b0cf47580be7c
-Size (duktape-2.2.0.tar.xz) = 969136 bytes
+SHA1 (duktape-2.3.0.tar.xz) = 1d0edbb757b16f85bcf916b66c605103f736b4ff
+RMD160 (duktape-2.3.0.tar.xz) = 3e90960d43a93909aadacd6cfc5ae642f057f483
+SHA512 (duktape-2.3.0.tar.xz) = ec6b88549948c7f68f0ae8e54b16240c148fcc0d976fc7004b9d29c67652abbc659429ecb102c6e386809463ed99e5c76d636ec6ec632af4abca46d4cb03e834
+Size (duktape-2.3.0.tar.xz) = 997572 bytes
+SHA1 (patch-Makefile.cmdline) = 8e19c38b6da425c3fcff644987c0ab6c92b4b1d2
diff -r 087700247081 -r fb05ca86768d lang/duktape/patches/patch-Makefile.cmdline
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/duktape/patches/patch-Makefile.cmdline       Wed Mar 20 18:29:20 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile.cmdline,v 1.1 2019/03/20 18:29:20 agc Exp $
+
+Don't assume we have gcc
+
+--- Makefile.cmdline   2019/03/20 18:08:52     1.1
++++ Makefile.cmdline   2019/03/20 18:13:12
+@@ -8,7 +8,7 @@
+ CMDLINE_SOURCES = \
+       examples/cmdline/duk_cmdline.c
+ 
+-CC = gcc
++#CC = gcc
+ CCOPTS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer
+ CCOPTS += -I./examples/cmdline -I./src   # duktape.h and duk_config.h must be in include path
+ CCLIBS = -lm
diff -r 087700247081 -r fb05ca86768d lang/libduktape/Makefile
--- a/lang/libduktape/Makefile  Wed Mar 20 16:35:26 2019 +0000
+++ b/lang/libduktape/Makefile  Wed Mar 20 18:29:20 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2017/10/29 22:24:45 leot Exp $
+# $NetBSD: Makefile,v 1.3 2019/03/20 18:29:20 agc Exp $
 
-DISTNAME=      duktape-2.2.0
+DISTNAME=      duktape-2.3.0
 PKGNAME=       lib${DISTNAME}
 CATEGORIES=    devel
 MASTER_SITES=  http://duktape.org/
diff -r 087700247081 -r fb05ca86768d lang/libduktape/distinfo
--- a/lang/libduktape/distinfo  Wed Mar 20 16:35:26 2019 +0000
+++ b/lang/libduktape/distinfo  Wed Mar 20 18:29:20 2019 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2017/10/29 22:24:45 leot Exp $
+$NetBSD: distinfo,v 1.3 2019/03/20 18:29:20 agc Exp $
 
-SHA1 (duktape-2.2.0.tar.xz) = 059d8f6ce4537bfca5689da693225802bb482706
-RMD160 (duktape-2.2.0.tar.xz) = cd341d62ed4f2ec3a1969426dec8ef82ede47925
-SHA512 (duktape-2.2.0.tar.xz) = 6fe67660ad4cfbab37b9048840bd8c42ee9585441c17253e1f17cb06e4527d1413851bc167d8b013990d5cae9f8e6eb4cb6ff80866f55bd8d67b0cf47580be7c
-Size (duktape-2.2.0.tar.xz) = 969136 bytes
+SHA1 (duktape-2.3.0.tar.xz) = 1d0edbb757b16f85bcf916b66c605103f736b4ff
+RMD160 (duktape-2.3.0.tar.xz) = 3e90960d43a93909aadacd6cfc5ae642f057f483
+SHA512 (duktape-2.3.0.tar.xz) = ec6b88549948c7f68f0ae8e54b16240c148fcc0d976fc7004b9d29c67652abbc659429ecb102c6e386809463ed99e5c76d636ec6ec632af4abca46d4cb03e834
+Size (duktape-2.3.0.tar.xz) = 997572 bytes



Home | Main Index | Thread Index | Old Index