| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 fprintf(stderr, "Parsing failed\n"); | 135 fprintf(stderr, "Parsing failed\n"); |
| 136 return std::make_pair(v8::base::TimeDelta(), v8::base::TimeDelta()); | 136 return std::make_pair(v8::base::TimeDelta(), v8::base::TimeDelta()); |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 return std::make_pair(parse_time1, parse_time2); | 139 return std::make_pair(parse_time1, parse_time2); |
| 140 } | 140 } |
| 141 | 141 |
| 142 | 142 |
| 143 int main(int argc, char* argv[]) { | 143 int main(int argc, char* argv[]) { |
| 144 v8::V8::SetFlagsFromCommandLine(&argc, argv, true); | 144 v8::V8::SetFlagsFromCommandLine(&argc, argv, true); |
| 145 v8::V8::InitializeICU(); | 145 v8::V8::InitializeICUDefaultLocation(argv[0]); |
| 146 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); | 146 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); |
| 147 v8::V8::InitializePlatform(platform); | 147 v8::V8::InitializePlatform(platform); |
| 148 v8::V8::Initialize(); | 148 v8::V8::Initialize(); |
| 149 v8::V8::InitializeExternalStartupData(argv[0]); | 149 v8::V8::InitializeExternalStartupData(argv[0]); |
| 150 | 150 |
| 151 Encoding encoding = LATIN1; | 151 Encoding encoding = LATIN1; |
| 152 std::vector<std::string> fnames; | 152 std::vector<std::string> fnames; |
| 153 std::string benchmark; | 153 std::string benchmark; |
| 154 int repeat = 1; | 154 int repeat = 1; |
| 155 for (int i = 0; i < argc; ++i) { | 155 for (int i = 0; i < argc; ++i) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 first_parse_total); | 194 first_parse_total); |
| 195 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(), | 195 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(), |
| 196 second_parse_total); | 196 second_parse_total); |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 v8::V8::Dispose(); | 199 v8::V8::Dispose(); |
| 200 v8::V8::ShutdownPlatform(); | 200 v8::V8::ShutdownPlatform(); |
| 201 delete platform; | 201 delete platform; |
| 202 return 0; | 202 return 0; |
| 203 } | 203 } |
| OLD | NEW |