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

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, 4 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 | « runtime/vm/debugger.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/double_conversion.cc
===================================================================
--- runtime/vm/double_conversion.cc (revision 10253)
+++ 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);
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698