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

Unified Diff: runtime/lib/double.dart

Issue 23129005: Remove int.pow and double.pow from VM library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed Math.pow to not use int.pow,double.pow. Created 7 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/lib/double.cc ('k') | runtime/lib/integers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/double.dart
diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart
index 29247adb02c05c794bc74c09ba5d709fd5be3ce1..166d7311799a6c6b212dca67665727492b064c85 100644
--- a/runtime/lib/double.dart
+++ b/runtime/lib/double.dart
@@ -126,21 +126,6 @@ class _Double implements double {
int toInt() native "Double_toInt";
double toDouble() { return this; }
- double pow(num exponent) {
- if (exponent == 0) {
- return 1.0; // ECMA-262 15.8.2.13
- }
- if (exponent is! num) {
- throw new ArgumentError(null);
- }
- double doubleExponent = exponent.toDouble();
- if (isNaN || exponent.isNaN) {
- return double.NAN;
- }
- return _pow(doubleExponent);
- }
- double _pow(double exponent) native "Double_pow";
-
String toStringAsFixed(int fractionDigits) {
// See ECMAScript-262, 15.7.4.5 for details.
« no previous file with comments | « runtime/lib/double.cc ('k') | runtime/lib/integers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698