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

Unified Diff: src/compiler.cc

Issue 1916833002: [compiler] Prevent unnecessary regeneration of baseline code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 6d8decb9541bd325d385ae238abc0ed6c5954bb0..298955f1e0f4edd2cfa389ae9e7d70f05032790a 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -898,6 +898,11 @@ MaybeHandle<Code> GetBaselineCode(Handle<JSFunction> function) {
function->shared()->set_profiler_ticks(0);
}
+ // Nothing left to do if the function already has baseline code.
+ if (function->shared()->code()->kind() == Code::FUNCTION) {
+ return Handle<Code>(function->shared()->code());
+ }
+
// We do not switch to baseline code when the debugger might have created a
// copy of the bytecode with break slots to be able to set break points.
if (function->shared()->HasDebugInfo()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698