Index: src/compiler.h |
=================================================================== |
--- src/compiler.h (revision 7267) |
+++ src/compiler.h (working copy) |
@@ -46,6 +46,10 @@ |
explicit CompilationInfo(Handle<SharedFunctionInfo> shared_info); |
explicit CompilationInfo(Handle<JSFunction> closure); |
+ Isolate* isolate() { |
+ ASSERT(Isolate::Current() == isolate_); |
+ return isolate_; |
+ } |
bool is_lazy() const { return (flags_ & IsLazy::mask()) != 0; } |
bool is_eval() const { return (flags_ & IsEval::mask()) != 0; } |
bool is_global() const { return (flags_ & IsGlobal::mask()) != 0; } |
@@ -142,6 +146,8 @@ |
} |
private: |
+ Isolate* isolate_; |
+ |
// Compilation mode. |
// BASE is generated by the full codegen, optionally prepared for bailouts. |
// OPTIMIZE is optimized code generated by the Hydrogen-based backend. |
@@ -286,8 +292,9 @@ |
explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } |
virtual ~CompilationZoneScope() { |
if (ShouldDeleteOnExit()) { |
- FrameElement::ClearConstantList(); |
- Result::ClearConstantList(); |
+ Isolate* isolate = Isolate::Current(); |
+ isolate->frame_element_constant_list()->Clear(); |
+ isolate->result_constant_list()->Clear(); |
} |
} |
}; |