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

Unified Diff: src/compiler.cc

Issue 2437043002: [compiler] Mark shared functions for optimization (Closed)
Patch Set: Unmark after compiling Created 4 years, 2 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/builtins/x87/builtins-x87.cc ('k') | src/objects.h » ('j') | 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 1b623c2b477029d86098ffc28d4a08a95dab06f9..08a1339de033faa85dc487aa206b429da76d50d8 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -977,6 +977,22 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
return cached_code;
}
+ if (function->shared()->was_marked_for_optimization()) {
+ function->shared()->set_was_marked_for_optimization(false);
+
+ if (FLAG_trace_opt) {
+ PrintF("[optimizing function ");
+ function->PrintName();
+ PrintF(" eagerly because shared function was previously marked]\n");
+ }
+
+ Handle<Code> opt_code;
+ if (GetOptimizedCode(function, Compiler::NOT_CONCURRENT)
+ .ToHandle(&opt_code)) {
+ return opt_code;
+ }
+ }
+
if (function->shared()->is_compiled()) {
return Handle<Code>(function->shared()->code());
}
« no previous file with comments | « src/builtins/x87/builtins-x87.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698