Index: src/compiler.h |
=================================================================== |
--- src/compiler.h (revision 1950) |
+++ src/compiler.h (working copy) |
@@ -28,7 +28,9 @@ |
#ifndef V8_COMPILER_H_ |
#define V8_COMPILER_H_ |
+#include "frame-element.h" |
#include "parser.h" |
+#include "zone.h" |
namespace v8 { namespace internal { |
@@ -69,6 +71,19 @@ |
static bool CompileLazy(Handle<SharedFunctionInfo> shared, int loop_nesting); |
}; |
+ |
+// During compilation we need a global list of handles to constants |
+// for frame elements. When the zone gets deleted, we make sure to |
+// clear this list of handles as well. |
+class CompilationZoneScope : public ZoneScope { |
+ public: |
+ explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } |
+ virtual ~CompilationZoneScope() { |
+ if (ShouldDeleteOnExit()) FrameElement::ClearConstantList(); |
+ } |
+}; |
+ |
+ |
} } // namespace v8::internal |
#endif // V8_COMPILER_H_ |