diff options
Diffstat (limited to 'JavaScriptCore/parser/Lexer.h')
-rw-r--r-- | JavaScriptCore/parser/Lexer.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/JavaScriptCore/parser/Lexer.h b/JavaScriptCore/parser/Lexer.h index f197093..ec254ce 100644 --- a/JavaScriptCore/parser/Lexer.h +++ b/JavaScriptCore/parser/Lexer.h @@ -1,6 +1,7 @@ /* * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2010 Zoltan Herczeg (zherczeg@inf.u-szeged.hu) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -26,6 +27,7 @@ #include "ParserArena.h" #include "SourceCode.h" #include <wtf/ASCIICType.h> +#include <wtf/AlwaysInline.h> #include <wtf/SegmentedVector.h> #include <wtf/Vector.h> #include <wtf/unicode/Unicode.h> @@ -66,24 +68,23 @@ namespace JSC { Lexer(JSGlobalData*); ~Lexer(); - void shift1(); - void shift2(); - void shift3(); - void shift4(); - void shiftLineTerminator(); - void record8(int); void record16(int); void record16(UChar); void copyCodeWithoutBOMs(); - int currentOffset() const; - const UChar* currentCharacter() const; + ALWAYS_INLINE void shift(); + ALWAYS_INLINE int peek(int offset); + int getUnicodeCharacter(); + void shiftLineTerminator(); + + ALWAYS_INLINE const UChar* currentCharacter() const; + ALWAYS_INLINE int currentOffset() const; - const Identifier* makeIdentifier(const UChar* characters, size_t length); + ALWAYS_INLINE const Identifier* makeIdentifier(const UChar* characters, size_t length); - bool lastTokenWasRestrKeyword() const; + ALWAYS_INLINE bool lastTokenWasRestrKeyword() const; static const size_t initialReadBufferCapacity = 32; @@ -106,10 +107,7 @@ namespace JSC { // current and following unicode characters (int to allow for -1 for end-of-file marker) int m_current; - int m_next1; - int m_next2; - int m_next3; - + IdentifierArena* m_arena; JSGlobalData* m_globalData; |