From 42e3e22cb135e64d123d0eb654b75f551bea166e Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Tue, 31 Jul 2018 00:36:56 +0300 Subject: [PATCH 1/9] Bump DUK_VERSION to 2.3.0 --- src-input/duktape.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-input/duktape.h.in b/src-input/duktape.h.in index b4e7194b49..898e04f76f 100644 --- a/src-input/duktape.h.in +++ b/src-input/duktape.h.in @@ -38,7 +38,7 @@ * development snapshots have 99 for patch level (e.g. 0.10.99 would be a * development version after 0.10.0 but before the next official release). */ -#define DUK_VERSION 20299L +#define DUK_VERSION 20300L /* Git commit, describe, and branch for Duktape build. Useful for * non-official snapshot builds so that application code can easily log From d0b5bbf3e073eb45da13db6961298bad5447b545 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Tue, 31 Jul 2018 00:36:39 +0300 Subject: [PATCH 2/9] Add duk_push_new_target() to API symbol test --- tests/api/test-all-public-symbols.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/api/test-all-public-symbols.c b/tests/api/test-all-public-symbols.c index cf8258882e..47e4285697 100644 --- a/tests/api/test-all-public-symbols.c +++ b/tests/api/test-all-public-symbols.c @@ -245,6 +245,7 @@ static duk_ret_t test_func(duk_context *ctx, void *udata) { (void) duk_push_literal(ctx, "dummy"); (void) duk_push_lstring(ctx, "dummy", 0); (void) duk_push_nan(ctx); + (void) duk_push_new_target(ctx); (void) duk_push_null(ctx); (void) duk_push_number(ctx, 0.0); (void) duk_push_object(ctx); From e95e51a72ce6e5da4d73fa4f282f11978fc9c8fb Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Tue, 31 Jul 2018 00:37:17 +0300 Subject: [PATCH 3/9] Update license year range --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index e8497318b9..69a7bb1d68 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -4,7 +4,7 @@ Duktape license (http://opensource.org/licenses/MIT) -Copyright (c) 2013-2017 by Duktape authors (see AUTHORS.rst) +Copyright (c) 2013-2018 by Duktape authors (see AUTHORS.rst) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From e97f064e5ba6340391a1da11b8232a0a51e0d386 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Tue, 31 Jul 2018 00:38:11 +0300 Subject: [PATCH 4/9] Remove 'experimental' tag from some API calls Date/time C API calls have been use for a while with no issues raised so remove their experimental status. --- website/api/duk_components_to_time.yaml | 1 - website/api/duk_get_now.yaml | 1 - website/api/duk_time_to_components.yaml | 1 - 3 files changed, 3 deletions(-) diff --git a/website/api/duk_components_to_time.yaml b/website/api/duk_components_to_time.yaml index e7f7ecfb39..8277937dd7 100644 --- a/website/api/duk_components_to_time.yaml +++ b/website/api/duk_components_to_time.yaml @@ -42,7 +42,6 @@ example: | tags: - time - - experimental seealso: - duk_time_to_components diff --git a/website/api/duk_get_now.yaml b/website/api/duk_get_now.yaml index 3f9ca1fca1..aa00850ed8 100644 --- a/website/api/duk_get_now.yaml +++ b/website/api/duk_get_now.yaml @@ -16,6 +16,5 @@ example: | tags: - time - - experimental introduced: 2.0.0 diff --git a/website/api/duk_time_to_components.yaml b/website/api/duk_time_to_components.yaml index e86fc87775..12d0202596 100644 --- a/website/api/duk_time_to_components.yaml +++ b/website/api/duk_time_to_components.yaml @@ -38,7 +38,6 @@ example: | tags: - time - - experimental seealso: - duk_components_to_time From d7f8a180d36754ba27070a291726df84bc6d9809 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Tue, 31 Jul 2018 00:41:22 +0300 Subject: [PATCH 5/9] Automate dist README.rst release notes link --- dist-files/README.rst | 2 +- util/dist.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dist-files/README.rst b/dist-files/README.rst index 86f62410cd..a374c46ba0 100644 --- a/dist-files/README.rst +++ b/dist-files/README.rst @@ -118,7 +118,7 @@ You can find release notes at: * https://github.com/svaarala/duktape/blob/master/RELEASES.rst (summary of all versions) -* https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-2.rst +* https://github.com/svaarala/duktape/blob/master/doc/release-notes-v@DUK_MAJOR@-@DUK_MINOR@.rst (more detailed notes for this version) This distributable contains Duktape version @DUK_VERSION_FORMATTED@, created from git diff --git a/util/dist.py b/util/dist.py index 4b0da530eb..304ac67ed1 100644 --- a/util/dist.py +++ b/util/dist.py @@ -740,6 +740,9 @@ def main(): copy_and_replace(os.path.join('dist-files', 'README.rst'), os.path.join(dist, 'README.rst'), { '@DUK_VERSION_FORMATTED@': duk_version_formatted, + '@DUK_MAJOR@': str(duk_major), + '@DUK_MINOR@': str(duk_minor), + '@DUK_PATCH@': str(duk_patch), '@GIT_COMMIT@': git_commit, '@GIT_DESCRIBE@': git_describe, '@GIT_BRANCH@': git_branch From f9edcfccfb500ce1dc53e990858fcb741fb454ef Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sat, 4 Aug 2018 16:01:31 +0300 Subject: [PATCH 6/9] Debugger README fix --- debugger/README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debugger/README.rst b/debugger/README.rst index 1d837d5e51..163d800d5d 100644 --- a/debugger/README.rst +++ b/debugger/README.rst @@ -92,6 +92,8 @@ Install DukLuv: * ``git clone https://github.com/creationix/dukluv.git`` +* ``cd dukluv`` + * ``git submodule init; git submodule update`` * ``make`` From 12de3adb9ca3bb29924a994b401255fb98e9e927 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Tue, 31 Jul 2018 01:13:54 +0300 Subject: [PATCH 7/9] Finalize 2.3.0 release notes --- doc/release-notes-v2-3.rst | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/doc/release-notes-v2-3.rst b/doc/release-notes-v2-3.rst index 8f3d34c726..d57e3c6f27 100644 --- a/doc/release-notes-v2-3.rst +++ b/doc/release-notes-v2-3.rst @@ -7,12 +7,6 @@ Release overview Main changes in this release (see RELEASES.rst for full details): -* TBD. - -* DUK_USE_ALIGN_BY now always defaults to 8 (natural alignment) to avoid any - potentially unsafe assumptions about compiler behavior for unaligned memory - accesses and pointers (which may be an issue even on x86). - * duk_xxx_literal() API call variants which take a plain C literal argument, for example duk_get_prop_literal(ctx, -2, "myProperty"). The calls are conceptually similar to the duk_xxx_string() variants, but can take advantage @@ -23,19 +17,39 @@ Main changes in this release (see RELEASES.rst for full details): literal to a heap string object quite fast (almost as fast as using a heapptr). For now the calls are experimental. +* More ES2015 support: Symbol.hasInstance, Symbol.toStringTag, + Symbol.isConcatSpreadable, Symbol.toPrimitive, Proxy improvements, + Number.EPSILON, Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, + Number.isFinite(), Number.isNaN(), Number.isSafeInteger(), + Number.parseInt(), Number.parseFloat(). + +* Other API additions: duk_random(), duk_push_new_target(), + duk_get_global_heapptr(), duk_put_global_heapptr(). + * When C++ exception support is enabled (DUK_USE_CPP_EXCEPTIONS), Duktape now uses a C++ exception throw also for fatal errors (e.g. uncaught error). The exception thrown has the type ``duk_fatal_exception`` which inherits from ``std::runtime_error`` so it has a ::what() method and a useful message. +* DUK_USE_ALIGN_BY now always defaults to 8 (natural alignment) to avoid any + potentially unsafe assumptions about compiler behavior for unaligned memory + accesses and pointers (which may be an issue even on x86). + +* A new CBOR encoder/decoder extra which may be eventually merged (in some + form) into Duktape itself. CBOR is a useful binary serialization format + which is a superset of JSON and has an RFC specification. + +* A Promise polyfill which will be used as a basis for the initial native + implementation. + +* Various fixes and portability improvements. + Upgrading from Duktape 2.2 ========================== No action (other than recompiling) should be needed for most users to upgrade from Duktape v2.2.x. Note the following: -* TBD. - * If you are using DUK_USE_CPP_EXCEPTIONS note that fatal errors are now thrown using a C++ exception of the type ``duk_fatal_exception`` which inherits from ``std::runtime_error`` and will be caught by a boilerplate @@ -77,6 +91,11 @@ from Duktape v2.2.x. Note the following: by default in the example low_memory.yaml configuration. Enable them manually if necessary using DUK_USE_BASE64_SUPPORT and DUK_USE_HEX_SUPPORT. +* The built-in base64 decoder is now more lenient. If you're relying on + strictness or specific behavior of the base64 decoder, you should use an + external decoder with the exact behavior desired (base64 decoders differ + quite a lot with respect to various decoding corner cases). + * Several -fsanitize=undefined warnings have been fixed in the default configuration using explicit checks to avoid undefined behavior. For example, floating point division by zero is avoided and behavior in that From 5a6f30caabc8a856b113577fffd3468e8dfab621 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Tue, 31 Jul 2018 03:45:22 +0300 Subject: [PATCH 8/9] Release checklist trivia --- doc/release-checklist.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/release-checklist.rst b/doc/release-checklist.rst index b18b61c1c7..b36eca92da 100644 --- a/doc/release-checklist.rst +++ b/doc/release-checklist.rst @@ -15,11 +15,13 @@ Checklist for ordinary releases * Git maintenance - - ensure git commits are up-to-date + - Ensure git commits are up-to-date - - ensure branches are merged, unused branches deleted (also remotely) + - Ensure branches are merged, unused branches deleted (also remotely) - - ensure branches are rebased where applicable + - Ensure branches are rebased where applicable + + - Check for uncommitted files - git fsck --full @@ -37,8 +39,6 @@ Checklist for ordinary releases * Check dist-files/README.rst - - Update release specific release notes link - * Ensure LICENSE.txt is up-to-date - Check year range @@ -109,7 +109,7 @@ Checklist for ordinary releases - Run:: $ make duk-sanitize-clang - $ for i in tests/ecmascript/test-*.js; do python util/runtest.py --duk ./duk-sanitize-clang --timeout 30 $i; done + $ for i in tests/ecmascript/test-*.js; do python util/runtest.py --duk ./duk-sanitize-clang --timeout 60 $i; done * ECMAScript testcases @@ -117,7 +117,10 @@ Checklist for ordinary releases - make ecmatest - - VALGRIND_WRAP=1 make ecmatest # valgrind test + - Run testcases with util/runtest.py with --valgrind option:: + + $ make duk + $ for i in tests/ecmascript/test-*.js; do python util/runtest.py --duk ./duk --valgrind --timeout 60 $i; done - On x86-32 (exercise 8-byte duk_tval) @@ -127,7 +130,7 @@ Checklist for ordinary releases - Run with assertions enabled at least on x86-64 -* Run testcases with torture options +* Run testcases with torture options, DUK_USE_ASSERTIONS and: - DUK_USE_GC_TORTURE From 4157e1d412d0760e40940e17f53d64e915e1fde8 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Tue, 31 Jul 2018 01:13:41 +0300 Subject: [PATCH 9/9] Releases: minor reorganization for 2.3.0 --- RELEASES.rst | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/RELEASES.rst b/RELEASES.rst index 7876319ee2..5a4521fb71 100644 --- a/RELEASES.rst +++ b/RELEASES.rst @@ -3227,10 +3227,7 @@ Miscellaneous: * Fix potential dangling pointer use in Duktape thread termination handling; the dangling pointer could cause unsafe memory behavior (GH-1845, GH-1868) -Planned -======= - -2.3.0 (XXXX-XX-XX) +2.3.0 (2018-08-04) ------------------ * When C++ exception support is enabled use a separate duk_fatal_exception @@ -3251,6 +3248,9 @@ Planned * 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) @@ -3261,9 +3261,6 @@ Planned actually did match the "non-standard" behavior provided by the option (GH-1823) -* Add support for Symbol.toPrimitive (@@toPrimitive) in ToPrimitive() - internal algorithm and duk_to_primitive() API call (GH-1825) - * Add duk_random() to allow C code access to the same random number source as ECMAScript code (GH-1815) @@ -3338,6 +3335,8 @@ Planned * 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) @@ -3391,6 +3390,12 @@ Planned 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) +Planned +======= + +2.4.0 (XXXX-XX-XX) +------------------ + 3.0.0 (XXXX-XX-XX) ------------------