Browse Source

Merge pull request #1441 from svaarala/global-binding-configurable

Global binding configurable and disabled by default
pull/1447/head
Sami Vaarala 8 years ago
committed by GitHub
parent
commit
57d5e0c665
  1. 9
      RELEASES.rst
  2. 10
      config/config-options/DUK_USE_GLOBAL_BINDING.yaml
  3. 1
      src-input/builtins.yaml
  4. 2
      util/makeduk_base.yaml

9
RELEASES.rst

@ -2538,10 +2538,11 @@ Planned
* Add ES2015 Annex B HTML comment syntax (GH-1435, GH-1436, GH-1438)
* Add a "global" property to the global object to provide easy access to the
global object itself without needing idioms like
"new Function('return this')()"; implemented based on
https://github.com/tc39/proposal-global (GH-1259, GH-1260)
* Add an experimental "global" property to the global object to provide easy
access to the global object itself without needing idioms like
"new Function('return this')()"; experimental, implemented based on
https://github.com/tc39/proposal-global, enable using DUK_USE_GLOBAL_BINDING
(GH-1259, GH-1260, GH-1441)
* Spawn the ArrayBuffer object backing a typed array lazily when its .buffer
property is first read, reducing memory usage in common cases where the view

10
config/config-options/DUK_USE_GLOBAL_BINDING.yaml

@ -0,0 +1,10 @@
define: DUK_USE_GLOBAL_BINDING
introduced: 2.1.0
default: false
tags:
- ecmascript
- experimental
description: >
Provide a 'global' binding (https://github.com/tc39/proposal-global).
Disabled by default because it's still a proposal and there may be
reasons it won't be widely implemented: https://github.com/tc39/proposal-global/issues/20.

1
src-input/builtins.yaml

@ -177,6 +177,7 @@ objects:
attributes: "wc"
# This could be stripped when DUK_USE_GLOBAL_BUILTIN is disabled
# but keep for now (the property is quite fundamental).
present_if: DUK_USE_GLOBAL_BINDING
- key: "NaN"
value:

2
util/makeduk_base.yaml

@ -72,3 +72,5 @@ DUK_USE_FASTINT: true
DUK_USE_JSON_STRINGIFY_FASTPATH: true
DUK_USE_SYMBOL_BUILTIN: true
DUK_USE_GLOBAL_BINDING: true

Loading…
Cancel
Save