Draft Specification for ES.next (Ecma-262 Edition 6)

This page contains a historical record of working draft of the ES.next specification prepared by the project editor.

Errors in the current draft should be reported as bugs at bugs.ecmascript.org. Report the version you are reading, and an appropriate “component” (editorial issues, technical issues, etc.). Such bug reports are particularly useful for specific bugs such as misspellings or errors in algorithms.

An unofficial HTML version of the Edition 6 working draft is usually available at http://people.mozilla.org/~jorendorff/es6-draft.html]. Note that this HTML version may not always be up to date with the current working draft below.

Some Guidelines for Reading these Drafts

For now, all draft found here are snapshots taken of the project editor’s working draft. Snapshots are taken at fairly arbitrary points in time. The drafts are still far from being complete, often have incomplete treatment of new features, and sometimes are captured in the middle of some major refactoring. Many features that are intended for the next edition may not yet be included in any particular draft. Incomplete material and undecided issues are often marked with marginal notes within the document.

It is reasonable to assume that the editor is aware of the major inconsistencies or missing material, but you can’t over report. So if you see something that you think is important to capture, file a bug.

The rationale for design decisions, are not generally part of the specification. You can find background information on this wiki and in the archives of the es-discuss mailing list. If you want to discuss why certain decisions were made or want to argue for an alternative then you should post messages about specific issues to es-discuss.

The primary target audience of this specification is implementors who must create highly interoperable ECMAScript implementations. In one sense, the specification is all about the edge cases that implementors must get exactly right in order to be completely interoperable. Next comes the authors of interoperability and conformance test suites, such as test262. They need to write tests that help implementors conform to the specification. Third in priority, are sophisticated authors and educator. These are the people who will teach the language to the world, and like implementors, they need to know (or at least lookup) edge case behavior.

This is not intended as a document for everyday ECMAScript coders (although some will use it). It is also not a tutorial on either language design in general, language theory, or the design process behind its creation. The spec. also isn’t particularly targeted towards academics. We certainly want to have a sound language and where necessary TC39 members may prove characteristics of certain features. But such material is not necessarily included in the specification.

We generally within the specification try to minimize tutorial material (eg examples) and redundancy between normative prose descriptions and normative algorithms. Redundant descriptions has historically resulted in internal inconsistencies. We have also seen cases where implementors follow incomplete prose descriptions without referring to the more complete algorithm. For these reasons, much of the redundant prose from previous editions is being converted into non-normative notes. In general, examples are only used if they seem necessary to clarify some difficult to understand normative point. Sometimes an example is used in order to make it clear that some unusual design point is intentional and not a bug in the specification. The spec. generally does not discuss what a feature is good for or how to use it. Having said all that, the spec. doesn’t always follow these guidelines. We working on the 6th edition of a fifteen year old document and sometimes older material doesn’t follow newer conventions. Cleaning this up is mostly a “if time is available” task.

We generally don’t include non-normative rationale material. It would be great for somebody to create a document explaining all of the design rationales for the language. But I the editor doesn’t have the time to do both that and to also produce the actual specification. Rationale material can be mined from es-discuss threads, on wiki.ecmascript.org, and in TC39 minutes.

Current Working Draft

January 15, 2015 Draft Rev 31

pdf, no change markup pdf with rev31 change markup pdf with cumulative change markup since rev22
Changes marked as “Rev 31“.

