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

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

Issue 9148051: Provide API support for weak handles and post-mortem finalization. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: a better strategy for protected handle checks Created 8 years, 11 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
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_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 "vm/assert.h" 9 #include "vm/assert.h"
10 #include "vm/store_buffer.h" 10 #include "vm/store_buffer.h"
11 #include "vm/timer.h" 11 #include "vm/timer.h"
12 12
13 namespace dart { 13 namespace dart {
14 14
15 // Forward declarations. 15 // Forward declarations.
16 class ApiState; 16 class ApiState;
17 class BigintStore; 17 class BigintStore;
18 class CodeIndexTable; 18 class CodeIndexTable;
19 class Debugger; 19 class Debugger;
20 class HandleScope; 20 class HandleScope;
21 class HandleVisitor;
21 class Heap; 22 class Heap;
22 class LongJump; 23 class LongJump;
23 class MessageQueue; 24 class MessageQueue;
24 class Mutex; 25 class Mutex;
25 class ObjectPointerVisitor; 26 class ObjectPointerVisitor;
26 class ObjectStore; 27 class ObjectStore;
27 class RawContext; 28 class RawContext;
28 class RawObject; 29 class RawObject;
29 class StackResource; 30 class StackResource;
30 class StubCode; 31 class StubCode;
31 class Zone; 32 class Zone;
32 33
33 class Isolate { 34 class Isolate {
34 public: 35 public:
35 ~Isolate(); 36 ~Isolate();
36 37
37 static inline Isolate* Current(); 38 static inline Isolate* Current();
38 static void SetCurrent(Isolate* isolate); 39 static void SetCurrent(Isolate* isolate);
39 40
40 static void InitOnce(); 41 static void InitOnce();
41 static Isolate* Init(); 42 static Isolate* Init();
42 void Shutdown(); 43 void Shutdown();
43 44
44 // Visit all object pointers. 45 // Visit all object pointers.
45 void VisitObjectPointers(ObjectPointerVisitor* visitor, bool validate_frames); 46 void VisitObjectPointers(ObjectPointerVisitor* visitor, bool validate_frames);
46 47
47 void VisitStrongObjectPointers(ObjectPointerVisitor* visitor, 48 void VisitWeakPersistentHandles(HandleVisitor* visitor);
48 bool validate_frames);
49
50 void VisitWeakObjectPointers(ObjectPointerVisitor* visitor);
51 49
52 StoreBufferBlock* store_buffer() { return &store_buffer_; } 50 StoreBufferBlock* store_buffer() { return &store_buffer_; }
53 51
54 Dart_PostMessageCallback post_message_callback() const { 52 Dart_PostMessageCallback post_message_callback() const {
55 return post_message_callback_; 53 return post_message_callback_;
56 } 54 }
57 void set_post_message_callback(Dart_PostMessageCallback value) { 55 void set_post_message_callback(Dart_PostMessageCallback value) {
58 post_message_callback_ = value; 56 post_message_callback_ = value;
59 } 57 }
60 58
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 #include "vm/isolate_linux.h" 313 #include "vm/isolate_linux.h"
316 #elif defined(TARGET_OS_MACOS) 314 #elif defined(TARGET_OS_MACOS)
317 #include "vm/isolate_macos.h" 315 #include "vm/isolate_macos.h"
318 #elif defined(TARGET_OS_WINDOWS) 316 #elif defined(TARGET_OS_WINDOWS)
319 #include "vm/isolate_win.h" 317 #include "vm/isolate_win.h"
320 #else 318 #else
321 #error Unknown target os. 319 #error Unknown target os.
322 #endif 320 #endif
323 321
324 #endif // VM_ISOLATE_H_ 322 #endif // VM_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698