Changeset 131956 in webkit for trunk/Source/JavaScriptCore/parser
- Timestamp:
- Oct 19, 2012, 4:23:34 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore/parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Lexer.cpp
r128542 r131956 1618 1618 } 1619 1619 1620 pattern = makeIdentifier (m_buffer16.data(), m_buffer16.size());1620 pattern = makeIdentifierSameType(m_buffer16.data(), m_buffer16.size()); 1621 1621 m_buffer16.resize(0); 1622 1622 … … 1626 1626 } 1627 1627 1628 flags = makeIdentifier (m_buffer16.data(), m_buffer16.size());1628 flags = makeIdentifierSameType(m_buffer16.data(), m_buffer16.size()); 1629 1629 m_buffer16.resize(0); 1630 1630 -
trunk/Source/JavaScriptCore/parser/Lexer.h
r127191 r131956 147 147 ALWAYS_INLINE const Identifier* makeIdentifier(const LChar* characters, size_t length); 148 148 ALWAYS_INLINE const Identifier* makeIdentifier(const UChar* characters, size_t length); 149 ALWAYS_INLINE const Identifier* makeLCharIdentifier(const LChar* characters, size_t length); 150 ALWAYS_INLINE const Identifier* makeLCharIdentifier(const UChar* characters, size_t length); 151 ALWAYS_INLINE const Identifier* makeIdentifierSameType(const UChar* characters, size_t length); 149 152 ALWAYS_INLINE const Identifier* makeIdentifierLCharFromUChar(const UChar* characters, size_t length); 150 153 … … 240 243 241 244 template <> 245 ALWAYS_INLINE const Identifier* Lexer<LChar>::makeIdentifierSameType(const UChar* characters, size_t length) 246 { 247 return &m_arena->makeIdentifierLCharFromUChar(m_globalData, characters, length); 248 } 249 250 template <> 251 ALWAYS_INLINE const Identifier* Lexer<UChar>::makeIdentifierSameType(const UChar* characters, size_t length) 252 { 253 return &m_arena->makeIdentifier(m_globalData, characters, length); 254 } 255 256 template <> 242 257 ALWAYS_INLINE void Lexer<LChar>::setCodeStart(const StringImpl* sourceString) 243 258 { … … 255 270 template <typename T> 256 271 ALWAYS_INLINE const Identifier* Lexer<T>::makeIdentifierLCharFromUChar(const UChar* characters, size_t length) 272 { 273 return &m_arena->makeIdentifierLCharFromUChar(m_globalData, characters, length); 274 } 275 276 template <typename T> 277 ALWAYS_INLINE const Identifier* Lexer<T>::makeLCharIdentifier(const LChar* characters, size_t length) 278 { 279 return &m_arena->makeIdentifier(m_globalData, characters, length); 280 } 281 282 template <typename T> 283 ALWAYS_INLINE const Identifier* Lexer<T>::makeLCharIdentifier(const UChar* characters, size_t length) 257 284 { 258 285 return &m_arena->makeIdentifierLCharFromUChar(m_globalData, characters, length); … … 294 321 tokenData->ident = 0; 295 322 else 296 tokenData->ident = make Identifier(start, ptr - start);323 tokenData->ident = makeLCharIdentifier(start, ptr - start); 297 324 tokenLocation->line = m_lineNumber; 298 325 tokenLocation->startOffset = start - m_codeStart;
Note:
See TracChangeset
for help on using the changeset viewer.