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

Side by Side Diff: src/optimizing-compiler-thread.cc

Issue 797943002: Consistently use only one of virtual/OVERRIDE/FINAL. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed temporary hack. Created 6 years 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/objects-inl.h ('k') | src/ostreams.h » ('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-compiler-thread.h" 5 #include "src/optimizing-compiler-thread.h"
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/full-codegen.h" 10 #include "src/full-codegen.h"
11 #include "src/hydrogen.h" 11 #include "src/hydrogen.h"
12 #include "src/isolate.h" 12 #include "src/isolate.h"
13 #include "src/v8threads.h" 13 #include "src/v8threads.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 17
18 class OptimizingCompilerThread::CompileTask : public v8::Task { 18 class OptimizingCompilerThread::CompileTask : public v8::Task {
19 public: 19 public:
20 CompileTask(Isolate* isolate, OptimizedCompileJob* job) 20 CompileTask(Isolate* isolate, OptimizedCompileJob* job)
21 : isolate_(isolate), job_(job) {} 21 : isolate_(isolate), job_(job) {}
22 22
23 virtual ~CompileTask() {} 23 virtual ~CompileTask() {}
24 24
25 private: 25 private:
26 // v8::Task overrides. 26 // v8::Task overrides.
27 virtual void Run() OVERRIDE { 27 void Run() OVERRIDE {
28 DisallowHeapAllocation no_allocation; 28 DisallowHeapAllocation no_allocation;
29 DisallowHandleAllocation no_handles; 29 DisallowHandleAllocation no_handles;
30 DisallowHandleDereference no_deref; 30 DisallowHandleDereference no_deref;
31 31
32 // The function may have already been optimized by OSR. Simply continue. 32 // The function may have already been optimized by OSR. Simply continue.
33 OptimizedCompileJob::Status status = job_->OptimizeGraph(); 33 OptimizedCompileJob::Status status = job_->OptimizeGraph();
34 USE(status); // Prevent an unused-variable error in release mode. 34 USE(status); // Prevent an unused-variable error in release mode.
35 DCHECK(status != OptimizedCompileJob::FAILED); 35 DCHECK(status != OptimizedCompileJob::FAILED);
36 36
37 // The function may have already been optimized by OSR. Simply continue. 37 // The function may have already been optimized by OSR. Simply continue.
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 433
434 434
435 bool OptimizingCompilerThread::IsOptimizerThread() { 435 bool OptimizingCompilerThread::IsOptimizerThread() {
436 base::LockGuard<base::Mutex> lock_guard(&thread_id_mutex_); 436 base::LockGuard<base::Mutex> lock_guard(&thread_id_mutex_);
437 return ThreadId::Current().ToInteger() == thread_id_; 437 return ThreadId::Current().ToInteger() == thread_id_;
438 } 438 }
439 #endif 439 #endif
440 440
441 441
442 } } // namespace v8::internal 442 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/ostreams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698