Changeset 227775 in webkit for trunk/Source/JavaScriptCore/parser/Lexer.cpp
- Timestamp:
- Jan 29, 2018, 11:34:44 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Lexer.cpp
r225799 r227775 1356 1356 } 1357 1357 // Fast check for characters that require special handling. 1358 // Catches 0, \n, \r, 0x2028, and 0x2029 as efficiently1359 // as possible, and lets through all common ASCII characters.1360 if (UNLIKELY( ((static_cast<unsigned>(m_current) - 0xE) & 0x2000))) {1358 // Catches 0, \n, and \r as efficiently as possible, and lets through all common ASCII characters. 1359 static_assert(std::is_unsigned<T>::value, "Lexer expects an unsigned character type"); 1360 if (UNLIKELY(m_current < 0xE)) { 1361 1361 // New-line or end of input is not allowed 1362 if (atEnd() || isLineTerminator(m_current)) {1362 if (atEnd() || m_current == '\r' || m_current == '\n') { 1363 1363 m_lexErrorMessage = ASCIILiteral("Unexpected EOF"); 1364 1364 return atEnd() ? StringUnterminated : StringCannotBeParsed;
Note:
See TracChangeset
for help on using the changeset viewer.