OLD | NEW |
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/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 246 |
247 | 247 |
248 void CodeCoverage::Write(Thread* thread) { | 248 void CodeCoverage::Write(Thread* thread) { |
249 if (!FLAG_support_coverage) { | 249 if (!FLAG_support_coverage) { |
250 return; | 250 return; |
251 } | 251 } |
252 if (FLAG_coverage_dir == NULL) { | 252 if (FLAG_coverage_dir == NULL) { |
253 return; | 253 return; |
254 } | 254 } |
255 | 255 |
256 Dart_FileOpenCallback file_open = Isolate::file_open_callback(); | 256 Dart_FileOpenCallback file_open = Dart::file_open_callback(); |
257 Dart_FileWriteCallback file_write = Isolate::file_write_callback(); | 257 Dart_FileWriteCallback file_write = Dart::file_write_callback(); |
258 Dart_FileCloseCallback file_close = Isolate::file_close_callback(); | 258 Dart_FileCloseCallback file_close = Dart::file_close_callback(); |
259 if ((file_open == NULL) || (file_write == NULL) || (file_close == NULL)) { | 259 if ((file_open == NULL) || (file_write == NULL) || (file_close == NULL)) { |
260 return; | 260 return; |
261 } | 261 } |
262 | 262 |
263 JSONStream stream; | 263 JSONStream stream; |
264 PrintJSON(thread, &stream, NULL, false); | 264 PrintJSON(thread, &stream, NULL, false); |
265 | 265 |
266 intptr_t pid = OS::ProcessId(); | 266 intptr_t pid = OS::ProcessId(); |
267 char* filename = OS::SCreate(thread->zone(), | 267 char* filename = OS::SCreate(thread->zone(), |
268 "%s/dart-cov-%" Pd "-%" Pd64 ".json", | 268 "%s/dart-cov-%" Pd "-%" Pd64 ".json", |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 cls = it.GetNextClass(); | 304 cls = it.GetNextClass(); |
305 ASSERT(!cls.IsNull()); | 305 ASSERT(!cls.IsNull()); |
306 PrintClass(lib, cls, jsarr, filter, as_call_sites); | 306 PrintClass(lib, cls, jsarr, filter, as_call_sites); |
307 } | 307 } |
308 } | 308 } |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 | 312 |
313 } // namespace dart | 313 } // namespace dart |
OLD | NEW |