Changes include: Updated specification to use and support the new built-in subclassing scheme described at: https://github.com/tc39/ecma262/blob/master/workingdocs/ES6-super-construct%3Dproposal.md

  • Added newTarget parameter to [[Construct]], Reflect.construct, and proxy ‘construct’ trap.
  • Added NewTarget binding to Function Environment Records and abstract operations/methods of setting and accessing that binding
  • Redefined [[Construct]] for ordinary ECMAScript functions so “derived” constructors don’t preallocate the new object and bind this.
  • Changed [[Construct]] for ordinary ECMAScript functions so “derived” constructors will throw if they try to explicitly return a non-object.
  • Within constructors this binding has TDZ access semantics.
  • super(...) syntactic form now illegal in Function/GeneratorDeclaration/Expression
  • super(...) and new super(...) propagates current NewTarget to [[Construct]] call
  • super(...) binds this value upon return from [[Construct]] call, throw if new already bound
  • Refactored [[Call]] and [[Construct]] for ordinary ECMAScript functions so they can continue to shared common spec steps.
  • Updated Generator object instantiation to work with new [[Construct]] design
  • Refactored Function constructor and GeneratorFunction to share a common abstract operation based definition
  • Every built-in constructor changed to merge object allocation and initialization code. In some cases (eg, TypedArray and Promise) significant refactoring of allocation and initialization logic.
  • Updated [[Construct]] of Bound functions to handle newTarget parameter.
  • Several of the above items are tentative because they still lack full TC39 discussion and review. The following are particularly tentative:
    • restrictions on where super(...) is allowed may change
    • new super(...) might go away or change
    • Support for the new.target access syntax (yellow highlight in spec text) is speculative and may move to ES7 and/or change

Other changes

  • Merged AllocArrayBuffer and SetArrayBufferData into single abstract operation
  • %TypedArray%.of now requires that its this value is a valid Typed Array constructor
  • Replaced “moduleId” with “sourceCodeId” and eliminated most usage of such ids in module related abstract operations
  • Some tweaking of Language Overview in 4.2
  • A new document title
  • Resolved bugs: 3543-3527, 3524-3523, 3520, 3517-3516, 3514-3511, 3501-3496, 3494-3479, 3310, 3229, 3136, 2865, 2536, 2495, 2179

Previous Drafts

December 24, 2014 Draft Rev 30

pdf, no change markup pdf with rev30 change markup pdf with cumulative change markup since rev22
Changes marked as “Rev 30“.

Changes include:

  • Made it a runtime error to try to create a subclass of a generator function via a class declaration or class expression.
  • Correct bugs in String.prototype.match/replace/search/split in the logic for double dispatching to a RegExp agument
  • Added language in 8.4 making it explicit that ES Jobs always run to completion
  • Class name is in TDZ during extends clause evaluation
  • Added static semantics that correctly validates statement label usage.
  • Array.prototype.concat/push/splice throw TypeError if new length would be 2^53 or greater. (Bug 3409)
  • Defined the Annex B (B.1.3) lexical grammar extensions for recognizing legacy HTML-like comments
  • Added a forbidden extension item that forbids supporting HTML-line comments within modules.
  • Additional early error for super() in non-constructor methods. (Already had an error for new super()).
  • Object.prototype.toString now uses IsArray to when testing for built-in exotic array instances.
  • IsArray abstract operation now longer throws if argument is a revoked proxy. It just returns false.
  • Simplified and corrected early error naming rules for module exports
  • Fixed several left-to-right evaluation order initialization bugs in various declaration forms
  • Resolved bugs: 3476-3445, 3443, 3441-3434, 3430-428, 3425-418, 3416-3411, 3409-3407, 3405-3404, 3396, 3306, 3284, 3269, 3264, 3230, 3214-3213, 2911, 2838, 2610, 2437, 1467, 1204, 935, 708, 631, 512, 509, 499, 170, 159

December 6, 2014 Draft Rev 29

pdf, no change markup pdf with rev29 change markup pdf with cumulative change markup since rev22
Changes marked as “Rev 29“.

