7#include "../../third_party/double-conversion/src/double-conversion.h"
20 const int kDecimalLow = -6;
21 const int kDecimalHigh = 21;
34 const int kConversionFlags =
53 const int kMinFractionDigits = 0;
54 const int kMaxFractionDigits = 20;
55 const int kMaxDigitsBeforePoint = 20;
57 const double kLowerBoundary = -1e21;
58 const double kUpperBoundary = 1e21;
60 const int kConversionFlags =
64 USE(kMaxDigitsBeforePoint);
65 USE(kMaxFractionDigits);
68 USE(kMinFractionDigits);
69 USE(kMaxFractionDigits);
74 ASSERT(kLowerBoundary <
d &&
d < kUpperBoundary);
76 ASSERT(kMinFractionDigits <= fraction_digits &&
77 fraction_digits <= kMaxFractionDigits);
92 const int kMinFractionDigits = -1;
93 const int kMaxFractionDigits = 20;
94 const int kConversionFlags =
98 USE(kMinFractionDigits);
99 USE(kMaxFractionDigits);
105 ASSERT(kMinFractionDigits <= fraction_digits &&
106 fraction_digits <= kMaxFractionDigits);
121 const int kMinPrecisionDigits = 1;
122 const int kMaxPrecisionDigits = 21;
123 const int kMaxLeadingPaddingZeroes = 6;
124 const int kMaxTrailingPaddingZeroes = 0;
125 const int kConversionFlags =
129 USE(kMinPrecisionDigits);
130 USE(kMaxPrecisionDigits);
137 kMaxTrailingPaddingZeroes + kMaxPrecisionDigits +
140 ASSERT(kMinPrecisionDigits <= precision && precision <= kMaxPrecisionDigits);
145 kMaxLeadingPaddingZeroes, kMaxTrailingPaddingZeroes);
164 int parsed_count = 0;
166 converter.StringToDouble(str,
static_cast<int>(
length), &parsed_count);
167 return (parsed_count ==
length);
171 if (isinf(val) || isnan(val)) {
177 if (val <=
static_cast<double>(
kMinInt64)) {
179 }
else if (val >=
static_cast<double>(
kMaxInt64)) {
182 ival =
static_cast<int64_t
>(val);
static uint32_t buffer_size(uint32_t offset, uint32_t maxAlignment)
static const size_t kBufferSize
static ArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
static DART_NORETURN void ThrowByType(ExceptionType type, const Array &arguments)
static IntegerPtr New(const String &str, Heap::Space space=Heap::kNew)
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
static Thread * Current()
ElementType * Alloc(intptr_t length)
@ EMIT_POSITIVE_EXPONENT_SIGN
@ EMIT_TRAILING_ZERO_AFTER_POINT
@ EMIT_TRAILING_DECIMAL_POINT
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
constexpr int64_t kMaxInt64
constexpr int64_t kMinInt64
StringPtr DoubleToStringAsPrecision(double d, int precision)
void DoubleToCString(double d, char *buffer, int buffer_size)
bool CStringToDouble(const char *str, intptr_t length, double *result)
IntegerPtr DoubleToInteger(Zone *zone, double val)
StringPtr DoubleToStringAsFixed(double d, int fraction_digits)
StringPtr DoubleToStringAsExponential(double d, int fraction_digits)
static constexpr const char * kInfinitySymbol
static constexpr const char * kNaNSymbol
static constexpr char kExponentChar
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer