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

Side by Side Diff: src/d8.h

Issue 2695823003: [debugger] add lcov support to d8. (Closed)
Patch Set: actual fix Created 3 years, 10 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 | src/d8.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_D8_H_ 5 #ifndef V8_D8_H_
6 #define V8_D8_H_ 6 #define V8_D8_H_
7 7
8 #include <iterator> 8 #include <iterator>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 expected_to_throw(false), 297 expected_to_throw(false),
298 mock_arraybuffer_allocator(false), 298 mock_arraybuffer_allocator(false),
299 enable_inspector(false), 299 enable_inspector(false),
300 num_isolates(1), 300 num_isolates(1),
301 compile_options(v8::ScriptCompiler::kNoCompileOptions), 301 compile_options(v8::ScriptCompiler::kNoCompileOptions),
302 isolate_sources(NULL), 302 isolate_sources(NULL),
303 icu_data_file(NULL), 303 icu_data_file(NULL),
304 natives_blob(NULL), 304 natives_blob(NULL),
305 snapshot_blob(NULL), 305 snapshot_blob(NULL),
306 trace_enabled(false), 306 trace_enabled(false),
307 trace_config(NULL) {} 307 trace_config(NULL),
308 lcov_file(NULL) {}
308 309
309 ~ShellOptions() { 310 ~ShellOptions() {
310 delete[] isolate_sources; 311 delete[] isolate_sources;
311 } 312 }
312 313
313 bool use_interactive_shell() { 314 bool use_interactive_shell() {
314 return (interactive_shell || !script_executed) && !test_shell; 315 return (interactive_shell || !script_executed) && !test_shell;
315 } 316 }
316 317
317 bool script_executed; 318 bool script_executed;
(...skipping 10 matching lines...) Expand all
328 bool mock_arraybuffer_allocator; 329 bool mock_arraybuffer_allocator;
329 bool enable_inspector; 330 bool enable_inspector;
330 int num_isolates; 331 int num_isolates;
331 v8::ScriptCompiler::CompileOptions compile_options; 332 v8::ScriptCompiler::CompileOptions compile_options;
332 SourceGroup* isolate_sources; 333 SourceGroup* isolate_sources;
333 const char* icu_data_file; 334 const char* icu_data_file;
334 const char* natives_blob; 335 const char* natives_blob;
335 const char* snapshot_blob; 336 const char* snapshot_blob;
336 bool trace_enabled; 337 bool trace_enabled;
337 const char* trace_config; 338 const char* trace_config;
339 const char* lcov_file;
338 }; 340 };
339 341
340 class Shell : public i::AllStatic { 342 class Shell : public i::AllStatic {
341 public: 343 public:
342 static MaybeLocal<Script> CompileString( 344 static MaybeLocal<Script> CompileString(
343 Isolate* isolate, Local<String> source, Local<Value> name, 345 Isolate* isolate, Local<String> source, Local<Value> name,
344 v8::ScriptCompiler::CompileOptions compile_options); 346 v8::ScriptCompiler::CompileOptions compile_options);
345 static bool ExecuteString(Isolate* isolate, Local<String> source, 347 static bool ExecuteString(Isolate* isolate, Local<String> source,
346 Local<Value> name, bool print_result, 348 Local<Value> name, bool print_result,
347 bool report_exceptions); 349 bool report_exceptions);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 static base::OS::MemoryMappedFile* counters_file_; 459 static base::OS::MemoryMappedFile* counters_file_;
458 static base::LazyMutex context_mutex_; 460 static base::LazyMutex context_mutex_;
459 static const base::TimeTicks kInitialTicks; 461 static const base::TimeTicks kInitialTicks;
460 462
461 static base::LazyMutex workers_mutex_; 463 static base::LazyMutex workers_mutex_;
462 static bool allow_new_workers_; 464 static bool allow_new_workers_;
463 static i::List<Worker*> workers_; 465 static i::List<Worker*> workers_;
464 static std::vector<ExternalizedContents> externalized_contents_; 466 static std::vector<ExternalizedContents> externalized_contents_;
465 467
466 static void WriteIgnitionDispatchCountersFile(v8::Isolate* isolate); 468 static void WriteIgnitionDispatchCountersFile(v8::Isolate* isolate);
469 // Append LCOV coverage data to file.
470 static void WriteLcovData(v8::Isolate* isolate, const char* file);
467 static Counter* GetCounter(const char* name, bool is_histogram); 471 static Counter* GetCounter(const char* name, bool is_histogram);
468 static Local<String> Stringify(Isolate* isolate, Local<Value> value); 472 static Local<String> Stringify(Isolate* isolate, Local<Value> value);
469 static void Initialize(Isolate* isolate); 473 static void Initialize(Isolate* isolate);
470 static void RunShell(Isolate* isolate); 474 static void RunShell(Isolate* isolate);
471 static bool SetOptions(int argc, char* argv[]); 475 static bool SetOptions(int argc, char* argv[]);
472 static Local<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate); 476 static Local<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate);
473 static MaybeLocal<Context> CreateRealm( 477 static MaybeLocal<Context> CreateRealm(
474 const v8::FunctionCallbackInfo<v8::Value>& args); 478 const v8::FunctionCallbackInfo<v8::Value>& args);
475 static MaybeLocal<Module> FetchModuleTree(v8::Local<v8::Context> context, 479 static MaybeLocal<Module> FetchModuleTree(v8::Local<v8::Context> context,
476 const std::string& file_name); 480 const std::string& file_name);
477 }; 481 };
478 482
479 483
480 } // namespace v8 484 } // namespace v8
481 485
482 486
483 #endif // V8_D8_H_ 487 #endif // V8_D8_H_
OLDNEW
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698