Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: tools/parser-shell.cc

Issue 1314863002: Version 4.5.103.27 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.5
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gyp/v8.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::InitializeICU();
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]);
150
149 Encoding encoding = LATIN1; 151 Encoding encoding = LATIN1;
150 std::vector<std::string> fnames; 152 std::vector<std::string> fnames;
151 std::string benchmark; 153 std::string benchmark;
152 int repeat = 1; 154 int repeat = 1;
153 for (int i = 0; i < argc; ++i) { 155 for (int i = 0; i < argc; ++i) {
154 if (strcmp(argv[i], "--latin1") == 0) { 156 if (strcmp(argv[i], "--latin1") == 0) {
155 encoding = LATIN1; 157 encoding = LATIN1;
156 } else if (strcmp(argv[i], "--utf8") == 0) { 158 } else if (strcmp(argv[i], "--utf8") == 0) {
157 encoding = UTF8; 159 encoding = UTF8;
158 } else if (strcmp(argv[i], "--utf16") == 0) { 160 } else if (strcmp(argv[i], "--utf16") == 0) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 first_parse_total); 194 first_parse_total);
193 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(), 195 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(),
194 second_parse_total); 196 second_parse_total);
195 } 197 }
196 } 198 }
197 v8::V8::Dispose(); 199 v8::V8::Dispose();
198 v8::V8::ShutdownPlatform(); 200 v8::V8::ShutdownPlatform();
199 delete platform; 201 delete platform;
200 return 0; 202 return 0;
201 } 203 }
OLDNEW
« no previous file with comments | « tools/gyp/v8.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698