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

Unified Diff: src/fast-dtoa.cc

Issue 1732019: Switch to vectors instead of bare char* arrays. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 8 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
« no previous file with comments | « src/fast-dtoa.h ('k') | test/cctest/test-fast-dtoa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-dtoa.cc
===================================================================
--- src/fast-dtoa.cc (revision 4542)
+++ src/fast-dtoa.cc (working copy)
@@ -61,7 +61,7 @@
// Output: returns true if the buffer is guaranteed to contain the closest
// representable number to the input.
// Modifies the generated digits in the buffer to approach (round towards) w.
-bool RoundWeed(char* buffer,
+bool RoundWeed(Vector<char> buffer,
int length,
uint64_t distance_too_high_w,
uint64_t unsafe_interval,
@@ -324,7 +324,7 @@
bool DigitGen(DiyFp low,
DiyFp w,
DiyFp high,
- char* buffer,
+ Vector<char> buffer,
int* length,
int* kappa) {
ASSERT(low.e() == w.e() && w.e() == high.e());
@@ -437,7 +437,7 @@
// The last digit will be closest to the actual v. That is, even if several
// digits might correctly yield 'v' when read again, the closest will be
// computed.
-bool grisu3(double v, char* buffer, int* length, int* decimal_exponent) {
+bool grisu3(double v, Vector<char> buffer, int* length, int* decimal_exponent) {
DiyFp w = Double(v).AsNormalizedDiyFp();
// boundary_minus and boundary_plus are the boundaries between v and its
// closest floating-point neighbors. Any number strictly between
@@ -488,7 +488,11 @@
}
-bool FastDtoa(double v, char* buffer, int* sign, int* length, int* point) {
+bool FastDtoa(double v,
+ Vector<char> buffer,
+ int* sign,
+ int* length,
+ int* point) {
ASSERT(v != 0);
ASSERT(!Double(v).IsSpecial());
« no previous file with comments | « src/fast-dtoa.h ('k') | test/cctest/test-fast-dtoa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698