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

Side by Side Diff: Source/wtf/dtoa.cpp

Issue 48663004: Fix more warnings in wtf (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix more warnings in wtf. Created 7 years, 1 month 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 | « Source/wtf/TCSystemAlloc.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /**************************************************************** 1 /****************************************************************
2 * 2 *
3 * The author of this software is David M. Gay. 3 * The author of this software is David M. Gay.
4 * 4 *
5 * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. 5 * Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
6 * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc. All rights reserved. 6 * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc. All rights reserved.
7 * 7 *
8 * Permission to use, copy, modify, and distribute this software for any 8 * Permission to use, copy, modify, and distribute this software for any
9 * purpose without fee is hereby granted, provided that this entire notice 9 * purpose without fee is hereby granted, provided that this entire notice
10 * is included in all copies of any software which is or includes a copy 10 * is included in all copies of any software which is or includes a copy
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 #undef d0 596 #undef d0
597 #undef d1 597 #undef d1
598 598
599 static const double tens[] = { 599 static const double tens[] = {
600 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 600 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
601 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 601 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
602 1e20, 1e21, 1e22 602 1e20, 1e21, 1e22
603 }; 603 };
604 604
605 static const double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 }; 605 static const double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
606 static const double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128,
607 9007199254740992. * 9007199254740992.e-256
608 /* = 2^106 * 1e-256 */
609 };
610 606
611 /* The factor of 2^53 in tinytens[4] helps us avoid setting the underflow */
612 /* flag unnecessarily. It leads to a song and dance at the end of strtod. */
613 #define Scale_Bit 0x10 607 #define Scale_Bit 0x10
Nico 2013/10/31 21:03:40 Scale_Bit can go too, right?
lgombos 2013/10/31 21:07:08 Yep, indeed, but it does not seems to cause me any
614 #define n_bigtens 5 608 #define n_bigtens 5
615 609
616 static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S) 610 static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
617 { 611 {
618 size_t n; 612 size_t n;
619 uint32_t* bx; 613 uint32_t* bx;
620 uint32_t* bxe; 614 uint32_t* bxe;
621 uint32_t q; 615 uint32_t q;
622 uint32_t* sx; 616 uint32_t* sx;
623 uint32_t* sxe; 617 uint32_t* sxe;
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 { 1305 {
1312 Vector<LChar> conversionBuffer(length); 1306 Vector<LChar> conversionBuffer(length);
1313 for (size_t i = 0; i < length; ++i) 1307 for (size_t i = 0; i < length; ++i)
1314 conversionBuffer[i] = isASCII(string[i]) ? string[i] : 0; 1308 conversionBuffer[i] = isASCII(string[i]) ? string[i] : 0;
1315 return parseDouble(conversionBuffer.data(), length, parsedLength); 1309 return parseDouble(conversionBuffer.data(), length, parsedLength);
1316 } 1310 }
1317 1311
1318 } // namespace Internal 1312 } // namespace Internal
1319 1313
1320 } // namespace WTF 1314 } // namespace WTF
OLDNEW
« no previous file with comments | « Source/wtf/TCSystemAlloc.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698