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

Side by Side Diff: runtime/bin/main.cc

Issue 1852393004: Fix background compilation issues when creating snapshots. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: more Created 4 years, 8 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 | « no previous file | runtime/vm/compiler.cc » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_tools_api.h" 10 #include "include/dart_tools_api.h"
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 char** isolate_snapshot_fname) { 1197 char** isolate_snapshot_fname) {
1198 intptr_t len = snprintf(NULL, 0, "%s.%s", filename, kVMIsolateSuffix); 1198 intptr_t len = snprintf(NULL, 0, "%s.%s", filename, kVMIsolateSuffix);
1199 *vm_snapshot_fname = new char[len + 1]; 1199 *vm_snapshot_fname = new char[len + 1];
1200 snprintf(*vm_snapshot_fname, len + 1, "%s.%s", filename, kVMIsolateSuffix); 1200 snprintf(*vm_snapshot_fname, len + 1, "%s.%s", filename, kVMIsolateSuffix);
1201 1201
1202 len = snprintf(NULL, 0, "%s.%s", filename, kIsolateSuffix); 1202 len = snprintf(NULL, 0, "%s.%s", filename, kIsolateSuffix);
1203 *isolate_snapshot_fname = new char[len + 1]; 1203 *isolate_snapshot_fname = new char[len + 1];
1204 snprintf(*isolate_snapshot_fname, len + 1, "%s.%s", filename, kIsolateSuffix); 1204 snprintf(*isolate_snapshot_fname, len + 1, "%s.%s", filename, kIsolateSuffix);
1205 } 1205 }
1206 1206
1207
1207 static void GenerateFullSnapshot() { 1208 static void GenerateFullSnapshot() {
1208 // Create a full snapshot of the script. 1209 // Create a full snapshot of the script.
1209 Dart_Handle result; 1210 Dart_Handle result;
1210 uint8_t* vm_isolate_buffer = NULL; 1211 uint8_t* vm_isolate_buffer = NULL;
1211 intptr_t vm_isolate_size = 0; 1212 intptr_t vm_isolate_size = 0;
1212 uint8_t* isolate_buffer = NULL; 1213 uint8_t* isolate_buffer = NULL;
1213 intptr_t isolate_size = 0; 1214 intptr_t isolate_size = 0;
1214 char* vm_snapshot_fname = NULL; 1215 char* vm_snapshot_fname = NULL;
1215 char* isolate_snapshot_fname = NULL; 1216 char* isolate_snapshot_fname = NULL;
1216 1217
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 Platform::Exit(Process::GlobalExitCode()); 1705 Platform::Exit(Process::GlobalExitCode());
1705 } 1706 }
1706 1707
1707 } // namespace bin 1708 } // namespace bin
1708 } // namespace dart 1709 } // namespace dart
1709 1710
1710 int main(int argc, char** argv) { 1711 int main(int argc, char** argv) {
1711 dart::bin::main(argc, argv); 1712 dart::bin::main(argc, argv);
1712 UNREACHABLE(); 1713 UNREACHABLE();
1713 } 1714 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698