Index: runtime/vm/allocation.h |
=================================================================== |
--- runtime/vm/allocation.h (revision 1423) |
+++ runtime/vm/allocation.h (working copy) |
@@ -9,6 +9,9 @@ |
namespace dart { |
+// Forward declarations. |
+class Isolate; |
+ |
// Stack allocated objects subclass from this base class. Objects of this type |
// cannot be allocated on either the C or object heaps. Destructors for objects |
// of this type will not be run unless the stack is unwound through normal |
@@ -35,11 +38,14 @@ |
StackResource(); |
virtual ~StackResource(); |
+ Isolate* isolate() const { return isolate_; } |
+ |
// The delete operator should be private instead of public, but unfortunately |
// the compiler complains when compiling the destructors for subclasses. |
void operator delete(void* pointer) { UNREACHABLE(); } |
private: |
+ Isolate* isolate_; // Current isolate for this stack resource. |
StackResource* previous_; |
void* operator new(uword size); |