Changeset 113352 in webkit


Ignore:
Timestamp:
Apr 5, 2012 12:09:40 PM (12 years ago)
Author:
barraclough@apple.com
Message:

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.

Source/JavaScriptCore:

  • parser/Keywords.table:

LayoutTests:

  • 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:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r113351 r113352  
     12012-04-05  Gavin Barraclough  <barraclough@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=77293
     4        [Un]Reserve 'let'
     5
     6        Rubber stamped by Oliver Hunt.
     7
     8        Revert r106198.
     9        This does break the web - e.g. https://bvi.bnc.ca/index/bnc/indexen.html
     10        If we're going to reserve let, we're going to have to do so in a more
     11        circumspect fashion.
     12
     13        * fast/js/keywords-and-reserved_words-expected.txt:
     14        * fast/js/reserved-words-as-property-expected.txt:
     15        * fast/js/reserved-words-strict-expected.txt:
     16        * fast/js/script-tests/keywords-and-reserved_words.js:
     17        * fast/js/script-tests/reserved-words-as-property.js:
     18        * fast/js/script-tests/reserved-words-strict.js:
     19
    1202012-04-05  Erik Arvidsson  <arv@chromium.org>
    221
  • trunk/LayoutTests/fast/js/keywords-and-reserved_words-expected.txt

    r106198 r113352  
    6161PASS classifyIdentifier("implements") is "strict"
    6262PASS classifyIdentifier("interface") is "strict"
    63 PASS classifyIdentifier("let") is "keyword"
     63PASS classifyIdentifier("let") is "strict"
    6464PASS classifyIdentifier("package") is "strict"
    6565PASS classifyIdentifier("private") is "strict"
  • trunk/LayoutTests/fast/js/reserved-words-as-property-expected.txt

    r106198 r113352  
    13361336PASS "use strict";({ get implements(){}, set implements(){}, parsedOkay: 42 }.parsedOkay === 42) is true
    13371337PASS (function(){"use strict";({ get implements(){}, set implements(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
     1338PASS var let; true is true
     1339PASS (function(){var let; true}); true is true
     1340PASS var let = 42; let === 42 is true
     1341PASS (function(){var let = 42; let === 42}); true is true
     1342PASS function g(let){  }; true is true
     1343PASS (function(){function g(let){  }; true}); true is true
     1344PASS /let/.test(function g(let){  }) is true
     1345PASS (function(){/let/.test(function g(let){  })}); true is true
     1346PASS try{}catch(let){}; true is true
     1347PASS (function(){try{}catch(let){}; true}); true is true
     1348PASS function let(){  }; true is true
     1349PASS (function(){function let(){  }; true}); true is true
     1350PASS ({ "let": 42 }.let === 42) is true
     1351PASS (function(){({ "let": 42 }.let === 42)}); true is true
     1352PASS ({ let: 42 }.let === 42) is true
     1353PASS (function(){({ let: 42 }.let === 42)}); true is true
     1354PASS ({ get let(){}, set let(){}, parsedOkay: 42 }.parsedOkay === 42) is true
     1355PASS (function(){({ get let(){}, set let(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
     1356PASS "use strict";var let; true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1357PASS (function(){"use strict";var let; true}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1358PASS "use strict";var let = 42; let === 42 threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1359PASS (function(){"use strict";var let = 42; let === 42}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1360PASS "use strict";function g(let){ "use strict"; }; true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1361PASS (function(){"use strict";function g(let){ "use strict"; }; true}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1362PASS "use strict";/let/.test(function g(let){ "use strict"; }) threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1363PASS (function(){"use strict";/let/.test(function g(let){ "use strict"; })}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1364PASS "use strict";try{}catch(let){}; true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1365PASS (function(){"use strict";try{}catch(let){}; true}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1366PASS "use strict";function let(){ "use strict"; }; true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1367PASS (function(){"use strict";function let(){ "use strict"; }; true}); true threw exception SyntaxError: Use of reserved word 'let' in strict mode.
     1368PASS "use strict";({ "let": 42 }.let === 42) is true
     1369PASS (function(){"use strict";({ "let": 42 }.let === 42)}); true is true
     1370PASS "use strict";({ let: 42 }.let === 42) is true
     1371PASS (function(){"use strict";({ let: 42 }.let === 42)}); true is true
     1372PASS "use strict";({ get let(){}, set let(){}, parsedOkay: 42 }.parsedOkay === 42) is true
     1373PASS (function(){"use strict";({ get let(){}, set let(){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
    13381374PASS var private; true is true
    13391375PASS (function(){var private; true}); true is true
  • trunk/LayoutTests/fast/js/reserved-words-strict-expected.txt

    r106198 r113352  
    77PASS isReserved('implements') is true
    88PASS isReserved('interface') is true
     9PASS isReserved('let') is true
    910PASS isReserved('package') is true
    1011PASS isReserved('private') is true
  • trunk/LayoutTests/fast/js/script-tests/keywords-and-reserved_words.js

    r106198 r113352  
    105105shouldBe('classifyIdentifier("implements")', '"strict"');
    106106shouldBe('classifyIdentifier("interface")', '"strict"');
    107 shouldBe('classifyIdentifier("let")', '"keyword"'); // Experimentally reserving this; this may be reserved in ES6.
     107shouldBe('classifyIdentifier("let")', '"strict"');
    108108shouldBe('classifyIdentifier("package")', '"strict"');
    109109shouldBe('classifyIdentifier("private")', '"strict"');
  • trunk/LayoutTests/fast/js/script-tests/reserved-words-as-property.js

    r106198 r113352  
    77var strictReservedWords = [
    88    "implements",
     9    "let",
    910    "private",
    1011    "public",
  • trunk/LayoutTests/fast/js/script-tests/reserved-words-strict.js

    r106198 r113352  
    1515var reservedWords = [
    1616    "implements",
     17    "let",
    1718    "private",
    1819    "public",
  • trunk/Source/JavaScriptCore/ChangeLog

    r113333 r113352  
     12012-04-05  Gavin Barraclough  <barraclough@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=77293
     4        [Un]Reserve 'let'
     5
     6        Rubber stamped by Oliver Hunt.
     7
     8        Revert r106198.
     9        This does break the web - e.g. https://bvi.bnc.ca/index/bnc/indexen.html
     10        If we're going to reserve let, we're going to have to do so in a more
     11        circumspect fashion.
     12
     13        * parser/Keywords.table:
     14
    1152012-04-05  Michael Saboff  <msaboff@apple.com>
    216
  • trunk/Source/JavaScriptCore/parser/Keywords.table

    r107527 r113352  
    4444super           RESERVED
    4545
    46 # technically RESERVED_IF_STRICT in ES5, but may be reserved in ES6.
    47 let             RESERVED
    48 
    4946# Reserved for future use in strict code.
    5047implements      RESERVED_IF_STRICT
    5148interface       RESERVED_IF_STRICT
     49let             RESERVED_IF_STRICT
    5250package         RESERVED_IF_STRICT
    5351private         RESERVED_IF_STRICT
Note: See TracChangeset for help on using the changeset viewer.