Browse Source

Merge pull request #1003 from svaarala/exp-operator-website-updates

Website updates for ES7 exponentiation operator
pull/1000/head
Sami Vaarala 8 years ago
committed by GitHub
parent
commit
637ae8ece5
  1. 3
      README.md
  2. 2
      config/config-options/DUK_USE_ES7_EXP_OPERATOR.yaml
  3. 7
      dist-files/README.rst
  4. 4
      website/buildsite.py
  5. 9
      website/guide/compatibility.html
  6. 3
      website/guide/compiling.html
  7. 2
      website/guide/duktapebuiltins.html
  8. 24
      website/guide/es6features.html
  9. 10
      website/guide/es7features.html
  10. 20
      website/guide/intro.html
  11. 5
      website/index/index.html

3
README.md

@ -16,7 +16,8 @@ to call Ecmascript functions from C code and vice versa.
Main features:
* Embeddable, portable, compact
* Ecmascript E5/E5.1 compliant
* Ecmascript E5/E5.1 compliant, some features implemented from
Ecmascript 2015 (E6) and Ecmascript 2016 (E7)
* Khronos/ES6 TypedArray and Node.js Buffer bindings
* Built-in debugger
* Built-in regular expression engine

2
config/config-options/DUK_USE_ES7_EXP_OPERATOR.yaml

@ -5,6 +5,6 @@ tags:
- ecmascript
- ecmascript7
description: >
Support the ES7 exponentation operator (** and **=). This is optional
Support the ES7 exponentiation operator (** and **=). This is optional
because the operator pulls in pow() which may have a significant footprint
impact on bare metal platforms.

7
dist-files/README.rst

@ -7,9 +7,10 @@ intended to be easily embeddable into C programs, with a C API similar in
spirit to Lua's.
Duktape supports the full E5/E5.1 feature set including errors, Unicode
strings, and regular expressions, a subset of E6 features (e.g. computed
property names and Proxy objects), Khronos/ES6 ArrayBuffer/TypedView, and
Node.js Buffer bindings.
strings, and regular expressions, a subset of Ecmascript 2015 (E6) and
Ecmascript 2016 (E7) features (e.g. computed property names, Proxy objects,
exponentiation operator), Khronos/ES6 ArrayBuffer/TypedView, and Node.js
Buffer bindings.
Duktape also provides a number of custom features such as error tracebacks,
additional data types for better C integration, combined reference counting

4
website/buildsite.py

@ -939,7 +939,8 @@ def generateGuide():
navlinks.append(['#ctypes', 'C types'])
navlinks.append(['#typealgorithms', 'Type algorithms'])
navlinks.append(['#duktapebuiltins', 'Duktape built-ins'])
navlinks.append(['#es6features', 'Ecmascript E6 features'])
navlinks.append(['#es6features', 'ES2015 (E6) features'])
navlinks.append(['#es7features', 'ES2016 (E7) features'])
navlinks.append(['#custombehavior', 'Custom behavior'])
navlinks.append(['#customjson', 'Custom JSON formats'])
navlinks.append(['#customdirectives', 'Custom directives'])
@ -990,6 +991,7 @@ def generateGuide():
res += processRawDoc('guide/typealgorithms.html')
res += processRawDoc('guide/duktapebuiltins.html')
res += processRawDoc('guide/es6features.html')
res += processRawDoc('guide/es7features.html')
res += processRawDoc('guide/custombehavior.html')
res += processRawDoc('guide/customjson.html')
res += processRawDoc('guide/customdirectives.html')

9
website/guide/compatibility.html

@ -8,11 +8,16 @@ extensions, frameworks, and test suites.</p>
<p>The main compatibility goal of Duktape is to be Ecmascript E5/E5.1
compatible. Current level of compatibility should be quite high.</p>
<h2 id="compatibility-e6">Ecmascript E6</h2>
<h2 id="compatibility-e6">Ecmascript 2015 (E6)</h2>
<p>Duktape borrows a few features from Ecmascript E6, but generally there
<p>Duktape implements some features from Ecmascript 2015 (E6), but generally there
is no compatibility with E6 yet.</p>
<h2 id="compatibility-e7">Ecmascript 2016 (E7)</h2>
<p>Duktape implements some features from Ecmascript 2016 (E7), but generally there
is no compatibility with E7 yet.</p>
<h2 id="compatibility-e3">Ecmascript E3</h2>
<p>There is no effort to maintain

