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

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

Issue 9605033: Implement a garbage collection prologue and epilogue callback mechanism. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix grammar Created 8 years, 9 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 | « runtime/vm/gc_marker.cc ('k') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define VM_ISOLATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/thread.h" 10 #include "platform/thread.h"
11 #include "vm/gc_callbacks.h"
11 #include "vm/store_buffer.h" 12 #include "vm/store_buffer.h"
12 #include "vm/timer.h" 13 #include "vm/timer.h"
13 14
14 namespace dart { 15 namespace dart {
15 16
16 // Forward declarations. 17 // Forward declarations.
17 class ApiState; 18 class ApiState;
18 class CodeIndexTable; 19 class CodeIndexTable;
19 class Debugger; 20 class Debugger;
20 class HandleScope; 21 class HandleScope;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 void set_ast_node_id(int value) { ast_node_id_ = value; } 226 void set_ast_node_id(int value) { ast_node_id_ = value; }
226 227
227 Debugger* debugger() const { return debugger_; } 228 Debugger* debugger() const { return debugger_; }
228 229
229 static void SetCreateCallback(Dart_IsolateCreateCallback cback); 230 static void SetCreateCallback(Dart_IsolateCreateCallback cback);
230 static Dart_IsolateCreateCallback CreateCallback(); 231 static Dart_IsolateCreateCallback CreateCallback();
231 232
232 static void SetInterruptCallback(Dart_IsolateInterruptCallback cback); 233 static void SetInterruptCallback(Dart_IsolateInterruptCallback cback);
233 static Dart_IsolateInterruptCallback InterruptCallback(); 234 static Dart_IsolateInterruptCallback InterruptCallback();
234 235
236 GcPrologueCallbacks& gc_prologue_callbacks() {
237 return gc_prologue_callbacks_;
238 }
239
240 GcEpilogueCallbacks& gc_epilogue_callbacks() {
241 return gc_epilogue_callbacks_;
242 }
243
235 private: 244 private:
236 Isolate(); 245 Isolate();
237 246
238 void BuildName(const char* name_prefix); 247 void BuildName(const char* name_prefix);
239 void PrintInvokedFunctions(); 248 void PrintInvokedFunctions();
240 249
241 static uword GetSpecifiedStackSize(); 250 static uword GetSpecifiedStackSize();
242 251
243 static const uword kStackSizeBuffer = (128 * KB); 252 static const uword kStackSizeBuffer = (128 * KB);
244 static const uword kDefaultStackSize = (1 * MB); 253 static const uword kDefaultStackSize = (1 * MB);
(...skipping 21 matching lines...) Expand all
266 StubCode* stub_code_; 275 StubCode* stub_code_;
267 CodeIndexTable* code_index_table_; 276 CodeIndexTable* code_index_table_;
268 Debugger* debugger_; 277 Debugger* debugger_;
269 LongJump* long_jump_base_; 278 LongJump* long_jump_base_;
270 TimerList timer_list_; 279 TimerList timer_list_;
271 intptr_t ast_node_id_; 280 intptr_t ast_node_id_;
272 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. 281 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_.
273 uword stack_limit_; 282 uword stack_limit_;
274 uword saved_stack_limit_; 283 uword saved_stack_limit_;
275 MessageHandler* message_handler_; 284 MessageHandler* message_handler_;
285 GcPrologueCallbacks gc_prologue_callbacks_;
286 GcEpilogueCallbacks gc_epilogue_callbacks_;
276 287
277 static Dart_IsolateCreateCallback create_callback_; 288 static Dart_IsolateCreateCallback create_callback_;
278 static Dart_IsolateInterruptCallback interrupt_callback_; 289 static Dart_IsolateInterruptCallback interrupt_callback_;
279 290
280 DISALLOW_COPY_AND_ASSIGN(Isolate); 291 DISALLOW_COPY_AND_ASSIGN(Isolate);
281 }; 292 };
282 293
283 } // namespace dart 294 } // namespace dart
284 295
285 #endif // VM_ISOLATE_H_ 296 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/gc_marker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698