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

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

Previous Drafts

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

September 27, 2013 Draft Rev 19

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

Changes include:

  • Better internal cross-linking
  • Restored NoIn expression productions
  • Added NoIn productions for Arrow functions
  • Made yield a reserved word
  • Included module BNF and some of the semantics (more to come)
  • Corrected TypedArray constructor
  • Changed branding for DataView to make them more polymorphic with Typed Arrays WRT buffer access and ArrayBuffer.isVGiew
  • Fixed Array.prototype.concat, filter,map, slice, splice result object construction.
  • Changed Array.prototype.concat, filter,map, slice, splice such so that when result object is an Array instance, it is from the same Realm as the method.
  • Clarified differences between %TypedArray% prototype methods and corresponding Array prototype
  • Renamed [[GetInheritance]] to [[GetPrototypeOf]] and [[SetInheritance]] to [[SetPrototypeOf]].
  • Changed Proxy [[GetPrototypeOf]] invariant so it only applies if target is not extensible.
  • Updated CreateOwnDataProperty to to eliminate the assert that the property doesn’t exist. Callers may need to check for success.
  • Fixed bug in creating result array for %TypedArray% filter
  • Added algorithms for Object.assign and Object.mixin
  • Added a IteratorStep abstract operation to simply most internal uses of iterators
  • Removed the recently added requirement that Typed Array instances must be non=extensible
  • renamed @@ToPrimitive as @@toPrimitive
  • Updated Object.prototype.toString for symbols, Math, and JSON
  • Added @@toStringTag methods for Math and JSON
  • Made Symbol a primitive type with a wrapper object named Symbol
  • Make new Object(Symbol()) throw a TypeError
  • Added properties of Symbol containing the well known symbols
  • Eliminated destructuring throw for non-existant source properties without a corresponding initializer
  • Renamed Math roundFloat32 → Math.fround
  • Math.hypoth is now viadic
  • Normalized <CR><LF> and <CR> to <LF> in template strings.
  • Eliminated [[HasOwnProperty]] MOP operation
  • Must say new DataView(...) to create a new one
  • Resolved bugs: 1940-1939, 1937-1930, 1928-1911, 1907-1904, 1899, 1896-1894, 1891, 1889, 1884-1881, 1878-1871, 1867, 1864, 1862-1860, 1857-1856, 1853, 1850-1816, 1812-1810, 1808-1806, 1803, 1606, 1598, 1589, 1153

September 5, 2013 Draft Rev 18

doc pdf with change markup only for this revision pdf without markup
Changes marked as “Rev 18
This draft has essentially no new technical content relative to rev 17. However, the document has been completely restructured and the rev17 content has redistributed roughly like this:

  • Sections 6-9 define the execution environment within which ECMAScript programs operate.
  • Sections 10-16 define the actual ECMAScript programming language including its syntactic encoding and the execution semantics of all language features. In previous editions this was sections 6,7,11-14,16, and parts of 10.
  • Sections 17-26 define the ECMAScript standard library. It includes the definitions of all of the standard objects that are available for use by ECMAScript programs as the execute. In previous editions this was section 15.

A table mapping old section numbers to new sections numbers is also available: pdf xls.

In the new organization all the property definitions for each object in sections 17-26 are now defined in alphabetical order. The built-ins are now groups into logical buckets rather than one giant chapter. The naming of sections 17-26 isn’t necessarily final nor is the specific groupings. Feedback on this will be appreciated.

As part of reorganizing the specification all the internal change tracking was reset. The markup in rev18 reflects only the (non-organization) changes relative to rev17. Going forward I will track all new changes. Rev17 is the last draft that will contain change history relative to the ES5.1 spec. so use that version if you want to see how something differs form the corresponding ES5.1 text.

Other changes include:

  • Add Number.MIN_SAFE_INTEGER property.

August 23, 2013 Draft Rev 17

This is the last draft with change markup relative to the ES5.1 specification.

