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


Ignore:
Timestamp:
May 13, 2009, 2:53:59 PM (16 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2009-05-13 Darin Adler <Darin Adler>

Revert the parser arena change. It was a slowdown, not a speedup.
Better luck next time (I'll break it up into pieces).

WebCore:

2009-05-13 Darin Adler <Darin Adler>

Revert the parser arena change. It was a slowdown, not a speedup.
Better luck next time (I'll break it up into pieces).

WebKit/mac:

2009-05-13 Darin Adler <Darin Adler>

Revert the parser arena change. It was a slowdown, not a speedup.
Better luck next time (I'll break it up into pieces).

File:
1 edited

Legend:

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

    r43642 r43661  
    2424
    2525#include "Lookup.h"
    26 #include "ParserArena.h"
     26#include "SegmentedVector.h"
    2727#include "SourceCode.h"
    2828#include <wtf/ASCIICType.h>
     
    4343
    4444        // Functions to set up parsing.
    45         void setCode(const SourceCode&, ParserArena&);
     45        void setCode(const SourceCode&);
    4646        void setIsReparsing() { m_isReparsing = true; }
    4747
     
    5151        bool prevTerminator() const { return m_terminator; }
    5252        SourceCode sourceCode(int openBrace, int closeBrace, int firstLine);
    53         bool scanRegExp(const Identifier*& pattern, const Identifier*& flags, UChar prefix = 0);
    54         bool skipRegExp();
     53        bool scanRegExp();
     54        const UString& pattern() const { return m_pattern; }
     55        const UString& flags() const { return m_flags; }
    5556
    5657        // Functions for use after parsing.
     
    7980        const UChar* currentCharacter() const;
    8081
    81         const Identifier* makeIdentifier(const UChar* characters, size_t length);
     82        JSC::Identifier* makeIdentifier(const UChar* buffer, size_t length);
    8283
    8384        bool lastTokenWasRestrKeyword() const;
    8485
    8586        static const size_t initialReadBufferCapacity = 32;
     87        static const size_t initialIdentifierTableCapacity = 64;
    8688
    8789        int m_lineNumber;
     
    107109        int m_next3;
    108110       
    109         IdentifierArena* m_arena;
     111        SegmentedVector<JSC::Identifier, initialIdentifierTableCapacity> m_identifiers;
    110112
    111113        JSGlobalData* m_globalData;
     114
     115        UString m_pattern;
     116        UString m_flags;
    112117
    113118        const HashTable m_keywordTable;
Note: See TracChangeset for help on using the changeset viewer.