| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 HandleScope handle_scope(isolate); | 274 HandleScope handle_scope(isolate); |
| 275 std::vector<TokenWithLocation> baseline_tokens, experimental_tokens; | 275 std::vector<TokenWithLocation> baseline_tokens, experimental_tokens; |
| 276 TimeDelta baseline_time, experimental_time; | 276 TimeDelta baseline_time, experimental_time; |
| 277 if (run_baseline) { | 277 if (run_baseline) { |
| 278 baseline_time = RunBaselineScanner( | 278 baseline_time = RunBaselineScanner( |
| 279 fname, isolate, encoding, print_tokens || check_tokens, | 279 fname, isolate, encoding, print_tokens || check_tokens, |
| 280 &baseline_tokens, repeat, harmony_settings); | 280 &baseline_tokens, repeat, harmony_settings); |
| 281 } | 281 } |
| 282 if (run_experimental) { | 282 if (run_experimental) { |
| 283 switch (encoding) { | 283 switch (encoding) { |
| 284 case UTF8: |
| 285 experimental_time = RunExperimentalScanner<int8_t>( |
| 286 fname, isolate, encoding, print_tokens || check_tokens, |
| 287 &experimental_tokens, repeat, harmony_settings); |
| 288 break; |
| 284 case LATIN1: | 289 case LATIN1: |
| 285 experimental_time = RunExperimentalScanner<uint8_t>( | 290 experimental_time = RunExperimentalScanner<uint8_t>( |
| 286 fname, isolate, encoding, print_tokens || check_tokens, | 291 fname, isolate, encoding, print_tokens || check_tokens, |
| 287 &experimental_tokens, repeat, harmony_settings); | 292 &experimental_tokens, repeat, harmony_settings); |
| 288 break; | 293 break; |
| 289 case UTF16: | 294 case UTF16: |
| 290 experimental_time = RunExperimentalScanner<uint16_t>( | 295 experimental_time = RunExperimentalScanner<uint16_t>( |
| 291 fname, isolate, encoding, print_tokens || check_tokens, | 296 fname, isolate, encoding, print_tokens || check_tokens, |
| 292 &experimental_tokens, repeat, harmony_settings); | 297 &experimental_tokens, repeat, harmony_settings); |
| 293 break; | 298 break; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 if (run_experimental) { | 419 if (run_experimental) { |
| 415 if (benchmark.empty()) benchmark = "Experimental"; | 420 if (benchmark.empty()) benchmark = "Experimental"; |
| 416 printf("%s(RunTime): %.f ms\n", benchmark.c_str(), | 421 printf("%s(RunTime): %.f ms\n", benchmark.c_str(), |
| 417 experimental_total); | 422 experimental_total); |
| 418 } | 423 } |
| 419 } | 424 } |
| 420 } | 425 } |
| 421 v8::V8::Dispose(); | 426 v8::V8::Dispose(); |
| 422 return 0; | 427 return 0; |
| 423 } | 428 } |
| OLD | NEW |