Changes include:

  • Support for normalizing relative module name
  • RexExp constructor no longer throws when the first argument is a RegExp and the second argument is present. Instead it creates a new RegExp using the same patterns as the first arguments and the flags supplied by the second argument.
  • Added ‘flags’ method to RegExp.prototype that returns a string containing the flag characters. This enables generic RegExp algorithms to pass through new flags added by RegExp subclasses.
  • Updated RegExp.prototype.split to work with RegExp subclass that over-ride exec to change the default matching algorithm.
  • Eliminated WeakMap/WeakSet clear methods
  • String.prototype.includes replaces String.prototype.contains
  • Symbols @@match, @@replace, @@search, @@split, replace the corresponding string property names in RegExp prototype
  • Eliminate @@isRegExp and Symbol.isRegExp
  • Some cleanup of RegExp constructor to better support RegExp subclassing
  • The this binding at the top level of a module has the value undefined.
  • @@species defined on RegExp, Array, %TypedArray%, Map, Set, ArrayBuffer, Promise
  • @@species pattern used to create derived instances of RegExp, Array, %TypeArray%, ArrayBuffer, and Promise, eliminates Zepto breakage
  • Within the spec, « » now used to bracket literal List values
  • Eliminated deferred throw of first exception from Object.assign, Object.create, Object.defineProperties, Object.freeze, Object.seal, Object.isFrozen, Object.isSealed
  • Template call sites objects are now canonicalized per realm, based upon their list of raw strings.
  • Assigning to a const declared binding throw, even in non-strict mode code.
  • Eliminated requirement to statically find and report assign to const declared names.
  • Made it a runtime error for a global let/const/class declaration to shadow a non-configurable property of global object.
  • Eliminated unnecessary and observable (via strict get accessor) boxing before/in calls to GetIterator. This also makes ToObject unnecessary on RHS of destructuring assignment/binding
  • Eliminate ToObject application to target argument of Reflect functions. Passing primitive values as targets now throw
  • export default ClassDeclaration is now legal, includes allowing anonymous class declarations as default export
  • Resolved bugs: 3403-3402, 3397, 3394-3393, 3390-3387, 3384, 3382-3371, 3369-3311, 3309-3308, 3305, 3301-3300, 3298, 3296-3295, 3293, 3289-3287, 3285, 3282-3281, 3267, 3261, 3257-3256, 3253, 3237, 3151, 3148, 3063, 3006, 2662, 2585, 2368, 1232, 522

October 14, 2014 Draft Rev 28

pdf, no change markup pdf with rev28 change markup pdf with cumulative change markup since rev22
Changes marked as “Rev 28“.

Changes include:

  • Removed loader pipeline and Reflect.Loader API (functionality being transferred to separate specification)
  • Stream-lined module linking semantics for declarative modules.
  • Added Module request task
  • Removed Module declaration
  • Update Import declaration to include module imports.
  • Updated default export syntax and semantics to support export of anonymous default functions
  • Added Module Environment Records and indirect (import) bindings
  • Added Module evaluation jobs
  • Added Host hooks for module name normalization and source access.
  • Finished up ES6 eval function semantics
  • Eliminated unused abstract operations, PromiseAll, PromiseCatch, PromiseThen
  • Modified Promise.all so specification internally uses a List instead of an Array to accumulate result promises
  • Added @@iterator property to %IteratorPrototype%
  • Added requirement that the object returned by ordinary object [[Enumerate]] must inherit from %IteratorPrototype%
  • Removed own @@iterator properties from various standard iterators, they now inherit it from %IteratorPrototype%
  • Updated ToPropertyKey to accept Symbol wrapper objects, similar to how other primitive coercion abstract operations handle wrapper objects
  • ToNumber now recognizes binary and octal string numeric values.
  • Significant fix to destructuring assignment where the rest assignment target is itself a destructuring pattern
  • Changed ordinary object creation to dispatch object allocation through [[CreateAction]] internal slot instead of @@create method.
  • Converted all @@create methods into CreateAction abstract operations.
  • Eliminated Symbol.create and @@create.
  • super without an immediately following property specifier is now illegal in all MethodDefinition (no more implicit super using current method name)
  • super in a constructor call expression references the constructor’s [[Prototype]]
  • Function.prototype.toMethod no longer takes an optional name argument
  • Updated Annex A Grammars to match ES6
  • Resolved bugs: 3278-3273, 3271-3270, 3268, 3266, 3263-3262, 3260-3258, 3255-3254, 3252, 3247, 3245, 3243-3238, 3236-3231, 3228-3224, 3222-3221, 3218, 3216-3215, 3211-3207, 3204-3162, 3159-3151, 3149, 3144, 3132, 3130-3129, 3123, 3119, 3106, 3104, 3094, 3013, 2999, 2996, 2972, 2947, 2852, 2834, 2820-2819, 2812, 2792, 2726, 2684, 2683, 2524, 2341, 2302, 2039, 1788, 1608, 1595, 1111, 949, 921, 502, 164, 151

