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

Unified Diff: src/libplatform/worker-thread.h

Issue 104583003: [platform] Implement a worker pool (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/libplatform/task-queue.cc ('k') | src/libplatform/worker-thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/libplatform/worker-thread.h
diff --git a/src/hydrogen-minus-zero.h b/src/libplatform/worker-thread.h
similarity index 76%
copy from src/hydrogen-minus-zero.h
copy to src/libplatform/worker-thread.h
index d23ec1196b3419cdc06e20aa3e12688979306009..f0b9019f59c9c5e04afac36cd6b49a634f0d5a61 100644
--- a/src/hydrogen-minus-zero.h
+++ b/src/libplatform/worker-thread.h
@@ -25,32 +25,38 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_HYDROGEN_MINUS_ZERO_H_
-#define V8_HYDROGEN_MINUS_ZERO_H_
+#ifndef V8_LIBPLATFORM_WORKER_THREAD_H_
+#define V8_LIBPLATFORM_WORKER_THREAD_H_
-#include "hydrogen.h"
+#include <queue>
+
+// TODO(jochen): We should have our own version of globals.h.
+#include "../globals.h"
+#include "../platform.h"
namespace v8 {
+
namespace internal {
+class TaskQueue;
-class HComputeMinusZeroChecksPhase : public HPhase {
+class WorkerThread : public Thread {
public:
- explicit HComputeMinusZeroChecksPhase(HGraph* graph)
- : HPhase("H_Compute minus zero checks", graph),
- visited_(graph->GetMaximumValueID(), zone()) { }
+ explicit WorkerThread(TaskQueue* queue);
+ virtual ~WorkerThread();
- void Run();
+ // Thread implementation.
+ virtual void Run() V8_OVERRIDE;
private:
- void PropagateMinusZeroChecks(HValue* value);
+ friend class QuitTask;
- BitVector visited_;
+ TaskQueue* queue_;
- DISALLOW_COPY_AND_ASSIGN(HComputeMinusZeroChecksPhase);
+ DISALLOW_COPY_AND_ASSIGN(WorkerThread);
};
-
} } // namespace v8::internal
-#endif // V8_HYDROGEN_MINUS_ZERO_H_
+
+#endif // V8_LIBPLATFORM_WORKER_THREAD_H_
« no previous file with comments | « src/libplatform/task-queue.cc ('k') | src/libplatform/worker-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698