doc pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 17
Note there are know issues with bogus entities in bookmark views of the PDF files that include change markup.
Changes include:

  • Added Number.isSafeInteger
  • Added Number.MAX_SAFE_INTEGER
  • Removed: Number.MAX_INTEGER
  • Removed: Number.toInteger
  • Define all parts of a class definition to be strict code
  • ‘length’ property of program defined functions have the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
  • Computed property names in object literals and class definitions can be strings or symbols
  • TypedArray objects are made non-extensible when they are allocated.
  • Added ToLength abstract operation. Generic Array methods use ToLength and are not limited to Uint32 lengths.
  • keys, and entries interators over Arrays and Typed Arrays return numbers for their key values.
  • Map/WeakMap constructor no longer explicitly looks for an ‘entires’ method on iterable arg. Always uses @@iterator.Throws if an iteration item is not an object.
  • Added with blacklist (@@unscopable) support to withStatement and Object Environment Records
  • Added Array.prototype[@@unscopable) with value [”find”, “findIndex”, “fill”, copyWithin”, “entries”, “keys”, “values”]
  • Destructuring to a object/array pattern throws if the value/default value is not an object
  • Destructuring throws if a corresponding source property does not exist and a default value is not provided
  • Eliminated NoIn alternative expression grammar because they are unnecessary after eliminating for-in binding initializer expression
  • Added Array.prototype.fill, Array.prototype.copyWithin, %TypedArray%.prototype.fill, %TypedArray%.prototype.copyWithin
  • Updated definition of Function.prototype.toString
  • Added Math.roundFloat32 (formerly aka Math.toFloat32)
  • Updated Array.prototype.splice to match web reality when called with 1 argument (see bug 429)
  • [”__proto__“]: obj defines a data property named “__proto__” rather than setting the object’s [[Prototype]] internal data property
  • Using a computed property name in a strict mode object literal or class definition to define a property that already exists is a runtime error
  • Made DataView buffer, byteLength, byteOffset prototype accessor properties just like they are for Typed Array
  • Specified all %TypedArray%.prototype methods
  • Array.prototype.map, filter, slice, splice when used iwth array subclasses creates results arrays of the same subclass
  • foo.__proto__ = 1234, etc. and {__proto__: 123} no longer throws.
  • Resolved Bugs: 1800, 1796, 1794, 178-1783, 1779, 1777-1771, 1769, 1767-1763, 1761-1752, 1750-1735, 1733, 1731, 1729, 1727-1717, 1715, 1713-1705, 1703-1661, 1659-1634, 1632-1626, 1624, 1622-1620, 1618, 1616-1609, 1607, 1605-1602, 1599, 1596, 1594, 1592, 1590, 1588-1586, 1583-1581, 1579, 1575, 1560, 1464, 1257, 788, 733, 716, 701, 429, 224, 175, 146

July 15, 2013 Draft

July 15, 2013 Draft doc
pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 16”
Note there are know issues with bogus entities in bookmark views of the PDF files.
Changes include:

  • Restored MOP internal methods [[IsExtensible]]/[[PreventExtensions]] in place of [[HasIntegery]]/[[SetIntegrity]]
  • Added [[Invoke]] internal method to the MOP. Revised evaluation semantics of function calls (including super calls) to use invoke)
  • Provided full complement of internal methods for Integer Index exotic objects (Typed Array views)
  • Reverted Symbols to being a kind of Exotic object rather than a new primitive type
  • Added computed symbol property definitions eg, [ ] to object literals and class definitions.
  • Made trailing ; optional for do-while statements
  • Simplified this binding semantics of Generator functions.
  • Updated Array.from algorithm to include mapping behavior
  • Generalize Array concat to deal with “spreading” array subclasses that may not be exotic arrays
  • Factor common TypedArray method into %TypedArray% abstract “class” as per plan of record.
  • Added of and from factory methods for Typed Arrays
  • Added applicable Array methods to %TypedArrayPrototype% (in some cases, thus stub sections)
  • Made Typed Arrays Iterables with @@iterator, keys, values, entries methods
  • Complete rewrite of DataView specification.
  • Map and WeakMap constructors try using entries methods before @@iterator method to initialize new instances
  • Added WeakSet
  • Added Reflect.invoke
  • Change from ES5: Object.freeze/seal/preventExensions. on primitives is a now a no-op. isFrozen/isSealed returns true. IsExtensible returns false.
  • Resolved Bugs: 1577, 1576, 1573, 1570, 1568-1566, 1564-1562, 1558, 1554, 1551-1549, 1546-1534, 1524, 1520-1476, 1434, 1417, 1405, 1400, 1398, 1396, 1391, 1375, 1365, 1354, 1317, 1315, 1295, 1290, 1283, 1276, 1269, 1265, 1213, 1201, 1196, 1194, 1175, 1146, 1085, 1057, 974, 965, 964, 962, 961, 955, 951, 936, 933, 930, 920, 903, 896, 892, 882, 793, 782, 781, 746, 743, 735, 734, 731-727, 715, 713, 711, 682, 677-675, 377, 313, 158