August 24, 2014 Draft Rev 27

pdf, no change markup pdf with rev27 change markup pdf with cumulative change markup since rev22
Changes marked as “Rev 27“.

Changes include:

  • Fixed scoping bug in for-of, catch clause, comprehensions WRT TDZ for iteration bindings. see bug: https://bugs.ecmascript.org/show_bug.cgi?id=3011
  • For-in/for-of loop bodies can’t contain tail calls because of need to close the iterator on abrupt completion.
  • [[OwnPropertyKeys]] now returns a List rather than an Array
  • Tests of @@isRegExp are now based on ToBoolean(Get(obj, @@isRegExp)
  • Array find/findIndex no longer ignore array element holes.
  • Added %IteratorPrototype% that all built-in iterators inherit from.
  • Destructoring now performs ToObject on values to be destructured.
  • Array and generator comprehensions removed from language
  • Removed specification of Reflect.Realm
  • Object.assign ignores null and undefined source arguments
  • Added 16.1 that lists forbidden extensions.
  • Some editorial cleanup of Function.prototype.toString
  • Removed all explicit poison pill methods on functions (except for Function.prototype) and added 16.1 restrictions on such extensions.
  • String(aSymbol) now returns the symbol’s description. Does not change ToString(symbol) throwing ever where else.
  • aSymbol == Object(aSymbol) now is true, just like other wrapable primitives, see bug: https://bugs.ecmascript.org/show_bug.cgi?id=3066
  • Tighten specification of when Array.prototype.sort is implementation defined
  • Revised @@unscopable semantics as per last TC39 meeting
  • Made it an error to reentrantly enter a generator via next/throw/return.
  • Further work on semantics of Generator return method in the context of yield*
  • The term “neutered” has been replaced with the term “detached”
  • Resolved bugs: 3147, 3142-3140, 3135-3133, 3131, 3128-3124, 3122-3120, 3117, 3115, 3111-3107, 3105, 3103-3098, 3096-3095, 3093-3092, 3090-3089, 3087-3082, 3080-3062, 3060-3016, 3012-3011, 3005, 2987, 2979, 2976, 2831, 2389, 2368, 1908, 523, 516, 513, 407, 91

July 18, 2014 Draft Rev 26

pdf, no change markup pdf with rev26 change markup pdf with cumulative change markup since rev22
Changes marked as “Rev 26“.

Changes include:

  • Terminology change: “Task” is replaced by “Job”.
  • GetMethod now treats null and undefined equivalently as meaning no method available.
  • Eliminated the ability of Proxy handlers to extend the set of property descriptor attributes they expose vis [[GetOwnProperty]]
  • Added invariant checks for Proxy [[OwnPropertyNames]] internal method
  • Revisited @@unscopable support in Object Environment Records
  • Updated Annex C (strict mode summary) WRT ES 6 changes and extensions.
  • Eliminated duplicate property name restrictions on object literals and class definitions
  • For-of now throws if iterable value is null or undefined (also reverted comprehensions to throwing for that case)
  • Date.prototype.toString now uses NaN as its time value when applied to an object with out a [[DateValue]]
  • Function poision-pill caller and arguments properties are now configurable
  • await is a FutureReservedWord when parsing and Module is the syntactic grammar goal symbol
  • Better integration of O.p.toLocaleString and String.p.toLocaleString with Ecma-402
  • Annex B support for function declarations in IfStatmentClauses
  • Annex B (and 13.12) support for legacy labelled FunctionDeclarations.
  • Another round of updates to 9.2.13 FunctionDeclarationInstanations to fix various scoping bugs.
  • Updated Symbol conversions: aSym == “not a symbol” produces false. var s=Symbol(); s==Object(s) produces true. foo”+aSymbol or aSymbol+”foo” throws TypeError. Symbol @@toPrimitive returns the wrappered symbol value. ToNumber(aSymbol) throws.
  • Spread now works on strings: var codeUnits = [...”this is a string”];
  • yield * now works with strings: function * getchars(str) {yield * str}
  • Added name property for bound functions in F.p.bind. Fixed bugs in generating length property in F.p.bind
  • Tweaked Script GlobalDeclarationInstantiations to deal with error situations that could arise from misusing proxies for the global object.
  • Added an informative generator function based definition for ordinary object [[Enumerate]]
  • Changed handling of NaN returned from a sort comparefn to match web reality. See bug https://bugs.ecmascript.org/show_bug.cgi?id=2978
  • Generator object return method/For-of/in loops use return method on generators
  • Resolved bugs: 3010, 3004-3000, 2992, 2990-2988, 2984-2983, 2981-2980, 2978-2977, 2975, 2971-2948, 2946-2937, 2935-2922, 2919, 2917, 2915, 2910-2891, 2888-2884, 2880, 2875, 2840, 2828, 2813, 2811, 2803, 2799, 2778-2777, 2721-2720, 2718-2717, 2682, 2636, 2634, 2594-2592, 2590-2589, 2587, 2564, 2488, 2411, 2365, 2360, 2324, 2315, 2080, 2053, 2049, 1797, 1789, 1762, 1459, 1444-1443, 1341, 1267-1266, 1142, 977, 944, 522, 519

May 22, 2014 Draft Rev 25

pdf, no change markup pdf with rev25 change markup pdf with cumulative change markup since rev22
Changes marked as “Rev 25“.

Changes include:

  • Added Content of 8.5 Initialization (of the ES execution environment)
  • Additional cleanup/refactoring of Realm initialization
  • Changed Object.prototype.toString default result for Proxy objects
  • Made toMethod work for bound functions
  • Made comprehensions do 0 iterations if value of for-of expression is undefined or null to be consistent with for-in/of statements.
  • Strengthened restrictions on use of ‘yield’ in arrow function parameters. See bug 2732.
  • %TypedArray%.prototype.byteLength/byteOffset/length now return 0 instead of throwing if the underlying ArrayBuffer has been neutered.
  • Added host defined data to PendingTask records and host hooks into Enqueuing and dispatching Tasks.
  • Legacy octal escape sequences (Annex B.1.2) are not allowed within template string literals.
  • Resolving thenables runs in a separate Task
  • Resolved bugs: 2882-2881, 2878-2877, 2874-2870, 2867-2866, 2864-2859, 2857-2854, 2851-2839, 2837, 2835, 2833-2832, 2830-2829, 2826-2821, 2817-2813, 2810-2804, 2802, 2801-2797, 2793, 2790-2779, 2776-2769, 2767-2756, 2753-2735, 2733-2731, 2725, 2706-2695, 2692, 2689-2688, 2686, 2675, 2671, 2656-2655, 2604, 2596-2595, 2574, 2545-2538, 2535-2532, 2530-2528, 2523, 2520, 2505, 2502, 2499, 2497, 2485, 2480, 2468, 2466, 2464-2462, 2460, 2459, 2455-2454, 2451-2450, 2448-2446, 2444, 2438, 2434-2428, 2426, 2422, 2402, 2399, 2394, 2392-2391, 2387, 2369, 2365-2364, 2358-2355, 2351, 2349, 2346, 2344, 2336, 2334, 2330, 2327, 2321-2318, 2316, 2313-2307, 2304, 2294-2293, 2288, 2276, 2265, 2263, 2224, 2223, 2219-2216, 2214, 2210, 2132, 2114, 1929, 1353, 811

April 27, 2014 Draft Rev 24

pdf, no change markup pdf with rev24 change markup pdf with cumulative change markup since rev22
Changes marked as “Rev 24“.

Changes include:

  • Several important bug fixes to Function Declaration Instantiation
  • Updated RegExp so that subclasses that over-ride exec semantics don’t have to also over-ride match/replace/search
  • disallowed a line break between ArrowParameters and the ⇒
  • Adjust Array.prototype.reverse and Array.prototype.unshift to eliminate several unnecessary MOP calls that were exposed if the array is a proxy
  • Object.assign now accepts multiple source arguments
  • arguments object now have an @@iterator own property
  • %TypedArray% constructors now processes iterables as an argument.
  • Changed length property value of Symbol, Map, Set, WeakSet, WeakMap to 1 to be consistent with most other built-in constructors
  • Added Annex B item about var declarations in catch clauses that binding the same name as a catch parameter
  • Array.from/typedArray.from now calls filter function with two arguments.
  • Eliminated static semantic rules that made the following an early error function({x}){var x} or generator(x) {var x}. A var declaration now can always be the same name as a formal parameter
  • Made for (let x in x), etc. a TDZ violation
  • further tweaking of super related productions in MemberExpression and NewExpression
  • Bug fix in GetBindingValue to make TDZ work. Accessing an uninitialized binding always throws and is not conditional on strict mode.
  • Started update of Annex A. Lexical grammar updated
  • Resolved bugs: 2729, 2727, 2724-2722, 2714-2713, 2711-2706, 2695-2688, 2685, 2681-2660, 2658-2657, 2655-2654, 2652-2649, 2647-2640, 2638-2637, 2635-2613, 2611, 2608-2607, 2605-2604, 2600, 2573, 2566, 2561, 2558-2557, 2551, 2548-2547, 2537, 2528-2526, 2477, 2445, 2443, 2337, 2314, 2154, 2010, 1540, 1114

April 5, 2014 Draft Rev 23

doc, no change markup doc, rev23 change markup
pdf, no change markup pdf with editor's margin notes pdf with rev23 change markup
Changes marked as “Rev 23“. Change markup is relative to Rev 22, January 20, 2014. Not that the markup versions have some algorithm step numbering anomalies that don’t actually exist in the absence of the markup. If you see one, double check it without markup.

Changes include:

  • Math.clz32 replaces Number.prototype.clz
  • for (let;;) loops get a new scope per iteration
  • Added [Yield] grammar parameter to ArrowFunction (Bug 2504)
  • Added [Yield] grammar parameters for Function/Generator/Class Declarations
  • Added [GeneratorParameter]] parameter to ClassExpression
  • Clarified that certainly early errors don’t apply when processing parenthesized expression cover grammar bug 2506)
  • 11.1.2 clarified the distinction between ES whitespace and Unicode whitespace. Added note that some Unicode white space characters are intentionally no ES whitespace
  • Fixed Symbol.prototype.toString Symbol.prototype.valueOf to work correctly when this value is a primitive string value
  • Lookahead let restrictions added: IterationStatement: for (LeftHandSideExpression of AssignmentExpression)... and for (LeftHandSideExpression in Expression)...
  • Lookahead grammar restriction to disambiguate: new super()
  • Reverted default for missing class constructor back to “constructor(...args) {super(...args)} because of bug 2491
  • Refactored identifier syntax/semantics into IdentiferReference, BindingIdentifier, and LabelIdentifier motivated by need to allow unicode escapes in non-keyword yield identifiers
  • Tweaked ordinary call to allocate non-strict mode wrapper objects using callee’s Realm
  • Named %Loader%: Reflect.Loader
  • Named %Realm%: Reflect.Realm
  • Added Reflect.Loader.prototype.@@toStringTag property
  • Provide complete algorithmic definition for RegExp.prototype.replace and RegExp.prototype.search
  • corrected RegExpExec so it correctly translates the match state of full Unicode RegExps back to UTF-16 capture values and endIndex.
  • documented (Annex D) fix to ES5 bug that exposed array updates to integer conversions side-effects
  • Typed Array Indexing: All canonical string numeric values considered to be possible indexes rather than expando property keys, eliminated vestigial spec. language for readonly/frozen typed arrays.
  • Updated Annex B function in block legacy compatibly hack based upon Jan. meeting concensus
  • Updated Function.prototype.toMethod as per Jan. meeting.
  • Updated Promises as per Jan. meeting consensus
  • Switched to “ize” from secondary British “ise” spelling of “initialize” and other words.
  • Resolved bugs: 2598-2597, 2591, 2584-2583, 2581-2578, 2576, 2572-2567, 2563-2562, 2560-2559, 2555, 2552, 2549, 2546, 2525, 2522-2521, 2519-2517, 2515-2514, 2512-2506, 2504, 2501-2500, 2498, 2493-2491, 2489, 2486, 2484, 2482, 2479-2478, 2476-2473, 2471-2469, 2465, 2442-2439, 2435, 2427, 2424-2423, 2419-2417, 2415-2413, 2410-2407, 2404-2403, 2398-2395, 2393, 2390, 2370, 2368-2367, 2363-2359, 2352, 2350, 2347, 2343-2342, 2338, 2335, 2331, 2329-2328, 2326-2325, 2322, 2295, 2266, 2256, 2239, 2209, 1910, 1790, 1734, 1483, 1475, 1413-1412, 1263, 1240, 1158, 913, 311, 222

