Skip to content

Commit 178cecb

Browse files
committed
Website updates for ES6 and ES7
* Use Ecmascript 2015 (E6) and Ecmascript 2016 (E7) to reference the specifications. * Add ES7 exponentiation operator.
1 parent 4162940 commit 178cecb

8 files changed

Lines changed: 42 additions & 35 deletions

File tree

website/buildsite.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,8 @@ def generateGuide():
939939
navlinks.append(['#ctypes', 'C types'])
940940
navlinks.append(['#typealgorithms', 'Type algorithms'])
941941
navlinks.append(['#duktapebuiltins', 'Duktape built-ins'])
942-
navlinks.append(['#es6features', 'Ecmascript E6 features'])
942+
navlinks.append(['#es6features', 'ES2015 (E6) features'])
943+
navlinks.append(['#es7features', 'ES2016 (E7) features'])
943944
navlinks.append(['#custombehavior', 'Custom behavior'])
944945
navlinks.append(['#customjson', 'Custom JSON formats'])
945946
navlinks.append(['#customdirectives', 'Custom directives'])
@@ -990,6 +991,7 @@ def generateGuide():
990991
res += processRawDoc('guide/typealgorithms.html')
991992
res += processRawDoc('guide/duktapebuiltins.html')
992993
res += processRawDoc('guide/es6features.html')
994+
res += processRawDoc('guide/es7features.html')
993995
res += processRawDoc('guide/custombehavior.html')
994996
res += processRawDoc('guide/customjson.html')
995997
res += processRawDoc('guide/customdirectives.html')

website/guide/compatibility.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ <h2 id="compatibility-e5">Ecmascript E5 / E5.1</h2>
88
<p>The main compatibility goal of Duktape is to be Ecmascript E5/E5.1
99
compatible. Current level of compatibility should be quite high.</p>
1010

11-
<h2 id="compatibility-e6">Ecmascript E6</h2>
11+
<h2 id="compatibility-e6">Ecmascript 2015 (E6)</h2>
1212

13-
<p>Duktape borrows a few features from Ecmascript E6, but generally there
13+
<p>Duktape implements some features from Ecmascript 2015 (E6), but generally there
1414
is no compatibility with E6 yet.</p>
1515

16+
<h2 id="compatibility-e7">Ecmascript 2016 (E7)</h2>
17+
18+
<p>Duktape implements some features from Ecmascript 2016 (E7), but generally there
19+
is no compatibility with E7 yet.</p>
20+
1621
<h2 id="compatibility-e3">Ecmascript E3</h2>
1722

1823
<p>There is no effort to maintain

website/guide/compiling.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ <h3>Preconfigured sources and default configuration</h3>
6565
features), except for intentional real world compatibility deviations
6666
(see <a href="#custombehavior">Custom behavior</a>)</li>
6767
<li>Khronos/ES6 typed array and Node.js Buffer support</li>
68-
<li>Some <a href="#es6features">features borrowed from ES6</a></li>
68+
<li>Some features from <a href="#es6features">Ecmascript 2015 (E6)</a> and
69+
<a href="#es7features">Ecmascript 2016 (E7)</a></li>
6970
<li>Packed value representation (8 bytes per value) when available,
7071
unpacked value representation (usually 16 bytes per value) when not</li>
7172
<li>Reference counting and mark-and-sweep garbage collection</li>

website/guide/duktapebuiltins.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ <h2>Additional global object properties</h2>
1414
<tbody>
1515
<tr><td class="propname"><a href="#builtin-duktape">Duktape</a></td>
1616
<td>The Duktape built-in object. Contains miscellaneous implementation specific stuff.</td></tr>
17-
<tr><td class="propname"><a href="#virtualization-proxy-object">Proxy</a></td>
18-
<td>Proxy constructor borrowed from ES6 (not part of Ecmascript E5/E5.1).</td></tr>
1917
</tbody>
2018
</table>
2119

website/guide/es6features.html

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
<h1 id="es6features">Ecmascript E6 features</h1>
1+
<h1 id="es6features">Ecmascript 2015 (E6) features</h1>
22