3
website/guide/compiling.html

@ -65,7 +65,8 @@ architecture detection and use the Duktape default configuration:</p>
features), except for intentional real world compatibility deviations
(see <a href="#custombehavior">Custom behavior</a>)</li>
<li>Khronos/ES6 typed array and Node.js Buffer support</li>
<li>Some <a href="#es6features">features borrowed from ES6</a></li>
<li>Some features from <a href="#es6features">Ecmascript 2015 (E6)</a> and
<a href="#es7features">Ecmascript 2016 (E7)</a></li>
<li>Packed value representation (8 bytes per value) when available,
unpacked value representation (usually 16 bytes per value) when not</li>
<li>Reference counting and mark-and-sweep garbage collection</li>

2
website/guide/duktapebuiltins.html

@ -14,8 +14,6 @@ values.</p>
<tbody>
<tr><td class="propname"><a href="#builtin-duktape">Duktape</a></td>
<td>The Duktape built-in object. Contains miscellaneous implementation specific stuff.</td></tr>
<tr><td class="propname"><a href="#virtualization-proxy-object">Proxy</a></td>
<td>Proxy constructor borrowed from ES6 (not part of Ecmascript E5/E5.1).</td></tr>
</tbody>
</table>

24
website/guide/es6features.html

@ -1,16 +1,14 @@
<h1 id="es6features">Ecmascript E6 features</h1>
<h1 id="es6features">Ecmascript 2015 (E6) features</h1>
<p>This section describes the small set of features Duktape borrows from
<a href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecmascript E6</a>.
These features are not fully compliant; the intent is to minimize custom features
and to align with the ES6 specification when possible.</p>
<p>This section describes the current set of features Duktape implements from
<a href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecmascript 2015 (E6)</a>.
Many of the features can be disabled through config options such as
<code>DUK_USE_ES6_PROXY</code> and <code>DUK_USE_BUFFEROBJECT_SUPPORT</code>.</p>
<h2 id="es6-regexp-syntax">ES6 Annex B RegExp syntax</h2>
<p>Duktape supports some of the additional RegExp syntax defined in
<a href="http://www.ecma-international.org/ecma-262/6.0/#sec-regular-expressions-patterns">ES6 Annex B.1.4</a>.
These features can be enabled/disabled using the <code>DUK_USE_ES6_REGEXP_SYNTAX</code>
config option (enabled by default).</p>
<a href="http://www.ecma-international.org/ecma-262/6.0/#sec-regular-expressions-patterns">ES6 Annex B.1.4</a>.</p>
<h2 id="es6-const">Const variables</h2>
@ -45,10 +43,6 @@ but is compatible with existing code base which has relied on a non-standard
<code>__proto__</code> property for a while. Duktape does not support the
<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>
<p>These custom features can be disabled by disabling the config options
<code>DUK_USE_ES6_OBJECT_SETPROTOTYPEOF</code> and
<code>DUK_USE_ES6_OBJECT_PROTO_PROPERTY</code>.</p>
<h2 id="es6-proxy">Proxy object (subset)</h2>
<p>The Ecmascript E6 <code>Proxy</code> object allows property virtualization
@ -97,11 +91,7 @@ ES6. The following traps are implemented:</p>
enforces it to simplify the internal implementation.</li>
</ul>
<p>This custom feature can be disabled by disabling the config option
<code>DUK_USE_ES6_PROXY</code>.</p>
<h2 id="es6-typedarray">Typed arrays</h2>
<p>Duktape implements Khronos typed array support which is a subset of ES6
typed arrays. Support for typed arrays and Node.js Buffer can be disabled
by disabling the config option <code>DUK_USE_BUFFEROBJECT_SUPPORT</code>.</p>
typed arrays.</p>

10
website/guide/es7features.html

@ -0,0 +1,10 @@
<h1 id="es7features">Ecmascript 2016 (E7) features</h1>
<p>This section describes the current set of features Duktape implements from
<a href="http://www.ecma-international.org/ecma-262/7.0/index.html">Ecmascript 2016 (E7)</a>.
Some features can be disabled through config options such as
<code>DUK_USE_ES7_EXP_OPERATOR</code>.</p>
<h2 id="es7-exp-operator">ES7 exponentiation operator (** and **=)</h2>
<p>The <code>**</code> and <code>**=</code> operators are supported.</p>

