OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 /* being contiguous and sorted in the same order! */ \ | 92 /* being contiguous and sorted in the same order! */ \ |
93 T(COMMA, ",", 1) \ | 93 T(COMMA, ",", 1) \ |
94 T(OR, "||", 4) \ | 94 T(OR, "||", 4) \ |
95 T(AND, "&&", 5) \ | 95 T(AND, "&&", 5) \ |
96 T(BIT_OR, "|", 6) \ | 96 T(BIT_OR, "|", 6) \ |
97 T(BIT_XOR, "^", 7) \ | 97 T(BIT_XOR, "^", 7) \ |
98 T(BIT_AND, "&", 8) \ | 98 T(BIT_AND, "&", 8) \ |
99 T(SHL, "<<", 11) \ | 99 T(SHL, "<<", 11) \ |
100 T(SAR, ">>", 11) \ | 100 T(SAR, ">>", 11) \ |
101 T(SHR, ">>>", 11) \ | 101 T(SHR, ">>>", 11) \ |
| 102 T(ROR, "rotate right", 11) /* only used by Crankshaft */ \ |
102 T(ADD, "+", 12) \ | 103 T(ADD, "+", 12) \ |
103 T(SUB, "-", 12) \ | 104 T(SUB, "-", 12) \ |
104 T(MUL, "*", 13) \ | 105 T(MUL, "*", 13) \ |
105 T(DIV, "/", 13) \ | 106 T(DIV, "/", 13) \ |
106 T(MOD, "%", 13) \ | 107 T(MOD, "%", 13) \ |
107 \ | 108 \ |
108 /* Compare operators sorted by precedence. */ \ | 109 /* Compare operators sorted by precedence. */ \ |
109 /* IsCompareOp() relies on this block of enum values */ \ | 110 /* IsCompareOp() relies on this block of enum values */ \ |
110 /* being contiguous and sorted in the same order! */ \ | 111 /* being contiguous and sorted in the same order! */ \ |
111 T(EQ, "==", 9) \ | 112 T(EQ, "==", 9) \ |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 private: | 288 private: |
288 static const char* const name_[NUM_TOKENS]; | 289 static const char* const name_[NUM_TOKENS]; |
289 static const char* const string_[NUM_TOKENS]; | 290 static const char* const string_[NUM_TOKENS]; |
290 static const int8_t precedence_[NUM_TOKENS]; | 291 static const int8_t precedence_[NUM_TOKENS]; |
291 static const char token_type[NUM_TOKENS]; | 292 static const char token_type[NUM_TOKENS]; |
292 }; | 293 }; |
293 | 294 |
294 } } // namespace v8::internal | 295 } } // namespace v8::internal |
295 | 296 |
296 #endif // V8_TOKEN_H_ | 297 #endif // V8_TOKEN_H_ |
OLD | NEW |