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

Unified Diff: src/handles.h

Issue 10640012: Add a second kind of HandleScope that ties the lifetime of Handles created in its scope to the life… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« src/compiler.h ('K') | « src/compiler.cc ('k') | src/handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« src/compiler.h ('K') | « src/compiler.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698