From c18cf2b43d636d5243d160bab4089aa53a169e8b Mon Sep 17 00:00:00 2001 From: bmeurer Date: Tue, 7 Jul 2015 00:28:02 -0700 Subject: [PATCH] [deoptimizer] Properly evict TurboFan OSR code objects on eager deopts. TurboFan OSR installs the CompileOptimized builtin on JSFunctions, which means that we never evict the OSR code objects for such functions from eager deopts. R=jarin@chromium.org Review URL: https://codereview.chromium.org/1220813018 Cr-Commit-Position: refs/heads/master@{#29507} --- src/runtime/runtime-compiler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc index 0b6677a..4cfa84a 100644 --- a/src/runtime/runtime-compiler.cc +++ b/src/runtime/runtime-compiler.cc @@ -151,11 +151,11 @@ RUNTIME_FUNCTION(Runtime_NotifyDeoptimized) { PrintF("]\n"); } function->ReplaceCode(function->shared()->code()); - // Evict optimized code for this function from the cache so that it - // doesn't get used for new closures. - function->shared()->EvictFromOptimizedCodeMap(*optimized_code, - "notify deoptimized"); } + // Evict optimized code for this function from the cache so that it + // doesn't get used for new closures. + function->shared()->EvictFromOptimizedCodeMap(*optimized_code, + "notify deoptimized"); } else { // TODO(titzer): we should probably do DeoptimizeCodeList(code) // unconditionally if the code is not already marked for deoptimization. -- 2.7.4