User:Waldo/ES6 testing

From MozillaWiki
Jump to: navigation, search

Things to be tested:

  • The ordinary/exotic object distinction (relevant to proxies, arrays, and the exotic objects mentioned in 8.4/8.5)
  • proper parsing of template literals, wrt the InputElementTemplateTail goal symbol -- ASI
  • Unicode format-control characters within template literals -- line terminators as well
  • identifier goal symbols seem to have changed some -- to use the Unicode properties ID_Start and ID_Continue (and also _/$/<ZWJ>/<ZWNJ>) -- may need testing
  • new keywords: class, continue, const, export, import, super (possibly all reserved before, tests needed for their new semantics, and places that still forbid them)
  • likely-new keyword yield
  • regular expression literals syntax rules appear different -- maybe something to do here, maybe not
  • " Well-Known Symbols and Intrinsics": are these directly observable, or only indirectly through spec algorithms' uses of them?
  • GetThisValue(V): how is this used, where, maybe needs tests (if not just some sort of refactoring of |this| keyword handling, not sure yet)
  • the Property Descriptor type now has an optional Origin field -- possibly/likely used for property descriptors returned from proxy hooks -- needs testing
  • new HasOwnProperty hook -- previously this was simply derived from GetOwnProperty
  • new Enumerate and OwnPropertyKeys hooks with well-defined semantics for for(var i in o) and Object.getOwnPropertyNames/keys -- visible in proxies
  • functions (ordinary function objects, have a bunch more internal data properties to track -- affecting semantics in various ways; realms are perhaps the most important one (corresponding to the multiple-globals problem in web browsers)
  • |new| on a function whose Prototype has been changed to null/undefined -- semantics of this are still partially up in the air
  • there seems to be a requirement that |(function() { "use strict"; }).caller === null| per which might be a change from ES5 -- needs investigation, testing
  • BuiltinBrand is new, may affect every place that currently does exact-class checks (or exact-class-modulo-other-globals checks)
  • String exotic objects: new internal ops defined for them, may require more testing for out-of-range -- also for negative indexes, which in the current spec seem to be passed through abs() (!)

New features:

  • template literals (nee quasis)
    • templates with zero or more substitution parts
  • binary integer literals
  • floating point hex literals (maybe? not added yet, might be)
    • \u{} Unicode escape sequences* \u{HexDigits} is a syntax error if HexDigits > 1114111 (0x10FFFF)
    • \u{} with a surrogate-pair number, other reserved code points
  • Binary Data proposal (8.2.1)
    • data block type
  • super
    • implicates Super References (8.2.4), and the super keyword -- something to do with calling superclass methods, and similar things; haven't grokked details yet
  • ToPrimitive is now explicitly hookable in objects (doesn't use toString/valueOf properties), using a well-known symbol/intrinsic
  • scriptable Proxy objects (8.5) (direct proxies)