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

Side by Side Diff: dart/runtime/bin/gen_snapshot.cc

Issue 119673004: Version 1.1.0-dev.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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
« no previous file with comments | « dart/runtime/bin/dartutils.cc ('k') | dart/runtime/bin/net/zlib.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Generate a snapshot file after loading all the scripts specified on the 5 // Generate a snapshot file after loading all the scripts specified on the
6 // command line. 6 // command line.
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
11 11
12 #include "include/dart_api.h" 12 #include "include/dart_api.h"
13 13
14 #include "bin/builtin.h" 14 #include "bin/builtin.h"
15 #include "bin/dartutils.h" 15 #include "bin/dartutils.h"
16 #include "bin/file.h" 16 #include "bin/file.h"
17 #include "bin/log.h" 17 #include "bin/log.h"
18 18
19 #include "platform/globals.h" 19 #include "platform/globals.h"
20 20
21 21
22 namespace dart { 22 namespace dart {
23 namespace bin { 23 namespace bin {
24 24
25 #define CHECK_RESULT(result) \ 25 #define CHECK_RESULT(result) \
26 if (Dart_IsError(result)) { \ 26 if (Dart_IsError(result)) { \
27 free(snapshot_buffer); \ 27 free(snapshot_buffer); \
28 Log::PrintErr("Error: %s", Dart_GetError(result)); \ 28 Log::PrintErr("Error: %s", Dart_GetError(result)); \
29 Dart_ExitScope(); \ 29 Dart_ExitScope(); \
30 Dart_ShutdownIsolate(); \ 30 Dart_ShutdownIsolate(); \
31 exit(255); \ 31 exit(255); \
32 } \ 32 } \
33 33
34 34
35 // Global state that indicates whether a snapshot is to be created and 35 // Global state that indicates whether a snapshot is to be created and
36 // if so which file to write the snapshot into. 36 // if so which file to write the snapshot into.
37 static const char* snapshot_filename = NULL; 37 static const char* snapshot_filename = NULL;
38 static const char* package_root = NULL; 38 static const char* package_root = NULL;
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 566 }
567 return 0; 567 return 0;
568 } 568 }
569 569
570 } // namespace bin 570 } // namespace bin
571 } // namespace dart 571 } // namespace dart
572 572
573 int main(int argc, char** argv) { 573 int main(int argc, char** argv) {
574 return dart::bin::main(argc, argv); 574 return dart::bin::main(argc, argv);
575 } 575 }
OLDNEW
« no previous file with comments | « dart/runtime/bin/dartutils.cc ('k') | dart/runtime/bin/net/zlib.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698