January 20, 2014 Draft Rev 22

doc pdf with change markup only for this revision pdf without markup
Changes marked as “Rev 22“. Change markup is relative to Rev 21, November 8, 2013

NOTE There are some formatting irregularities (extra line spacing, wrong left margin) for a number of the algorithms. These will be correct in future revisions.

Changes include:

  • Promises
  • Module loading/linking semantics
  • Internal Tasks
  • Realm Objects
  • Loader Objects
  • updated with binding for unscopable names as discussed at Sept 2013 meeting
  • An unscopables object is now an ordinary object whose own property keys are the unscopable names.
  • Fixed sticky mode bugs in RegExpExec
  • Provided algorithm for RegExp.prototype.replace and updated other RegExp methods
  • Fixed RegExp matcher algoritm to normalize results of Unicode mode matches back to UTF-16
  • Grammar parameter tweaks related to use of yield in generator parameters.
  • Simplified eval/arguments restrictions. They never are applied in non-strict code
  • Added tail call detection for arrow functions with expression bodies
  • clarified unicode escaping in IdentifierNames and keywords
  • The default class constructor definition is now “constructor(...args) {return super (...args);)” if one is not explicitly provided (adding explicit “return” is the change)
  • Fixed Invoke abstract operation to correctly handle invokes on primitive values. Implementations of built-ins that are * specified using Invoke should make sure they work correctly in cases where Invoke might be validly applied to a primitive
  • Function.prototype.toMethod, replaces RebindSuper abstraction operation with CloneMethod
  • Eliminated comparator optional argument to Map and Set constructor
  • Removed vague overflow/underflow requirements from Math.Hypoth
  • Creating a Proxy requires use of new.
  • No line terminator allow before the * in yield *.
  • extends clause of a class declaration is now a LeftHandSideExpression
  • Completely redo of object invariants section.
  • Fixed bugs include: 2306-2303, 2301-2298, 2296, 2294-2288, 2286, 2284-2267, 2265-2257, 2255-2240, 2238-2234, 2232-2218, 2216-2214, 2211-2210, 2046, 1908

