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

Unified Diff: src/compiler.cc

Issue 1053063003: Make --always-opt also optimize top-level code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Skip failing tests. Created 5 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
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 30777361a7a0b1f216da9f8cf5f260c282a5d47c..a95fe866d99f8e73170e4fee8740c7cbe616e471 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1472,6 +1472,24 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
}
current_code->set_profiler_ticks(0);
+ // TODO(mstarzinger): We cannot properly deserialize a scope chain containing
+ // an eval scope and hence would fail at parsing the eval source again.
+ if (shared->disable_optimization_reason() == kEval) {
+ return MaybeHandle<Code>();
+ }
+
+ // TODO(mstarzinger): We cannot properly deserialize a scope chain for the
+ // builtin context, hence Genesis::InstallExperimentalNatives would fail.
+ if (shared->is_toplevel() && isolate->bootstrapper()->IsActive()) {
+ return MaybeHandle<Code>();
+ }
+
+ // TODO(titzer): Some top-level code times out because of missing interrupt
+ // checks at back-branches, these are currently marked with --no-turbo-osr.
+ if (shared->is_toplevel() && !FLAG_turbo_osr) {
+ return MaybeHandle<Code>();
+ }
+
info->SetOptimizing(osr_ast_id, current_code);
if (mode == CONCURRENT) {
« no previous file with comments | « src/bailout-reason.h ('k') | src/compiler/ast-graph-builder.h » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698