| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 <assert.h> | |
| 9 #include <stdlib.h> | 8 #include <stdlib.h> |
| 10 #include <string.h> | 9 #include <string.h> |
| 11 #include <stdio.h> | 10 #include <stdio.h> |
| 12 | 11 |
| 13 #include "include/dart_api.h" | 12 #include "include/dart_api.h" |
| 14 | 13 |
| 15 #include "bin/builtin.h" | 14 #include "bin/builtin.h" |
| 16 #include "bin/file.h" | 15 #include "bin/file.h" |
| 17 #include "bin/globals.h" | 16 #include "bin/globals.h" |
| 18 #include "bin/process_script.h" | 17 #include "bin/process_script.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // and writes out a snapshot. | 176 // and writes out a snapshot. |
| 178 Dart_Isolate isolate = Dart_CreateIsolate(NULL, script_name); | 177 Dart_Isolate isolate = Dart_CreateIsolate(NULL, script_name); |
| 179 if (isolate == NULL) { | 178 if (isolate == NULL) { |
| 180 return 255; | 179 return 255; |
| 181 } | 180 } |
| 182 | 181 |
| 183 // Shutdown the isolate. | 182 // Shutdown the isolate. |
| 184 Dart_ShutdownIsolate(); | 183 Dart_ShutdownIsolate(); |
| 185 return 0; | 184 return 0; |
| 186 } | 185 } |
| OLD | NEW |