May 14, 2013 Draft

doc pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 15”

Changes include:

  • Made Symbols a primitive type
  • Added semantics for generator function and generator method definitions
  • Added semantics for array comprehensions and generator comprehensions
  • Added semantics for yield and yield*
  • Replaced StopIteration exception with nextResult objects
  • Updated for-in/of semantics to use new generator protocol
  • Made Arrow function and concise method formal parameters “strict”
  • Added Object.setPrototypeOf function
  • Made Function constructor subclassable
  • Added Array.prototype.find and findIndex
  • Added Math.imul
  • Added ArrayBuffer.isView to check for ArrayBuffer view objects
  • Added Clause 15.19 defining the content of the build-in iteration module. Contains built-ins needed to support generators
  • Disallow Unicode escapes as RegularExpressionFlags
  • Moved Object.prototype.__proto__ back to Annex B. It’s a simple access or that is not Realm specific.
  • Added in Annex B __proto__ property keys in object literals
  • Added placeholder in Annex B for defining syntax of html-like comments
  • In Annex B, first cut at block-level function declaration legacy semantics
  • Added RegExp.prototype.compile to Annexs B
  • Fixed handling of negative integer indices for typed arrays. Elimiante ToPositiveInteger abstract operation
  • Typed Arrays are allowed to store values using native endianess.
  • Fixed various bugs in class declaration semantics
  • Dates never expose -0 as a time value
  • Resolved Bugs: 1469, 1461-1460, 1458, 1452-1451, 1449, 1446, 1442-1435, 1433, 1432-1414, 1411-1407, 1404, 1403-1401, 1399-1397, 1395-1392, 1389-1376, 1374-1366, 1363-1361, 1359, 1357-1355, 1352-1348, 1346, 1344-1342, 1340-1338, 1336-1318, 1316, 1314-1301, 1299-1296, 1294-1291, 1289-1288, 1286-1285, 1284, 1282, 1280-1277, 1272, 1253, 1117, 387

March 8, 2013 Draft doc
pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 14”

