Ignore:
Timestamp:
Oct 30, 2014, 4:50:54 PM (11 years ago)
Author:
[email protected]
Message:

AST Nodes should keep track of their end offset
https://bugs.webkit.org/show_bug.cgi?id=138143

Reviewed by Filip Pizlo.

AST nodes nodes now have an int property for their end text
offsets. This change lays some foundational work that will be
needed in profiling which basic blocks have executed.

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::setEndOffset):

  • parser/Nodes.h:

(JSC::Node::endOffset):
(JSC::Node::setEndOffset):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseExpression):
(JSC::Parser<LexerType>::parseProperty):

  • parser/Parser.h:

(JSC::Parser<LexerType>::parse):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::operatorStackPop):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Parser.h

    r174821 r175396  
    913913                                    m_numConstants);
    914914        result->setLoc(m_source->firstLine(), m_lexer->lineNumber(), m_lexer->currentOffset(), m_lexer->currentLineStartOffset());
     915        result->setEndOffset(m_lexer->currentOffset());
    915916    } else {
    916917        // We can never see a syntax error when reparsing a function, since we should have
Note: See TracChangeset for help on using the changeset viewer.