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

Unified Diff: src/runtime/runtime-compiler.cc

Issue 2730323002: [deoptimizer] When deoptimizing code, unlink all functions referring to that code. (Closed)
Patch Set: Fix typo Created 3 years, 9 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 | « src/log.cc ('k') | test/mjsunit/regress/regress-unlink-closures-on-deopt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-compiler.cc
diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc
index f929d736977e08dc256537817c41fecc22825e19..f9384232709fe0075b37b7dca06b7260813d472a 100644
--- a/src/runtime/runtime-compiler.cc
+++ b/src/runtime/runtime-compiler.cc
@@ -213,14 +213,9 @@ RUNTIME_FUNCTION(Runtime_NotifyDeoptimized) {
isolate->thread_manager()->IterateArchivedThreads(&activations_finder);
if (!activations_finder.has_code_activations_) {
- if (function->code() == *optimized_code) {
- if (FLAG_trace_deopt) {
- PrintF("[removing optimized code for: ");
- function->PrintName();
- PrintF("]\n");
- }
- function->ReplaceCode(function->shared()->code());
- }
+ Deoptimizer::UnlinkOptimizedCode(*optimized_code,
+ function->context()->native_context());
+
// Evict optimized code for this function from the cache so that it
// doesn't get used for new closures.
function->shared()->EvictFromOptimizedCodeMap(*optimized_code,
« no previous file with comments | « src/log.cc ('k') | test/mjsunit/regress/regress-unlink-closures-on-deopt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698