Index: lib/double.cc |
=================================================================== |
--- lib/double.cc (revision 16285) |
+++ lib/double.cc (working copy) |
@@ -189,9 +189,8 @@ |
DEFINE_NATIVE_ENTRY(Double_toInt, 1) { |
const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0)); |
if (isinf(arg.value()) || isnan(arg.value())) { |
- GrowableArray<const Object*> args; |
- args.Add(&String::ZoneHandle(String::New( |
- "Infinity or NaN toInt"))); |
+ const Array& args = Array::Handle(Array::New(1)); |
+ args.SetAt(0, String::Handle(String::New("Infinity or NaN toInt"))); |
Exceptions::ThrowByType(Exceptions::kFormat, args); |
} |
double result = trunc(arg.value()); |
@@ -253,8 +252,8 @@ |
} |
} |
- GrowableArray<const Object*> args; |
- args.Add(&value); |
+ const Array& args = Array::Handle(Array::New(1)); |
+ args.SetAt(0, value); |
Exceptions::ThrowByType(Exceptions::kFormat, args); |
return Object::null(); |
} |
@@ -273,9 +272,9 @@ |
&& kLowerBoundary < d && d < kUpperBoundary) { |
return DoubleToStringAsFixed(d, static_cast<int>(fraction_digits_value)); |
} else { |
- GrowableArray<const Object*> args; |
- args.Add(&String::ZoneHandle(String::New( |
- "Illegal arguments to double.toStringAsFixed"))); |
+ const Array& args = Array::Handle(Array::New(1)); |
+ args.SetAt(0, String::Handle( |
+ String::New("Illegal arguments to double.toStringAsFixed"))); |
Exceptions::ThrowByType(Exceptions::kArgument, args); |
return Object::null(); |
} |
@@ -291,9 +290,9 @@ |
return DoubleToStringAsExponential( |
d, static_cast<int>(fraction_digits_value)); |
} else { |
- GrowableArray<const Object*> args; |
- args.Add(&String::ZoneHandle(String::New( |
- "Illegal arguments to double.toStringAsExponential"))); |
+ const Array& args = Array::Handle(Array::New(1)); |
+ args.SetAt(0, String::Handle( |
+ String::New("Illegal arguments to double.toStringAsExponential"))); |
Exceptions::ThrowByType(Exceptions::kArgument, args); |
return Object::null(); |
} |
@@ -308,9 +307,9 @@ |
if (1 <= precision_value && precision_value <= 21) { |
return DoubleToStringAsPrecision(d, static_cast<int>(precision_value)); |
} else { |
- GrowableArray<const Object*> args; |
- args.Add(&String::ZoneHandle(String::New( |
- "Illegal arguments to double.toStringAsPrecision"))); |
+ const Array& args = Array::Handle(Array::New(1)); |
+ args.SetAt(0, String::Handle( |
+ String::New("Illegal arguments to double.toStringAsPrecision"))); |
Exceptions::ThrowByType(Exceptions::kArgument, args); |
return Object::null(); |
} |