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

Side by Side Diff: src/conversions.h

Issue 597007: Faster implementation of integer-to-ascii conversion. I think.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/conversions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // Converts a string into an integer. 96 // Converts a string into an integer.
97 int StringToInt(String* str, int index, int radix, double* value); 97 int StringToInt(String* str, int index, int radix, double* value);
98 int StringToInt(const char* str, int index, int radix, double* value); 98 int StringToInt(const char* str, int index, int radix, double* value);
99 99
100 // Converts a double to a string value according to ECMA-262 9.8.1. 100 // Converts a double to a string value according to ECMA-262 9.8.1.
101 // The buffer should be large enough for any floating point number. 101 // The buffer should be large enough for any floating point number.
102 // 100 characters is enough. 102 // 100 characters is enough.
103 const char* DoubleToCString(double value, Vector<char> buffer); 103 const char* DoubleToCString(double value, Vector<char> buffer);
104 104
105 // Convert an int to a null-terminated string. The returned string is 105 // Convert an int to a null-terminated string. The returned string need
106 // located inside the buffer, but not necessarily at the start. 106 // not be freed by the caller, but may be overwritten by a later call to
107 const char* IntToCString(int n, Vector<char> buffer); 107 // IntToCString.
108 const char* IntToCString(int n, int* length_return);
108 109
109 // Additional number to string conversions for the number type. 110 // Additional number to string conversions for the number type.
110 // The caller is responsible for calling free on the returned pointer. 111 // The caller is responsible for calling free on the returned pointer.
111 char* DoubleToFixedCString(double value, int f); 112 char* DoubleToFixedCString(double value, int f);
112 char* DoubleToExponentialCString(double value, int f); 113 char* DoubleToExponentialCString(double value, int f);
113 char* DoubleToPrecisionCString(double value, int f); 114 char* DoubleToPrecisionCString(double value, int f);
114 char* DoubleToRadixCString(double value, int radix); 115 char* DoubleToRadixCString(double value, int radix);
115 116
116 } } // namespace v8::internal 117 } } // namespace v8::internal
117 118
118 #endif // V8_CONVERSIONS_H_ 119 #endif // V8_CONVERSIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698