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

Unified Diff: compiler/lib/implementation/math_natives.js

Issue 9702034: Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: junit tests fixed Created 8 years, 9 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 | « compiler/lib/implementation/math_natives.dart ('k') | compiler/lib/implementation/number.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/lib/implementation/math_natives.js
diff --git a/compiler/lib/implementation/math_natives.js b/compiler/lib/implementation/math_natives.js
deleted file mode 100644
index 4ac5aaffba2f38a51714217ab8c4b9a79e18e2aa..0000000000000000000000000000000000000000
--- a/compiler/lib/implementation/math_natives.js
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Native methods for Math.
-var native_Math_ceil = Math.ceil;
-var native_Math_floor = Math.floor;
-var native_Math_max = Math.max;
-var native_Math_min = Math.min;
-var native_Math_round = Math.round;
-
-// A valid integer-string is composed of:
-// optional whitespace: \s*
-// an optional sign: [+-]?
-// either digits (at least one): \d+
-// or a hex-literal: 0[xX][0-9abcdefABCDEF]+
-// optional whitespace: \s*
-var math$INT_REGEXP =
- /^\s*[+-]?(:?\d+|0[xX][0-9abcdefABCDEF]+)\s*$/;
-
-// A valid double-string is composed of:
-// optional whitespace: \s*
-// an optional sign: [+-]?
-// either:
-// digits* . digits+ exponent?
-// digits+ exponent
-// Infinity
-// NaN
-// optional whitespace: \s*
-var math$DOUBLE_REGEXP =
- /^\s*[+-]?((\d*\.\d+([eE][+-]?\d+)?)|(\d+([eE][+-]?\d+))|Infinity|NaN)\s*$/;
-
-function native_MathNatives_parseDouble(str) {
- if (math$INT_REGEXP.test(str) || math$DOUBLE_REGEXP.test(str)) return +str;
- throw native_MathNatives__newBadNumberFormat(str);
-}
-
-
-
-function native_MathNatives_parseInt(str) {
- if (math$INT_REGEXP.test(str)) return +str;
- throw native_MathNatives__newBadNumberFormat(str);
-}
-
-function native_MathNatives_random() { return Math.random(); }
-function native_MathNatives_sin(x) { return Math.sin(x); }
-function native_MathNatives_cos(x) { return Math.cos(x); }
-function native_MathNatives_tan(x) { return Math.tan(x); }
-function native_MathNatives_asin(x) { return Math.asin(x); }
-function native_MathNatives_acos(x) { return Math.acos(x); }
-function native_MathNatives_atan(x) { return Math.atan(x); }
-function native_MathNatives_atan2(x, y) { return Math.atan2(x, y); }
-function native_MathNatives_sqrt(x) { return Math.sqrt(x); }
-function native_MathNatives_exp(x) { return Math.exp(x); }
-function native_MathNatives_log(x) { return Math.log(x); }
-function native_MathNatives_pow(x, y) { return Math.pow(x, y); }
« no previous file with comments | « compiler/lib/implementation/math_natives.dart ('k') | compiler/lib/implementation/number.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698