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

Unified Diff: runtime/vm/double_conversion.cc

Issue 10836061: Change the zone allocation api. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
Index: runtime/vm/double_conversion.cc
===================================================================
--- runtime/vm/double_conversion.cc (revision 10080)
+++ runtime/vm/double_conversion.cc (working copy)
@@ -86,8 +86,7 @@
kDoubleToStringCommonExponentChar,
0, 0, 0, 0); // Last four values are ignored in fixed mode.
- char* buffer = reinterpret_cast<char*>(
- Isolate::Current()->current_zone()->Allocate(kBufferSize));
+ char* buffer = Isolate::Current()->current_zone()->Alloc<char>(kBufferSize);
buffer[kBufferSize - 1] = '\0';
double_conversion::StringBuilder builder(buffer, kBufferSize);
bool status = converter.ToFixed(d, fraction_digits, &builder);
@@ -121,8 +120,7 @@
kDoubleToStringCommonExponentChar,
0, 0, 0, 0); // Last four values are ignored in exponential mode.
- char* buffer = reinterpret_cast<char*>(
- Isolate::Current()->current_zone()->Allocate(kBufferSize));
+ char* buffer = Isolate::Current()->current_zone()->Alloc<char>(kBufferSize);
buffer[kBufferSize - 1] = '\0';
double_conversion::StringBuilder builder(buffer, kBufferSize);
bool status = converter.ToExponential(d, fraction_digits, &builder);
@@ -162,8 +160,7 @@
kMaxLeadingPaddingZeroes,
kMaxTrailingPaddingZeroes);
- char* buffer = reinterpret_cast<char*>(
- Isolate::Current()->current_zone()->Allocate(kBufferSize));
+ char* buffer = Isolate::Current()->current_zone()->Alloc<char>(kBufferSize);
buffer[kBufferSize - 1] = '\0';
double_conversion::StringBuilder builder(buffer, kBufferSize);
bool status = converter.ToPrecision(d, precision, &builder);

Powered by Google App Engine
This is Rietveld 408576698