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

Unified Diff: src/objects.cc

Issue 1883403002: [compiler] Move ensuring deoptimization support to backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 8 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/crankshaft/hydrogen.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index f3980573d0f7a051f45ecb17914799e5d66a5c32..7b455bfe385dae41e496428249fd58bc8595fe8b 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -13517,8 +13517,15 @@ void SharedFunctionInfo::ResetForNewContext(int new_ic_age) {
set_ic_age(new_ic_age);
if (code()->kind() == Code::FUNCTION) {
code()->set_profiler_ticks(0);
- if (optimization_disabled() &&
- opt_count() >= FLAG_max_opt_count) {
+ if (optimization_disabled() && opt_count() >= FLAG_max_opt_count) {
+ // Re-enable optimizations if they were disabled due to opt_count limit.
+ set_optimization_disabled(false);
+ }
+ set_opt_count(0);
+ set_deopt_count(0);
+ } else if (code()->is_interpreter_entry_trampoline()) {
+ set_profiler_ticks(0);
+ if (optimization_disabled() && opt_count() >= FLAG_max_opt_count) {
// Re-enable optimizations if they were disabled due to opt_count limit.
set_optimization_disabled(false);
}
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698