Ignore:
Timestamp:
Jun 13, 2011, 3:38:22 PM (14 years ago)
Author:
[email protected]
Message:

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

Reviewed by Gavin Barraclough.

Make it possible to inline the common case of identifier lexing
https://bugs.webkit.org/show_bug.cgi?id=62600

Add a lexing function that expects to lex an "normal" alpha numeric
identifier (that ignores keywords) so it's possible to inline the
common parsing cases. This comes out as a reasonable parsing speed
boost.

  • parser/JSParser.cpp: (JSC::JSParser::nextExpectIdentifier): (JSC::JSParser::parseProperty): (JSC::JSParser::parseMemberExpression):
  • parser/Lexer.cpp:
  • parser/Lexer.h: (JSC::Lexer::makeIdentifier): (JSC::Lexer::lexExpectIdentifier):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Lexer.cpp

    r88094 r88719  
    332332}
    333333
    334 ALWAYS_INLINE const Identifier* Lexer::makeIdentifier(const UChar* characters, size_t length)
    335 {
    336     return &m_arena->makeIdentifier(m_globalData, characters, length);
    337 }
    338 
    339334ALWAYS_INLINE bool Lexer::lastTokenWasRestrKeyword() const
    340335{
Note: See TracChangeset for help on using the changeset viewer.