3-
<p>This section describes the small set of features Duktape borrows from
4-
<a href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecmascript E6</a>.
5-
These features are not fully compliant; the intent is to minimize custom features
6-
and to align with the ES6 specification when possible.</p>
3+
<p>This section describes the current set of features Duktape implements from
4+
<a href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecmascript 2015 (E6)</a>.
5+
Many of the features can be disabled through config options such as
6+
<code>DUK_USE_ES6_PROXY</code> and <code>DUK_USE_BUFFEROBJECT_SUPPORT</code>.</p>
77

88
<h2 id="es6-regexp-syntax">ES6 Annex B RegExp syntax</h2>
99

1010
<p>Duktape supports some of the additional RegExp syntax defined in
11-
<a href="http://www.ecma-international.org/ecma-262/6.0/#sec-regular-expressions-patterns">ES6 Annex B.1.4</a>.
12-
These features can be enabled/disabled using the <code>DUK_USE_ES6_REGEXP_SYNTAX</code>
13-
config option (enabled by default).</p>
11+
<a href="http://www.ecma-international.org/ecma-262/6.0/#sec-regular-expressions-patterns">ES6 Annex B.1.4</a>.</p>
1412

1513
<h2 id="es6-const">Const variables</h2>
1614

@@ -45,10 +43,6 @@ <h2 id="es6-proto">Object.setPrototypeOf and Object.prototype.__proto__</h2>
4543
<code>__proto__</code> property for a while. Duktape does not support the
4644
<a href="http://www.ecma-international.org/ecma-262/6.0/index.html#sec-__proto__-property-names-in-object-initializers">__proto__ property name in an object initializer</a>.</p>
4745

48-
<p>These custom features can be disabled by disabling the config options
49-
<code>DUK_USE_ES6_OBJECT_SETPROTOTYPEOF</code> and
50-
<code>DUK_USE_ES6_OBJECT_PROTO_PROPERTY</code>.</p>
51-
5246
<h2 id="es6-proxy">Proxy object (subset)</h2>
5347

5448
<p>The Ecmascript E6 <code>Proxy</code> object allows property virtualization
@@ -97,11 +91,7 @@ <h2 id="es6-proxy">Proxy object (subset)</h2>
9791
enforces it to simplify the internal implementation.</li>
9892
</ul>
9993

100-
<p>This custom feature can be disabled by disabling the config option
101-
<code>DUK_USE_ES6_PROXY</code>.</p>
102-
10394
<h2 id="es6-typedarray">Typed arrays</h2>
10495

10596
<p>Duktape implements Khronos typed array support which is a subset of ES6
106-
typed arrays. Support for typed arrays and Node.js Buffer can be disabled
107-
by disabling the config option <code>DUK_USE_BUFFEROBJECT_SUPPORT</code>.</p>
97+
typed arrays.</p>

website/guide/es7features.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<h1 id="es7features">Ecmascript 2016 (E7) features</h1>
2+
3+
<p>This section describes the current set of features Duktape implements from
4+
<a href="http://www.ecma-international.org/ecma-262/7.0/index.html">Ecmascript 2016 (E7)</a>.
5+
Some features can be disabled through config options such as
6+
<code>DUK_USE_ES7_EXP_OPERATOR</code>.</p>
7+
8+
<h2 id="es7-exp-operator">ES7 exponentiation operator (** and **=)</h2>
9+
10+
<p>The <code>**</code> and <code>**=</code> operators are supported.</p>

website/guide/intro.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,16 @@ <h2>What is Duktape?</h2>
4040

4141
<h2>Conformance</h2>
4242

43-
<p>Duktape conforms to the following Ecmascript specifications:</p>
43+
<p>Duktape conforms to ES5.0/ES5.1:</p>
4444
<ul>
45-
<li><a href="http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262%205th%20edition%20December%202009.pdf">Edition 5 (E5)</a></li>
46-
<li><a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf">Edition 5.1 (E5.1)</a>
47-
(as <a href="http://www.ecma-international.org/ecma-262/5.1/">HTML</a>)</li>
45+
<li><a href="http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262%205th%20edition%20December%202009.pdf">ECMAScript Language Specification 5th Edition</a></li>
46+
<li><a href="http://www.ecma-international.org/ecma-262/5.1/">ECMAScript&#x00ae; Language Specification 5.1 Edition</a></li>
4847
</ul>
4948

