Changeset 64827 in webkit for trunk/JavaScriptCore/parser/Lexer.h


Ignore:
Timestamp:
Aug 6, 2010, 3:33:10 AM (15 years ago)
Author:
[email protected]
Message:

Refactor identifier parsing in lexer
https://bugs.webkit.org/show_bug.cgi?id=41845

Reviewed by Darin Adler.

The code is refactored to avoid gotos. The new code
has the same performance as the old one.

SunSpider --parse-only: no change (from 34.0ms to 33.6ms)
SunSpider: no change (from 523.2ms to 523.5ms)

  • parser/Lexer.cpp:

(JSC::Lexer::parseIdent):
(JSC::Lexer::lex):

  • parser/Lexer.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/Lexer.h

    r63566 r64827  
    9595        ALWAYS_INLINE bool lastTokenWasRestrKeyword() const;
    9696
     97        ALWAYS_INLINE JSTokenType parseIdentifier(JSTokenData*, LexType);
    9798        ALWAYS_INLINE bool parseString(JSTokenData* lvalp);
    9899
Note: See TracChangeset for help on using the changeset viewer.