Index: src/handles.h |
diff --git a/src/handles.h b/src/handles.h |
index 960696b5fb81f705f2128b5586fef44ca0c8e7fb..68889c7633808eadd8ffd1290dfff330757a48d0 100644 |
--- a/src/handles.h |
+++ b/src/handles.h |
@@ -95,6 +95,9 @@ class Handle { |
}; |
+class HandleScopeImplementer; |
+ |
+ |
// A stack-allocated class that governs a number of local handles. |
// After a handle scope has been created, all local handles will be |
// allocated within that handle scope until either the handle scope is |
@@ -157,10 +160,30 @@ class HandleScope { |
static void ZapRange(internal::Object** start, internal::Object** end); |
friend class v8::HandleScope; |
+ friend class v8::internal::HandleScopeImplementer; |
friend class v8::ImplementationUtilities; |
}; |
+class CompilationInfo; |
+ |
+// Like a regular stack-allocated HandleScope, but does not delete the |
+// handles allocated in its scope on destruction. Instead, it ties |
+// the Handles created in its scope with the CompilatationInfo passed |
+// to its constructor. The Handles are reclaimed when the |
+// CompilationInfo destructs. |
+class GatheringHandleScope { |
danno
2012/06/24 11:07:03
Why not just call this CompilationHandleScope?
danno
2012/06/24 11:07:03
This guy should be responsible for creating the "P
|
+ public: |
+ explicit GatheringHandleScope(CompilationInfo* info); |
+ ~GatheringHandleScope(); |
+ |
+ private: |
+ CompilationInfo* info_; |
+ Object** prev_next_; |
+ Object** prev_limit_; |
+}; |
+ |
+ |
// ---------------------------------------------------------------------------- |
// Handle operations. |
// They might invoke garbage collection. The result is an handle to |