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/Nodes.h

    r174821 r175396  
    133133        int lineNo() const { return m_position.line; }
    134134        int startOffset() const { return m_position.offset; }
     135        int endOffset() const { return m_endOffset; }
    135136        int lineStartOffset() const { return m_position.lineStartOffset; }
    136137        const JSTextPosition& position() const { return m_position; }
     138        void setEndOffset(int offset) { m_endOffset = offset; }
    137139
    138140    protected:
    139141        JSTextPosition m_position;
     142        int m_endOffset;
    140143    };
    141144
Note: See TracChangeset for help on using the changeset viewer.