Index: src/compiler.h |
diff --git a/src/compiler.h b/src/compiler.h |
index c4ba636f6fb4021df3a67fb88ca1de13416ea23d..2f8d176d9cfdf8602c46ed87e9f72247d3595532 100644 |
--- a/src/compiler.h |
+++ b/src/compiler.h |
@@ -163,7 +163,7 @@ class CompilationInfo { |
kBailoutOnUninitialized = 1 << 19, |
}; |
- explicit CompilationInfo(ParseInfo* parse_info); |
+ CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure); |
CompilationInfo(const char* debug_name, Isolate* isolate, Zone* zone, |
Code::Flags code_flags = Code::ComputeFlags(Code::STUB)); |
virtual ~CompilationInfo(); |
@@ -178,7 +178,6 @@ class CompilationInfo { |
bool is_native() const; |
bool is_module() const; |
LanguageMode language_mode() const; |
- Handle<JSFunction> closure() const; |
FunctionLiteral* literal() const; |
Scope* scope() const; |
Handle<Context> context() const; |
@@ -193,6 +192,7 @@ class CompilationInfo { |
} |
Zone* zone() { return zone_; } |
bool is_osr() const { return !osr_ast_id_.IsNone(); } |
+ Handle<JSFunction> closure() const { return closure_; } |
Handle<Code> code() const { return code_; } |
Code::Flags code_flags() const { return code_flags_; } |
BailoutId osr_ast_id() const { return osr_ast_id_; } |
@@ -382,7 +382,7 @@ class CompilationInfo { |
} |
void ReopenHandlesInNewHandleScope() { |
- // Empty for now but will be needed once fields move from ParseInfo. |
+ closure_ = Handle<JSFunction>(*closure_); |
} |
void AbortOptimization(BailoutReason reason) { |
@@ -526,6 +526,8 @@ class CompilationInfo { |
Code::Flags code_flags_; |
+ Handle<JSFunction> closure_; |
+ |
// The compiled code. |
Handle<Code> code_; |