From 935b2c8c73fbd31023c53f929dce077c221e1002 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 11 Sep 2015 22:27:31 +0300 Subject: [PATCH 01/11] Bump DUK_VERSION for 1.3.0 release --- src/duk_api_public.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/duk_api_public.h.in b/src/duk_api_public.h.in index 6549c7d3..a2f854e5 100644 --- a/src/duk_api_public.h.in +++ b/src/duk_api_public.h.in @@ -86,7 +86,7 @@ struct duk_number_list_entry { * 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 10299L +#define DUK_VERSION 10300L /* Git describe for Duktape build. Useful for non-official snapshot builds * so that application code can easily log which Duktape snapshot was used. From 07ee0809c3de5ac1508e7390521d69faa5ad70b7 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 11 Sep 2015 22:31:01 +0300 Subject: [PATCH 02/11] Add wiki link to dist README --- dist-files/README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist-files/README.rst b/dist-files/README.rst index 2a0c28a7..9c8c27c4 100644 --- a/dist-files/README.rst +++ b/dist-files/README.rst @@ -24,6 +24,10 @@ In particular, you should read the getting started section: * http://duktape.org/guide.html#gettingstarted +More examples and how-to articles are in the Duktape Wiki: + +* http://wiki.duktape.org/ + Building and integrating Duktape into your project is very straightforward: * http://duktape.org/guide.html#compiling From 083e79600c2ba2ad478ef37044ad854dddd91da8 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 11 Sep 2015 22:39:04 +0300 Subject: [PATCH 03/11] Releases: reorganize and cleanup 1.3.0 entries --- RELEASES.rst | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/RELEASES.rst b/RELEASES.rst index 59cdf862..2790778f 100644 --- a/RELEASES.rst +++ b/RELEASES.rst @@ -960,10 +960,7 @@ Released * Avoid including for application build (GH-312) -Planned -======= - -1.3.0 (2015-XX-XX) +1.3.0 (2015-09-12) ------------------ * Introduce an external duk_config.h header which provides all platform and @@ -979,6 +976,16 @@ Planned values which point to a user memory area allocated outside of Duktape heap (for example, an externally allocated frame buffer) (GH-153) +* Add duk_push_buffer_object() which allows pushing of all buffer object and + buffer view types (GH-190) + +* Add duk_get_buffer_data() and duk_require_buffer_data() API calls which + accept both plain buffer and buffer object values (GH-190) + +* Add duk_steal_buffer() API call which allows user code to steal the current + allocation of a dynamic buffer which is useful for some buffer manipulation + algorithms (GH-129) + * Add support for module.exports in the module loader framework (GH-201) * Change Duktape.modLoaded[] module cache to track the "module" object @@ -1014,16 +1021,6 @@ Planned * Add Proxy object support to 'instanceof' operator (without support for 'getPrototypeOf' trap) (GH-182) -* Add duk_steal_buffer() API call which allows user code to steal the current - allocation of a dynamic buffer which is useful for some buffer manipulation - algorithms (GH-129) - -* Add duk_get_buffer_data() and duk_require_buffer_data() API calls which - accept both plain buffer and buffer object values (GH-190) - -* Add duk_push_buffer_object() which allows pushing of all buffer object and - buffer view types (GH-190) - * Add explicit 'this' binding for C eval calls so that strict eval code also gets 'this' bound to the global object (GH-164) @@ -1055,12 +1052,14 @@ Planned places (GH-209) * Sizeof(duk_hbuffer_dynamic) reduced from 16 to 12 bytes for low memory - builds using heap compression (GH-209) + builds which employ heap compression (GH-209) * Increase try-catch register limit (from 511 to 262143) to fix try-catch out-of-register issues for most code (GH-145) -* Use deep C stack by default also for OSX/iPhone (GH-226) +* Remove DUK_OPT_DEEP_C_STACK (and DUK_USE_DEEP_C_STACK) in favor of explicit + DUK_USE_xxx config options for native recursion limits; C stacks are assumed + to be deep by default for all targets including OSX/iPhone (GH-165, GH-226) * Make Proxy internal _Target and _Handler properties immutable (non-writable and non-configurable) (GH-237) @@ -1074,11 +1073,7 @@ Planned structure (GH-209) * Add example debug transport with local dvalue encoding and decoding, also - provides a C example for encoding and decoding dvalues - -* Remove DUK_OPT_DEEP_C_STACK (and DUK_USE_DEEP_C_STACK) in favor of explicit - DUK_USE_xxx config options for native recursion limits; C stacks are assumed - to be deep by default for all targets (GH-165) + provides a C example for encoding and decoding dvalues (GH-251) * Provide at least 10 callstack entries for error handling (Duktape.errCreate) when callstack limit is reached (GH-191) @@ -1140,6 +1135,14 @@ Planned * Avoid including for application build (GH-312) +Planned +======= + +1.4.0 (XXXX-XX-XX) +------------------ + +* TBD + 2.0.0 (XXXX-XX-XX) ------------------ From ff0e44648ee514a7e31c1ce557807d3efebb3063 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sat, 12 Sep 2015 04:21:36 +0300 Subject: [PATCH 04/11] Add commented out torture options --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 6dcdf69d..e40ca542 100644 --- a/Makefile +++ b/Makefile @@ -193,6 +193,8 @@ CCOPTS_FEATURES += -DDUK_OPT_SELF_TESTS #CCOPTS_FEATURES += -DDUK_OPT_NO_AUGMENT_ERRORS #CCOPTS_FEATURES += -DDUK_OPT_GC_TORTURE #CCOPTS_FEATURES += -DDUK_OPT_SHUFFLE_TORTURE +#CCOPTS_FEATURES += -DDUK_OPT_REFZERO_FINALIZER_TORTURE +#CCOPTS_FEATURES += -DDUK_OPT_MARKANDSWEEP_FINALIZER_TORTURE #CCOPTS_FEATURES += -DDUK_OPT_NO_MS_RESIZE_STRINGTABLE CCOPTS_FEATURES += -DDUK_OPT_DEBUG_BUFSIZE=512 #CCOPTS_FEATURES += -DDUK_OPT_NO_STRICT_DECL From 8a310bc1a9b694fc50fd6c834534e358981260fc Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 11 Sep 2015 23:05:22 +0300 Subject: [PATCH 05/11] Duk cmdline trivial help indent fix --- examples/cmdline/duk_cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cmdline/duk_cmdline.c b/examples/cmdline/duk_cmdline.c index bdcc03a5..df61cdf9 100644 --- a/examples/cmdline/duk_cmdline.c +++ b/examples/cmdline/duk_cmdline.c @@ -865,7 +865,7 @@ int main(int argc, char *argv[]) { #ifdef DUK_CMDLINE_DEBUGGER_SUPPORT " --debugger start example debugger\n" #endif - " --recreate-heap recreate heap after every file\n" + " --recreate-heap recreate heap after every file\n" "\n" "If is omitted, interactive mode is started automatically.\n"); fflush(stderr); From e6edfbb23e8118dd72e93078052384a31b05cd04 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 11 Sep 2015 23:43:08 +0300 Subject: [PATCH 06/11] Testcase NaN platform dependency note --- tests/ecmascript/test-bi-typedarray-nan-handling.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ecmascript/test-bi-typedarray-nan-handling.js b/tests/ecmascript/test-bi-typedarray-nan-handling.js index 7cd3ae4d..f8115666 100644 --- a/tests/ecmascript/test-bi-typedarray-nan-handling.js +++ b/tests/ecmascript/test-bi-typedarray-nan-handling.js @@ -50,6 +50,9 @@ function nanHandlingTest() { sign = expt >>> 15; expt = (expt >> 4) & 0x7ff; + // Note: NaN normalization is allowed, and NaN sign is also platform + // dependent. + print('sign: ' + sign); print('expt: ' + expt); From 769511f61d4725461db824f3a7896926efc615b8 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 11 Sep 2015 23:43:20 +0300 Subject: [PATCH 07/11] Add a known issue for NaN sign in typed array test --- doc/testcase-known-issues.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/testcase-known-issues.yaml b/doc/testcase-known-issues.yaml index 6ed44001..864f88a8 100644 --- a/doc/testcase-known-issues.yaml +++ b/doc/testcase-known-issues.yaml @@ -123,6 +123,9 @@ - test: "test-dev-nonstd-setget-key-argument.js" specialoptions: "should work with default options, but will break with DUK_OPT_NO_NONSTD_ACCESSOR_KEY_ARGUMENT" +- + test: "test-bi-typedarray-nan-handling.js" + specialoptions: "NaN sign is platform dependent" # API testcase (tests/api/) known issues From 269f9a45483b47dca901a12a224c1feda041dac6 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sat, 12 Sep 2015 02:47:07 +0300 Subject: [PATCH 08/11] API testcase minor fix Avoid refcount expect string because refcount may change in some situations like shuffle torture tests. --- tests/api/test-external-buffer.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/api/test-external-buffer.c b/tests/api/test-external-buffer.c index 1b5a1454..907f6783 100644 --- a/tests/api/test-external-buffer.c +++ b/tests/api/test-external-buffer.c @@ -17,9 +17,9 @@ final top: 1 *** test_3 (duk_safe_call) ==> rc=1, result='TypeError: unexpected type' *** test_4 (duk_safe_call) -["censoredtag","censoredpointer",5,"censoredheapsize"] -["censoredtag","censoredpointer",5,"censoredheapsize",256] -["censoredtag","censoredpointer",5,"censoredheapsize",16] +["censoredtag","censoredpointer","censoredrefcount","censoredheapsize"] +["censoredtag","censoredpointer","censoredrefcount","censoredheapsize",256] +["censoredtag","censoredpointer","censoredrefcount","censoredheapsize",16] final top: 0 ==> rc=0, result='undefined' ===*/ @@ -111,12 +111,16 @@ static duk_ret_t test_3(duk_context *ctx) { static duk_ret_t test_4(duk_context *ctx) { unsigned char buf[16]; + /* Censor refcount too because e.g. in shuffle torture test the + * refcount will be different than otherwise. + */ duk_eval_string(ctx, "(function (b1, b2, b3) {\n" " [ b1, b2, b3 ].forEach(function (b) {\n" " var t = Duktape.info(b);\n" " t[0] = 'censoredtag';\n" " t[1] = 'censoredpointer';\n" + " t[2] = 'censoredrefcount';\n" " t[3] = 'censoredheapsize';\n" " print(Duktape.enc('jx', t));\n" " });\n" From 57bdc8c713e41a55c14f09354f5499b3214a5d6d Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sat, 12 Sep 2015 02:47:33 +0300 Subject: [PATCH 09/11] Release checklist updates --- doc/release-checklist.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/release-checklist.rst b/doc/release-checklist.rst index d03e40d0..8ee35784 100644 --- a/doc/release-checklist.rst +++ b/doc/release-checklist.rst @@ -129,7 +129,7 @@ Checklist for ordinary releases - DUK_USE_REFZERO_FINALIZER_TORTURE - - DUK_USE_MARKANDSWEEP_FINALIZER_TORTURE + - DUK_USE_MARKANDSWEEP_FINALIZER_TORTURE + DUK_OPT_GC_TORTURE * Memory usage testing @@ -182,6 +182,12 @@ Checklist for ordinary releases - make emscriptenduktest +* emscripten (compile Duktape with emscripten, run with Duktape) + + - on x86-64 + + - make emscripteninceptiontest + * JS-Interpreter - on x86-64 From 9fdd8308da9ecde166fb1bae9f3ddbbebab6483a Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sat, 12 Sep 2015 04:26:54 +0300 Subject: [PATCH 10/11] Leave duk_config.h-autodetect out of dist It's the same header already present in src/. It makes sense to include it in config/ when there are more examples there. --- util/make_dist.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/make_dist.sh b/util/make_dist.sh index d6ffae6b..985d05dc 100644 --- a/util/make_dist.sh +++ b/util/make_dist.sh @@ -445,7 +445,7 @@ python config/genconfig.py --metadata config --output $DIST/duk_config.h.tmp \ autodetect-header-legacy cp $DIST/duk_config.h.tmp $DISTSRCCOM/duk_config.h cp $DIST/duk_config.h.tmp $DISTSRCSEP/duk_config.h -cp $DIST/duk_config.h.tmp $DIST/config/duk_config.h-autodetect +#cp $DIST/duk_config.h.tmp $DIST/config/duk_config.h-autodetect # Modular duk_config.h (to replace the previous monolithic one) #python config/genconfig.py --metadata config --output $DIST/config/duk_config.h-modular \ From 7691f8b1fabd6fadb46e59f97d2b22131620ae78 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sat, 12 Sep 2015 04:52:37 +0300 Subject: [PATCH 11/11] Fix dist example dukdebug makefile --- dist-files/Makefile.dukdebug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist-files/Makefile.dukdebug b/dist-files/Makefile.dukdebug index ac9765b3..bc7b9d5b 100644 --- a/dist-files/Makefile.dukdebug +++ b/dist-files/Makefile.dukdebug @@ -6,7 +6,7 @@ DUKTAPE_SOURCES = src/duktape.c DUKTAPE_CMDLINE_SOURCES = \ examples/cmdline/duk_cmdline.c \ - examples/debug-trans-socket/duk_debug_trans_socket.c + examples/debug-trans-socket/duk_trans_socket.c CC = gcc CCOPTS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer