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

Unified Diff: src/crankshaft/lithium-codegen.cc

Issue 1490233009: [heap] Make link from optimized code to inlined code explicit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Allow handle deref. Created 5 years 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 | « src/compiler/code-generator.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/lithium-codegen.cc
diff --git a/src/crankshaft/lithium-codegen.cc b/src/crankshaft/lithium-codegen.cc
index 10e06dd65d4e4865ca224094cc7f94504779723d..5bd1e6a9b872426627bc306eb5bbec9f95b64306 100644
--- a/src/crankshaft/lithium-codegen.cc
+++ b/src/crankshaft/lithium-codegen.cc
@@ -332,10 +332,17 @@ void LCodeGenBase::PopulateDeoptimizationData(Handle<Code> code) {
void LCodeGenBase::PopulateDeoptimizationLiteralsWithInlinedFunctions() {
DCHECK_EQ(0, deoptimization_literals_.length());
- for (auto function : chunk()->inlined_functions()) {
+ for (Handle<SharedFunctionInfo> function : chunk()->inlined_functions()) {
DefineDeoptimizationLiteral(function);
}
inlined_function_count_ = deoptimization_literals_.length();
+
+ // Define deoptimization literals for all unoptimized code objects of inlined
+ // functions. This ensures unoptimized code is kept alive by optimized code.
+ AllowDeferredHandleDereference allow_shared_function_info_dereference;
+ for (Handle<SharedFunctionInfo> function : chunk()->inlined_functions()) {
+ DefineDeoptimizationLiteral(handle(function->code()));
+ }
}
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698