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

Unified Diff: src/isolate.cc

Issue 1842763002: [api] Add a switch that controls if ES2015 tail call elimination feature is enabled or not. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-dynamic
Patch Set: Created 4 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
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 9cee8db2ba79d92adb820c0af6800f66a58c799e..093c7251dab39ddb16fbd655f5470aebc55c5a34 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2881,6 +2881,12 @@ std::string Isolate::GetTurboCfgFileName() {
}
}
+void Isolate::SetTailCallEliminationEnabled(bool enabled) {
+ if (is_tail_call_elimination_enabled_ == enabled) return;
+ is_tail_call_elimination_enabled_ = enabled;
+ // This is a big hammer but we don't expect this to happen frequently.
+ internal::Deoptimizer::DeoptimizeAll(this);
+}
// Heap::detached_contexts tracks detached contexts as pairs
// (number of GC since the context was detached, the context).
« include/v8-debug.h ('K') | « src/isolate.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698