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

Side by Side Diff: src/mksnapshot.cc

Issue 345903004: Split out libplatform into a separate libary (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <errno.h> 5 #include <errno.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #ifdef COMPRESS_STARTUP_DATA_BZ2 7 #ifdef COMPRESS_STARTUP_DATA_BZ2
8 #include <bzlib.h> 8 #include <bzlib.h>
9 #endif 9 #endif
10 #include <signal.h> 10 #include <signal.h>
11 11
12 #include "src/v8.h" 12 #include "src/v8.h"
13 13
14 #include "include/libplatform/libplatform.h"
14 #include "src/assembler.h" 15 #include "src/assembler.h"
15 #include "src/base/platform/platform.h" 16 #include "src/base/platform/platform.h"
16 #include "src/bootstrapper.h" 17 #include "src/bootstrapper.h"
17 #include "src/flags.h" 18 #include "src/flags.h"
18 #include "src/list.h" 19 #include "src/list.h"
19 #include "src/natives.h" 20 #include "src/natives.h"
20 #include "src/serialize.h" 21 #include "src/serialize.h"
21 22
22 23
23 using namespace v8; 24 using namespace v8;
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 fprintf(stderr, "%s\n", *message_line); 311 fprintf(stderr, "%s\n", *message_line);
311 for (int i = 0; i <= message->GetEndColumn(); ++i) { 312 for (int i = 0; i <= message->GetEndColumn(); ++i) {
312 fprintf(stderr, "%c", i < message->GetStartColumn() ? ' ' : '^'); 313 fprintf(stderr, "%c", i < message->GetStartColumn() ? ' ' : '^');
313 } 314 }
314 fprintf(stderr, "\n"); 315 fprintf(stderr, "\n");
315 } 316 }
316 317
317 318
318 int main(int argc, char** argv) { 319 int main(int argc, char** argv) {
319 V8::InitializeICU(); 320 V8::InitializeICU();
321 v8::Platform* platform =
322 v8::platform::CreateDefaultPlatform(base::OS::NumberOfProcessorsOnline());
323 v8::V8::InitializePlatform(platform);
320 i::Isolate::SetCrashIfDefaultIsolateInitialized(); 324 i::Isolate::SetCrashIfDefaultIsolateInitialized();
321 i::CpuFeatures::Probe(true); 325 i::CpuFeatures::Probe(true);
322 326
323 // By default, log code create information in the snapshot. 327 // By default, log code create information in the snapshot.
324 i::FLAG_log_code = true; 328 i::FLAG_log_code = true;
325 329
326 // Print the usage if an error occurs when parsing the command line 330 // Print the usage if an error occurs when parsing the command line
327 // flags or if the help flag is set. 331 // flags or if the help flag is set.
328 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); 332 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
329 if (result > 0 || argc != 2 || i::FLAG_help) { 333 if (result > 0 || argc != 2 || i::FLAG_help) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 #ifdef COMPRESS_STARTUP_DATA_BZ2 438 #ifdef COMPRESS_STARTUP_DATA_BZ2
435 BZip2Compressor bzip2; 439 BZip2Compressor bzip2;
436 writer.SetCompressor(&bzip2); 440 writer.SetCompressor(&bzip2);
437 #endif 441 #endif
438 writer.WriteSnapshot(snapshot_data, ser, context_data, context_ser); 442 writer.WriteSnapshot(snapshot_data, ser, context_data, context_ser);
439 } 443 }
440 } 444 }
441 445
442 isolate->Dispose(); 446 isolate->Dispose();
443 V8::Dispose(); 447 V8::Dispose();
448 V8::ShutdownPlatform();
449 delete platform;
444 return 0; 450 return 0;
445 } 451 }
OLDNEW
« samples/process.cc ('K') | « src/libplatform/default-platform.cc ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698