Diff
Modified: trunk/LayoutTests/ChangeLog (113351 => 113352)
--- trunk/LayoutTests/ChangeLog 2012-04-05 19:08:30 UTC (rev 113351)
+++ trunk/LayoutTests/ChangeLog 2012-04-05 19:09:40 UTC (rev 113352)
@@ -1,3 +1,22 @@
+2012-04-05 Gavin Barraclough <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=77293
+ [Un]Reserve 'let'
+
+ Rubber stamped by Oliver Hunt.
+
+ Revert r106198.
+ This does break the web - e.g. https://bvi.bnc.ca/index/bnc/indexen.html
+ If we're going to reserve let, we're going to have to do so in a more
+ circumspect fashion.
+
+ * fast/js/keywords-and-reserved_words-expected.txt:
+ * fast/js/reserved-words-as-property-expected.txt:
+ * fast/js/reserved-words-strict-expected.txt:
+ * fast/js/script-tests/keywords-and-reserved_words.js:
+ * fast/js/script-tests/reserved-words-as-property.js:
+ * fast/js/script-tests/reserved-words-strict.js:
+
2012-04-05 Erik Arvidsson <[email protected]>
HTMLSelectElement does not have a getter for namedItem. This fixes the invalid test
Modified: trunk/LayoutTests/fast/js/keywords-and-reserved_words-expected.txt (113351 => 113352)
--- trunk/LayoutTests/fast/js/keywords-and-reserved_words-expected.txt 2012-04-05 19:08:30 UTC (rev 113351)
+++ trunk/LayoutTests/fast/js/keywords-and-reserved_words-expected.txt 2012-04-05 19:09:40 UTC (rev 113352)
@@ -60,7 +60,7 @@
PASS classifyIdentifier("super") is "keyword"
PASS classifyIdentifier("implements") is "strict"
PASS classifyIdentifier("interface") is "strict"
-PASS classifyIdentifier("let") is "keyword"
+PASS classifyIdentifier("let") is "strict"
PASS classifyIdentifier("package") is "strict"
PASS classifyIdentifier("private") is "strict"
PASS classifyIdentifier("protected") is "strict"
Modified: trunk/LayoutTests/fast/js/reserved-words-as-property-expected.txt (113351 => 113352)
--- trunk/LayoutTests/fast/js/reserved-words-as-property-expected.txt 2012-04-05 19:08:30 UTC (rev 113351)
+++ trunk/LayoutTests/fast/js/reserved-words-as-property-expected.txt 2012-04-05 19:09:40 UTC (rev 113352)
@@ -1335,6 +1335,42 @@
PASS (function(){"use strict";({ implements: 42 }.implements === 42)}); true is true
PASS "use strict";({ get implements(){}, set implements(){}, parsedOkay: 42 }.parsedOkay === 42) is true
PASS (function(){"use strict";({ get implements(){}, set implements(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
+PASS var let; true is true
+PASS (function(){var let; true}); true is true
+PASS var let = 42; let === 42 is true
+PASS (function(){var let = 42; let === 42}); true is true
+PASS function g(let){ }; true is true
+PASS (function(){function g(let){ }; true}); true is true
+PASS /let/.test(function g(let){ }) is true
+PASS (function(){/let/.test(function g(let){ })}); true is true
+PASS try{}catch(let){}; true is true
+PASS (function(){try{}catch(let){}; true}); true is true
+PASS function let(){ }; true is true
+PASS (function(){function let(){ }; true}); true is true
+PASS ({ "let": 42 }.let === 42) is true
+PASS (function(){({ "let": 42 }.let === 42)}); true is true
+PASS ({ let: 42 }.let === 42) is true
+PASS (function(){({ let: 42 }.let === 42)}); true is true
+PASS ({ get let(){}, set let(){}, parsedOkay: 42 }.parsedOkay === 42) is true
+PASS (function(){({ get let(){}, set let(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
+PASS "use strict";var let; true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS (function(){"use strict";var let; true}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS "use strict";var let = 42; let === 42 threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS (function(){"use strict";var let = 42; let === 42}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS "use strict";function g(let){ "use strict"; }; true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS (function(){"use strict";function g(let){ "use strict"; }; true}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS "use strict";/let/.test(function g(let){ "use strict"; }) threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS (function(){"use strict";/let/.test(function g(let){ "use strict"; })}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS "use strict";try{}catch(let){}; true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS (function(){"use strict";try{}catch(let){}; true}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS "use strict";function let(){ "use strict"; }; true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS (function(){"use strict";function let(){ "use strict"; }; true}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
+PASS "use strict";({ "let": 42 }.let === 42) is true
+PASS (function(){"use strict";({ "let": 42 }.let === 42)}); true is true
+PASS "use strict";({ let: 42 }.let === 42) is true
+PASS (function(){"use strict";({ let: 42 }.let === 42)}); true is true
+PASS "use strict";({ get let(){}, set let(){}, parsedOkay: 42 }.parsedOkay === 42) is true
+PASS (function(){"use strict";({ get let(){}, set let(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
PASS var private; true is true
PASS (function(){var private; true}); true is true
PASS var private = 42; private === 42 is true
Modified: trunk/LayoutTests/fast/js/reserved-words-strict-expected.txt (113351 => 113352)
--- trunk/LayoutTests/fast/js/reserved-words-strict-expected.txt 2012-04-05 19:08:30 UTC (rev 113351)
+++ trunk/LayoutTests/fast/js/reserved-words-strict-expected.txt 2012-04-05 19:09:40 UTC (rev 113352)
@@ -6,6 +6,7 @@
SHOULD BE RESERVED:
PASS isReserved('implements') is true
PASS isReserved('interface') is true
+PASS isReserved('let') is true
PASS isReserved('package') is true
PASS isReserved('private') is true
PASS isReserved('protected') is true
Modified: trunk/LayoutTests/fast/js/script-tests/keywords-and-reserved_words.js (113351 => 113352)
--- trunk/LayoutTests/fast/js/script-tests/keywords-and-reserved_words.js 2012-04-05 19:08:30 UTC (rev 113351)
+++ trunk/LayoutTests/fast/js/script-tests/keywords-and-reserved_words.js 2012-04-05 19:09:40 UTC (rev 113352)
@@ -104,7 +104,7 @@
// Future Reserved Words, in strict mode only.
shouldBe('classifyIdentifier("implements")', '"strict"');
shouldBe('classifyIdentifier("interface")', '"strict"');
-shouldBe('classifyIdentifier("let")', '"keyword"'); // Experimentally reserving this; this may be reserved in ES6.
+shouldBe('classifyIdentifier("let")', '"strict"');
shouldBe('classifyIdentifier("package")', '"strict"');
shouldBe('classifyIdentifier("private")', '"strict"');
shouldBe('classifyIdentifier("protected")', '"strict"');
Modified: trunk/LayoutTests/fast/js/script-tests/reserved-words-as-property.js (113351 => 113352)
--- trunk/LayoutTests/fast/js/script-tests/reserved-words-as-property.js 2012-04-05 19:08:30 UTC (rev 113351)
+++ trunk/LayoutTests/fast/js/script-tests/reserved-words-as-property.js 2012-04-05 19:09:40 UTC (rev 113352)
@@ -6,6 +6,7 @@
var strictReservedWords = [
"implements",
+ "let",
"private",
"public",
"yield",
Modified: trunk/LayoutTests/fast/js/script-tests/reserved-words-strict.js (113351 => 113352)
--- trunk/LayoutTests/fast/js/script-tests/reserved-words-strict.js 2012-04-05 19:08:30 UTC (rev 113351)
+++ trunk/LayoutTests/fast/js/script-tests/reserved-words-strict.js 2012-04-05 19:09:40 UTC (rev 113352)
@@ -14,6 +14,7 @@
var reservedWords = [
"implements",
+ "let",
"private",
"public",
"yield",
Modified: trunk/Source/_javascript_Core/ChangeLog (113351 => 113352)
--- trunk/Source/_javascript_Core/ChangeLog 2012-04-05 19:08:30 UTC (rev 113351)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-04-05 19:09:40 UTC (rev 113352)
@@ -1,3 +1,17 @@
+2012-04-05 Gavin Barraclough <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=77293
+ [Un]Reserve 'let'
+
+ Rubber stamped by Oliver Hunt.
+
+ Revert r106198.
+ This does break the web - e.g. https://bvi.bnc.ca/index/bnc/indexen.html
+ If we're going to reserve let, we're going to have to do so in a more
+ circumspect fashion.
+
+ * parser/Keywords.table:
+
2012-04-05 Michael Saboff <[email protected]>
Rolling out http://trac.webkit.org/changeset/113262.
Modified: trunk/Source/_javascript_Core/parser/Keywords.table (113351 => 113352)
--- trunk/Source/_javascript_Core/parser/Keywords.table 2012-04-05 19:08:30 UTC (rev 113351)
+++ trunk/Source/_javascript_Core/parser/Keywords.table 2012-04-05 19:09:40 UTC (rev 113352)
@@ -43,12 +43,10 @@
import RESERVED
super RESERVED
-# technically RESERVED_IF_STRICT in ES5, but may be reserved in ES6.
-let RESERVED
-
# Reserved for future use in strict code.
implements RESERVED_IF_STRICT
interface RESERVED_IF_STRICT
+let RESERVED_IF_STRICT
package RESERVED_IF_STRICT
private RESERVED_IF_STRICT
protected RESERVED_IF_STRICT