Changes include:

  • Class bodies are now always strict
  • static methods may now be defined in ClassBody
  • Updated comprehension syntax to use left-to-right order
  • Eliminated is and isnt operators
  • added grammar productions to allow unqualified super to be used after new operator
  • expression to the right of of in for-of now restricted to being AssignmentExpression
  • Almost all Chapter 15 constructors are now specified to have an @@create method and are initialized in a manner that supports subclassing. (still need to work on Function)
  • Added Object.getOwnPropertyKeys function
  • Added Object.is function
  • Tentatively added Object.mixin function
  • Array.from now takes an optional map function
  • Added String.prototype.normalize method
  • All String.prototype methods that accept RegExp arguments will now work with subclasses of RegExp
  • Renamed Number.prototype.toInt to Number.prototype.toInteger
  • RegExp global, ignoreCase, multiline, source, sticky are now prototype accessor properties rather than instance own data properties. This is needed to support adding web compatible compile method.
  • Added new RegExp.prototype methods that allow string methods to work with RegExp subclasses: match, replace, search, split, @@isRegExp
  • Map and Set constructors now accept a =n optional comparator parameter. Only value currently allowed is “is”
  • ArrayBuffer and TypedArray object length no long restricted to 232 limit
  • Eliminated all remaining references to [[Class]] and [[NativeBrand]] (except for in some DataView code that needs rewritting anyway)
  • Added SameValueZero abstraction operation that considers -0 and +0 to be the same value.
  • Rename [[GetP]] to [[Get]] and [[SetP]] to [[Set]]
  • Specified that unless otherwise indicated, internal data properties are created when an object is allocated. Internal data properties are now explicitly listed in ObjectCreate abstract operation calls.
  • internally consolidated [[IsExtensible]]/[[IsSealed]/[[IsFrozen]] and [[PreventExtensions]]/[[Seal]]/[[Freeze]] into two MOP operations [[HasIntegrity]] and [[SetIntegrity]]. However, no public APIs (Proxy traps and Reflect functions) changed.
  • Numerous editorial and technical corrections, clarifications, and bug fixes
  • Resolved Bugs: 1252-1251, 1249-1246, 1243-1241, 1239-1238, 1236, 1234-1233, 1231-1229, 1227, 1225-1224, 1222-1220, 1218-1214, 1212-1209, 1207, 1206, 1205, 1203-1197, 1195-1194, 1190, 1188-1187, 1185, 1182-1176, 1174-1166, 1164-1163, 1157, 1144, 1123, 1110, 1108, 1089, 1081, 1063, 1060, 1051, 1045, 1019, 981, 979, 969, 497, 21, 20

December 21, 2012 Draft doc
pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 13”

This revision generalizing object allocation in order to make it easier to subclass built-ins and other objects with private instance state. TypedArrays are now better integrated into the spec. Cleaned up many typos and issues introduced with the major refactoring in Rev 12.

Changes include:

  • Well-known Symbols and Intrinsics added as
  • [[HasProperty]] reintroduced as an internal method
  • Elimianted [[Key]] and updated [[OwnPropertyKeys]] to return an iterator. Object.keys and Object.getOwnProertyNames now uses [[OwnPropertyKeys]].
  • Restructured ordinary [[Construct]] to looks for and call a @@create method on the constructor. This permits the separate definition of the allocation and initialization actions of constructors. This makes built-ins and other objects that require special allocation to be subclassable but corrects the problem of a single instance be initialized as an instance of multiple such classes. See https://mail.mozilla.org/pipermail/es-discuss/2012-November/026753.html
  • Added default @@create method for Function.prototype. Restructued Date, Map, WeakMap, Set to use @@create based instance allocation.
  • Added Indexed Delegation Exotic objects to support array-like indexing of TypedArray objects.
  • Renamed “items” interator methods to “entires”
  • Complete reworked ArrayBuffer and TypedArray sections. They now use @@create pattern for allocation and are subclassable. Still not integrated with Binary Data proposal but this is the foundation for doing so.
  • Resolved bugs: 1161, 1156, 1154, 1152, 1151, 1149-1147, 1145, 1143, 1141-1138, 1135, 1130, 1127, 1122, 1120-1118, 1112, 1107-1099, 1097-1090, 1088, 1086, 1084-1077, 1074-1064, 1062, 1061, 1058, 1056-1052, 1050-1024, 1022-982, 922

November 22, 2012 Draft doc
pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 12”

This is a major revision that takes the first step at reforming the internal Meta-Object Protocol (the “internal methods”) and extending it to support Proxies. Quite a bit of material has moved within the document. The overall document organization is in a state of flux and some sections will be moved in the future. For now, somethings have been temporarily left in their old locations to preserve change markup relative to ES 5.1 that might otherwise get lost.

Changes include:

  • Reorganized Chapter 8 into separate language type and specification type sub sections
  • Added Symbol property keys to the definition of the Object Type. terminology migration from talking about “property names” to “property keys”.
  • Restructured 8.6.2 (now as the abstract interface definition of the internal object MOP. eliminated Table 9 (Internal props of only some objects) and distribute related material to definitions of specific object forms. Moved discussion of internal method invariants plus invariant enforced by proxies into separate place order subsection. This needs a complete rewrite to clearly define the actual internal methods invariants.
  • MOP changes: Added [[GetInheritance]]/[[SetInheritance]] as internal methods for accessing [[Prototype]] internal prototype chain. Added [[[IsExtensible]]/[[PreventExtensions]]. Replaced [[Get]]/[[Put]] with [[GetP]]/[[SetP]]. At some point we may be able to rename these as [[Get]]/[[Set]]. Eliminated [[GetProperty]], [[CanPut]], [[HasProperty]], [[DefaultValue]]. Added Keys, [[OwnPropertyKeys]], [[Freeze]], [[Seal]], [[IsFrozen]], [[IsSealed]].
  • [[DefaultValue]] now part of ToPrimitive with a possible dispatch through a @@ToPrimitive symbol keyed method on objects. Define a @@ToPrimitive method on Date.prototype to take care of special date [[DefaultValue]] rules.
  • As part of “proto climbing” reform refactored GetValue and PutValue to directly incorporate the logic for property references on primitive values. Eliminated special [[Put]] and [[Get]] for primitive bases.
  • Eliminated all “strict” arguments to internal methods that were used to request trapping in strict mode”. All such methods now always return true/false success status. It’s up to the called (usually via a convenience function) to throw on failure.
  • Section 8.3-8.5 now provided the concrete implementation of the MOP interface for all ordinary and exotic object forms defined in the specification. this will eventually move into a new top level section following the current section 10.
  • Defined Symbol objects as a kind of exotic object. Its internal methods make it stateless and immutable.
  • In 9.3 added a number of convenience functions that operate at the level of the generic object MOP. These can be thought of as generic “derived” operations that will work with any kind of object. They are now used throughout the specification.
  • Added Table 25 (incomplete) in 10.3 to define the “intrinsic objects” of a code realm
  • instanceof operator no longer uses an internal method. Instead, extensible via a @@hasInstance symbol-keyed regular method.
  • Restated most Object.* reflection functions to delegate to corresponding MOP internal method.
  • Defined all of the functions in the @Reflect module corresponding to MOP internal operations.
  • Resolved bugs: 982, 979, 978, 973, 971-969, 966, 960, 958-956, 954-952, 950, 948-945, 943-936, 934-925, 923, 920-914, 912-904, 902-883, 881-873, 870-853, 851-839, 837-818, 808, 785, 672, 591, 400, 150, 100

October 26, 2012 Draft doc
pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 11”

Changes include:

  • Changed the name of the Program grammar production to Script. Updated the syntax, static and runtime semantics of Script in 14.1
  • In 10.1, defined the terms “module code” and “generator code”.
  • Specified semantics of global environment records and and global declaration instantiation semantics in line with the Sept. 2012 TC39 meeting decisions.
  • Specified WeakMap and Set
  • Added iterator functions and iterator objects for Array
  • Added Map clear method
  • Made Map size an accessor property
  • Updated function declaration instantiation semantics to reflect Sept. 2012 TC39 discussion of function parameters. However, there are likely to be more changes following the next meeting.
  • Some refactoring of early errors associated with places that use cover grammars.
  • Work on semantics of var/function declarations at top levels of functions and scripts.
  • Updated early error rules for formal function parameters based upon recent es-discuss thread.
  • Chapter 15 functions now get poison pills for “arguments” and “caller”.
  • Changed Object.defineProperties to defer exceptions until all property updates are completed.
  • Stubbed in a place holder for Object.assign.
  • Made it explicit that Function.prototype does not have a prototype property.
  • Resolved bugs: 817-813, 812, 810, 805, 804-799, 796, 795, 792, 790-787, 784, 783, 780-777, 761-757, 755-751, 748, 747, 745-735, 733, 732, 726-716, 714, 712, 710, 706-700, 694, 690-683, 681-679, 674, 671-664, 658, 636, 627, 626, 614, 591, 570, 504, 496-494, 414, 401, 357, 312, 265, 260, 247, 214, 182, 153

September 27, 2012 Draft doc
pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 10”

Changes include:

  • Significant reworking of the use of cover grammars for unambiguously defining assignment restructuring patterns and for arrow function formal parameters.
  • Renaming of Quasis to Template Strings
  • Incorporated Class definition semantic decisions from July TC39 meeting
  • Make concise methods enumerable, as per Sept. TC39 meeting.
  • A first cut at making Object.prototype.toString extensible via a Unique Symbol extension point.
  • Started to rough in binary data and typed arrays into Section 15. At this point it is mostly just material copied directly from wiki proposals. Lots of integration and detailed specification work remains.
  • Fully specified Map builtin as 15.14. This also serves as model for how other new built-in collections will be specified.
  • Roughed in section 15 places holders for Set, Weakmap, Proxy, and the Reflect module. Feedback on overall organization of this material is welcome.
  • Many fixes of both unreported and reported bugs, including:256, 464-468,470-479, 482-484,486,488,490-497,499,502,506,506-510,514, 515, 520, 521, 527, 529-537,539-559, 561-564, 566-569, 571, 572, 576, 579-587, 589, 592, 597-599, 601-609,612, 614-616, 618, 620-623, 626, 628-630, 633,635,639-644,650,653

July 8, 2012 Draft doc
pdf with change markup only for this revisionpdf with cumulative change markup pdf without markup
Changes marked as “Rev 9”

Changes include:

  • Quasi literal added to specification
  • Initial work at defining tail call semantics (still need to define tail positions in 13.7)
  • Initial pass at replacing native/host object terminology with ordinary/exotic objects
  • Clause 6 and others updated to clarify processing of full Unicode source code. Revised usage of “code unit” and “code point”
  • Specification of Identifiers updated to use current Unicode specification devices
  • \u{nnnnnn} Unicode code point escapes added
  • UTF-16 encoding for non-BMP characters in string literals now fully specified
  • Added functions: String.fromCodePoint, String.raw (a quasi tag function), String.prototype.codePointAt
  • ECMAScript now requires use of Unicode 5.1.0, normative references updated
  • A syntactic grammar notation was added for indicating when alternative lexical goals are required
  • Fixed ES5 missing explicitly setting length in several array functions
  • Fixed bugs: 368, 388-399, 402-405, 410-413, 415-416,418, 420-428, 430-439, 445-456,458-461

June 15, 2012 Draft doc
pdf with change markup only for this revisionpdf with cumulative change markuppdf without markup
Changes marked as “Rev 8”

Changes from May TC39 Review

  • Tentative addition of Class Definitions Syntax and Semantics in 13.5 based upon Maximally Minimal Strawman. NOTE-Classes do not yet have full consensus within TC39 and may not survive.
  • 11.1.5 make super references illegal in method definitions within object literals
  • removed <| and TriangleLiterals
  • reverted methods to only have bracketed function bodies rather than concise bodies
  • Removed Object.isObject
  • Removed String.prototype.toArray
  • Eliminated requirement for buggy daylight savings time adjustment

Other changes

  • 5.1.1 , 5.2 Defined “chain production” and implicit algorithm pass through for chain productions. Eliminated unnecessary pass through algorithms
  • Eliminate final remnants of ES1 line number references within algorithm conventions
  • Moved Literal from lexical to syntactic grammar
  • Updated keywords list
  • 10.1.2 /10.4 introduce concept of non-ECMAScript functions and execution contexts for them
  • tweaks to Array Comprehension syntax
  • made it an early error to use a reserved word as a single identifier property definition shorthand
  • added default value initializers to internal elements and properties of destructuring assignment patterns
  • corrected major case statement semantic bug from ES5.1
  • made YieldExpressions illegal in parameter default value initializers
  • made home object binding of methods contingent upon them actually referencing super
  • added [[ThisMode]] internal property to functions via FunctionCreate to deal with lexical this binding in arrow functions
  • made super references and yield expressions early errors in ProgramBody
  • In Math.sign clarified handling of -0
  • Added String.prototype HTML wrapping functions to Annex B
  • Merged ES5.2 Annex F into Annex D&E
  • Made Annex F an Informative Summary of Static Semantic algorithms
  • Fixed bugs 281,340,343,346-349,351-356,358-367,369-376,378-380,382,384-386

May 4 , 2012 Draft doc pdf with change markuppdf without markup
Changes marked as “Rev 7”
Changes include:

  • Clarified that IdentifierNames can include escape sequences
  • Added syntax and semantics for Binary and Octal integers
  • Extended Reference to support super references
  • Added semantics for super in MemberExpressions and CallExpressions
  • Added abstract operations for Object and Array creations
  • Added arrow functions (13.2) and concise methods (13.3)
  • Preliminary introduction of code “Realms” (contexts with their own globals, intrinsics, etc.) (incomplete)
  • Added Method Environment Records as part of super support
  • Extensions to execution contexts needed to support generators, super, and code realms
  • Eliminated “enter execution context” algorithms by merging them with [[Call]], eval, Program etc.
  • General migration of most material related to functions and their execution into Chapter 13.
  • Added additional explicit checks of completion values.
  • made yield illegal outside of generators
  • additional work/cleanup on for-in/for-of (prep for array comprehensions)
  • Started tracking Annex D and E additions
  • refactored “Creating Function Objects” into separate function and constructor creation abstract operations.
  • added Object.isObject
  • added Array.of and Array.from and cleanup Array constructor specification
  • added String.prototype repeat, startsWith, endsWith, contains, toArray
  • clarification of Number.MIN_Value for Arm processors (that don’t support denormalized numbers)
  • added Number.EPSILON,MAX_INTEGER,parseInt, parseFloat,isNaN,isFinite, isInteger, toInt
  • added Number.prototype.clz
  • added Math.log10, log2, log1p, expm1, cosh, sinh, tanh, acosh, asinh, atanh, hypot, trunc, sign, cbrt

February 27, 2012 Draft doc pdf with change markuppdf without markup
Changes marked as “Rev 6”
This is an intermediate draft containing incomplete changes.
Changes include:

  • Eliminated “extended mode” in support of “one JavaScript” plan, all new features are generally available in all modes.
  • Eliminated various static semantic rules that would be breaking changes in “one JavaScript”
  • Added support for for-in, for-of, and first cut at lexically scoped for(;;).
  • Added section B.3.1 with specifies __proto__ feature.
  • Did spec. changes to implement “completion reform”.
  • Did most of the work to pervasively use completion results for expressions as well as statements. Still some work to do in sections 10 and 15 but all of expressions and the Array methods have all been updated to handle completion records as general results. See 8.8 for enhance completion record internal API. Note that observable occurrence points are more precisely specified for many exception that had been informally “thrown” by various specification algorithms.
  • Added [[Enumerate]] and [[Iterate]] internal methods for normal objects.
  • Generalized the List special type to also include a Record specification type.
  • Added an Invoke abstract operation that is used to internally “call methods”
  • Added syntactic productions for array comprehensions, generators and Generator comprehensions. No semantics yet.
  • Converted prose specification of labelled statements into algorithmic spec. Added BreakableStatement production that includes IterationStatement and SwitchStatement.
  • Refactored let/const into a single set of productions and semantics rules.
  • Many minor edits and typo/bug corrections, see bugs.ecmascript.org for details.
  • Preliminary work in support of super references and super calls is still incomplete

January 16, 2012 Draft doc pdf with change markuppdf without markup
Changes marked as “Rev 5”
This is an intermediate draft containing incomplete changes.
Changes include:

  • Various proses descriptions and introductions have been converted into non-normative notes.
  • Some preliminary work was done in support of super references and super calls (incomplete)
  • Various editorial minor corrections
  • Updates to function declaration instantiation in support of extend mode formal parameter scoping decisions made at Nov 2011 TC39 meeting.
  • Changes to spread in destructing assignment in ArrayLiteral to conform to decisions made at Nov. 2011 TC39 meeting.
  • Added static and runtime semantics for concise method properties in object literals.
  • Converted ES5 algorithmic strict mode errors into declarative early errors for Unary and Postfix expressions
  • Added is and isnt operators
  • Eliminated “augments” as a possible formal parameter name for extended code

November 7, 2011 Draft doc pdf with change markuppdf without markup
Changes marked as “Rev 4”
Changes include:

  • New issue bugs: 221,222
  • Introduced the term “base code” to mean code that is neither strict or extended.
  • Changed organization and presentation conventions for static and runtime semantics, Note that some parts of the spec. have not yet been switched to the new conventions.
  • Refactors Literal production to make it easier to talk about non-null literals
  • Added a [[Strict]] internal property for functions to make it easier to talk about strict mode code. Changed the definition of the [[Code]] and [[FormalParameters]] internal properties of function objects.
  • Moved function parameter initialization into 10.4.3 “Entering Function Code”
  • Added semantics for new function parameter forms in extended code.
  • Refactored Declaration Binding Instantiations into separate subsections for different situations
  • Added declaration instantiation for extended code functions.
  • Refactored argument object creation into separate algorithms for strict and non-strict functions.
  • Made FunctionExpression a PrimaryExpression
  • Started grammar modifications to support #[ ] and #{ } as agreed to at Sept. TC39 meeting. Incomplete
  • Added grammar productions for concise methods in object literals. Semantics still to come
  • First cut at grammar productions for super property access and <| operator
  • Started migrating some expository text into informative notes.
  • Added static semantic algorithms for processing lexical scoped declarations
  • Finished semantics for binding destructuring patterns in declarations, catch parameter, and function formal parameters
  • Made sure exceptions during processing of default parameter initializes are handled
  • Major record for semantics of function declaration in section 13

September 23, 2011 Draft doc pdf
Changes marked as “Rev 3”
Changes include:

  • Resolved as fixed bugs 137, 140,167, 177, 183,184,185,186,187,188,189,190,191,193,196,196
  • Merged multiple built-in “class” branding internal properties into a single [[NativeBrand]] internal property
  • In 10.2, change environment records so that both mutable and immutable bindings may be in an initialized state and must be initialized before use via InitializeBinding
  • In 10.5 added separate algorithm for Block declaration instantiation. Block level declaration instantiations now specified. Function and global level still need to be updated to support let and const
  • Added a Declaration production to the grammar and changed StatementList to include both Statement and Declaration
  • Added let and const declarations. var declarations still hoist to function level and must not conflict with a let or const.
  • Hoisting and temporal dead zone for all block scoped declarations
  • Added semantics for destructuring binding pattern.
  • Added appropriate lexical scoping for declarations in bodies of switch and try statements. Note that for statements still need work for declarations in for head.
  • Added initializers for individual property level bindings in destructure bindings

July 25, 2011 Draft doc pdf
Mostly typo corrections (thanks for all the reports) and corrections to problems that have been reported against ES5.1. See closed 6th edition bugs at bugs.ecmascript.org.

July 12, 2011 Draft doc pdf This is the first working draft of the ES.next specification. Notable changes from the ES5.1 spec include:

  • 5.1.4 Introduction of the concept of supplemental grammars.
  • 5.3 Introduction of concept of Static Semantic Rules
  • 8.6.2 and various places. Eliminated [[Class]] internal property. Added various internal trademark properties as a replacement.
  • 10.1.2 defined the concept of “extended code” that means code that may use new Es.next syntax. Also redefined “strict code” to mean either ES5 strict mode code or extended code.
  • 11.1.4 added syntax and semantics for use of spread operator in array literals
  • 11.1.5 added syntax and semantics for property value shorthand and various semantic helper abstract operations.
  • 11.2, 11.2.4 added syntax and semantics for spread operator in argument lists
  • 11.13 Add syntax and semantics for destructuring assignment operator.
  • 12.2 Added BindingPattern syntax and partial semantics to support destructuring in declarations and formal parameter lists.
  • 13 Added syntax to support rest parameter, parameter default values, and destructuring patterns in formal parameter lists. Also static semantics for them. However, instantiation of such parameters is not yet done. Defined the argument list “length” for such enhanced parameter lists.
  • 15 Clarified that clause 15 function specifications are in effect the definition of [[Call]] internal methods.
  • Respecified toString to not use [[Class]]. Note that adding an explicit extension mechanism is still a to-do.
  • Annex B Retitled as normative optional features of Web Browser ES implementations

Initial Baseline document: doc
This is the starting point for the ES.next spec. It is just the ES5.1 specification with a ES6 draft cover and copyright notice.working_draft_ecma-262_edition_6_10-26-12.docworking_draft_ecma-262_edition_6_03-08-13-nomarkup.pdfworking_draft_ecma-262_edition_6_04-05-14.doc

harmony/specification_drafts.txt · Last modified: 2014/11/17 18:34 by allen
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki