tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / JavaScriptCore / KeywordLookup.h
1 // This file was generated by KeywordLookupGenerator.py.  Do not edit.
2
3 #if CPU(NEEDS_ALIGNED_ACCESS)
4
5 #define COMPARE_2CHARS(address, char1, char2) \
6     (((address)[0] == char1) && ((address)[1] == char2))
7 #define COMPARE_4CHARS(address, char1, char2, char3, char4) \
8     (COMPARE_2CHARS(address, char1, char2) && COMPARE_2CHARS((address) + 2, char3, char4))
9 #define COMPARE_2UCHARS(address, char1, char2) \
10     (((address)[0] == char1) && ((address)[1] == char2))
11 #define COMPARE_4UCHARS(address, char1, char2, char3, char4) \
12     (COMPARE_2UCHARS(address, char1, char2) && COMPARE_2UCHARS((address) + 2, char3, char4))
13
14 #else // CPU(NEEDS_ALIGNED_ACCESS)
15
16 #if CPU(BIG_ENDIAN)
17
18 #define CHARPAIR_TOUINT16(a, b) \
19     ((((uint16_t)(a)) << 8) + (uint16_t)(b))
20 #define CHARQUAD_TOUINT32(a, b, c, d) \
21     ((((uint32_t)(CHARPAIR_TOUINT16(a, b))) << 16) + CHARPAIR_TOUINT16(c, d))
22 #define UCHARPAIR_TOUINT32(a, b) \
23     ((((uint32_t)(a)) << 16) + (uint32_t)(b))
24 #define UCHARQUAD_TOUINT64(a, b, c, d) \
25     ((((uint64_t)(UCHARQUAD_TOUINT64(a, b))) << 32) + UCHARPAIR_TOUINT32(c, d))
26
27 #else // CPU(BIG_ENDIAN)
28
29 #define CHARPAIR_TOUINT16(a, b) \
30     ((((uint16_t)(b)) << 8) + (uint16_t)(a))
31 #define CHARQUAD_TOUINT32(a, b, c, d) \
32     ((((uint32_t)(CHARPAIR_TOUINT16(c, d))) << 16) + CHARPAIR_TOUINT16(a, b))
33 #define UCHARPAIR_TOUINT32(a, b) \
34     ((((uint32_t)(b)) << 16) + (uint32_t)(a))
35 #define UCHARQUAD_TOUINT64(a, b, c, d) \
36     ((((uint64_t)(UCHARPAIR_TOUINT32(c, d))) << 32) + UCHARPAIR_TOUINT32(a, b))
37
38 #endif // CPU(BIG_ENDIAN)
39
40
41 #define COMPARE_2CHARS(address, char1, char2) \
42     (((uint16_t*)(address))[0] == CHARPAIR_TOUINT16(char1, char2))
43 #define COMPARE_2UCHARS(address, char1, char2) \
44     (((uint32_t*)(address))[0] == UCHARPAIR_TOUINT32(char1, char2))
45
46 #if CPU(X86_64)
47
48 #define COMPARE_4CHARS(address, char1, char2, char3, char4) \
49     (((uint32_t*)(address))[0] == CHARQUAD_TOUINT32(char1, char2, char3, char4))
50 #define COMPARE_4UCHARS(address, char1, char2, char3, char4) \
51     (((uint64_t*)(address))[0] == UCHARQUAD_TOUINT64(char1, char2, char3, char4))
52
53 #else // CPU(X86_64)
54
55 #define COMPARE_4CHARS(address, char1, char2, char3, char4) \
56     (COMPARE_2CHARS(address, char1, char2) && COMPARE_2CHARS((address) + 2, char3, char4))
57 #define COMPARE_4UCHARS(address, char1, char2, char3, char4) \
58     (COMPARE_2UCHARS(address, char1, char2) && COMPARE_2UCHARS((address) + 2, char3, char4))
59
60 #endif // CPU(X86_64)
61
62 #endif // CPU(NEEDS_ALIGNED_ACCESS)
63
64 #define COMPARE_3CHARS(address, char1, char2, char3) \
65     (COMPARE_2CHARS(address, char1, char2) && ((address)[2] == (char3)))
66 #define COMPARE_3UCHARS(address, char1, char2, char3) \
67     (COMPARE_2UCHARS(address, char1, char2) && ((address)[2] == (char3)))
68 #define COMPARE_5CHARS(address, char1, char2, char3, char4, char5) \
69     (COMPARE_4CHARS(address, char1, char2, char3, char4) && ((address)[4] == (char5)))
70 #define COMPARE_5UCHARS(address, char1, char2, char3, char4, char5) \
71     (COMPARE_4UCHARS(address, char1, char2, char3, char4) && ((address)[4] == (char5)))
72 #define COMPARE_6CHARS(address, char1, char2, char3, char4, char5, char6) \
73     (COMPARE_4CHARS(address, char1, char2, char3, char4) && COMPARE_2CHARS(address + 4, char5, char6))
74 #define COMPARE_6UCHARS(address, char1, char2, char3, char4, char5, char6) \
75     (COMPARE_4UCHARS(address, char1, char2, char3, char4) && COMPARE_2UCHARS(address + 4, char5, char6))
76 #define COMPARE_7CHARS(address, char1, char2, char3, char4, char5, char6, char7) \
77     (COMPARE_4CHARS(address, char1, char2, char3, char4) && COMPARE_4CHARS(address + 3, char4, char5, char6, char7))
78 #define COMPARE_7UCHARS(address, char1, char2, char3, char4, char5, char6, char7) \
79     (COMPARE_4UCHARS(address, char1, char2, char3, char4) && COMPARE_4UCHARS(address + 3, char4, char5, char6, char7))
80 #define COMPARE_8CHARS(address, char1, char2, char3, char4, char5, char6, char7, char8) \
81     (COMPARE_4CHARS(address, char1, char2, char3, char4) && COMPARE_4CHARS(address + 4, char5, char6, char7, char8))
82 #define COMPARE_8UCHARS(address, char1, char2, char3, char4, char5, char6, char7, char8) \
83     (COMPARE_4UCHARS(address, char1, char2, char3, char4) && COMPARE_4UCHARS(address + 4, char5, char6, char7, char8))
84
85 namespace JSC {
86
87 static ALWAYS_INLINE bool isIdentPart(int c);
88 static const int maxTokenLength = 11;
89
90 template <>
91 template <bool shouldCreateIdentifier> ALWAYS_INLINE JSTokenType Lexer<UChar>::parseKeyword(JSTokenData* data)
92 {
93     ASSERT(m_codeEnd - m_code >= maxTokenLength);
94
95     const UChar* code = m_code;
96     if (code[0] == 'f') {
97         if (COMPARE_7UCHARS(code + 1, 'u', 'n', 'c', 't', 'i', 'o', 'n')) {
98             if (!isIdentPart(code[8])) {
99                 internalShift<8>();
100                 if (shouldCreateIdentifier)
101                     data->ident = &m_globalData->propertyNames->functionKeyword;
102                 return FUNCTION;
103             }
104         } else if (COMPARE_2UCHARS(code + 1, 'o', 'r')) {
105             if (!isIdentPart(code[3])) {
106                 internalShift<3>();
107                 if (shouldCreateIdentifier)
108                     data->ident = &m_globalData->propertyNames->forKeyword;
109                 return FOR;
110             }
111         } else if (COMPARE_4UCHARS(code + 1, 'a', 'l', 's', 'e')) {
112             if (!isIdentPart(code[5])) {
113                 internalShift<5>();
114                 if (shouldCreateIdentifier)
115                     data->ident = &m_globalData->propertyNames->falseKeyword;
116                 return FALSETOKEN;
117             }
118         } else if (COMPARE_6UCHARS(code + 1, 'i', 'n', 'a', 'l', 'l', 'y')) {
119             if (!isIdentPart(code[7])) {
120                 internalShift<7>();
121                 if (shouldCreateIdentifier)
122                     data->ident = &m_globalData->propertyNames->finallyKeyword;
123                 return FINALLY;
124             }
125         }
126     } else if (code[0] == 't') {
127         if (code[1] == 'h') {
128             if (COMPARE_2UCHARS(code + 2, 'i', 's')) {
129                 if (!isIdentPart(code[4])) {
130                     internalShift<4>();
131                     if (shouldCreateIdentifier)
132                         data->ident = &m_globalData->propertyNames->thisKeyword;
133                     return THISTOKEN;
134                 }
135             } else if (COMPARE_4UCHARS(code + 1, 'h', 'r', 'o', 'w')) {
136                 if (!isIdentPart(code[5])) {
137                     internalShift<5>();
138                     if (shouldCreateIdentifier)
139                         data->ident = &m_globalData->propertyNames->throwKeyword;
140                     return THROW;
141                 }
142             }
143         } else if (code[1] == 'r') {
144             if (COMPARE_2UCHARS(code + 2, 'u', 'e')) {
145                 if (!isIdentPart(code[4])) {
146                     internalShift<4>();
147                     if (shouldCreateIdentifier)
148                         data->ident = &m_globalData->propertyNames->trueKeyword;
149                     return TRUETOKEN;
150                 }
151             } else if (code[2] == 'y') {
152                 if (!isIdentPart(code[3])) {
153                     internalShift<3>();
154                     if (shouldCreateIdentifier)
155                         data->ident = &m_globalData->propertyNames->tryKeyword;
156                     return TRY;
157                 }
158             }
159         } else if (COMPARE_5UCHARS(code + 1, 'y', 'p', 'e', 'o', 'f')) {
160             if (!isIdentPart(code[6])) {
161                 internalShift<6>();
162                 if (shouldCreateIdentifier)
163                     data->ident = &m_globalData->propertyNames->typeofKeyword;
164                 return TYPEOF;
165             }
166         }
167     } else if (code[0] == 'i') {
168         if (code[1] == 'f') {
169             if (!isIdentPart(code[2])) {
170                 internalShift<2>();
171                 if (shouldCreateIdentifier)
172                     data->ident = &m_globalData->propertyNames->ifKeyword;
173                 return IF;
174             }
175         } else if (code[1] == 'n') {
176             if (!isIdentPart(code[2])) {
177                 internalShift<2>();
178                 if (shouldCreateIdentifier)
179                     data->ident = &m_globalData->propertyNames->inKeyword;
180                 return INTOKEN;
181             }
182             if (COMPARE_7UCHARS(code + 2, 't', 'e', 'r', 'f', 'a', 'c', 'e')) {
183                 if (!isIdentPart(code[9])) {
184                     internalShift<9>();
185                     if (shouldCreateIdentifier)
186                         data->ident = &m_globalData->propertyNames->interfaceKeyword;
187                     return RESERVED_IF_STRICT;
188                 }
189             } else if (COMPARE_8UCHARS(code + 2, 's', 't', 'a', 'n', 'c', 'e', 'o', 'f')) {
190                 if (!isIdentPart(code[10])) {
191                     internalShift<10>();
192                     if (shouldCreateIdentifier)
193                         data->ident = &m_globalData->propertyNames->instanceofKeyword;
194                     return INSTANCEOF;
195                 }
196             }
197         } else if (COMPARE_2UCHARS(code + 1, 'm', 'p')) {
198             if (COMPARE_4UCHARS(code + 2, 'p', 'o', 'r', 't')) {
199                 if (!isIdentPart(code[6])) {
200                     internalShift<6>();
201                     if (shouldCreateIdentifier)
202                         data->ident = &m_globalData->propertyNames->importKeyword;
203                     return RESERVED;
204                 }
205             } else if (COMPARE_7UCHARS(code + 3, 'l', 'e', 'm', 'e', 'n', 't', 's')) {
206                 if (!isIdentPart(code[10])) {
207                     internalShift<10>();
208                     if (shouldCreateIdentifier)
209                         data->ident = &m_globalData->propertyNames->implementsKeyword;
210                     return RESERVED_IF_STRICT;
211                 }
212             }
213         }
214     } else if (code[0] == 'v') {
215         if (COMPARE_2UCHARS(code + 1, 'a', 'r')) {
216             if (!isIdentPart(code[3])) {
217                 internalShift<3>();
218                 if (shouldCreateIdentifier)
219                     data->ident = &m_globalData->propertyNames->varKeyword;
220                 return VAR;
221             }
222         } else if (COMPARE_4UCHARS(code, 'v', 'o', 'i', 'd')) {
223             if (!isIdentPart(code[4])) {
224                 internalShift<4>();
225                 if (shouldCreateIdentifier)
226                     data->ident = &m_globalData->propertyNames->voidKeyword;
227                 return VOIDTOKEN;
228             }
229         }
230     } else if (COMPARE_6UCHARS(code, 'r', 'e', 't', 'u', 'r', 'n')) {
231         if (!isIdentPart(code[6])) {
232             internalShift<6>();
233             if (shouldCreateIdentifier)
234                 data->ident = &m_globalData->propertyNames->returnKeyword;
235             return RETURN;
236         }
237     } else if (code[0] == 'n') {
238         if (COMPARE_4UCHARS(code, 'n', 'u', 'l', 'l')) {
239             if (!isIdentPart(code[4])) {
240                 internalShift<4>();
241                 if (shouldCreateIdentifier)
242                     data->ident = &m_globalData->propertyNames->nullKeyword;
243                 return NULLTOKEN;
244             }
245         } else if (COMPARE_2UCHARS(code + 1, 'e', 'w')) {
246             if (!isIdentPart(code[3])) {
247                 internalShift<3>();
248                 if (shouldCreateIdentifier)
249                     data->ident = &m_globalData->propertyNames->newKeyword;
250                 return NEW;
251             }
252         }
253     } else if (code[0] == 'e') {
254         if (COMPARE_4UCHARS(code, 'e', 'l', 's', 'e')) {
255             if (!isIdentPart(code[4])) {
256                 internalShift<4>();
257                 if (shouldCreateIdentifier)
258                     data->ident = &m_globalData->propertyNames->elseKeyword;
259                 return ELSE;
260             }
261         } else if (code[1] == 'x') {
262             if (COMPARE_4UCHARS(code + 2, 'p', 'o', 'r', 't')) {
263                 if (!isIdentPart(code[6])) {
264                     internalShift<6>();
265                     if (shouldCreateIdentifier)
266                         data->ident = &m_globalData->propertyNames->exportKeyword;
267                     return RESERVED;
268                 }
269             } else if (COMPARE_5UCHARS(code + 2, 't', 'e', 'n', 'd', 's')) {
270                 if (!isIdentPart(code[7])) {
271                     internalShift<7>();
272                     if (shouldCreateIdentifier)
273                         data->ident = &m_globalData->propertyNames->extendsKeyword;
274                     return RESERVED;
275                 }
276             }
277         } else if (COMPARE_4UCHARS(code, 'e', 'n', 'u', 'm')) {
278             if (!isIdentPart(code[4])) {
279                 internalShift<4>();
280                 if (shouldCreateIdentifier)
281                     data->ident = &m_globalData->propertyNames->enumKeyword;
282                 return RESERVED;
283             }
284         }
285     } else if (code[0] == 'c') {
286         if (code[1] == 'a') {
287             if (COMPARE_4UCHARS(code + 1, 'a', 't', 'c', 'h')) {
288                 if (!isIdentPart(code[5])) {
289                     internalShift<5>();
290                     if (shouldCreateIdentifier)
291                         data->ident = &m_globalData->propertyNames->catchKeyword;
292                     return CATCH;
293                 }
294             } else if (COMPARE_2UCHARS(code + 2, 's', 'e')) {
295                 if (!isIdentPart(code[4])) {
296                     internalShift<4>();
297                     if (shouldCreateIdentifier)
298                         data->ident = &m_globalData->propertyNames->caseKeyword;
299                     return CASE;
300                 }
301             }
302         } else if (COMPARE_2UCHARS(code + 1, 'o', 'n')) {
303             if (COMPARE_5UCHARS(code + 3, 't', 'i', 'n', 'u', 'e')) {
304                 if (!isIdentPart(code[8])) {
305                     internalShift<8>();
306                     if (shouldCreateIdentifier)
307                         data->ident = &m_globalData->propertyNames->continueKeyword;
308                     return CONTINUE;
309                 }
310             } else if (COMPARE_2UCHARS(code + 3, 's', 't')) {
311                 if (!isIdentPart(code[5])) {
312                     internalShift<5>();
313                     if (shouldCreateIdentifier)
314                         data->ident = &m_globalData->propertyNames->constKeyword;
315                     return CONSTTOKEN;
316                 }
317             }
318         } else if (COMPARE_4UCHARS(code + 1, 'l', 'a', 's', 's')) {
319             if (!isIdentPart(code[5])) {
320                 internalShift<5>();
321                 if (shouldCreateIdentifier)
322                     data->ident = &m_globalData->propertyNames->classKeyword;
323                 return RESERVED;
324             }
325         }
326     } else if (COMPARE_5UCHARS(code, 'b', 'r', 'e', 'a', 'k')) {
327         if (!isIdentPart(code[5])) {
328             internalShift<5>();
329             if (shouldCreateIdentifier)
330                 data->ident = &m_globalData->propertyNames->breakKeyword;
331             return BREAK;
332         }
333     } else if (code[0] == 'w') {
334         if (COMPARE_4UCHARS(code + 1, 'h', 'i', 'l', 'e')) {
335             if (!isIdentPart(code[5])) {
336                 internalShift<5>();
337                 if (shouldCreateIdentifier)
338                     data->ident = &m_globalData->propertyNames->whileKeyword;
339                 return WHILE;
340             }
341         } else if (COMPARE_4UCHARS(code, 'w', 'i', 't', 'h')) {
342             if (!isIdentPart(code[4])) {
343                 internalShift<4>();
344                 if (shouldCreateIdentifier)
345                     data->ident = &m_globalData->propertyNames->withKeyword;
346                 return WITH;
347             }
348         }
349     } else if (code[0] == 'd') {
350         if (code[1] == 'e') {
351             if (COMPARE_5UCHARS(code + 2, 'f', 'a', 'u', 'l', 't')) {
352                 if (!isIdentPart(code[7])) {
353                     internalShift<7>();
354                     if (shouldCreateIdentifier)
355                         data->ident = &m_globalData->propertyNames->defaultKeyword;
356                     return DEFAULT;
357                 }
358             } else if (COMPARE_6UCHARS(code + 2, 'b', 'u', 'g', 'g', 'e', 'r')) {
359                 if (!isIdentPart(code[8])) {
360                     internalShift<8>();
361                     if (shouldCreateIdentifier)
362                         data->ident = &m_globalData->propertyNames->debuggerKeyword;
363                     return DEBUGGER;
364                 }
365             } else if (COMPARE_4UCHARS(code + 2, 'l', 'e', 't', 'e')) {
366                 if (!isIdentPart(code[6])) {
367                     internalShift<6>();
368                     if (shouldCreateIdentifier)
369                         data->ident = &m_globalData->propertyNames->deleteKeyword;
370                     return DELETETOKEN;
371                 }
372             }
373         } else if (code[1] == 'o') {
374             if (!isIdentPart(code[2])) {
375                 internalShift<2>();
376                 if (shouldCreateIdentifier)
377                     data->ident = &m_globalData->propertyNames->doKeyword;
378                 return DO;
379             }
380         }
381     } else if (COMPARE_5UCHARS(code, 'y', 'i', 'e', 'l', 'd')) {
382         if (!isIdentPart(code[5])) {
383             internalShift<5>();
384             if (shouldCreateIdentifier)
385                 data->ident = &m_globalData->propertyNames->yieldKeyword;
386             return RESERVED_IF_STRICT;
387         }
388     } else if (code[0] == 'p') {
389         if (code[1] == 'r') {
390             if (COMPARE_5UCHARS(code + 2, 'i', 'v', 'a', 't', 'e')) {
391                 if (!isIdentPart(code[7])) {
392                     internalShift<7>();
393                     if (shouldCreateIdentifier)
394                         data->ident = &m_globalData->propertyNames->privateKeyword;
395                     return RESERVED_IF_STRICT;
396                 }
397             } else if (COMPARE_7UCHARS(code + 2, 'o', 't', 'e', 'c', 't', 'e', 'd')) {
398                 if (!isIdentPart(code[9])) {
399                     internalShift<9>();
400                     if (shouldCreateIdentifier)
401                         data->ident = &m_globalData->propertyNames->protectedKeyword;
402                     return RESERVED_IF_STRICT;
403                 }
404             }
405         } else if (COMPARE_5UCHARS(code + 1, 'u', 'b', 'l', 'i', 'c')) {
406             if (!isIdentPart(code[6])) {
407                 internalShift<6>();
408                 if (shouldCreateIdentifier)
409                     data->ident = &m_globalData->propertyNames->publicKeyword;
410                 return RESERVED_IF_STRICT;
411             }
412         } else if (COMPARE_6UCHARS(code + 1, 'a', 'c', 'k', 'a', 'g', 'e')) {
413             if (!isIdentPart(code[7])) {
414                 internalShift<7>();
415                 if (shouldCreateIdentifier)
416                     data->ident = &m_globalData->propertyNames->packageKeyword;
417                 return RESERVED_IF_STRICT;
418             }
419         }
420     } else if (code[0] == 's') {
421         if (COMPARE_5UCHARS(code + 1, 'w', 'i', 't', 'c', 'h')) {
422             if (!isIdentPart(code[6])) {
423                 internalShift<6>();
424                 if (shouldCreateIdentifier)
425                     data->ident = &m_globalData->propertyNames->switchKeyword;
426                 return SWITCH;
427             }
428         } else if (COMPARE_5UCHARS(code + 1, 't', 'a', 't', 'i', 'c')) {
429             if (!isIdentPart(code[6])) {
430                 internalShift<6>();
431                 if (shouldCreateIdentifier)
432                     data->ident = &m_globalData->propertyNames->staticKeyword;
433                 return RESERVED_IF_STRICT;
434             }
435         } else if (COMPARE_4UCHARS(code + 1, 'u', 'p', 'e', 'r')) {
436             if (!isIdentPart(code[5])) {
437                 internalShift<5>();
438                 if (shouldCreateIdentifier)
439                     data->ident = &m_globalData->propertyNames->superKeyword;
440                 return RESERVED;
441             }
442         }
443     } else if (COMPARE_3UCHARS(code, 'l', 'e', 't')) {
444         if (!isIdentPart(code[3])) {
445             internalShift<3>();
446             if (shouldCreateIdentifier)
447                 data->ident = &m_globalData->propertyNames->letKeyword;
448             return RESERVED_IF_STRICT;
449         }
450     }
451     return IDENT;
452 }
453
454 template <>
455 template <bool shouldCreateIdentifier> ALWAYS_INLINE JSTokenType Lexer<LChar>::parseKeyword(JSTokenData* data)
456 {
457     ASSERT(m_codeEnd - m_code >= maxTokenLength);
458
459     const LChar* code = m_code;
460     if (code[0] == 'f') {
461         if (COMPARE_7CHARS(code + 1, 'u', 'n', 'c', 't', 'i', 'o', 'n')) {
462             if (!isIdentPart(code[8])) {
463                 internalShift<8>();
464                 if (shouldCreateIdentifier)
465                     data->ident = &m_globalData->propertyNames->functionKeyword;
466                 return FUNCTION;
467             }
468         } else if (COMPARE_2CHARS(code + 1, 'o', 'r')) {
469             if (!isIdentPart(code[3])) {
470                 internalShift<3>();
471                 if (shouldCreateIdentifier)
472                     data->ident = &m_globalData->propertyNames->forKeyword;
473                 return FOR;
474             }
475         } else if (COMPARE_4CHARS(code + 1, 'a', 'l', 's', 'e')) {
476             if (!isIdentPart(code[5])) {
477                 internalShift<5>();
478                 if (shouldCreateIdentifier)
479                     data->ident = &m_globalData->propertyNames->falseKeyword;
480                 return FALSETOKEN;
481             }
482         } else if (COMPARE_6CHARS(code + 1, 'i', 'n', 'a', 'l', 'l', 'y')) {
483             if (!isIdentPart(code[7])) {
484                 internalShift<7>();
485                 if (shouldCreateIdentifier)
486                     data->ident = &m_globalData->propertyNames->finallyKeyword;
487                 return FINALLY;
488             }
489         }
490     } else if (code[0] == 't') {
491         if (code[1] == 'h') {
492             if (COMPARE_2CHARS(code + 2, 'i', 's')) {
493                 if (!isIdentPart(code[4])) {
494                     internalShift<4>();
495                     if (shouldCreateIdentifier)
496                         data->ident = &m_globalData->propertyNames->thisKeyword;
497                     return THISTOKEN;
498                 }
499             } else if (COMPARE_4CHARS(code + 1, 'h', 'r', 'o', 'w')) {
500                 if (!isIdentPart(code[5])) {
501                     internalShift<5>();
502                     if (shouldCreateIdentifier)
503                         data->ident = &m_globalData->propertyNames->throwKeyword;
504                     return THROW;
505                 }
506             }
507         } else if (code[1] == 'r') {
508             if (COMPARE_2CHARS(code + 2, 'u', 'e')) {
509                 if (!isIdentPart(code[4])) {
510                     internalShift<4>();
511                     if (shouldCreateIdentifier)
512                         data->ident = &m_globalData->propertyNames->trueKeyword;
513                     return TRUETOKEN;
514                 }
515             } else if (code[2] == 'y') {
516                 if (!isIdentPart(code[3])) {
517                     internalShift<3>();
518                     if (shouldCreateIdentifier)
519                         data->ident = &m_globalData->propertyNames->tryKeyword;
520                     return TRY;
521                 }
522             }
523         } else if (COMPARE_5CHARS(code + 1, 'y', 'p', 'e', 'o', 'f')) {
524             if (!isIdentPart(code[6])) {
525                 internalShift<6>();
526                 if (shouldCreateIdentifier)
527                     data->ident = &m_globalData->propertyNames->typeofKeyword;
528                 return TYPEOF;
529             }
530         }
531     } else if (code[0] == 'i') {
532         if (code[1] == 'f') {
533             if (!isIdentPart(code[2])) {
534                 internalShift<2>();
535                 if (shouldCreateIdentifier)
536                     data->ident = &m_globalData->propertyNames->ifKeyword;
537                 return IF;
538             }
539         } else if (code[1] == 'n') {
540             if (!isIdentPart(code[2])) {
541                 internalShift<2>();
542                 if (shouldCreateIdentifier)
543                     data->ident = &m_globalData->propertyNames->inKeyword;
544                 return INTOKEN;
545             }
546             if (COMPARE_7CHARS(code + 2, 't', 'e', 'r', 'f', 'a', 'c', 'e')) {
547                 if (!isIdentPart(code[9])) {
548                     internalShift<9>();
549                     if (shouldCreateIdentifier)
550                         data->ident = &m_globalData->propertyNames->interfaceKeyword;
551                     return RESERVED_IF_STRICT;
552                 }
553             } else if (COMPARE_8CHARS(code + 2, 's', 't', 'a', 'n', 'c', 'e', 'o', 'f')) {
554                 if (!isIdentPart(code[10])) {
555                     internalShift<10>();
556                     if (shouldCreateIdentifier)
557                         data->ident = &m_globalData->propertyNames->instanceofKeyword;
558                     return INSTANCEOF;
559                 }
560             }
561         } else if (COMPARE_2CHARS(code + 1, 'm', 'p')) {
562             if (COMPARE_4CHARS(code + 2, 'p', 'o', 'r', 't')) {
563                 if (!isIdentPart(code[6])) {
564                     internalShift<6>();
565                     if (shouldCreateIdentifier)
566                         data->ident = &m_globalData->propertyNames->importKeyword;
567                     return RESERVED;
568                 }
569             } else if (COMPARE_7CHARS(code + 3, 'l', 'e', 'm', 'e', 'n', 't', 's')) {
570                 if (!isIdentPart(code[10])) {
571                     internalShift<10>();
572                     if (shouldCreateIdentifier)
573                         data->ident = &m_globalData->propertyNames->implementsKeyword;
574                     return RESERVED_IF_STRICT;
575                 }
576             }
577         }
578     } else if (code[0] == 'v') {
579         if (COMPARE_2CHARS(code + 1, 'a', 'r')) {
580             if (!isIdentPart(code[3])) {
581                 internalShift<3>();
582                 if (shouldCreateIdentifier)
583                     data->ident = &m_globalData->propertyNames->varKeyword;
584                 return VAR;
585             }
586         } else if (COMPARE_4CHARS(code, 'v', 'o', 'i', 'd')) {
587             if (!isIdentPart(code[4])) {
588                 internalShift<4>();
589                 if (shouldCreateIdentifier)
590                     data->ident = &m_globalData->propertyNames->voidKeyword;
591                 return VOIDTOKEN;
592             }
593         }
594     } else if (COMPARE_6CHARS(code, 'r', 'e', 't', 'u', 'r', 'n')) {
595         if (!isIdentPart(code[6])) {
596             internalShift<6>();
597             if (shouldCreateIdentifier)
598                 data->ident = &m_globalData->propertyNames->returnKeyword;
599             return RETURN;
600         }
601     } else if (code[0] == 'n') {
602         if (COMPARE_4CHARS(code, 'n', 'u', 'l', 'l')) {
603             if (!isIdentPart(code[4])) {
604                 internalShift<4>();
605                 if (shouldCreateIdentifier)
606                     data->ident = &m_globalData->propertyNames->nullKeyword;
607                 return NULLTOKEN;
608             }
609         } else if (COMPARE_2CHARS(code + 1, 'e', 'w')) {
610             if (!isIdentPart(code[3])) {
611                 internalShift<3>();
612                 if (shouldCreateIdentifier)
613                     data->ident = &m_globalData->propertyNames->newKeyword;
614                 return NEW;
615             }
616         }
617     } else if (code[0] == 'e') {
618         if (COMPARE_4CHARS(code, 'e', 'l', 's', 'e')) {
619             if (!isIdentPart(code[4])) {
620                 internalShift<4>();
621                 if (shouldCreateIdentifier)
622                     data->ident = &m_globalData->propertyNames->elseKeyword;
623                 return ELSE;
624             }
625         } else if (code[1] == 'x') {
626             if (COMPARE_4CHARS(code + 2, 'p', 'o', 'r', 't')) {
627                 if (!isIdentPart(code[6])) {
628                     internalShift<6>();
629                     if (shouldCreateIdentifier)
630                         data->ident = &m_globalData->propertyNames->exportKeyword;
631                     return RESERVED;
632                 }
633             } else if (COMPARE_5CHARS(code + 2, 't', 'e', 'n', 'd', 's')) {
634                 if (!isIdentPart(code[7])) {
635                     internalShift<7>();
636                     if (shouldCreateIdentifier)
637                         data->ident = &m_globalData->propertyNames->extendsKeyword;
638                     return RESERVED;
639                 }
640             }
641         } else if (COMPARE_4CHARS(code, 'e', 'n', 'u', 'm')) {
642             if (!isIdentPart(code[4])) {
643                 internalShift<4>();
644                 if (shouldCreateIdentifier)
645                     data->ident = &m_globalData->propertyNames->enumKeyword;
646                 return RESERVED;
647             }
648         }
649     } else if (code[0] == 'c') {
650         if (code[1] == 'a') {
651             if (COMPARE_4CHARS(code + 1, 'a', 't', 'c', 'h')) {
652                 if (!isIdentPart(code[5])) {
653                     internalShift<5>();
654                     if (shouldCreateIdentifier)
655                         data->ident = &m_globalData->propertyNames->catchKeyword;
656                     return CATCH;
657                 }
658             } else if (COMPARE_2CHARS(code + 2, 's', 'e')) {
659                 if (!isIdentPart(code[4])) {
660                     internalShift<4>();
661                     if (shouldCreateIdentifier)
662                         data->ident = &m_globalData->propertyNames->caseKeyword;
663                     return CASE;
664                 }
665             }
666         } else if (COMPARE_2CHARS(code + 1, 'o', 'n')) {
667             if (COMPARE_5CHARS(code + 3, 't', 'i', 'n', 'u', 'e')) {
668                 if (!isIdentPart(code[8])) {
669                     internalShift<8>();
670                     if (shouldCreateIdentifier)
671                         data->ident = &m_globalData->propertyNames->continueKeyword;
672                     return CONTINUE;
673                 }
674             } else if (COMPARE_2CHARS(code + 3, 's', 't')) {
675                 if (!isIdentPart(code[5])) {
676                     internalShift<5>();
677                     if (shouldCreateIdentifier)
678                         data->ident = &m_globalData->propertyNames->constKeyword;
679                     return CONSTTOKEN;
680                 }
681             }
682         } else if (COMPARE_4CHARS(code + 1, 'l', 'a', 's', 's')) {
683             if (!isIdentPart(code[5])) {
684                 internalShift<5>();
685                 if (shouldCreateIdentifier)
686                     data->ident = &m_globalData->propertyNames->classKeyword;
687                 return RESERVED;
688             }
689         }
690     } else if (COMPARE_5CHARS(code, 'b', 'r', 'e', 'a', 'k')) {
691         if (!isIdentPart(code[5])) {
692             internalShift<5>();
693             if (shouldCreateIdentifier)
694                 data->ident = &m_globalData->propertyNames->breakKeyword;
695             return BREAK;
696         }
697     } else if (code[0] == 'w') {
698         if (COMPARE_4CHARS(code + 1, 'h', 'i', 'l', 'e')) {
699             if (!isIdentPart(code[5])) {
700                 internalShift<5>();
701                 if (shouldCreateIdentifier)
702                     data->ident = &m_globalData->propertyNames->whileKeyword;
703                 return WHILE;
704             }
705         } else if (COMPARE_4CHARS(code, 'w', 'i', 't', 'h')) {
706             if (!isIdentPart(code[4])) {
707                 internalShift<4>();
708                 if (shouldCreateIdentifier)
709                     data->ident = &m_globalData->propertyNames->withKeyword;
710                 return WITH;
711             }
712         }
713     } else if (code[0] == 'd') {
714         if (code[1] == 'e') {
715             if (COMPARE_5CHARS(code + 2, 'f', 'a', 'u', 'l', 't')) {
716                 if (!isIdentPart(code[7])) {
717                     internalShift<7>();
718                     if (shouldCreateIdentifier)
719                         data->ident = &m_globalData->propertyNames->defaultKeyword;
720                     return DEFAULT;
721                 }
722             } else if (COMPARE_6CHARS(code + 2, 'b', 'u', 'g', 'g', 'e', 'r')) {
723                 if (!isIdentPart(code[8])) {
724                     internalShift<8>();
725                     if (shouldCreateIdentifier)
726                         data->ident = &m_globalData->propertyNames->debuggerKeyword;
727                     return DEBUGGER;
728                 }
729             } else if (COMPARE_4CHARS(code + 2, 'l', 'e', 't', 'e')) {
730                 if (!isIdentPart(code[6])) {
731                     internalShift<6>();
732                     if (shouldCreateIdentifier)
733                         data->ident = &m_globalData->propertyNames->deleteKeyword;
734                     return DELETETOKEN;
735                 }
736             }
737         } else if (code[1] == 'o') {
738             if (!isIdentPart(code[2])) {
739                 internalShift<2>();
740                 if (shouldCreateIdentifier)
741                     data->ident = &m_globalData->propertyNames->doKeyword;
742                 return DO;
743             }
744         }
745     } else if (COMPARE_5CHARS(code, 'y', 'i', 'e', 'l', 'd')) {
746         if (!isIdentPart(code[5])) {
747             internalShift<5>();
748             if (shouldCreateIdentifier)
749                 data->ident = &m_globalData->propertyNames->yieldKeyword;
750             return RESERVED_IF_STRICT;
751         }
752     } else if (code[0] == 'p') {
753         if (code[1] == 'r') {
754             if (COMPARE_5CHARS(code + 2, 'i', 'v', 'a', 't', 'e')) {
755                 if (!isIdentPart(code[7])) {
756                     internalShift<7>();
757                     if (shouldCreateIdentifier)
758                         data->ident = &m_globalData->propertyNames->privateKeyword;
759                     return RESERVED_IF_STRICT;
760                 }
761             } else if (COMPARE_7CHARS(code + 2, 'o', 't', 'e', 'c', 't', 'e', 'd')) {
762                 if (!isIdentPart(code[9])) {
763                     internalShift<9>();
764                     if (shouldCreateIdentifier)
765                         data->ident = &m_globalData->propertyNames->protectedKeyword;
766                     return RESERVED_IF_STRICT;
767                 }
768             }
769         } else if (COMPARE_5CHARS(code + 1, 'u', 'b', 'l', 'i', 'c')) {
770             if (!isIdentPart(code[6])) {
771                 internalShift<6>();
772                 if (shouldCreateIdentifier)
773                     data->ident = &m_globalData->propertyNames->publicKeyword;
774                 return RESERVED_IF_STRICT;
775             }
776         } else if (COMPARE_6CHARS(code + 1, 'a', 'c', 'k', 'a', 'g', 'e')) {
777             if (!isIdentPart(code[7])) {
778                 internalShift<7>();
779                 if (shouldCreateIdentifier)
780                     data->ident = &m_globalData->propertyNames->packageKeyword;
781                 return RESERVED_IF_STRICT;
782             }
783         }
784     } else if (code[0] == 's') {
785         if (COMPARE_5CHARS(code + 1, 'w', 'i', 't', 'c', 'h')) {
786             if (!isIdentPart(code[6])) {
787                 internalShift<6>();
788                 if (shouldCreateIdentifier)
789                     data->ident = &m_globalData->propertyNames->switchKeyword;
790                 return SWITCH;
791             }
792         } else if (COMPARE_5CHARS(code + 1, 't', 'a', 't', 'i', 'c')) {
793             if (!isIdentPart(code[6])) {
794                 internalShift<6>();
795                 if (shouldCreateIdentifier)
796                     data->ident = &m_globalData->propertyNames->staticKeyword;
797                 return RESERVED_IF_STRICT;
798             }
799         } else if (COMPARE_4CHARS(code + 1, 'u', 'p', 'e', 'r')) {
800             if (!isIdentPart(code[5])) {
801                 internalShift<5>();
802                 if (shouldCreateIdentifier)
803                     data->ident = &m_globalData->propertyNames->superKeyword;
804                 return RESERVED;
805             }
806         }
807     } else if (COMPARE_3CHARS(code, 'l', 'e', 't')) {
808         if (!isIdentPart(code[3])) {
809             internalShift<3>();
810             if (shouldCreateIdentifier)
811                 data->ident = &m_globalData->propertyNames->letKeyword;
812             return RESERVED_IF_STRICT;
813         }
814     }
815     return IDENT;
816 }
817
818 } // namespace JSC