50-
<p>Duktape borrows
51-
<a href="#es6features">a few features</a> from Ecmascript E6:</p>
49+
<p>Some features from Ecmascript 2015 (E6) and Ecmascript 2016 (E7) are implemented:</p>
5250
<ul>
53-
<li><a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf">Edition 6 (E6)</a>
54-
(as <a href="http://www.ecma-international.org/ecma-262/6.0/index.html">HTML</a>)</li>
51+
<li><a href="http://www.ecma-international.org/ecma-262/6.0/">ECMAScript&#x00ae; 2015 Language Specification</a></li>
52+
<li><a href="http://www.ecma-international.org/ecma-262/7.0/">ECMAScript&#x00ae; 2016 Language Specification</a></li>
5553
</ul>
5654

5755
<p>TypedArray support is based on Khronos TypedArray specification with some
@@ -75,9 +73,10 @@ <h2>Features</h2>
7573
<li>Khronos/ES6 <a href="https://www.khronos.org/registry/typedarray/specs/latest/">TypedArray</a>
7674
and <a href="https://nodejs.org/docs/v0.12.1/api/buffer.html">Node.js Buffer</a> bindings,
7775
plain buffer type (lightweight ArrayBuffer)</li>
78-
<li>Borrowed from ES6: <code>setPrototypeOf</code>/<code>__proto__</code>,
76+
<li>From Ecmascript 2015 (E6): <code>setPrototypeOf</code>/<code>__proto__</code>,
7977
a subset of <code>Proxy</code> objects, computed property names,
8078
and minimal <code>const</code> support</li>
79+
<li>From Ecmascript 2016 (E7): exponentiation operator (<code>**</code>, <code>**=</code>)</li>
8180
<li>Duktape specific built-ins: provided by the <code>Duktape</code> global object</li>
8281
<li>Extended types: custom "buffer" and "pointer" types, extended string type
8382
which supports arbitary binary strings and
@@ -155,7 +154,8 @@ <h2>Document organization</h2>
155154
<p>Duktape specific Ecmascript features are discussed in multiple sections:
156155
<a href="#typealgorithms">Type algorithms</a> (for custom types),
157156
<a href="#duktapebuiltins">Duktape built-ins</a> (additional built-ins),
158-
<a href="#es6features">Ecmascript E6 features</a> (features borrowed from ES6),
157+
<a href="#es6features">Ecmascript 2015 (E6) features</a> (features implemented from ES6),
158+
<a href="#es7features">Ecmascript 2016 (E7) features</a> (features implemented from ES7),
159159
<a href="#custombehavior">Custom behavior</a> (behavior differing from standard),
160160
<a href="#customjson">Custom JSON formats</a>,
161161
<a href="#customdirectives">Custom directives</a>,

website/index/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ <h1>Main features</h1>
3939
<li>Embeddable, portable, compact:
4040
can run on platforms with 192kB flash and 64kB system RAM</li>
4141
<li><a href="http://www.ecma-international.org/ecma-262/5.1/">Ecmascript E5/E5.1</a>
42-
compliant, some features borrowed from
43-
<a href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecmascript E6</a></li>
42+
compliant, some features implemented from
43+
<a href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecmascript 2015 (E6)</a> and
44+
<a href="http://www.ecma-international.org/ecma-262/7.0/index.html">Ecmascript 2016 (E7)</a></li>
4445
<li>Khronos/ES6 <a href="https://www.khronos.org/registry/typedarray/specs/latest/">TypedArray</a>
4546
and <a href="https://nodejs.org/docs/v0.12.1/api/buffer.html">Node.js Buffer</a> bindings</li>
4647
<li>Built-in debugger</li>

0 commit comments

Comments
 (0)