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

Side by Side Diff: runtime/vm/coverage.cc

Issue 23464105: - Fix C++11 string literal requirements. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « no previous file | no next file » | 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 #include "vm/coverage.h" 5 #include "vm/coverage.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/json_stream.h" 10 #include "vm/json_stream.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 cls = it.GetNextClass(); 105 cls = it.GetNextClass();
106 if (cls.is_finalized()) { 106 if (cls.is_finalized()) {
107 // Only classes that have been finalized do have a meaningful list of 107 // Only classes that have been finalized do have a meaningful list of
108 // functions. 108 // functions.
109 PrintClass(cls, jsarr); 109 PrintClass(cls, jsarr);
110 } 110 }
111 } 111 }
112 } 112 }
113 } 113 }
114 114
115 const char* format = "%s/dart-cov-%"Pd"-%"Pd".json"; 115 const char* format = "%s/dart-cov-%" Pd "-%" Pd ".json";
116 intptr_t pid = OS::ProcessId(); 116 intptr_t pid = OS::ProcessId();
117 intptr_t len = OS::SNPrint(NULL, 0, format, 117 intptr_t len = OS::SNPrint(NULL, 0, format,
118 FLAG_coverage_dir, pid, isolate->main_port()); 118 FLAG_coverage_dir, pid, isolate->main_port());
119 char* filename = Isolate::Current()->current_zone()->Alloc<char>(len + 1); 119 char* filename = Isolate::Current()->current_zone()->Alloc<char>(len + 1);
120 OS::SNPrint(filename, len + 1, format, 120 OS::SNPrint(filename, len + 1, format,
121 FLAG_coverage_dir, pid, isolate->main_port()); 121 FLAG_coverage_dir, pid, isolate->main_port());
122 void* file = (*file_open)(filename, true); 122 void* file = (*file_open)(filename, true);
123 if (file == NULL) { 123 if (file == NULL) {
124 OS::Print("Failed to write coverage file: %s\n", filename); 124 OS::Print("Failed to write coverage file: %s\n", filename);
125 return; 125 return;
126 } 126 }
127 (*file_write)(stream.buffer()->buf(), stream.buffer()->length(), file); 127 (*file_write)(stream.buffer()->buf(), stream.buffer()->length(), file);
128 (*file_close)(file); 128 (*file_close)(file);
129 } 129 }
130 130
131 } // namespace dart 131 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698