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

Side by Side Diff: src/compiler-dispatcher/optimizing-compile-dispatcher.h

Issue 2912773002: Rename "NoBarrier" memory operations to "Relaxed". (Closed)
Patch Set: comment Created 3 years, 6 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/base/atomicops_internals_x86_msvc.h ('k') | src/d8.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 #ifndef V8_COMPILER_DISPATCHER_OPTIMIZING_COMPILE_DISPATCHER_H_ 5 #ifndef V8_COMPILER_DISPATCHER_OPTIMIZING_COMPILE_DISPATCHER_H_
6 #define V8_COMPILER_DISPATCHER_OPTIMIZING_COMPILE_DISPATCHER_H_ 6 #define V8_COMPILER_DISPATCHER_OPTIMIZING_COMPILE_DISPATCHER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "src/base/atomicops.h" 10 #include "src/base/atomicops.h"
(...skipping 15 matching lines...) Expand all
26 enum class BlockingBehavior { kBlock, kDontBlock }; 26 enum class BlockingBehavior { kBlock, kDontBlock };
27 27
28 explicit OptimizingCompileDispatcher(Isolate* isolate) 28 explicit OptimizingCompileDispatcher(Isolate* isolate)
29 : isolate_(isolate), 29 : isolate_(isolate),
30 input_queue_capacity_(FLAG_concurrent_recompilation_queue_length), 30 input_queue_capacity_(FLAG_concurrent_recompilation_queue_length),
31 input_queue_length_(0), 31 input_queue_length_(0),
32 input_queue_shift_(0), 32 input_queue_shift_(0),
33 blocked_jobs_(0), 33 blocked_jobs_(0),
34 ref_count_(0), 34 ref_count_(0),
35 recompilation_delay_(FLAG_concurrent_recompilation_delay) { 35 recompilation_delay_(FLAG_concurrent_recompilation_delay) {
36 base::NoBarrier_Store(&mode_, static_cast<base::AtomicWord>(COMPILE)); 36 base::Relaxed_Store(&mode_, static_cast<base::AtomicWord>(COMPILE));
37 input_queue_ = NewArray<CompilationJob*>(input_queue_capacity_); 37 input_queue_ = NewArray<CompilationJob*>(input_queue_capacity_);
38 } 38 }
39 39
40 ~OptimizingCompileDispatcher(); 40 ~OptimizingCompileDispatcher();
41 41
42 void Stop(); 42 void Stop();
43 void Flush(BlockingBehavior blocking_behavior); 43 void Flush(BlockingBehavior blocking_behavior);
44 // Takes ownership of |job|. 44 // Takes ownership of |job|.
45 void QueueForOptimization(CompilationJob* job); 45 void QueueForOptimization(CompilationJob* job);
46 void Unblock(); 46 void Unblock();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // background thread. 96 // background thread.
97 // 97 //
98 // Since flags might get modified while the background thread is running, it 98 // Since flags might get modified while the background thread is running, it
99 // is not safe to access them directly. 99 // is not safe to access them directly.
100 int recompilation_delay_; 100 int recompilation_delay_;
101 }; 101 };
102 } // namespace internal 102 } // namespace internal
103 } // namespace v8 103 } // namespace v8
104 104
105 #endif // V8_COMPILER_DISPATCHER_OPTIMIZING_COMPILE_DISPATCHER_H_ 105 #endif // V8_COMPILER_DISPATCHER_OPTIMIZING_COMPILE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « src/base/atomicops_internals_x86_msvc.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698