24 TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
26 if (FLAG_trace_intrinsified_natives) {
33 double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
35 double right = right_object.value();
36 if (FLAG_trace_intrinsified_natives) {
43 double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
45 double right = right_object.value();
46 if (FLAG_trace_intrinsified_natives) {
53 double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
55 double right = right_object.value();
56 if (FLAG_trace_intrinsified_natives) {
63 double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
65 double right = right_object.value();
66 if (FLAG_trace_intrinsified_natives) {
73 const Double& left = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
75 bool result = right.IsNull() ?
false : (left.value() > right.value());
76 if (FLAG_trace_intrinsified_natives) {
77 OS::PrintErr(
"Double_greaterThan %s > %s\n", left.ToCString(),
84 const Double& right = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
86 return Bool::Get(left.AsDoubleValue() > right.value()).
ptr();
90 const Double& left = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
92 bool result = right.IsNull() ?
false : (left.value() == right.value());
93 if (FLAG_trace_intrinsified_natives) {
94 OS::PrintErr(
"Double_equal %s == %s\n", left.ToCString(),
101 const Double& left = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
103 return Bool::Get(left.value() == right.AsDoubleValue()).
ptr();
106#if defined(DART_HOST_OS_MACOS)
108#pragma GCC diagnostic ignored "-Wold-style-cast"
116 const intptr_t
start = startValue.AsTruncatedUint32Value();
117 const intptr_t
end = endValue.AsTruncatedUint32Value();
118 const intptr_t
len =
value.Length();
131 const Number& number = Number::CheckedHandle(zone, arguments->NativeArgAt(0));
137 const double kLowerBoundary = -1e21;
138 const double kUpperBoundary = 1e21;
140 const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
143 intptr_t fraction_digits_value = fraction_digits.Value();
144 if (0 <= fraction_digits_value && fraction_digits_value <= 20 &&
145 kLowerBoundary <
d &&
d < kUpperBoundary) {
149 String::New(
"Illegal arguments to double.toStringAsFixed")));
155 const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
158 intptr_t fraction_digits_value = fraction_digits.Value();
159 if (-1 <= fraction_digits_value && fraction_digits_value <= 20) {
161 static_cast<int>(fraction_digits_value));
164 String::New(
"Illegal arguments to double.toStringAsExponential")));
170 const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
173 intptr_t precision_value = precision.Value();
174 if (1 <= precision_value && precision_value <= 21) {
178 String::New(
"Illegal arguments to double.toStringAsPrecision")));
184 const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
189 const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
194 const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
196 double dval = arg.
value();
201 const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
202 const double in_val = arg.
value();
static const Bool & Get(bool value)
static DoublePtr New(double d, Heap::Space space=Heap::kNew)
static DART_NORETURN void ThrowArgumentError(const Instance &arg)
StringPtr ToString(Heap::Space space) const
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
static bool ParseDouble(const String &str, intptr_t start, intptr_t end, double *result)
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
static float DivideAllowZero(float a, float b)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
StringPtr DoubleToStringAsPrecision(double d, int precision)
StringPtr DoubleToStringAsFixed(double d, int fraction_digits)
StringPtr DoubleToStringAsExponential(double d, int fraction_digits)
DEFINE_NATIVE_ENTRY(List_allocate, 0, 2)
constexpr int64_t kSignBitDouble
#define GET_NON_NULL_NATIVE_ARGUMENT(type, name, value)