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

Side by Side Diff: src/optimizing-compile-dispatcher.cc

Issue 1773663003: [compiler] Slightly change API to finalize compile jobs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-remove-concurrent-osr
Patch Set: Fix think'o. 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 unified diff | Download patch
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/optimizing-compile-dispatcher.h" 5 #include "src/optimizing-compile-dispatcher.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/full-codegen/full-codegen.h" 8 #include "src/full-codegen/full-codegen.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/tracing/trace-event.h" 10 #include "src/tracing/trace-event.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 CompilationInfo* info = job->info(); 191 CompilationInfo* info = job->info();
192 Handle<JSFunction> function(*info->closure()); 192 Handle<JSFunction> function(*info->closure());
193 if (function->IsOptimized()) { 193 if (function->IsOptimized()) {
194 if (FLAG_trace_concurrent_recompilation) { 194 if (FLAG_trace_concurrent_recompilation) {
195 PrintF(" ** Aborting compilation for "); 195 PrintF(" ** Aborting compilation for ");
196 function->ShortPrint(); 196 function->ShortPrint();
197 PrintF(" as it has already been optimized.\n"); 197 PrintF(" as it has already been optimized.\n");
198 } 198 }
199 DisposeOptimizedCompileJob(job, false); 199 DisposeOptimizedCompileJob(job, false);
200 } else { 200 } else {
201 MaybeHandle<Code> code = Compiler::GetConcurrentlyOptimizedCode(job); 201 Compiler::FinalizeOptimizedCompileJob(job);
202 function->ReplaceCode(code.is_null() ? function->shared()->code()
203 : *code.ToHandleChecked());
204 } 202 }
205 } 203 }
206 } 204 }
207 205
208 206
209 void OptimizingCompileDispatcher::QueueForOptimization( 207 void OptimizingCompileDispatcher::QueueForOptimization(
210 OptimizedCompileJob* job) { 208 OptimizedCompileJob* job) {
211 DCHECK(IsQueueAvailable()); 209 DCHECK(IsQueueAvailable());
212 { 210 {
213 // Add job to the back of the input queue. 211 // Add job to the back of the input queue.
(...skipping 15 matching lines...) Expand all
229 while (blocked_jobs_ > 0) { 227 while (blocked_jobs_ > 0) {
230 V8::GetCurrentPlatform()->CallOnBackgroundThread( 228 V8::GetCurrentPlatform()->CallOnBackgroundThread(
231 new CompileTask(isolate_), v8::Platform::kShortRunningTask); 229 new CompileTask(isolate_), v8::Platform::kShortRunningTask);
232 blocked_jobs_--; 230 blocked_jobs_--;
233 } 231 }
234 } 232 }
235 233
236 234
237 } // namespace internal 235 } // namespace internal
238 } // namespace v8 236 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698