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

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

Issue 8437056: Implemented File create API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | « runtime/bin/gen_snapshot.cc ('k') | runtime/bin/process_script.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) 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 #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 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 i += 1; 86 i += 1;
87 } 87 }
88 88
89 return 0; 89 return 0;
90 } 90 }
91 91
92 92
93 static void DumpPprofSymbolInfo() { 93 static void DumpPprofSymbolInfo() {
94 if (generate_pprof_symbols_filename != NULL) { 94 if (generate_pprof_symbols_filename != NULL) {
95 Dart_EnterScope(); 95 Dart_EnterScope();
96 File* pprof_file = File::OpenFile(generate_pprof_symbols_filename, true); 96 File* pprof_file = File::Open(generate_pprof_symbols_filename, true);
97 ASSERT(pprof_file != NULL); 97 ASSERT(pprof_file != NULL);
98 void* buffer; 98 void* buffer;
99 int buffer_size; 99 int buffer_size;
100 Dart_GetPprofSymbolInfo(&buffer, &buffer_size); 100 Dart_GetPprofSymbolInfo(&buffer, &buffer_size);
101 if (buffer_size > 0) { 101 if (buffer_size > 0) {
102 ASSERT(buffer != NULL); 102 ASSERT(buffer != NULL);
103 pprof_file->WriteFully(buffer, buffer_size); 103 pprof_file->WriteFully(buffer, buffer_size);
104 } 104 }
105 delete pprof_file; // Closes the file. 105 delete pprof_file; // Closes the file.
106 Dart_ExitScope(); 106 Dart_ExitScope();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return 255; // Indicates we encountered an error. 261 return 255; // Indicates we encountered an error.
262 } 262 }
263 free(canonical_script_name); 263 free(canonical_script_name);
264 Dart_ExitScope(); 264 Dart_ExitScope();
265 // Dump symbol information for the profiler. 265 // Dump symbol information for the profiler.
266 DumpPprofSymbolInfo(); 266 DumpPprofSymbolInfo();
267 // Shutdown the isolate. 267 // Shutdown the isolate.
268 Dart_ShutdownIsolate(); 268 Dart_ShutdownIsolate();
269 return 0; 269 return 0;
270 } 270 }
OLDNEW
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/bin/process_script.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698