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

Unified Diff: src/compiler.h

Issue 1415133002: Introduce a reference to the code object of inlined functions in CompilationInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweak Created 5 years, 2 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
« no previous file with comments | « no previous file | src/compiler/code-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index cc1a9559bfb2d8c1241b35d40d3c6e2c5641829b..25e791caa234e10f5879028e87e6d475b242ab7e 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -404,12 +404,27 @@ class CompilationInfo {
bool has_simple_parameters();
- typedef std::vector<Handle<SharedFunctionInfo>> InlinedFunctionList;
+ struct InlinedFunctionHolder {
+ Handle<SharedFunctionInfo> shared_info;
+
+ // Root that holds the unoptimized code of the inlined function alive
+ // (and out of reach of code flushing) until we finish compilation.
+ // Do not remove.
+ Handle<Code> inlined_code_object_root;
+
+ explicit InlinedFunctionHolder(
+ Handle<SharedFunctionInfo> inlined_shared_info)
+ : shared_info(inlined_shared_info),
+ inlined_code_object_root(inlined_shared_info->code()) {}
+ };
+
+ typedef std::vector<InlinedFunctionHolder> InlinedFunctionList;
InlinedFunctionList const& inlined_functions() const {
return inlined_functions_;
}
+
void AddInlinedFunction(Handle<SharedFunctionInfo> inlined_function) {
- inlined_functions_.push_back(inlined_function);
+ inlined_functions_.push_back(InlinedFunctionHolder(inlined_function));
}
base::SmartArrayPointer<char> GetDebugName() const;
« no previous file with comments | « no previous file | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698