Ignore:
Timestamp:
Jul 9, 2010, 2:24:07 PM (15 years ago)
Author:
[email protected]
Message:

2010-07-09 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

Remove a couple of excess writes from the lexer
https://bugs.webkit.org/show_bug.cgi?id=41981

Remove a couple of fields from JSTokenInfo, and rename the remaining ones
to something more accurate

  • parser/JSParser.cpp: (JSC::JSParser::next): (JSC::JSParser::tokenStart): (JSC::JSParser::tokenLine): (JSC::JSParser::tokenEnd):
  • parser/JSParser.h: (JSC::JSTokenInfo::JSTokenInfo):
  • parser/Lexer.cpp: (JSC::Lexer::lex):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/JSParser.cpp

    r62848 r62995  
    8686    void next()
    8787    {
    88         m_lastLine = token().m_info.last_line;
    89         m_lastTokenEnd = token().m_info.last_column;
     88        m_lastLine = token().m_info.line;
     89        m_lastTokenEnd = token().m_info.endOffset;
    9090        m_lexer->setLastLineNumber(m_lastLine);
    9191        m_token.m_type = m_lexer->lex(&m_token.m_data, &m_token.m_info);
     
    108108    int tokenStart()
    109109    {
    110         return token().m_info.first_column;
     110        return token().m_info.startOffset;
    111111    }
    112112
    113113    int tokenLine()
    114114    {
    115         return token().m_info.first_line;
     115        return token().m_info.line;
    116116    }
    117117
    118118    int tokenEnd()
    119119    {
    120         return token().m_info.last_column;
     120        return token().m_info.endOffset;
    121121    }
    122122
Note: See TracChangeset for help on using the changeset viewer.