20
website/guide/intro.html

@ -40,18 +40,16 @@ Ecmascript throughout to refer to the language implemented by Duktape.</p>
<h2>Conformance</h2>
<p>Duktape conforms to the following Ecmascript specifications:</p>
<p>Duktape conforms to ES5.0/ES5.1:</p>
<ul>
<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>
<li><a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf">Edition 5.1 (E5.1)</a>
(as <a href="http://www.ecma-international.org/ecma-262/5.1/">HTML</a>)</li>
<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>
<li><a href="http://www.ecma-international.org/ecma-262/5.1/">ECMAScript&#x00ae; Language Specification 5.1 Edition</a></li>
</ul>
<p>Duktape borrows
<a href="#es6features">a few features</a> from Ecmascript E6:</p>
<p>Some features from Ecmascript 2015 (E6) and Ecmascript 2016 (E7) are implemented:</p>
<ul>
<li><a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf">Edition 6 (E6)</a>
(as <a href="http://www.ecma-international.org/ecma-262/6.0/index.html">HTML</a>)</li>
<li><a href="http://www.ecma-international.org/ecma-262/6.0/">ECMAScript&#x00ae; 2015 Language Specification</a></li>
<li><a href="http://www.ecma-international.org/ecma-262/7.0/">ECMAScript&#x00ae; 2016 Language Specification</a></li>
</ul>
<p>TypedArray support is based on Khronos TypedArray specification with some
@ -75,9 +73,10 @@ features (some are visible to applications, while others are internal):</p>
<li>Khronos/ES6 <a href="https://www.khronos.org/registry/typedarray/specs/latest/">TypedArray</a>
and <a href="https://nodejs.org/docs/v0.12.1/api/buffer.html">Node.js Buffer</a> bindings,
plain buffer type (lightweight ArrayBuffer)</li>
<li>Borrowed from ES6: <code>setPrototypeOf</code>/<code>__proto__</code>,
<li>From Ecmascript 2015 (E6): <code>setPrototypeOf</code>/<code>__proto__</code>,
a subset of <code>Proxy</code> objects, computed property names,
and minimal <code>const</code> support</li>
<li>From Ecmascript 2016 (E7): exponentiation operator (<code>**</code>, <code>**=</code>)</li>
<li>Duktape specific built-ins: provided by the <code>Duktape</code> global object</li>
<li>Extended types: custom "buffer" and "pointer" types, extended string type
which supports arbitary binary strings and
@ -155,7 +154,8 @@ wrappers are discussed in detail.</p>
<p>Duktape specific Ecmascript features are discussed in multiple sections:
<a href="#typealgorithms">Type algorithms</a> (for custom types),
<a href="#duktapebuiltins">Duktape built-ins</a> (additional built-ins),
<a href="#es6features">Ecmascript E6 features</a> (features borrowed from ES6),
<a href="#es6features">Ecmascript 2015 (E6) features</a> (features implemented from ES6),
<a href="#es7features">Ecmascript 2016 (E7) features</a> (features implemented from ES7),
<a href="#custombehavior">Custom behavior</a> (behavior differing from standard),
<a href="#customjson">Custom JSON formats</a>,
<a href="#customdirectives">Custom directives</a>,

5
website/index/index.html

@ -39,8 +39,9 @@ Duktape API to call Ecmascript functions from C code and vice versa.</p>
<li>Embeddable, portable, compact:
can run on platforms with 192kB flash and 64kB system RAM</li>
<li><a href="http://www.ecma-international.org/ecma-262/5.1/">Ecmascript E5/E5.1</a>
compliant, some features borrowed from
<a href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecmascript E6</a></li>
compliant, some features implemented from
<a href="http://www.ecma-international.org/ecma-262/6.0/index.html">Ecmascript 2015 (E6)</a> and
<a href="http://www.ecma-international.org/ecma-262/7.0/index.html">Ecmascript 2016 (E7)</a></li>
<li>Khronos/ES6 <a href="https://www.khronos.org/registry/typedarray/specs/latest/">TypedArray</a>
and <a href="https://nodejs.org/docs/v0.12.1/api/buffer.html">Node.js Buffer</a> bindings</li>
<li>Built-in debugger</li>

Loading…
Cancel
Save