Title: [88974] trunk
Revision
88974
Author
[email protected]
Date
2011-06-15 14:46:13 -0700 (Wed, 15 Jun 2011)

Log Message

2011-06-15  Oliver Hunt  <[email protected]>

        Reviewed by Darin Adler.

        REGRESSION (r88719): 5by5.tv schedule is not visible
        https://bugs.webkit.org/show_bug.cgi?id=62720

        Add test for the "interesting" ascii characters that may occur in an identifier

        * fast/js/parser-syntax-check-expected.txt:
        * fast/js/script-tests/parser-syntax-check.js:
2011-06-15  Oliver Hunt  <[email protected]>

        Reviewed by Darin Adler.

        REGRESSION (r88719): 5by5.tv schedule is not visible
        https://bugs.webkit.org/show_bug.cgi?id=62720

        Problem here is that the lexer wasn't considering '$' to be
        a valid character in an identifier.

        * parser/Lexer.h:
        (JSC::Lexer::lexExpectIdentifier):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (88973 => 88974)


--- trunk/LayoutTests/ChangeLog	2011-06-15 21:39:17 UTC (rev 88973)
+++ trunk/LayoutTests/ChangeLog	2011-06-15 21:46:13 UTC (rev 88974)
@@ -1,3 +1,15 @@
+2011-06-15  Oliver Hunt  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r88719): 5by5.tv schedule is not visible
+        https://bugs.webkit.org/show_bug.cgi?id=62720
+
+        Add test for the "interesting" ascii characters that may occur in an identifier
+
+        * fast/js/parser-syntax-check-expected.txt:
+        * fast/js/script-tests/parser-syntax-check.js:
+
 2011-06-15  Stephen White  <[email protected]>
 
         Unreviewed; more chromium test expectations updates.

Modified: trunk/LayoutTests/fast/js/parser-syntax-check-expected.txt (88973 => 88974)


--- trunk/LayoutTests/fast/js/parser-syntax-check-expected.txt	2011-06-15 21:39:17 UTC (rev 88973)
+++ trunk/LayoutTests/fast/js/parser-syntax-check-expected.txt	2011-06-15 21:46:13 UTC (rev 88974)
@@ -549,6 +549,24 @@
 PASS Invalid: "function f() { 'use strict'; function __proto__(){} }"
 PASS Invalid: "'use strict'; (function __proto__(){})"
 PASS Invalid: "function f() { 'use strict'; (function __proto__(){}) }"
+PASS Valid:   "if (0) $foo; "
+PASS Valid:   "function f() { if (0) $foo;  }"
+PASS Valid:   "if (0) _foo; "
+PASS Valid:   "function f() { if (0) _foo;  }"
+PASS Valid:   "if (0) foo$; "
+PASS Valid:   "function f() { if (0) foo$;  }"
+PASS Valid:   "if (0) foo_; "
+PASS Valid:   "function f() { if (0) foo_;  }"
+PASS Valid:   "if (0) obj.$foo; "
+PASS Valid:   "function f() { if (0) obj.$foo;  }"
+PASS Valid:   "if (0) obj._foo; "
+PASS Valid:   "function f() { if (0) obj._foo;  }"
+PASS Valid:   "if (0) obj.foo$; "
+PASS Valid:   "function f() { if (0) obj.foo$;  }"
+PASS Valid:   "if (0) obj.foo_; "
+PASS Valid:   "function f() { if (0) obj.foo_;  }"
+PASS Valid:   "if (0) obj.foo\u03bb; "
+PASS Valid:   "function f() { if (0) obj.foo\u03bb;  }"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/js/script-tests/parser-syntax-check.js (88973 => 88974)


--- trunk/LayoutTests/fast/js/script-tests/parser-syntax-check.js	2011-06-15 21:39:17 UTC (rev 88973)
+++ trunk/LayoutTests/fast/js/script-tests/parser-syntax-check.js	2011-06-15 21:46:13 UTC (rev 88974)
@@ -351,4 +351,14 @@
 invalid("'use strict'; function __proto__(){}")
 invalid("'use strict'; (function __proto__(){})")
 
+valid("if (0) $foo; ")
+valid("if (0) _foo; ")
+valid("if (0) foo$; ")
+valid("if (0) foo_; ")
+valid("if (0) obj.$foo; ")
+valid("if (0) obj._foo; ")
+valid("if (0) obj.foo$; ")
+valid("if (0) obj.foo_; ")
+valid("if (0) obj.foo\\u03bb; ")
+
 var successfullyParsed = true;

Modified: trunk/Source/_javascript_Core/ChangeLog (88973 => 88974)


--- trunk/Source/_javascript_Core/ChangeLog	2011-06-15 21:39:17 UTC (rev 88973)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-06-15 21:46:13 UTC (rev 88974)
@@ -1,5 +1,18 @@
 2011-06-15  Oliver Hunt  <[email protected]>
 
+        Reviewed by Darin Adler.
+
+        REGRESSION (r88719): 5by5.tv schedule is not visible
+        https://bugs.webkit.org/show_bug.cgi?id=62720
+
+        Problem here is that the lexer wasn't considering '$' to be
+        a valid character in an identifier.
+
+        * parser/Lexer.h:
+        (JSC::Lexer::lexExpectIdentifier):
+
+2011-06-15  Oliver Hunt  <[email protected]>
+
         Reviewed by Sam Weinig.
 
         Reduce the size of global_resolve

Modified: trunk/Source/_javascript_Core/parser/Lexer.h (88973 => 88974)


--- trunk/Source/_javascript_Core/parser/Lexer.h	2011-06-15 21:39:17 UTC (rev 88973)
+++ trunk/Source/_javascript_Core/parser/Lexer.h	2011-06-15 21:46:13 UTC (rev 88974)
@@ -202,7 +202,7 @@
 
         // Here's the shift
         if (ptr < end) {
-            if (!WTF::isASCII(*ptr) || (*ptr == '\\') || (*ptr == '_'))
+            if ((!WTF::isASCII(*ptr)) || (*ptr == '\\') || (*ptr == '_') || (*ptr == '$'))
                 goto slowCase;
             m_current = *ptr;
         } else
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to