November 8, 2013 Draft Rev 21

doc pdf with change markup only for this revision pdf without markup
Changes marked as “Rev 21“. Cumulative change markup is relative to Rev 20, October 28, 2013

NOTE No cumulative markup is available for this revision. It was lost in the course of fixing some major formatting problems that were present in Rev20.

Changes include:

  • Updated Module Syntax and static semantics
  • Scripts no longer may contain import statements
  • Specified how to determine if a call is in tail position
  • The call and apply functions now internally do tail calls to the target function
  • Tweaked the new operator so it will work in tail position
  • Eliminated the [[Invoke]] MOP operation
  • Calling the next method of an completed generator returns a “done” result instead of throwing
  • The length property of bound functions is now configurable/non-writable
  • Clarified requirements of String localeCompare when no language sensitive comparison support is available.
  • Tweaked the ordering of a few steps in Array.from to enable self-hosting using for-of
  • Added ToInt8 and similar abstract operation
  • Defined name property of %TypedArray% and the individual typed array constructors
  • Significant fixed to yield * evaluation semantics
  • Fixed handling of identifier ‘yield’ in generator function parameter lists
  • A little static semantic cleanup making sure that FunctionDeclarations and GeneratorDeclarations have the same top level scoping rules
  • Fixed bugs include: 2208, 2206-2180, 2178-2156, 2153-2139, 2137-2134, 2130-2115, 2113-2082, 2045, 1956, 1868, 1859, 1851, 1841, 1823, 1633, 1295, 1273, 968, 959, 871, 814, 738

