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

Unified Diff: src/compiler.cc

Issue 1816513002: [compiler] Remove redundant unoptimized compile trigger. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test no longer failing. 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
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('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 35e82209ffac0b26fdc35654eed9844b79fb9704..e2800ca24d032812d8db4424af3f6960841a4458 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1088,21 +1088,10 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
DCHECK(AllowCompilation::IsAllowed(isolate));
- if (!shared->is_compiled() ||
- shared->scope_info() == ScopeInfo::Empty(isolate)) {
- // The function was never compiled. Compile it unoptimized first.
- // TODO(titzer): reuse the AST and scope info from this compile.
- CompilationInfoWithZone unoptimized(function);
- unoptimized.EnableDeoptimizationSupport();
- Handle<Code> unoptimized_code;
- if (!GetUnoptimizedCodeCommon(&unoptimized).ToHandle(&unoptimized_code)) {
- return MaybeHandle<Code>();
- }
- shared->ReplaceCode(*unoptimized_code);
+ if (shared->is_compiled()) {
+ shared->code()->set_profiler_ticks(0);
}
- shared->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) {
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698