OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 return !(*this == other); | 189 return !(*this == other); |
190 } | 190 } |
191 void Print(const char* prefix) const { | 191 void Print(const char* prefix) const { |
192 printf("%s %11s at (%d, %d)", | 192 printf("%s %11s at (%d, %d)", |
193 prefix, Token::Name(value), | 193 prefix, Token::Name(value), |
194 static_cast<int>(beg), static_cast<int>(end)); | 194 static_cast<int>(beg), static_cast<int>(end)); |
195 if (literal.size() > 0) { | 195 if (literal.size() > 0) { |
196 for (size_t i = 0; i < literal.size(); i++) { | 196 for (size_t i = 0; i < literal.size(); i++) { |
197 printf(is_ascii ? " %02x" : " %04x", literal[i]); | 197 printf(is_ascii ? " %02x" : " %04x", literal[i]); |
198 } | 198 } |
| 199 printf(" (is ascii: %d)", is_ascii); |
199 } | 200 } |
200 printf(" (last octal start: %d)\n", octal_beg); | 201 printf(" (last octal start: %d)\n", octal_beg); |
201 } | 202 } |
202 }; | 203 }; |
203 | 204 |
204 | 205 |
205 bool HasLiteral(Token::Value token) { | 206 bool HasLiteral(Token::Value token) { |
206 return token == Token::IDENTIFIER || | 207 return token == Token::IDENTIFIER || |
207 token == Token::STRING || | 208 token == Token::STRING || |
208 token == Token::NUMBER; | 209 token == Token::NUMBER; |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 if (run_experimental) { | 475 if (run_experimental) { |
475 if (benchmark.empty()) benchmark = "Experimental"; | 476 if (benchmark.empty()) benchmark = "Experimental"; |
476 printf("%s(RunTime): %.f ms\n", benchmark.c_str(), | 477 printf("%s(RunTime): %.f ms\n", benchmark.c_str(), |
477 experimental_total); | 478 experimental_total); |
478 } | 479 } |
479 } | 480 } |
480 } | 481 } |
481 v8::V8::Dispose(); | 482 v8::V8::Dispose(); |
482 return 0; | 483 return 0; |
483 } | 484 } |
OLD | NEW |