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

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

Issue 1590963002: Switch GetConcurrentlyOptimizedCode to MaybeHandle. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-18
Patch Set: Fix typo. Created 4 years, 10 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') | src/runtime/runtime-compiler.cc » ('j') | 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/v8.h" 10 #include "src/v8.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 BackEdgeTable::RemoveStackCheck(code, offset); 237 BackEdgeTable::RemoveStackCheck(code, offset);
238 } else { 238 } else {
239 if (function->IsOptimized()) { 239 if (function->IsOptimized()) {
240 if (FLAG_trace_concurrent_recompilation) { 240 if (FLAG_trace_concurrent_recompilation) {
241 PrintF(" ** Aborting compilation for "); 241 PrintF(" ** Aborting compilation for ");
242 function->ShortPrint(); 242 function->ShortPrint();
243 PrintF(" as it has already been optimized.\n"); 243 PrintF(" as it has already been optimized.\n");
244 } 244 }
245 DisposeOptimizedCompileJob(job, false); 245 DisposeOptimizedCompileJob(job, false);
246 } else { 246 } else {
247 Handle<Code> code = Compiler::GetConcurrentlyOptimizedCode(job); 247 MaybeHandle<Code> code = Compiler::GetConcurrentlyOptimizedCode(job);
248 function->ReplaceCode(code.is_null() ? function->shared()->code() 248 function->ReplaceCode(code.is_null() ? function->shared()->code()
249 : *code); 249 : *code.ToHandleChecked());
250 } 250 }
251 } 251 }
252 } 252 }
253 } 253 }
254 254
255 255
256 void OptimizingCompileDispatcher::QueueForOptimization( 256 void OptimizingCompileDispatcher::QueueForOptimization(
257 OptimizedCompileJob* job) { 257 OptimizedCompileJob* job) {
258 DCHECK(IsQueueAvailable()); 258 DCHECK(IsQueueAvailable());
259 CompilationInfo* info = job->info(); 259 CompilationInfo* info = job->info();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 info->closure()->PrintName(); 349 info->closure()->PrintName();
350 PrintF(", AST id %d]\n", info->osr_ast_id().ToInt()); 350 PrintF(", AST id %d]\n", info->osr_ast_id().ToInt());
351 } 351 }
352 DisposeOptimizedCompileJob(stale, false); 352 DisposeOptimizedCompileJob(stale, false);
353 } 353 }
354 osr_buffer_[osr_buffer_cursor_] = job; 354 osr_buffer_[osr_buffer_cursor_] = job;
355 osr_buffer_cursor_ = (osr_buffer_cursor_ + 1) % osr_buffer_capacity_; 355 osr_buffer_cursor_ = (osr_buffer_cursor_ + 1) % osr_buffer_capacity_;
356 } 356 }
357 } // namespace internal 357 } // namespace internal
358 } // namespace v8 358 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/runtime/runtime-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698