From 56cc999f93420ff79efc2a95bc5f84737a374f1c Mon Sep 17 00:00:00 2001 From: "yurys@chromium.org" Date: Thu, 18 Jul 2013 14:28:00 +0000 Subject: [PATCH] Fix Windows compilation after r15750 BUG=None TBR=yangguo@chromium.org Review URL: https://codereview.chromium.org/19778003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/circular-queue.cc | 4 ++-- src/circular-queue.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/circular-queue.cc b/src/circular-queue.cc index 475b234..3e32e4d 100644 --- a/src/circular-queue.cc +++ b/src/circular-queue.cc @@ -35,7 +35,7 @@ namespace internal { SamplingCircularQueue::SamplingCircularQueue(size_t record_size_in_bytes, size_t desired_chunk_size_in_bytes, - int buffer_size_in_chunks) + unsigned buffer_size_in_chunks) : record_size_(record_size_in_bytes / sizeof(Cell)), chunk_size_in_bytes_(desired_chunk_size_in_bytes / record_size_in_bytes * record_size_in_bytes + sizeof(Cell)), @@ -46,7 +46,7 @@ SamplingCircularQueue::SamplingCircularQueue(size_t record_size_in_bytes, ASSERT(chunk_size_ * sizeof(Cell) == chunk_size_in_bytes_); ASSERT(buffer_size_in_chunks > 2); // Mark all chunks as clear. - for (int i = 0; i < buffer_size_; i += chunk_size_) { + for (size_t i = 0; i < buffer_size_; i += chunk_size_) { buffer_[i] = kClear; } diff --git a/src/circular-queue.h b/src/circular-queue.h index 239ffe1..4ad4f4b 100644 --- a/src/circular-queue.h +++ b/src/circular-queue.h @@ -47,7 +47,7 @@ class SamplingCircularQueue { // Executed on the application thread. SamplingCircularQueue(size_t record_size_in_bytes, size_t desired_chunk_size_in_bytes, - int buffer_size_in_chunks); + unsigned buffer_size_in_chunks); ~SamplingCircularQueue(); // Enqueue returns a pointer to a memory location for storing the next @@ -88,10 +88,10 @@ class SamplingCircularQueue { INLINE(void WrapPositionIfNeeded(Cell** pos)); - const int record_size_; + const size_t record_size_; const size_t chunk_size_in_bytes_; - const int chunk_size_; - const int buffer_size_; + const size_t chunk_size_; + const size_t buffer_size_; Cell* buffer_; byte* positions_; ProducerPosition* producer_pos_; -- 2.7.4