October 28, 2013 Draft Rev 20

doc pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 20“. Cumulative change markup is relative to Rev 17, August 23, 2013

Changes include:

  • Introduced grammar parameters and eliminated NoIn productions
  • Spread now requires an Iterable rather than an array-like
  • B.1.4, Web browser extensions to RegExp Pattern grammar and semantics
  • Updated RegExp to actually do sticky matching.
  • Updated RegExp to support “u” (unicode) patterns and matching.
  • Defined String @@iterator and String Iterator objects bug fixes in Object.mixin
  • Added support for revokable proxies
  • Added Proxy and Proxy.revokable factory functions
  • Removed the JSON grammar and replaced it with references to Ecma-404
  • Added requirement that Math.random functions in different code realms must produce difference sequences of numbers
  • Made Map, and Set built-in iterators so that once they return a result of completed they always return complete on subsequent calls to next.
  • Added Symbol.prototype[@@toPrimitive]
  • Added name property for functions created via function/generator/class declarations or binding initializers and assignment.
  • Defined the name property conventions for built-in functions.
  • Added normative reference to Ecma-404, removed normative reference to C standard.
  • Added normative reference to Ecma-402 and made Ecma-402 support a conformance requirement for ES implementation that provide an internationalization API.
  • Updated toLocale*String methods with reference Ecma-402
  • [[Construct]] for Proxy objects throw if no “construct” trap and target does not have a [[Construct]]
  • Changed terminology “ordinary function object” to “ECMAScript function object”
  • fixed ArrayBuffer(len) and %ArrayBuffer%(len) to throw RangeError on infinite length
  • make sure yield is usable as a statement label in non-strict code, except in generator functions.
  • consolidated in BindingIdentifier static semantic restrictions on strict mode declarations of eval and arguments
  • changed the way strict mode use of strict mode only reserved words are specified.
  • use parameterized grammar productions to restrict where return statements can appear
  • added grammar restrictions preventing an ExpressionStatement from stating as “let [”
  • terminology: “internal data property” is now “internal slot”
  • changed handling of non-object values in WeakMap as per bug 1938
  • Renamed abstract operation CreateOwnDataProperty to CreateDataProperty. Added CreateDataPropertyOrThrow abstract operation
  • Elaborated in 9.3 that built-in functions can be implemented as either ECMAScript functions or as implementation defined exotic functions.
  • Eliminated [[GlobalArray]] compatibility hack in slice and certain Array methods, replaced with a Realm check
  • fixed bugs: 2077-2072, 2069, 2067-2054, 2052-2050, 2048-2046, 2043, 2041-2040, 2037-2035, 2033, 2032, 2030-2028, 2026-2012, 2010-1941, 1938, 1909, 1903, 1900, 1870, 1869, 1863, 1858, 1855, 1854, 1852, 1804, 1660, 1619, 1574, 1358, 1287, 1274, 1268, 1250, 1226, 1116, 1113, 972, 872, 791, 749, 740, 625, 594, 528, 526-524, 519, 498, 481, 428, 407, 364, 230, 206, 119

Early Drafts

harmony/specification_drafts.txt · Last modified: 2015/01/26 18:25 by allen
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki