+2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Enable ES6 classes by default
+ https://bugs.webkit.org/show_bug.cgi?id=142774
+
+ Reviewed by Gavin Barraclough.
+
+ * Source/cmake/WebKitFeatures.cmake:
+
2015-03-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CMake][EFL] Rearrange OptionEFL.cmake to improve readability
+2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Enable ES6 classes by default
+ https://bugs.webkit.org/show_bug.cgi?id=142774
+
+ Reviewed by Gavin Barraclough.
+
+ Unskipped tests and also fixed tests so that they can run under run-javascript-tests.
+
+ * TestExpectations: Unskipped tests.
+ * js/class-syntax-call-expected.txt:
+ * js/class-syntax-declaration-expected.txt:
+ * js/class-syntax-default-constructor-expected.txt:
+ * js/class-syntax-expression-expected.txt:
+ * js/class-syntax-extends-expected.txt:
+ * js/class-syntax-super-expected.txt:
+ * js/dom/reserved-words-as-property-expected.txt: Rebaselined now that "class" is a non-reserved keyword.
+ * js/script-tests/class-syntax-call.js: Don't refer to "window" object as it doesn't exit when ran inside jsc.
+ * js/script-tests/class-syntax-declaration.js: Rebaselined after r181611, which added default constructor support.
+ * js/script-tests/class-syntax-default-constructor.js: Don't refer to "window" object. Also replaced shouldNotBe
+ by an explicit !== check as the former is not supported when ran inside jsc.
+ * js/script-tests/class-syntax-expression.js: Rebaselined after r181611.
+ * js/script-tests/class-syntax-extends.js: Ditto. Also replaced evalAndLog by shouldNotThrow as the former is not
+ supported inside jsc.
+ * js/script-tests/class-syntax-super.js: Don't refer to "window" object as it doesn't exist inside jsc.
+ * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.11-expected.txt:
+ * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.27-expected.txt:
+ * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.5-expected.txt:
+
2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Better Console Previews for Arrays / Small Objects
webkit.org/b/127860 [ Debug ] js/function-apply-aliased.html [ Skip ]
-# ES6 class syntax hasn't been enabled yet.
-webkit.org/b/140491 js/class-syntax-call.html [ Failure ]
-webkit.org/b/140491 js/class-syntax-declaration.html [ Failure ]
-webkit.org/b/140491 js/class-syntax-default-constructor.html [ Failure ]
-webkit.org/b/140491 js/class-syntax-expression.html [ Failure ]
-webkit.org/b/140491 js/class-syntax-extends.html [ Failure ]
-webkit.org/b/140491 js/class-syntax-scoping.html [ Failure ]
-webkit.org/b/140491 js/class-syntax-super.html [ Failure ]
-
# This test verifies dynamic manipulation of the mroot and msqrt elements.
mathml/roots-removeChild.html [ ImageOnlyFailure ]
-PASS class A { constructor() {} }; window.A = A; new A did not throw exception.
+Tests for calling the constructors of ES6 classes
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS class A { constructor() {} }; new A did not throw exception.
PASS A() threw exception TypeError: Cannot call a class constructor.
-PASS class B extends A { constructor() { super() } }; window.B = B; new A did not throw exception.
+PASS class B extends A { constructor() { super() } }; new B did not throw exception.
PASS B() threw exception TypeError: Cannot call a class constructor.
PASS new (class { constructor() {} })() did not throw exception.
PASS (class { constructor() {} })() threw exception TypeError: Cannot call a class constructor.
+Tests for ES6 class syntax declarations
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
PASS constructorCallCount is 0
PASS A.someStaticMethod() is staticMethodValue
PASS (new A).someInstanceMethod() is instanceMethodValue
PASS class threw exception SyntaxError: Unexpected end of script.
PASS class X { threw exception SyntaxError: Unexpected end of script.
PASS class X { ( } threw exception SyntaxError: Unexpected token '('. Expected an indentifier..
-PASS class X {} threw exception SyntaxError: Class declaration without a constructor is not supported yet..
+PASS class X {} did not throw exception.
PASS class X { constructor() {} constructor() {} } threw exception SyntaxError: Cannot declare multiple constructors in a single class..
PASS class X { constructor() {} static constructor() { return staticMethodValue; } } did not throw exception.
PASS X.constructor() is staticMethodValue
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS class A { }; window.A = A; new A instanceof A is true
+PASS class A { }; new A instanceof A is true
PASS A() threw exception TypeError: Cannot call a class constructor.
PASS A.prototype.constructor instanceof Function is true
PASS A.prototype.constructor.name is "A"
PASS class B extends A { }; new B instanceof A; new B instanceof A is true
PASS B() threw exception TypeError: Cannot call a class constructor.
PASS B.prototype.constructor.name is "B"
-PASS A is not B
+PASS A !== B is true
FAIL A.prototype.constructor should be function B() { super(...arguments); }. Was function A() { }.
PASS new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2) is [1, 2]
PASS successfullyParsed is true
+Tests for ES6 class syntax expressions
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
PASS constructorCallCount is 0
PASS A.someStaticMethod() is staticMethodValue
PASS (new A).someInstanceMethod() is instanceMethodValue
PASS x = class threw exception SyntaxError: Unexpected end of script.
PASS x = class { threw exception SyntaxError: Unexpected end of script.
PASS x = class { ( } threw exception SyntaxError: Unexpected token '('. Expected an indentifier..
-PASS x = class {} threw exception SyntaxError: Class declaration without a constructor is not supported yet..
+PASS x = class {} did not throw exception.
PASS x = class { constructor() {} constructor() {} } threw exception SyntaxError: Cannot declare multiple constructors in a single class..
PASS x = class { constructor() {} static constructor() { return staticMethodValue; } } did not throw exception.
PASS x.constructor() is staticMethodValue
PASS x = class extends threw exception SyntaxError: Unexpected end of script.
PASS x = class extends threw exception SyntaxError: Unexpected end of script.
PASS x = class extends Base { threw exception SyntaxError: Unexpected end of script.
-PASS x = class extends Base {} threw exception SyntaxError: Class declaration without a constructor is not supported yet..
+PASS x = class extends Base { } did not throw exception.
PASS x = class extends Base { constructor() { } } did not throw exception.
PASS x.__proto__ is Base
PASS x.prototype.__proto__ is Base.prototype
PASS x.__proto__ is Function.prototype
PASS x = class extends 3 { constructor() { } }; x.__proto__ threw exception TypeError: The superclass is not an object..
PASS x = class extends "abc" { constructor() { } }; x.__proto__ threw exception TypeError: The superclass is not an object..
-baseWithBadPrototype = class { constructor() { } }; baseWithBadPrototype.prototype = 3
+PASS baseWithBadPrototype = class { constructor() { } }; baseWithBadPrototype.prototype = 3 did not throw exception.
PASS x = class extends baseWithBadPrototype { constructor() { } } threw exception TypeError: The superclass's prototype is not an object..
-baseWithBadPrototype.prototype = "abc"
+PASS baseWithBadPrototype.prototype = "abc" did not throw exception.
PASS x = class extends baseWithBadPrototype { constructor() { } } threw exception TypeError: The superclass's prototype is not an object..
PASS baseWithBadPrototype.prototype = null; x = class extends baseWithBadPrototype { constructor() { } } did not throw exception.
PASS successfullyParsed is true
PASS new (class extends Base { constructor() { return undefined } }) is undefined
PASS x = { }; new (class extends Base { constructor() { return x } }); is x
PASS x instanceof Base is false
-PASS new (class extends Base { constructor() { } }) threw exception TypeError: Cannot return a non-object type in the constructor of a derived class..
+PASS new (class extends Base { constructor() { } }) threw exception ReferenceError: Cannot access uninitialized variable..
PASS new (class extends Base { constructor() { return 1; } }) threw exception TypeError: Cannot return a non-object type in the constructor of a derived class..
PASS new (class extends null { constructor() { return undefined } }) is undefined
PASS x = { }; new (class extends null { constructor() { return x } }); is x
PASS x instanceof Object is true
-PASS new (class extends null { constructor() { } }) threw exception TypeError: Cannot return a non-object type in the constructor of a derived class..
+PASS new (class extends null { constructor() { } }) threw exception ReferenceError: Cannot access uninitialized variable..
PASS new (class extends null { constructor() { return 1; } }) threw exception TypeError: Cannot return a non-object type in the constructor of a derived class..
PASS new (class extends null { constructor() { super() } }) did not throw exception.
PASS new (class { constructor() { super() } }) threw exception SyntaxError: Cannot call super() in a base class constructor..
PASS (function(){"use strict";({ with: 42 }.with === 42)}); true is true
PASS "use strict";({ get with(){}, set with(){}, parsedOkay: 42 }.parsedOkay === 42) is true
PASS (function(){"use strict";({ get with(){}, set with(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
-PASS var class; true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS (function(){var class; true}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS var class = 42; class === 42 threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS (function(){var class = 42; class === 42}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS function g(class){ }; true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS (function(){function g(class){ }; true}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS /class/.test(function g(class){ }) threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS (function(){/class/.test(function g(class){ })}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS try{}catch(class){}; true threw exception SyntaxError: Cannot use the reserved word 'class' as a catch variable name..
-PASS (function(){try{}catch(class){}; true}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a catch variable name..
-PASS function class(){ }; true threw exception SyntaxError: Cannot use the reserved word 'class' as a function name..
-PASS (function(){function class(){ }; true}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a function name..
+PASS var class; true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS (function(){var class; true}); true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS var class = 42; class === 42 threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS (function(){var class = 42; class === 42}); true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS function g(class){ }; true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS (function(){function g(class){ }; true}); true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS /class/.test(function g(class){ }) threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS (function(){/class/.test(function g(class){ })}); true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS try{}catch(class){}; true threw exception SyntaxError: Cannot use the keyword 'class' as a catch variable name..
+PASS (function(){try{}catch(class){}; true}); true threw exception SyntaxError: Cannot use the keyword 'class' as a catch variable name..
+PASS function class(){ }; true threw exception SyntaxError: Cannot use the keyword 'class' as a function name..
+PASS (function(){function class(){ }; true}); true threw exception SyntaxError: Cannot use the keyword 'class' as a function name..
PASS ({ "class": 42 }.class === 42) is true
PASS (function(){({ "class": 42 }.class === 42)}); true is true
PASS ({ class: 42 }.class === 42) is true
PASS (function(){({ class: 42 }.class === 42)}); true is true
PASS ({ get class(){}, set class(){}, parsedOkay: 42 }.parsedOkay === 42) is true
PASS (function(){({ get class(){}, set class(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
-PASS "use strict";var class; true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS (function(){"use strict";var class; true}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS "use strict";var class = 42; class === 42 threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS (function(){"use strict";var class = 42; class === 42}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS "use strict";function g(class){ "use strict"; }; true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS (function(){"use strict";function g(class){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS "use strict";/class/.test(function g(class){ "use strict"; }) threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS (function(){"use strict";/class/.test(function g(class){ "use strict"; })}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a variable name..
-PASS "use strict";try{}catch(class){}; true threw exception SyntaxError: Cannot use the reserved word 'class' as a catch variable name..
-PASS (function(){"use strict";try{}catch(class){}; true}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a catch variable name..
-PASS "use strict";function class(){ "use strict"; }; true threw exception SyntaxError: Cannot use the reserved word 'class' as a function name..
-PASS (function(){"use strict";function class(){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the reserved word 'class' as a function name..
+PASS "use strict";var class; true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS (function(){"use strict";var class; true}); true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS "use strict";var class = 42; class === 42 threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS (function(){"use strict";var class = 42; class === 42}); true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS "use strict";function g(class){ "use strict"; }; true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS (function(){"use strict";function g(class){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS "use strict";/class/.test(function g(class){ "use strict"; }) threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS (function(){"use strict";/class/.test(function g(class){ "use strict"; })}); true threw exception SyntaxError: Cannot use the keyword 'class' as a variable name..
+PASS "use strict";try{}catch(class){}; true threw exception SyntaxError: Cannot use the keyword 'class' as a catch variable name..
+PASS (function(){"use strict";try{}catch(class){}; true}); true threw exception SyntaxError: Cannot use the keyword 'class' as a catch variable name..
+PASS "use strict";function class(){ "use strict"; }; true threw exception SyntaxError: Cannot use the keyword 'class' as a function name..
+PASS (function(){"use strict";function class(){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the keyword 'class' as a function name..
PASS "use strict";({ "class": 42 }.class === 42) is true
PASS (function(){"use strict";({ "class": 42 }.class === 42)}); true is true
PASS "use strict";({ class: 42 }.class === 42) is true
PASS (function(){"use strict";({ export: 42 }.export === 42)}); true is true
PASS "use strict";({ get export(){}, set export(){}, parsedOkay: 42 }.parsedOkay === 42) is true
PASS (function(){"use strict";({ get export(){}, set export(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
-PASS var extends; true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS (function(){var extends; true}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS var extends = 42; extends === 42 threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS (function(){var extends = 42; extends === 42}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS function g(extends){ }; true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS (function(){function g(extends){ }; true}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS /extends/.test(function g(extends){ }) threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS (function(){/extends/.test(function g(extends){ })}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS try{}catch(extends){}; true threw exception SyntaxError: Cannot use the reserved word 'extends' as a catch variable name..
-PASS (function(){try{}catch(extends){}; true}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a catch variable name..
-PASS function extends(){ }; true threw exception SyntaxError: Cannot use the reserved word 'extends' as a function name..
-PASS (function(){function extends(){ }; true}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a function name..
+PASS var extends; true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS (function(){var extends; true}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS var extends = 42; extends === 42 threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS (function(){var extends = 42; extends === 42}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS function g(extends){ }; true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS (function(){function g(extends){ }; true}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS /extends/.test(function g(extends){ }) threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS (function(){/extends/.test(function g(extends){ })}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS try{}catch(extends){}; true threw exception SyntaxError: Cannot use the keyword 'extends' as a catch variable name..
+PASS (function(){try{}catch(extends){}; true}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a catch variable name..
+PASS function extends(){ }; true threw exception SyntaxError: Cannot use the keyword 'extends' as a function name..
+PASS (function(){function extends(){ }; true}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a function name..
PASS ({ "extends": 42 }.extends === 42) is true
PASS (function(){({ "extends": 42 }.extends === 42)}); true is true
PASS ({ extends: 42 }.extends === 42) is true
PASS (function(){({ extends: 42 }.extends === 42)}); true is true
PASS ({ get extends(){}, set extends(){}, parsedOkay: 42 }.parsedOkay === 42) is true
PASS (function(){({ get extends(){}, set extends(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
-PASS "use strict";var extends; true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS (function(){"use strict";var extends; true}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS "use strict";var extends = 42; extends === 42 threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS (function(){"use strict";var extends = 42; extends === 42}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS "use strict";function g(extends){ "use strict"; }; true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS (function(){"use strict";function g(extends){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS "use strict";/extends/.test(function g(extends){ "use strict"; }) threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS (function(){"use strict";/extends/.test(function g(extends){ "use strict"; })}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a variable name..
-PASS "use strict";try{}catch(extends){}; true threw exception SyntaxError: Cannot use the reserved word 'extends' as a catch variable name..
-PASS (function(){"use strict";try{}catch(extends){}; true}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a catch variable name..
-PASS "use strict";function extends(){ "use strict"; }; true threw exception SyntaxError: Cannot use the reserved word 'extends' as a function name..
-PASS (function(){"use strict";function extends(){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the reserved word 'extends' as a function name..
+PASS "use strict";var extends; true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS (function(){"use strict";var extends; true}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS "use strict";var extends = 42; extends === 42 threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS (function(){"use strict";var extends = 42; extends === 42}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS "use strict";function g(extends){ "use strict"; }; true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS (function(){"use strict";function g(extends){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS "use strict";/extends/.test(function g(extends){ "use strict"; }) threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS (function(){"use strict";/extends/.test(function g(extends){ "use strict"; })}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a variable name..
+PASS "use strict";try{}catch(extends){}; true threw exception SyntaxError: Cannot use the keyword 'extends' as a catch variable name..
+PASS (function(){"use strict";try{}catch(extends){}; true}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a catch variable name..
+PASS "use strict";function extends(){ "use strict"; }; true threw exception SyntaxError: Cannot use the keyword 'extends' as a function name..
+PASS (function(){"use strict";function extends(){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the keyword 'extends' as a function name..
PASS "use strict";({ "extends": 42 }.extends === 42) is true
PASS (function(){"use strict";({ "extends": 42 }.extends === 42)}); true is true
PASS "use strict";({ extends: 42 }.extends === 42) is true
PASS (function(){"use strict";({ import: 42 }.import === 42)}); true is true
PASS "use strict";({ get import(){}, set import(){}, parsedOkay: 42 }.parsedOkay === 42) is true
PASS (function(){"use strict";({ get import(){}, set import(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
-PASS var super; true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS (function(){var super; true}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS var super = 42; super === 42 threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS (function(){var super = 42; super === 42}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS function g(super){ }; true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS (function(){function g(super){ }; true}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS /super/.test(function g(super){ }) threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS (function(){/super/.test(function g(super){ })}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS try{}catch(super){}; true threw exception SyntaxError: Cannot use the reserved word 'super' as a catch variable name..
-PASS (function(){try{}catch(super){}; true}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a catch variable name..
-PASS function super(){ }; true threw exception SyntaxError: Cannot use the reserved word 'super' as a function name..
-PASS (function(){function super(){ }; true}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a function name..
+PASS var super; true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS (function(){var super; true}); true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS var super = 42; super === 42 threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS (function(){var super = 42; super === 42}); true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS function g(super){ }; true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS (function(){function g(super){ }; true}); true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS /super/.test(function g(super){ }) threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS (function(){/super/.test(function g(super){ })}); true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS try{}catch(super){}; true threw exception SyntaxError: Cannot use the keyword 'super' as a catch variable name..
+PASS (function(){try{}catch(super){}; true}); true threw exception SyntaxError: Cannot use the keyword 'super' as a catch variable name..
+PASS function super(){ }; true threw exception SyntaxError: Cannot use the keyword 'super' as a function name..
+PASS (function(){function super(){ }; true}); true threw exception SyntaxError: Cannot use the keyword 'super' as a function name..
PASS ({ "super": 42 }.super === 42) is true
PASS (function(){({ "super": 42 }.super === 42)}); true is true
PASS ({ super: 42 }.super === 42) is true
PASS (function(){({ super: 42 }.super === 42)}); true is true
PASS ({ get super(){}, set super(){}, parsedOkay: 42 }.parsedOkay === 42) is true
PASS (function(){({ get super(){}, set super(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
-PASS "use strict";var super; true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS (function(){"use strict";var super; true}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS "use strict";var super = 42; super === 42 threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS (function(){"use strict";var super = 42; super === 42}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS "use strict";function g(super){ "use strict"; }; true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS (function(){"use strict";function g(super){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS "use strict";/super/.test(function g(super){ "use strict"; }) threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS (function(){"use strict";/super/.test(function g(super){ "use strict"; })}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a variable name..
-PASS "use strict";try{}catch(super){}; true threw exception SyntaxError: Cannot use the reserved word 'super' as a catch variable name..
-PASS (function(){"use strict";try{}catch(super){}; true}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a catch variable name..
-PASS "use strict";function super(){ "use strict"; }; true threw exception SyntaxError: Cannot use the reserved word 'super' as a function name..
-PASS (function(){"use strict";function super(){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the reserved word 'super' as a function name..
+PASS "use strict";var super; true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS (function(){"use strict";var super; true}); true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS "use strict";var super = 42; super === 42 threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS (function(){"use strict";var super = 42; super === 42}); true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS "use strict";function g(super){ "use strict"; }; true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS (function(){"use strict";function g(super){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS "use strict";/super/.test(function g(super){ "use strict"; }) threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS (function(){"use strict";/super/.test(function g(super){ "use strict"; })}); true threw exception SyntaxError: Cannot use the keyword 'super' as a variable name..
+PASS "use strict";try{}catch(super){}; true threw exception SyntaxError: Cannot use the keyword 'super' as a catch variable name..
+PASS (function(){"use strict";try{}catch(super){}; true}); true threw exception SyntaxError: Cannot use the keyword 'super' as a catch variable name..
+PASS "use strict";function super(){ "use strict"; }; true threw exception SyntaxError: Cannot use the keyword 'super' as a function name..
+PASS (function(){"use strict";function super(){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the keyword 'super' as a function name..
PASS "use strict";({ "super": 42 }.super === 42) is true
PASS (function(){"use strict";({ "super": 42 }.super === 42)}); true is true
PASS "use strict";({ super: 42 }.super === 42) is true
-//@ skip
+description('Tests for calling the constructors of ES6 classes');
-shouldNotThrow('class A { constructor() {} }; window.A = A; new A');
+shouldNotThrow('class A { constructor() {} }; new A');
shouldThrow('A()', '"TypeError: Cannot call a class constructor"');
-shouldNotThrow('class B extends A { constructor() { super() } }; window.B = B; new A');
+shouldNotThrow('class B extends A { constructor() { super() } }; new B');
shouldThrow('B()', '"TypeError: Cannot call a class constructor"');
shouldNotThrow('new (class { constructor() {} })()');
shouldThrow('(class { constructor() {} })()', '"TypeError: Cannot call a class constructor"');
-//@ skip
+
+description('Tests for ES6 class syntax declarations');
var constructorCallCount = 0;
const staticMethodValue = [1];
shouldThrow("class", "'SyntaxError: Unexpected end of script'");
shouldThrow("class X {", "'SyntaxError: Unexpected end of script'");
shouldThrow("class X { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an indentifier.'");
-shouldThrow("class X {}", "'SyntaxError: Class declaration without a constructor is not supported yet.'");
+shouldNotThrow("class X {}");
shouldThrow("class X { constructor() {} constructor() {} }", "'SyntaxError: Cannot declare multiple constructors in a single class.'");
shouldNotThrow("class X { constructor() {} static constructor() { return staticMethodValue; } }");
shouldBe("X.constructor()", "staticMethodValue");
-//@ skip
description('Tests for ES6 class syntax default constructor');
-shouldBeTrue('class A { }; window.A = A; new A instanceof A');
+shouldBeTrue('class A { }; new A instanceof A');
shouldThrow('A()', '"TypeError: Cannot call a class constructor"');
shouldBeTrue('A.prototype.constructor instanceof Function');
shouldBe('A.prototype.constructor.name', '"A"');
shouldBeTrue('class B extends A { }; new B instanceof A; new B instanceof A');
shouldThrow('B()', '"TypeError: Cannot call a class constructor"');
shouldBe('B.prototype.constructor.name', '"B"');
-shouldNotBe('A', 'B');
+shouldBeTrue('A !== B');
shouldBe('A.prototype.constructor', 'B.prototype.constructor');
shouldBe('new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2)', '[1, 2]');
-//@ skip
+
+description('Tests for ES6 class syntax expressions');
var constructorCallCount = 0;
const staticMethodValue = [1];
shouldThrow("x = class", "'SyntaxError: Unexpected end of script'");
shouldThrow("x = class {", "'SyntaxError: Unexpected end of script'");
shouldThrow("x = class { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an indentifier.'");
-shouldThrow("x = class {}", "'SyntaxError: Class declaration without a constructor is not supported yet.'");
+shouldNotThrow("x = class {}");
shouldThrow("x = class { constructor() {} constructor() {} }", "'SyntaxError: Cannot declare multiple constructors in a single class.'");
shouldNotThrow("x = class { constructor() {} static constructor() { return staticMethodValue; } }");
shouldBe("x.constructor()", "staticMethodValue");
-//@ skip
description('Tests for ES6 class syntax "extends"');
shouldThrow('x = class extends', '"SyntaxError: Unexpected end of script"');
shouldThrow('x = class extends', '"SyntaxError: Unexpected end of script"');
shouldThrow('x = class extends Base {', '"SyntaxError: Unexpected end of script"');
-shouldThrow('x = class extends Base {}', '"SyntaxError: Class declaration without a constructor is not supported yet."');
+shouldNotThrow('x = class extends Base { }');
shouldNotThrow('x = class extends Base { constructor() { } }');
shouldBe('x.__proto__', 'Base');
shouldBe('x.prototype.__proto__', 'Base.prototype');
shouldBe('x.__proto__', 'Function.prototype');
shouldThrow('x = class extends 3 { constructor() { } }; x.__proto__', '"TypeError: The superclass is not an object."');
shouldThrow('x = class extends "abc" { constructor() { } }; x.__proto__', '"TypeError: The superclass is not an object."');
-evalAndLog('baseWithBadPrototype = class { constructor() { } }; baseWithBadPrototype.prototype = 3');
+shouldNotThrow('baseWithBadPrototype = class { constructor() { } }; baseWithBadPrototype.prototype = 3');
shouldThrow('x = class extends baseWithBadPrototype { constructor() { } }', '"TypeError: The superclass\'s prototype is not an object."');
-evalAndLog('baseWithBadPrototype.prototype = "abc"');
+shouldNotThrow('baseWithBadPrototype.prototype = "abc"');
shouldThrow('x = class extends baseWithBadPrototype { constructor() { } }', '"TypeError: The superclass\'s prototype is not an object."');
shouldNotThrow('baseWithBadPrototype.prototype = null; x = class extends baseWithBadPrototype { constructor() { } }');
-//@ skip
description('Tests for ES6 class syntax "super"');
chainMethod() { return [super.chainMethod(), 'derived']; }
callBaseMethod() { return super.baseMethod(); }
get callBaseMethodInGetter() { return super['baseMethod'](); }
- set callBaseMethodInSetter() { window.valueInSetter = super.baseMethod(); }
+ set callBaseMethodInSetter() { valueInSetter = super.baseMethod(); }
get baseMethodInGetterSetter() { return super.baseMethod; }
- set baseMethodInGetterSetter() { window.valueInSetter = super['baseMethod']; }
+ set baseMethodInGetterSetter() { valueInSetter = super['baseMethod']; }
static staticMethod() { return super.staticMethod(); }
}
shouldBe('new (class extends Base { constructor() { return undefined } })', 'undefined');
shouldBe('x = { }; new (class extends Base { constructor() { return x } });', 'x');
shouldBeFalse('x instanceof Base');
-shouldThrow('new (class extends Base { constructor() { } })', '"TypeError: Cannot return a non-object type in the constructor of a derived class."');
+shouldThrow('new (class extends Base { constructor() { } })', '"ReferenceError: Cannot access uninitialized variable."');
shouldThrow('new (class extends Base { constructor() { return 1; } })', '"TypeError: Cannot return a non-object type in the constructor of a derived class."');
shouldBe('new (class extends null { constructor() { return undefined } })', 'undefined');
shouldBe('x = { }; new (class extends null { constructor() { return x } });', 'x');
shouldBeTrue('x instanceof Object');
-shouldThrow('new (class extends null { constructor() { } })', '"TypeError: Cannot return a non-object type in the constructor of a derived class."');
+shouldThrow('new (class extends null { constructor() { } })', '"ReferenceError: Cannot access uninitialized variable."');
shouldThrow('new (class extends null { constructor() { return 1; } })', '"TypeError: Cannot return a non-object type in the constructor of a derived class."');
shouldNotThrow('new (class extends null { constructor() { super() } })');
shouldThrow('new (class { constructor() { super() } })', '"SyntaxError: Cannot call super() in a base class constructor."');
-CONSOLE MESSAGE: line 76: SyntaxError: Unexpected use of reserved word 'extends'
+CONSOLE MESSAGE: line 76: SyntaxError: Unexpected keyword 'extends'
S7.5.3_A1.11
PASS Expected parsing failure
-CONSOLE MESSAGE: line 76: SyntaxError: Unexpected use of reserved word 'super'
+CONSOLE MESSAGE: line 76: SyntaxError: Cannot reference super.
S7.5.3_A1.27
PASS Expected parsing failure
-CONSOLE MESSAGE: line 76: SyntaxError: Unexpected use of reserved word 'class'
+CONSOLE MESSAGE: line 76: SyntaxError: Unexpected keyword 'class'. Class declaration is not allowed in a lexically nested statement.
S7.5.3_A1.5
PASS Expected parsing failure
+2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Enable ES6 classes by default
+ https://bugs.webkit.org/show_bug.cgi?id=142774
+
+ Reviewed by Gavin Barraclough.
+
+ Enabled the feature and unskipped tests.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * tests/stress/class-syntax-no-loop-tdz.js:
+ * tests/stress/class-syntax-no-tdz-in-catch.js:
+ * tests/stress/class-syntax-no-tdz-in-conditional.js:
+ * tests/stress/class-syntax-no-tdz-in-loop-no-inline-super.js:
+ * tests/stress/class-syntax-no-tdz-in-loop.js:
+ * tests/stress/class-syntax-no-tdz.js:
+ * tests/stress/class-syntax-tdz-in-catch.js:
+ * tests/stress/class-syntax-tdz-in-conditional.js:
+ * tests/stress/class-syntax-tdz-in-loop.js:
+ * tests/stress/class-syntax-tdz.js:
+
2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Better Console Previews for Arrays / Small Objects
ENABLE_CANVAS_PATH = ENABLE_CANVAS_PATH;
ENABLE_CANVAS_PROXY = ;
ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
-ENABLE_ES6_CLASS_SYNTAX = ;
+ENABLE_ES6_CLASS_SYNTAX = ENABLE_ES6_CLASS_SYNTAX;
ENABLE_CONTENT_FILTERING = ENABLE_CONTENT_FILTERING;
ENABLE_CSP_NEXT = ;
ENABLE_CSS_ANIMATIONS_LEVEL_2 = ENABLE_CSS_ANIMATIONS_LEVEL_2;
-//@ skip
class A {
constructor() { }
-//@ skip
class A {
constructor() { }
-//@ skip
class A {
constructor() { }
-//@ skip
class A {
constructor() { }
-//@ skip
class A {
constructor() { }
-//@ skip
class A {
constructor() { }
-//@ skip
class A {
constructor() { }
-//@ skip
class A {
constructor() { }
-//@ skip
class A {
constructor() { }
-//@ skip
class A {
constructor() { }
+2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Enable ES6 classes by default
+ https://bugs.webkit.org/show_bug.cgi?id=142774
+
+ Reviewed by Gavin Barraclough.
+
+ * wtf/FeatureDefines.h:
+
2015-03-16 Csaba Osztrogonác <ossy@webkit.org>
[ARM] Enable generating idiv instructions if it is supported
#endif
#if !defined(ENABLE_ES6_CLASS_SYNTAX)
-#define ENABLE_ES6_CLASS_SYNTAX 0
+#define ENABLE_ES6_CLASS_SYNTAX 1
#endif
#if !defined(ENABLE_CONTENT_EXTENSIONS)
+2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Enable ES6 classes by default
+ https://bugs.webkit.org/show_bug.cgi?id=142774
+
+ Reviewed by Gavin Barraclough.
+
+ * Configurations/FeatureDefines.xcconfig:
+
2015-03-16 Simon Fraser <simon.fraser@apple.com>
Update the debug overlays after layout
ENABLE_CANVAS_PATH = ENABLE_CANVAS_PATH;
ENABLE_CANVAS_PROXY = ;
ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
-ENABLE_ES6_CLASS_SYNTAX = ;
+ENABLE_ES6_CLASS_SYNTAX = ENABLE_ES6_CLASS_SYNTAX;
ENABLE_CONTENT_FILTERING = ENABLE_CONTENT_FILTERING;
ENABLE_CSP_NEXT = ;
ENABLE_CSS_ANIMATIONS_LEVEL_2 = ENABLE_CSS_ANIMATIONS_LEVEL_2;
+2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Enable ES6 classes by default
+ https://bugs.webkit.org/show_bug.cgi?id=142774
+
+ Reviewed by Gavin Barraclough.
+
+ * Configurations/FeatureDefines.xcconfig:
+
2015-03-16 Brent Fulgham <bfulgham@apple.com>
WebKit1 Clients Are Not Reliably Repainted
ENABLE_CANVAS_PATH = ENABLE_CANVAS_PATH;
ENABLE_CANVAS_PROXY = ;
ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
-ENABLE_ES6_CLASS_SYNTAX = ;
+ENABLE_ES6_CLASS_SYNTAX = ENABLE_ES6_CLASS_SYNTAX;
ENABLE_CONTENT_FILTERING = ENABLE_CONTENT_FILTERING;
ENABLE_CSP_NEXT = ;
ENABLE_CSS_ANIMATIONS_LEVEL_2 = ENABLE_CSS_ANIMATIONS_LEVEL_2;
+2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Enable ES6 classes by default
+ https://bugs.webkit.org/show_bug.cgi?id=142774
+
+ Reviewed by Gavin Barraclough.
+
+ * Configurations/FeatureDefines.xcconfig:
+
2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
Don't pass nil as a fireDate for NSTimer
ENABLE_CANVAS_PATH = ENABLE_CANVAS_PATH;
ENABLE_CANVAS_PROXY = ;
ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
-ENABLE_ES6_CLASS_SYNTAX = ;
+ENABLE_ES6_CLASS_SYNTAX = ENABLE_ES6_CLASS_SYNTAX;
ENABLE_CONTENT_FILTERING = ENABLE_CONTENT_FILTERING;
ENABLE_CSP_NEXT = ;
ENABLE_CSS_ANIMATIONS_LEVEL_2 = ENABLE_CSS_ANIMATIONS_LEVEL_2;
WEBKIT_OPTION_DEFINE(ENABLE_CANVAS_PATH "Toggle Canvas Path support" ON)
WEBKIT_OPTION_DEFINE(ENABLE_CANVAS_PROXY "Toggle CanvasProxy support" OFF)
WEBKIT_OPTION_DEFINE(ENABLE_CHANNEL_MESSAGING "Toggle MessageChannel and MessagePort support" ON)
- WEBKIT_OPTION_DEFINE(ENABLE_ES6_CLASS_SYNTAX "Toggle ES6 class syntax support" OFF)
+ WEBKIT_OPTION_DEFINE(ENABLE_ES6_CLASS_SYNTAX "Toggle ES6 class syntax support" ON)
WEBKIT_OPTION_DEFINE(ENABLE_CONTENT_FILTERING "Toggle content filtering support" OFF)
WEBKIT_OPTION_DEFINE(ENABLE_CONTEXT_MENUS "Toggle Context Menu support" ON)
WEBKIT_OPTION_DEFINE(ENABLE_CSP_NEXT "Toggle Content Security Policy 1.1 support" OFF)
+2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Enable ES6 classes by default
+ https://bugs.webkit.org/show_bug.cgi?id=142774
+
+ Reviewed by Gavin Barraclough.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
2015-03-16 Alexey Proskuryakov <ap@apple.com>
Fix webkitpy tests after r181585.
define => "ENABLE_CHANNEL_MESSAGING", default => 1, value => \$channelMessagingSupport },
{ option => "class-syntax", desc => "Toggle ES6 class syntax support",
- define => "ENABLE_ES6_CLASS_SYNTAX", default => 0, value => \$classSyntax },
+ define => "ENABLE_ES6_CLASS_SYNTAX", default => 1, value => \$classSyntax },
{ option => "csp-next", desc => "Toggle Content Security Policy 1.1 support",
define => "ENABLE_CSP_NEXT", default => isGtk(), value => \$cspNextSupport },