Index: src/handles.h |
diff --git a/src/handles.h b/src/handles.h |
index 960696b5fb81f705f2128b5586fef44ca0c8e7fb..4851c6ac1b72e418167b9667a8c292fcd34ded44 100644 |
--- a/src/handles.h |
+++ b/src/handles.h |
@@ -161,6 +161,25 @@ class HandleScope { |
}; |
+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 { |
+ 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 |