I am not a committer of V8 (and this is my first change list for V8) . I have signed "Individual Contributor License Agreement". Thank you.
On 2/5/11, [email protected] <[email protected]> wrote: > Reviewers: William Hesse, > > Message: > The change list is used to fix V8 Issue 898 > http://code.google.com/p/v8/issues/detail?id=898 > > > Description: > Make sure there are no errors when compiling V8 using VS2005 project files. > bignum.cc > Add some static_cast to avoid type-casting warnings. > > lithium-gap-resolver-ia32.cc > Use #pragma to disable compiler warning (level 1) C4351. It is a new > behavior: > elements of array 'array' will be default initialized. Detailed info can be > found in > http://msdn.microsoft.com/en-us/library/1ywe7hcy%28VS.80%29.aspx > > profile-generator.cc > VS2005 will show an warning message if the Windows "Language for > non-Unicode > programs" setting is not "English". Change Non-ASCII Characters to "-" in > Line > 2288. > > BUG=V8 Issue 898 > TEST=Use VS2005+SP1 to build v8.sln successfully. > > > Please review this at http://codereview.chromium.org/6286135/ > > SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ > > Affected files: > M src/bignum.cc > M src/ia32/lithium-gap-resolver-ia32.cc > M src/profile-generator.cc > > > Index: src/bignum.cc > =================================================================== > --- src/bignum.cc (revision 6654) > +++ src/bignum.cc (working copy) > @@ -67,7 +67,7 @@ > int needed_bigits = kUInt64Size / kBigitSize + 1; > EnsureCapacity(needed_bigits); > for (int i = 0; i < needed_bigits; ++i) { > - bigits_[i] = value & kBigitMask; > + bigits_[i] = static_cast<Chunk>(value & kBigitMask); > value = value >> kBigitSize; > } > used_digits_ = needed_bigits; > @@ -266,7 +266,7 @@ > } > while (carry != 0) { > EnsureCapacity(used_digits_ + 1); > - bigits_[used_digits_] = carry & kBigitMask; > + bigits_[used_digits_] = static_cast<Chunk>(carry & kBigitMask); > used_digits_++; > carry >>= kBigitSize; > } > @@ -287,13 +287,13 @@ > uint64_t product_low = low * bigits_[i]; > uint64_t product_high = high * bigits_[i]; > uint64_t tmp = (carry & kBigitMask) + product_low; > - bigits_[i] = tmp & kBigitMask; > + bigits_[i] = static_cast<Chunk>(tmp & kBigitMask); > carry = (carry >> kBigitSize) + (tmp >> kBigitSize) + > (product_high << (32 - kBigitSize)); > } > while (carry != 0) { > EnsureCapacity(used_digits_ + 1); > - bigits_[used_digits_] = carry & kBigitMask; > + bigits_[used_digits_] = static_cast<Chunk>(carry & kBigitMask); > used_digits_++; > carry >>= kBigitSize; > } > @@ -748,7 +748,8 @@ > for (int i = 0; i < other.used_digits_; ++i) { > DoubleChunk product = static_cast<DoubleChunk>(factor) * > other.bigits_[i]; > DoubleChunk remove = borrow + product; > - Chunk difference = bigits_[i + exponent_diff] - (remove & kBigitMask); > + Chunk difference = > + static_cast<Chunk>(bigits_[i + exponent_diff] - (remove & > kBigitMask)); > bigits_[i + exponent_diff] = difference & kBigitMask; > borrow = static_cast<Chunk>((difference >> (kChunkSize - 1)) + > (remove >> kBigitSize)); > Index: src/ia32/lithium-gap-resolver-ia32.cc > =================================================================== > --- src/ia32/lithium-gap-resolver-ia32.cc (revision 6654) > +++ src/ia32/lithium-gap-resolver-ia32.cc (working copy) > @@ -31,14 +31,20 @@ > namespace v8 { > namespace internal { > > -LGapResolver::LGapResolver(LCodeGen* owner) > +#ifdef _MSC_VER > + #pragma warning(push) > + #pragma warning(disable : 4351) > +#endif // _MSC_VER > + LGapResolver::LGapResolver(LCodeGen* owner) > : cgen_(owner), > moves_(32), > source_uses_(), > destination_uses_(), > spilled_register_(-1) {} > +#ifdef _MSC_VER > + #pragma warning(pop) > +#endif // _MSC_VER > > - > void LGapResolver::Resolve(LParallelMove* parallel_move) { > ASSERT(HasBeenReset()); > // Build up a worklist of moves. > Index: src/profile-generator.cc > =================================================================== > --- src/profile-generator.cc (revision 6654) > +++ src/profile-generator.cc (working copy) > @@ -2285,7 +2285,7 @@ > > // The algorithm is based on the article: > // K. Cooper, T. Harvey and K. Kennedy "A Simple, Fast Dominance > Algorithm" > -// Softw. Pract. Exper. 4 (2001), pp. 1–10. > +// Softw. Pract. Exper. 4 (2001), pp. 1-10. > bool HeapSnapshotGenerator::BuildDominatorTree( > const Vector<HeapEntry*>& entries, > Vector<HeapEntry*>* dominators) { > > > -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
