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

Side by Side Diff: runtime/vm/dart.h

Issue 11442024: Unify specification of file open, close, and write callbacks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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/vm/code_observers.cc ('k') | runtime/vm/dart.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 #ifndef VM_DART_H_ 5 #ifndef VM_DART_H_
6 #define VM_DART_H_ 6 #define VM_DART_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 // Forward declarations. 13 // Forward declarations.
14 class DebugInfo; 14 class DebugInfo;
15 class Isolate; 15 class Isolate;
16 class RawError; 16 class RawError;
17 class ThreadPool; 17 class ThreadPool;
18 18
19 class Dart : public AllStatic { 19 class Dart : public AllStatic {
20 public: 20 public:
21 static const char* InitOnce( 21 static const char* InitOnce(
22 Dart_IsolateCreateCallback create, 22 Dart_IsolateCreateCallback create,
23 Dart_IsolateInterruptCallback interrupt, 23 Dart_IsolateInterruptCallback interrupt,
24 Dart_IsolateUnhandledExceptionCallback unhandled, 24 Dart_IsolateUnhandledExceptionCallback unhandled,
25 Dart_IsolateShutdownCallback shutdown); 25 Dart_IsolateShutdownCallback shutdown,
26 Dart_FileOpenCallback file_open,
27 Dart_FileWriteCallback file_write,
28 Dart_FileCloseCallback file_close);
26 29
27 static Isolate* CreateIsolate(const char* name_prefix); 30 static Isolate* CreateIsolate(const char* name_prefix);
28 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data); 31 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data);
29 static void ShutdownIsolate(); 32 static void ShutdownIsolate();
30 33
31 static Isolate* vm_isolate() { return vm_isolate_; } 34 static Isolate* vm_isolate() { return vm_isolate_; }
32 static ThreadPool* thread_pool() { return thread_pool_; } 35 static ThreadPool* thread_pool() { return thread_pool_; }
33 36
34 static void set_perf_events_writer(Dart_FileWriterFunction writer_function) { 37 static void set_perf_events_file(void* file) {
35 perf_events_writer_ = writer_function; 38 perf_events_file_ = file;
36 } 39 }
37 static Dart_FileWriterFunction perf_events_writer() { 40 static void* perf_events_file() {
38 return perf_events_writer_; 41 return perf_events_file_;
39 } 42 }
40 43
41 static void set_pprof_symbol_generator(DebugInfo* value) { 44 static void set_pprof_symbol_generator(DebugInfo* value) {
42 pprof_symbol_generator_ = value; 45 pprof_symbol_generator_ = value;
43 } 46 }
44 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } 47 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; }
45 48
46 static void set_flow_graph_writer(Dart_FileWriterFunction writer_function) {
47 flow_graph_writer_ = writer_function;
48 }
49 static Dart_FileWriterFunction flow_graph_writer() {
50 return flow_graph_writer_;
51 }
52
53 private: 49 private:
54 static Isolate* vm_isolate_; 50 static Isolate* vm_isolate_;
55 static ThreadPool* thread_pool_; 51 static ThreadPool* thread_pool_;
56 static Dart_FileWriterFunction perf_events_writer_; 52 static void* perf_events_file_;
57 static DebugInfo* pprof_symbol_generator_; 53 static DebugInfo* pprof_symbol_generator_;
58 static Dart_FileWriterFunction flow_graph_writer_;
59 }; 54 };
60 55
61 } // namespace dart 56 } // namespace dart
62 57
63 #endif // VM_DART_H_ 58 #endif // VM_DART_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_observers.cc ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698