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

Unified Diff: src/optimizing-compiler-thread.h

Issue 358363002: Move platform abstraction to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 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 side-by-side diff with in-line comments
Download patch
Index: src/optimizing-compiler-thread.h
diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h
index a6bcbedbd3ea1903aceccafa69bac1199be28af5..941ddcd6138e2dc955fdf845be9b4d0f20d05edc 100644
--- a/src/optimizing-compiler-thread.h
+++ b/src/optimizing-compiler-thread.h
@@ -6,11 +6,11 @@
#define V8_OPTIMIZING_COMPILER_THREAD_H_
#include "src/base/atomicops.h"
+#include "src/base/platform/mutex.h"
+#include "src/base/platform/platform.h"
+#include "src/base/platform/time.h"
#include "src/flags.h"
#include "src/list.h"
-#include "src/platform.h"
-#include "src/platform/mutex.h"
-#include "src/platform/time.h"
#include "src/unbound-queue-inl.h"
namespace v8 {
@@ -20,7 +20,7 @@ class HOptimizedGraphBuilder;
class OptimizedCompileJob;
class SharedFunctionInfo;
-class OptimizingCompilerThread : public Thread {
+class OptimizingCompilerThread : public base::Thread {
public:
explicit OptimizingCompilerThread(Isolate *isolate) :
Thread("OptimizingCompilerThread"),
@@ -63,7 +63,7 @@ class OptimizingCompilerThread : public Thread {
bool IsQueuedForOSR(JSFunction* function);
inline bool IsQueueAvailable() {
- LockGuard<Mutex> access_input_queue(&input_queue_mutex_);
+ base::LockGuard<base::Mutex> access_input_queue(&input_queue_mutex_);
return input_queue_length_ < input_queue_capacity_;
}
@@ -105,19 +105,19 @@ class OptimizingCompilerThread : public Thread {
#ifdef DEBUG
int thread_id_;
- Mutex thread_id_mutex_;
+ base::Mutex thread_id_mutex_;
#endif
Isolate* isolate_;
- Semaphore stop_semaphore_;
- Semaphore input_queue_semaphore_;
+ base::Semaphore stop_semaphore_;
+ base::Semaphore input_queue_semaphore_;
// Circular queue of incoming recompilation tasks (including OSR).
OptimizedCompileJob** input_queue_;
int input_queue_capacity_;
int input_queue_length_;
int input_queue_shift_;
- Mutex input_queue_mutex_;
+ base::Mutex input_queue_mutex_;
// Queue of recompilation tasks ready to be installed (excluding OSR).
UnboundQueue<OptimizedCompileJob*> output_queue_;
@@ -128,8 +128,8 @@ class OptimizingCompilerThread : public Thread {
int osr_buffer_cursor_;
volatile base::AtomicWord stop_thread_;
- TimeDelta time_spent_compiling_;
- TimeDelta time_spent_total_;
+ base::TimeDelta time_spent_compiling_;
+ base::TimeDelta time_spent_total_;
int osr_hits_;
int osr_attempts_;
« src/base/macros.h ('K') | « src/objects-inl.h ('k') | src/optimizing-compiler-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698