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

Unified Diff: sdk/lib/_internal/js_runtime/lib/math_patch.dart

Issue 1276353006: dart2js: Do not use JSDouble for native behavior return types. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Replace use of JS('double') Created 5 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
Index: sdk/lib/_internal/js_runtime/lib/math_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/math_patch.dart b/sdk/lib/_internal/js_runtime/lib/math_patch.dart
index 0a4370873ec4a974c22d11ee1cfb5082677e9c3e..34476f24d8a78c21d3e4f119810c6c1226925a96 100644
--- a/sdk/lib/_internal/js_runtime/lib/math_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/math_patch.dart
@@ -8,43 +8,43 @@ import 'dart:_js_helper' show patch, checkNum;
@patch
double sqrt(num x)
- => JS('double', r'Math.sqrt(#)', checkNum(x));
+ => JS('num', r'Math.sqrt(#)', checkNum(x));
@patch
double sin(num x)
- => JS('double', r'Math.sin(#)', checkNum(x));
+ => JS('num', r'Math.sin(#)', checkNum(x));
@patch
double cos(num x)
- => JS('double', r'Math.cos(#)', checkNum(x));
+ => JS('num', r'Math.cos(#)', checkNum(x));
@patch
double tan(num x)
- => JS('double', r'Math.tan(#)', checkNum(x));
+ => JS('num', r'Math.tan(#)', checkNum(x));
@patch
double acos(num x)
- => JS('double', r'Math.acos(#)', checkNum(x));
+ => JS('num', r'Math.acos(#)', checkNum(x));
@patch
double asin(num x)
- => JS('double', r'Math.asin(#)', checkNum(x));
+ => JS('num', r'Math.asin(#)', checkNum(x));
@patch
double atan(num x)
- => JS('double', r'Math.atan(#)', checkNum(x));
+ => JS('num', r'Math.atan(#)', checkNum(x));
@patch
double atan2(num a, num b)
- => JS('double', r'Math.atan2(#, #)', checkNum(a), checkNum(b));
+ => JS('num', r'Math.atan2(#, #)', checkNum(a), checkNum(b));
@patch
double exp(num x)
- => JS('double', r'Math.exp(#)', checkNum(x));
+ => JS('num', r'Math.exp(#)', checkNum(x));
@patch
double log(num x)
- => JS('double', r'Math.log(#)', checkNum(x));
+ => JS('num', r'Math.log(#)', checkNum(x));
@patch
num pow(num x, num exponent) {
« no previous file with comments | « pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart ('k') | tests/compiler/dart2js/cpa_inference_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698