From fe76fafe9301d5328c1ec3fdfbadbde31ff0659b Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Sat, 16 Sep 2017 02:32:10 +0300
Subject: [PATCH 01/22] Release checklist update
---
doc/release-checklist.rst | 39 ++++++++++++++++++---------------------
1 file changed, 18 insertions(+), 21 deletions(-)
diff --git a/doc/release-checklist.rst b/doc/release-checklist.rst
index 2f632d24..76827221 100644
--- a/doc/release-checklist.rst
+++ b/doc/release-checklist.rst
@@ -40,8 +40,6 @@ Checklist for ordinary releases
- Check year range
- - Also check ``util/create_spdx_license.py``
-
* Ensure RELEASES.rst is up-to-date
- New release is in place
@@ -96,9 +94,9 @@ Checklist for ordinary releases
- Check ``make duk-clang``, covers ``-Wcast-align``
-* Test genconfig manually using metadata from the distributable
+* Test configure.py manually using metadata from the distributable
- - Ensure that Duktape compiles with e.g. ``-DDUK_USE_FASTINT`` genconfig
+ - Ensure that Duktape compiles with e.g. ``-DDUK_USE_FASTINT`` configure
argument
* Ecmascript testcases
@@ -141,11 +139,6 @@ Checklist for ordinary releases
- test-dev-refcount-leak-basic.js
-* Performance testing
-
- - Check for unexpected performance regressions by compiling previous release
- and candidate release with ``-O2`` and running "make perftest" for them.
-
* API testcases
- On x86-64:
@@ -155,12 +148,6 @@ Checklist for ordinary releases
- -Werror is no longer enabled so check apitest output for any test
case warnings (or enable -Werror manually in runtests.js)
-* Regfuzz
-
- - On x86-64, with DUK_USE_ASSERTIONS
-
- - make regfuzztest
-
* test262
- on x86-64
@@ -171,7 +158,7 @@ Checklist for ordinary releases
* Assorted release tests driven by Makefile
- - on x86-65
+ - on x86-64
- make clean releasetest
@@ -186,6 +173,20 @@ Checklist for ordinary releases
- Test JSON proxy
+* Performance testing and Wiki performance results page
+
+ - Update and run ``util/bench_microbenchmarks.py`` to get raw microbenchmark
+ results. Then use ``util/format_perftest.py`` to format into HTML; the
+ different parts of the Wiki performance page need manual tweaking of the
+ format_perftest.py script.
+
+ - Run Octane results manually for now.
+
+* Website index page footprint/RAM figures
+
+ - Run ``util/index_page_sizes.sh`` manually and update index page results
+ accordingly.
+
* Prepare an update pull for compat-table
- Fork and branch
@@ -329,17 +330,13 @@ Checklist for maintenance releases
* Bump DUK_VERSION in maintenance branch.
-* Check dist-files/Makefile.sharedlibrary; currently duplicates version
- number and needs to be fixed manually.
-
* Review diff between previous release and new patch release.
* Tag release, description "maintenance release" should be good enough for
most patch releases.
* Build release. Compare release to previous release package by diffing the
- unpacked directories. The SPDX license can be diffed by sorting the files
- first and then using diff -u.
+ unpacked directories.
* Build website from master. Deploy only ``download.html``.
From a3424ec6743d9af88cfc4b84a90c6f28af45793d Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Sat, 16 Sep 2017 22:07:51 +0300
Subject: [PATCH 02/22] Bump DUK_VERSION for 2.2.0 release
---
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 86cef868..17d205a9 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 20199L
+#define DUK_VERSION 20200L
/* Git commit, describe, and branch for Duktape build. Useful for
* non-official snapshot builds so that application code can easily log
From 4ba87f79ba2cf7db3905d9fa591a5b07d2c4508c Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Fri, 22 Sep 2017 23:30:42 +0300
Subject: [PATCH 03/22] Comment on draft Promise methods
---
src-input/builtins.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src-input/builtins.yaml b/src-input/builtins.yaml
index 1d89b89a..d67684ff 100644
--- a/src-input/builtins.yaml
+++ b/src-input/builtins.yaml
@@ -3413,6 +3413,7 @@ objects:
# https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred.
# 'accept' is obsolete and not implemented:
#https://bugs.chromium.org/p/v8/issues/detail?id=3238
+ # 'try': https://github.com/tc39/proposal-promise-try
- id: bi_promise_prototype
class: Object
@@ -3448,6 +3449,8 @@ objects:
# 'chain' is an obsolete variant of .then and not implemented:
# https://stackoverflow.com/questions/34713965/the-feature-of-method-promise-prototype-chain-in-chrome
+ # 'finally': https://github.com/tc39/proposal-promise-finally
+
#
# TypedArray
#
From 6e33c3530803c72e81cbd8f656551a870c095f5d Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Sat, 16 Sep 2017 23:41:11 +0300
Subject: [PATCH 04/22] Website download pages update for 2.2.0
---
website/download/download.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/website/download/download.html b/website/download/download.html
index 81ecf0e1..f140a0d5 100644
--- a/website/download/download.html
+++ b/website/download/download.html
@@ -49,7 +49,8 @@
2017-03-20 | duktape-2.0.2.tar.xz | maintenance release | XXX |
2017-05-04 | duktape-2.0.3.tar.xz | maintenance release (no longer maintained) | XXX |
2017-04-15 | duktape-2.1.0.tar.xz | performance, side effect handling | XXX |
-2017-07-29 | duktape-2.1.1.tar.xz | maintenance release | XXX |
+2017-07-29 | duktape-2.1.1.tar.xz | maintenance release | XXX |
+2017-09-23 | duktape-2.2.0.tar.xz | call handling, API improvements, performance | XXX |
From 9fa01777711bffca710347dd32b73162f07bf520 Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Thu, 21 Sep 2017 04:57:52 +0300
Subject: [PATCH 05/22] Website index/guide intro updates
---
website/guide/intro.html | 12 +++++++++++-
website/index/index.html | 15 +++++++++++----
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/website/guide/intro.html b/website/guide/intro.html
index 50a65bdd..d947d157 100644
--- a/website/guide/intro.html
+++ b/website/guide/intro.html
@@ -68,7 +68,17 @@ was based on Khronos TypedArray specification:
Node.js Buffer support is based on:
+
+TextEncoder() and TextDecoder() bindings are based on:
+
+
+Performance.now() binding is based on:
+
Features
diff --git a/website/index/index.html b/website/index/index.html
index 2bbaa1bd..02851436 100644
--- a/website/index/index.html
+++ b/website/index/index.html
@@ -37,7 +37,7 @@ Duktape API to call Ecmascript functions from C code and vice versa.
Main features
- Embeddable, portable, compact:
- can run on platforms with 192kB flash and 64kB system RAM
+ can run on platforms with 160kB flash and 64kB system RAM
- Ecmascript E5/E5.1,
with some semantics updated from ES2015+
- Partial support for
@@ -49,6 +49,7 @@ Duktape API to call Ecmascript functions from C code and vice versa.
- ES2015 TypedArray
and Node.js Buffer bindings
- Encoding API bindings based on the WHATWG Encoding Living Standard
+- performance.now()
- Built-in debugger
- Built-in regular expression engine
- Built-in Unicode support
@@ -64,10 +65,16 @@ Duktape API to call Ecmascript functions from C code and vice versa.
Code and RAM footprint
+
+For a "Hello world" example:
- | x86 default | x86 lowmem | x86 full lowmem |
-Code | 170kB | 150kB | 200kB |
-Startup RAM | 68kB | 35kB | 2.3kB |
+Config | Code footprint (kB) | Startup RAM (kB) |
+thumb default | 146 | 73 |
+thumb lowmem | 96 | 26 |
+thumb full lowmem | 120 | 1.5 |
+x86 default | 176 | 74 |
+x86 lowmem | 121 | 27 |
+x86 full lowmem | 146 | 1.5 |
See Benchmarks.
From 32e4d9af1ad48c9cd16588c1cd180ffcf578ac54 Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Sat, 16 Sep 2017 23:41:14 +0300
Subject: [PATCH 06/22] Releases: 2.2.0 reorganisation, rewording
---
RELEASES.rst | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/RELEASES.rst b/RELEASES.rst
index d5388ebc..25e45404 100644
--- a/RELEASES.rst
+++ b/RELEASES.rst
@@ -2893,18 +2893,10 @@ Miscellaneous:
* Fix incorrect handling of register bound unary operation target for
unary minus, unary plus, and bitwise NOT (GH-1623, GH-1624)
-Planned
-=======
-
-2.0.3 (XXXX-XX-XX)
-------------------
-
-* TBD
-
-2.2.0 (XXXX-XX-XX)
+2.2.0 (2017-09-23)
------------------
-* Change Duktape/C function inheritance for user functions pushed using
+* Change inheritance for Duktape/C user functions pushed using
duk_push_c_function() and duk_push_c_lightfunc(), they now inherit from an
intermediate prototype object (function -> %NativeFunctionPrototype% ->
Function.prototype) which provides .name and .length getters; the virtual
@@ -2977,10 +2969,10 @@ Planned
* Add support for Proxy 'apply' and 'construct' traps (GH-1601)
-* Add minimal new.target support, evaluates to undefined for non-constructor
- calls and final non-bound constructor function in constructor calls;
- explicit newTarget not yet supported and handling of new.target in eval()
- code is not yet fully correct (GH-1544, GH-1572)
+* Add minimal new.target support; new.target evaluates to undefined for
+ non-constructor calls and to the final non-bound constructor function in
+ constructor calls; explicit newTarget not yet supported and handling of
+ new.target in eval() code is not yet fully correct (GH-1544, GH-1572)
* Add proper string vs. symbol sorting to Reflect.ownKeys() and other
enumeration call sites (GH-1460, GH-1607)
@@ -2998,7 +2990,7 @@ Planned
* Add a wrap check to duk_{check,require}_stack{_top}() (GH-1537)
* Improve case insensitive RegExp character class compilation performance
- using a small (256 byte, footprint impact is about 300-400 bytes)
+ using a small (256 byte, total footprint impact is about 300-400 bytes)
canonicalization lookup bitmap (GH-1616)
* Improve error messages for source code, base-64, hex, UTF-8, and bytecode
@@ -3102,7 +3094,7 @@ Planned
requested (GH-1536)
* Fix incorrect pausing by debugger StepOut, StepOver, and StepInto commands
- when stepping over a tail call (GH-1684, GH-1685, GH-1726, GH-1734)
+ when stepping out/over/into a tail call (GH-1684, GH-1685, GH-1726, GH-1734)
* Fix duk_hbufobj assert in shared slice() handling (GH-1506)
@@ -3161,8 +3153,8 @@ Planned
attached to a duk_hthread instead of being a separate, monolithic
thr->callstack (GH-1487)
-* Internal change: duk_catcher structs are now in a single linked list attached
- to a duk_activation instead of being a separate, monolithic
+* Internal change: duk_catcher structs are now in a single linked list
+ attached to a duk_activation instead of being a separate, monolithic
thr->catchstack (GH-1449)
* Internal change: simple freelists for duk_activation and duk_catcher
@@ -3192,6 +3184,14 @@ Planned
check entry part before array part in property lookup (GH-1634); optimize
duk_propdesc filling in property lookups (GH-1635)
+Planned
+=======
+
+2.3.0 (XXXX-XX-XX)
+------------------
+
+* TBD
+
3.0.0 (XXXX-XX-XX)
------------------
From 69e3dde3d1a98b9f2bf682cf89da66e124ed2a6c Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Sun, 17 Sep 2017 01:03:04 +0300
Subject: [PATCH 07/22] Finalize 2.2.0 release notes
---
doc/release-notes-v2-2.rst | 66 ++++++++++++++++++++++----------------
1 file changed, 39 insertions(+), 27 deletions(-)
diff --git a/doc/release-notes-v2-2.rst b/doc/release-notes-v2-2.rst
index aa197eff..41b4dcf3 100644
--- a/doc/release-notes-v2-2.rst
+++ b/doc/release-notes-v2-2.rst
@@ -7,16 +7,31 @@ Release overview
Main changes in this release (see RELEASES.rst for full details):
-* TBD.
+* Internal reworking of call handling for better performance and code sharing.
+ Coroutine yield and tail call restrictions removed when using new Foo(),
+ .call(), .apply(), Reflect.apply(), and Reflect.construct(). Maximum call
+ argument count increased to ~64k.
+
+* C API additions: duk_seal(), duk_freeze(), duk_is_constructable(),
+ duk_require_object(), duk_push_proxy(), macros for creating symbol
+ literals in C code (DUK_HIDDEN_SYMBOL("myValue") etc), and more
+ duk_def_prop() convenience flags. The 0xFF byte prefix is now reserved
+ entirely for user hidden Symbols, so there are no longer restrictions in
+ what follows the prefix.
+
+* More ES2015 features: Math.clz32(), Math.imul(), Math.sign(),
+ Object.prototype.{__defineGetter__,__defineSetter__},
+ Object.prototype.{__lookupGetter__,_lookupSetter__}, Proxy 'apply' and
+ 'construct' traps, minimal new.target, and fixed string/symbol key sorting.
+
+* Performance.now() binding and a monotonic time provider.
* Case insensitive RegExp character class canonicalization performance has
improved by ~50x using a small lookup table (256 bytes, total footprint
impact is ~300-400 bytes).
-* The 0xFF string prefix byte is now reserved to application hidden Symbols,
- so there are no longer restrictions in what follows the prefix. The new
- DUK_HIDDEN_SYMBOL("myValue") macro is recommended and uses a single 0xFF
- prefix byte.
+* Performance, footprint, and portability improvements. Also improvements
+ to error messages, value summaries, and assertion coverage.
Upgrading from Duktape 2.1
==========================
@@ -24,6 +39,10 @@ Upgrading from Duktape 2.1
No action (other than recompiling) should be needed for most users to upgrade
from Duktape v2.1.x. Note the following:
+* There are public API macros to create different Symbol types as C literals.
+ For example, DUK_HIDDEN_SYMBOL("myPointer") can now be used instead of
+ manually creating the internal representation ("\xFF" "myPointer").
+
* Bytecode dump format has been changed slightly: initial byte is now 0xBF
(previously 0xFF) to avoid potential confusion with Symbol strings, and
serialization version byte (in practice unused) was removed from the format.
@@ -36,16 +55,6 @@ from Duktape v2.1.x. Note the following:
(e.g. '(1U << 3)) to match their C type. These changes may cause some
sign conversion warnings in application call sites.
-* There are public API macros to create different Symbol types as C literals.
- For example, DUK_HIDDEN_SYMBOL("myPointer") can now be used instead of
- manually creating the internal representation ("\xFF" "myPointer").
-
-* Case insensitive RegExps are still much slower than case sensitive ones.
- The small canonicalization lookup (256 bytes) is enabled by default. The
- small lookup is still slower than DUK_USE_REGEXP_CANON_WORKAROUND but the
- difference is now much smaller. You may be able to turn off the workaround
- option whose main downside is a relatively large footprint impact (128kB).
-
* duk_safe_call() no longer automatically extends the value stack to ensure
there's space for 'nrets' return values. This was not guaranteed by the
API and the check is mostly unnecessary overhead. If a duk_safe_call()
@@ -59,17 +68,12 @@ from Duktape v2.1.x. Note the following:
very low memory targets. If you're using a pool allocator, you may need to
measure and adjust pool sizes/counts.
-* Function.prototype.call(), Function.prototype.apply(), and Reflect.apply()
- are now handled inline in call handling. As a result, when functions are
- called via .call()/.apply() the .call()/.apply() is not part of the call
- stack and is absent in e.g. tracebacks. .call()/.apply() no longer prevents
- a yield, doesn't consume native stack for Ecmascript-to-Ecmascript calls,
- and can now be used in tailcall positions, e.g. in
- 'return func.call(null, 1, 2);'.
-
-* Constructor calls, i.e. 'new Xyz()' or duk_new(), no longer prevent a yield,
- don't consume native stack for Ecmascript-to-Ecmascript calls, and can now
- be used in tailcalls.
+* Function.prototype.call(), Function.prototype.apply(), Reflect.apply(),
+ new Xyz(), duk_new(), and Reflect.construct() are now handled inline in call
+ handling. As a result, they are not part of the call stack, are absent in
+ tracebacks, don't consume native stack for Ecmascript-to-Ecmascript calls,
+ no longer prevent a coroutine yield, and can be used in tail call positions
+ (e.g. 'return func.call(null, 1, 2);').
* Functions pushed using duk_push_c_function() and duk_push_c_lightfunc() now
inherit from an intermediate prototype (func -> %NativeFunctionPrototype%
@@ -86,6 +90,10 @@ from Duktape v2.1.x. Note the following:
properties; the bound argument values are not visible in the debugger
protocol for now.
+* The Proxy target and handler references are no longer internal properties
+ (but duk_hproxy struct members), and are not visible in the debugger
+ protocol for now.
+
* DUK_USE_DATE_GET_NOW() is now allowed to return fractions. The fractions
won't be available through the Date built-in (this is forbidden by the
Ecmascript specification) but are available through the duk_get_now() C
@@ -98,7 +106,11 @@ from Duktape v2.1.x. Note the following:
step commands will still pause on function entry/exit as appropriate; for
example, StepInto will pause on function entry or exit (or an error throw).
-Other minor differences:
+* Case insensitive RegExps are still much slower than case sensitive ones.
+ The small canonicalization lookup (256 bytes) is enabled by default. The
+ small lookup is still slower than DUK_USE_REGEXP_CANON_WORKAROUND but the
+ difference is now much smaller. You may be able to turn off the workaround
+ option whose main downside is a relatively large footprint impact (128kB).
* When an Error instance is being constructed and Duktape.errCreate() is
called for the constructor return value, the call stack seen by errCreate()
From 3f6eb7c6290f3430520a143442cb8c2aa050f6e5 Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Sun, 17 Sep 2017 01:49:21 +0300
Subject: [PATCH 08/22] Update dist README for 2.2
---
dist-files/README.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dist-files/README.rst b/dist-files/README.rst
index 6cf4b1aa..944b3cd5 100644
--- a/dist-files/README.rst
+++ b/dist-files/README.rst
@@ -10,8 +10,8 @@ Duktape supports the full E5/E5.1 feature set (with some semantics updated
from ES2015+) including errors, Unicode strings, and regular expressions,
a subset of Ecmascript 2015 (E6) and Ecmascript 2016 (E7) features (e.g.
computed property names, Proxy objects, exponentiation operator, Reflect),
-ES2015 ArrayBuffer/TypedView, Node.js Buffer, and WHATWG Encoding API
-living standard.
+ES2015 ArrayBuffer/TypedView, Node.js Buffer, performance.now(), and WHATWG
+Encoding API living standard.
Duktape also provides a number of custom features such as error tracebacks,
additional data types for better C integration, combined reference counting
@@ -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-1.rst
+* https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-2.rst
(more detailed notes for this version)
This distributable contains Duktape version @DUK_VERSION_FORMATTED@, created from git
From 1ca66a3a1e3331a582f69e0a8d0df64cc3035424 Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Mon, 18 Sep 2017 01:58:34 +0300
Subject: [PATCH 09/22] Remove perftest targets from Makefile
---
Makefile | 55 -------------------------------------------------------
1 file changed, 55 deletions(-)
diff --git a/Makefile b/Makefile
index c72bc60b..eb6ad661 100644
--- a/Makefile
+++ b/Makefile
@@ -1151,58 +1151,3 @@ massif-%: tests/ecmascript/%.js duk
massif-helloworld: massif-test-dev-hello-world
massif-deepmerge: massif-test-dev-deepmerge
massif-arcfour: massif-test-dev-arcfour
-
-# Simple performance test, minimum time for N runs
-# - Duktape is interpreted and uses reference counting
-# - Python and Perl are interpreted and also use reference counting
-# - Ruby and Lua are interpreted but don't use reference counting
-# - Mujs is interpreted but doesn't use reference counting
-# - Rhino compiles to Java bytecode and is ultimately JITed
-# - Node.js (V8) is JITed
-# - Luajit is JITed
-
-#TIME=$(PYTHON) util/time_multi.py --count 1 --sleep 0 --sleep-factor 2.0 --mode min # Take minimum time of N
-#TIME=$(PYTHON) util/time_multi.py --count 3 --sleep 0 --sleep-factor 2.0 --mode min # Take minimum time of N
-TIME=$(PYTHON) util/time_multi.py --count 5 --sleep 0 --sleep-factor 2.0 --mode min # Take minimum time of N
-
-# Blocks: optimization variants, previous versions, other interpreting engines,
-# other JIT engines.
-perftest: duk duk.O2 duk.O3 duk.O4
- for i in tests/perf/*.js; do \
- printf '%-36s:' "`basename $$i`"; \
- printf ' duk.Os %5s' "`$(TIME) ./duk $$i`"; \
- printf ' duk.O2 %5s' "`$(TIME) ./duk.O2 $$i`"; \
- printf ' duk.O3 %5s' "`$(TIME) ./duk.O3 $$i`"; \
- printf ' duk.O4 %5s' "`$(TIME) ./duk.O4 $$i`"; \
- printf ' |'; \
- printf ' duk.O2.150 %5s' "`$(TIME) ./duk.O2.150 $$i`"; \
- printf ' duk.O2.140 %5s' "`$(TIME) ./duk.O2.140 $$i`"; \
- printf ' duk.O2.130 %5s' "`$(TIME) ./duk.O2.130 $$i`"; \
- printf ' duk.O2.124 %5s' "`$(TIME) ./duk.O2.124 $$i`"; \
- printf ' duk.O2.113 %5s' "`$(TIME) ./duk.O2.113 $$i`"; \
- printf ' duk.O2.102 %5s' "`$(TIME) ./duk.O2.102 $$i`"; \
- printf ' |'; \
- printf ' mujs %5s' "`$(TIME) mujs $$i`"; \
- printf ' jerry %5s' "`$(TIME) jerry $$i`"; \
- printf ' lua %5s' "`$(TIME) lua $${i%%.js}.lua`"; \
- printf ' python %5s' "`$(TIME) $(PYTHON) $${i%%.js}.py`"; \
- printf ' perl %5s' "`$(TIME) perl $${i%%.js}.pl`"; \
- printf ' ruby %5s' "`$(TIME) ruby $${i%%.js}.rb`"; \
- printf ' |'; \
- printf ' rhino %5s' "`$(TIME) rhino $$i`"; \
- printf ' node %5s' "`$(TIME) node $$i`"; \
- printf ' luajit %5s' "`$(TIME) luajit $${i%%.js}.lua`"; \
- printf '\n'; \
- done
-perftestduk: duk.O2 duk-perf.O2
- for i in tests/perf/*.js; do \
- printf '%-36s:' "`basename $$i`"; \
- printf ' duk-perf.O2 %5s' "`$(TIME) ./duk-perf.O2 $$i`"; \
- printf ' duk.O2 %5s' "`$(TIME) ./duk.O2 $$i`"; \
- printf ' |'; \
- printf ' mujs %5s' "`$(TIME) mujs $$i`"; \
- printf ' jerry %5s' "`$(TIME) jerry $$i`"; \
- printf ' duk.O2.master %5s' "`$(TIME) ./duk.O2.master $$i`"; \
- printf ' duk.O2.150 %5s' "`$(TIME) ./duk.O2.150 $$i`"; \
- printf '\n'; \
- done
From c6d788adafeeb32dd05612faf13bd868972bc027 Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Mon, 18 Sep 2017 23:15:09 +0300
Subject: [PATCH 10/22] Microbenchmark script trivia
---
util/bench_microbenchmarks.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/util/bench_microbenchmarks.py b/util/bench_microbenchmarks.py
index 0e2d9399..b7254954 100644
--- a/util/bench_microbenchmarks.py
+++ b/util/bench_microbenchmarks.py
@@ -105,11 +105,13 @@ def run_one(testfile):
return doc
def format_one(doc):
- res = '%-36s:' % os.path.basename(doc['test'])
+ res = '%-40s:' % os.path.basename(doc['test'])
for eng in engines:
engname = eng['name']
t = doc['engines'][engname]
- if t.get('sigsegv', False):
+ if t.get('killed', False):
+ res += ' %s %5s' % (engname, 'kill')
+ elif t.get('sigsegv', False):
res += ' %s %5s' % (engname, 'segv')
elif t.get('failed', False):
res += ' %s %5s' % (engname, 'n/a')
From 74a9cb31fc07477cb42969877f6a3f51c88063cf Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Mon, 18 Sep 2017 23:19:38 +0300
Subject: [PATCH 11/22] Add 'slow' metadata tag to some tests
---
tests/ecmascript/test-bi-arraybuffer-constructor.js | 3 ++-
tests/ecmascript/test-regexp-charclass-canon-blksize.js | 3 ++-
tests/ecmascript/test-regexp-charclass-canon-blockedge.js | 6 ++++++
tests/ecmascript/test-regexp-charclass-canon-cornercases.js | 6 ++++++
tests/ecmascript/test-regexp-charclass-canon-individual.js | 3 ++-
tests/ecmascript/test-regexp-charclass-canon-random.js | 6 ++++++
6 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/tests/ecmascript/test-bi-arraybuffer-constructor.js b/tests/ecmascript/test-bi-arraybuffer-constructor.js
index 4ce5245f..ca43f5d6 100644
--- a/tests/ecmascript/test-bi-arraybuffer-constructor.js
+++ b/tests/ecmascript/test-bi-arraybuffer-constructor.js
@@ -6,7 +6,8 @@
/*---
{
- "custom": true
+ "custom": true,
+ "slow": true
}
---*/
diff --git a/tests/ecmascript/test-regexp-charclass-canon-blksize.js b/tests/ecmascript/test-regexp-charclass-canon-blksize.js
index e218cdf6..3d8dc9ee 100644
--- a/tests/ecmascript/test-regexp-charclass-canon-blksize.js
+++ b/tests/ecmascript/test-regexp-charclass-canon-blksize.js
@@ -10,7 +10,8 @@
/*---
{
- "skip": true
+ "skip": true,
+ "slow": true
}
---*/
diff --git a/tests/ecmascript/test-regexp-charclass-canon-blockedge.js b/tests/ecmascript/test-regexp-charclass-canon-blockedge.js
index de760f4f..4b6a2e95 100644
--- a/tests/ecmascript/test-regexp-charclass-canon-blockedge.js
+++ b/tests/ecmascript/test-regexp-charclass-canon-blockedge.js
@@ -5,6 +5,12 @@
/*@include util-regexp.js@*/
+/*---
+{
+ "slow": true
+}
+---*/
+
/*===
1023 [\u03ff-\u03ff] F893 T1 F129 T1 F64512
1024 [\u03ff-\u0400] F893 T1 F129 T2 F79 T1 F64431
diff --git a/tests/ecmascript/test-regexp-charclass-canon-cornercases.js b/tests/ecmascript/test-regexp-charclass-canon-cornercases.js
index 78badbc0..cc00095e 100644
--- a/tests/ecmascript/test-regexp-charclass-canon-cornercases.js
+++ b/tests/ecmascript/test-regexp-charclass-canon-cornercases.js
@@ -4,6 +4,12 @@
/*@include util-regexp.js@*/
+/*---
+{
+ "slow": true
+}
+---*/
+
/*===
256 [\u0000-\u0100] T258 F118 T1 F547 T1 F31 T1 F64579
257 [\u0001-\u0101] F1 T257 F118 T1 F547 T1 F31 T1 F64579
diff --git a/tests/ecmascript/test-regexp-charclass-canon-individual.js b/tests/ecmascript/test-regexp-charclass-canon-individual.js
index 32406db5..22280fd0 100644
--- a/tests/ecmascript/test-regexp-charclass-canon-individual.js
+++ b/tests/ecmascript/test-regexp-charclass-canon-individual.js
@@ -10,7 +10,8 @@
/*---
{
- "skip": true
+ "skip": true,
+ "slow": true
}
---*/
diff --git a/tests/ecmascript/test-regexp-charclass-canon-random.js b/tests/ecmascript/test-regexp-charclass-canon-random.js
index a6d38280..b5ec48a2 100644
--- a/tests/ecmascript/test-regexp-charclass-canon-random.js
+++ b/tests/ecmascript/test-regexp-charclass-canon-random.js
@@ -5,6 +5,12 @@
/*@include util-regexp.js@*/
+/*---
+{
+ "slow": true
+}
+---*/
+
// Verified against Firefox.
/*===
[\u325e-\uceff] F604 T1 F4 T1 F3 T2 F3 T1 F1 T1 F26 T1 F21 T2 F4353 T80 F2200 T1 F240 T1 F5348 T40098 F12544
From 1566b39eac8adc7b43099511b289608bd5134de5 Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Wed, 20 Sep 2017 23:14:19 +0300
Subject: [PATCH 12/22] Tweaks to format_perftest.py
---
util/format_perftest.py | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/util/format_perftest.py b/util/format_perftest.py
index ee549a67..60db9e36 100644
--- a/util/format_perftest.py
+++ b/util/format_perftest.py
@@ -20,8 +20,8 @@ def main():
results = []
baseline = []
- # Column index (positive or negative) for baseline engine.
- baseline_column = 1 # Second engine is baseline by default, e.g. duk.O2 vs duk.O2.master
+ # Column index (positive or negative) for baseline engine (after filtering).
+ baseline_column = 4
with open(sys.argv[1], 'rb') as f_in, open(sys.argv[2], 'wb') as f_out:
for line in f_in:
@@ -45,9 +45,20 @@ def main():
result.append(float(parts[idx]))
except ValueError:
result.append(None)
- baseline.append(result[baseline_column])
results.append(result)
+ filter_columns = [ 3, 4, 5, 6, 7, 8, 9, 10 ]
+ def do_filter(val):
+ res = []
+ for i in filter_columns:
+ res.append(val[i])
+ return res
+
+ #headings = do_filter(headings)
+ #results = [ do_filter(x) for x in results ]
+
+ baseline = [ x[baseline_column] for x in results ]
+
#print(repr(headings))
#print(repr(results))
@@ -110,6 +121,8 @@ tr:nth-child(odd) { background: #eeeeee; }
if column == baseline_column:
style = 'background-color: #eeeeee'
+ #if column not in [ 3, 4 ]:
+ # style = 'background-color: #eeeeee'
if t is None:
text = '-'
From 0499855d89089467217c03939289c962e80b8f00 Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Wed, 20 Sep 2017 23:53:34 +0300
Subject: [PATCH 13/22] Add arm/thumb size test targets
---
testrunner/run_commit_test.py | 44 ++++++++++++++++++++++++++++-------
1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/testrunner/run_commit_test.py b/testrunner/run_commit_test.py
index 20dc73ea..2dd77bbe 100644
--- a/testrunner/run_commit_test.py
+++ b/testrunner/run_commit_test.py
@@ -342,12 +342,12 @@ def context_linux_x64_gcc_defsize_makeduk():
execute([ 'make', 'duk' ])
return context_helper_get_binary_size_diff(comp)
-def context_linux_x64_gcc_defsize_fltoetc():
+def context_helper_defsize_fltoetc(archopt):
cwd = os.getcwd()
def comp():
execute([ 'make', 'dist' ])
execute([
- 'gcc', '-oduk',
+ 'gcc', '-oduk', archopt,
'-Os', '-fomit-frame-pointer',
'-fno-stack-protector',
'-flto', '-fno-asynchronous-unwind-tables',
@@ -360,6 +360,17 @@ def context_linux_x64_gcc_defsize_fltoetc():
])
return context_helper_get_binary_size_diff(comp)
+def context_linux_x64_gcc_defsize_fltoetc():
+ return context_helper_defsize_fltoetc('-m64')
+def context_linux_x86_gcc_defsize_fltoetc():
+ return context_helper_defsize_fltoetc('-m32')
+def context_linux_x32_gcc_defsize_fltoetc():
+ return context_helper_defsize_fltoetc('-mx32')
+def context_linux_arm_gcc_defsize_fltoetc():
+ return context_helper_defsize_fltoetc('-marm')
+def context_linux_thumb_gcc_defsize_fltoetc():
+ return context_helper_defsize_fltoetc('-mthumb')
+
def context_helper_minsize_fltoetc(archopt, strip):
cwd = os.getcwd()
def comp():
@@ -400,21 +411,25 @@ def context_helper_minsize_fltoetc(archopt, strip):
def context_linux_x64_gcc_minsize_fltoetc():
return context_helper_minsize_fltoetc('-m64', False)
-
def context_linux_x86_gcc_minsize_fltoetc():
return context_helper_minsize_fltoetc('-m32', False)
-
def context_linux_x32_gcc_minsize_fltoetc():
return context_helper_minsize_fltoetc('-mx32', False)
+def context_linux_arm_gcc_minsize_fltoetc():
+ return context_helper_minsize_fltoetc('-marm', False)
+def context_linux_thumb_gcc_minsize_fltoetc():
+ return context_helper_minsize_fltoetc('-mthumb', False)
def context_linux_x64_gcc_stripsize_fltoetc():
return context_helper_minsize_fltoetc('-m64', True)
-
def context_linux_x86_gcc_stripsize_fltoetc():
return context_helper_minsize_fltoetc('-m32', True)
-
def context_linux_x32_gcc_stripsize_fltoetc():
return context_helper_minsize_fltoetc('-mx32', True)
+def context_linux_arm_gcc_stripsize_fltoetc():
+ return context_helper_minsize_fltoetc('-marm', True)
+def context_linux_thumb_gcc_stripsize_fltoetc():
+ return context_helper_minsize_fltoetc('-mthumb', True)
def context_linux_x64_cpp_exceptions():
# For now rather simple: compile, run, and grep for my_class
@@ -800,10 +815,8 @@ def context_helper_hello_ram(archopt):
def context_linux_x64_hello_ram():
return context_helper_hello_ram('-m64')
-
def context_linux_x86_hello_ram():
return context_helper_hello_ram('-m32')
-
def context_linux_x32_hello_ram():
return context_helper_hello_ram('-mx32')
@@ -967,6 +980,10 @@ def context_linux_x86_graph_hello_size():
return context_linux_graph_hello_size_helper('-m32')
def context_linux_x32_graph_hello_size():
return context_linux_graph_hello_size_helper('-mx32')
+def context_linux_arm_graph_hello_size():
+ return context_linux_graph_hello_size_helper('-marm')
+def context_linux_thumb_graph_hello_size():
+ return context_linux_graph_hello_size_helper('-mthumb')
def context_codemetrics():
def scandir(path):
@@ -1033,18 +1050,29 @@ context_handlers = {
'linux-x64-duk-gxx': context_linux_x64_duk_gxx,
'linux-x64-gcc-defsize-makeduk': context_linux_x64_gcc_defsize_makeduk,
+
'linux-x64-gcc-defsize-fltoetc': context_linux_x64_gcc_defsize_fltoetc,
+ 'linux-x86-gcc-defsize-fltoetc': context_linux_x86_gcc_defsize_fltoetc,
+ 'linux-x32-gcc-defsize-fltoetc': context_linux_x32_gcc_defsize_fltoetc,
+ 'linux-arm-gcc-defsize-fltoetc': context_linux_arm_gcc_defsize_fltoetc,
+ 'linux-thumb-gcc-defsize-fltoetc': context_linux_thumb_gcc_defsize_fltoetc,
'linux-x64-gcc-minsize-fltoetc': context_linux_x64_gcc_minsize_fltoetc,
'linux-x86-gcc-minsize-fltoetc': context_linux_x86_gcc_minsize_fltoetc,
'linux-x32-gcc-minsize-fltoetc': context_linux_x32_gcc_minsize_fltoetc,
+ 'linux-arm-gcc-minsize-fltoetc': context_linux_arm_gcc_minsize_fltoetc,
+ 'linux-thumb-gcc-minsize-fltoetc': context_linux_thumb_gcc_minsize_fltoetc,
'linux-x64-gcc-stripsize-fltoetc': context_linux_x64_gcc_stripsize_fltoetc,
'linux-x86-gcc-stripsize-fltoetc': context_linux_x86_gcc_stripsize_fltoetc,
'linux-x32-gcc-stripsize-fltoetc': context_linux_x32_gcc_stripsize_fltoetc,
+ 'linux-arm-gcc-stripsize-fltoetc': context_linux_arm_gcc_stripsize_fltoetc,
+ 'linux-thumb-gcc-stripsize-fltoetc': context_linux_thumb_gcc_stripsize_fltoetc,
# Jobs matching previous graphs.html data points.
'linux-x64-graph-hello-size': context_linux_x64_graph_hello_size,
'linux-x86-graph-hello-size': context_linux_x86_graph_hello_size,
'linux-x32-graph-hello-size': context_linux_x32_graph_hello_size,
+ 'linux-arm-graph-hello-size': context_linux_arm_graph_hello_size,
+ 'linux-thumb-graph-hello-size': context_linux_thumb_graph_hello_size,
'linux-x64-cpp-exceptions': context_linux_x64_cpp_exceptions,
From db830dc642adcc6ca738dd72c318bd8e1a805dd2 Mon Sep 17 00:00:00 2001
From: Sami Vaarala
Date: Thu, 21 Sep 2017 00:38:16 +0300
Subject: [PATCH 14/22] Benchmarks page updates
---
website/benchmarks.html | 38 +++++++++++++++++++++++++++++++++++---
1 file changed, 35 insertions(+), 3 deletions(-)
diff --git a/website/benchmarks.html b/website/benchmarks.html
index 7c89ad7c..addd9c7d 100644
--- a/website/benchmarks.html
+++ b/website/benchmarks.html
@@ -4,6 +4,7 @@
Duktape benchmarks
+