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

Unified Diff: pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart

Issue 2858353003: Move Dart versions of math.min() and math.max() into VM patch file. (Closed)
Patch Set: Merge branch 'master' into min-max Created 3 years, 7 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 | « no previous file | pkg/dev_compiler/tool/sdk_expected_errors.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart
index 01c7ca3a7fe730b5134a6f53caf0f1be419bcaa1..b37ba521b3e5b812409db9007d4274f04a33a1fa 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart
@@ -8,12 +8,12 @@ import 'dart:_js_helper' show patch, checkNum;
import 'dart:typed_data' show ByteData;
@patch
-num/*=T*/ min/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) =>
- JS('num', r'Math.min(#, #)', checkNum(a), checkNum(b)) as num/*=T*/;
+T min<T extends num>(T a, T b) =>
+ JS('num', r'Math.min(#, #)', checkNum(a), checkNum(b)) as T;
@patch
-num/*=T*/ max/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) =>
- JS('num', r'Math.max(#, #)', checkNum(a), checkNum(b)) as num/*=T*/;
+T max<T extends num>(T a, T b) =>
+ JS('num', r'Math.max(#, #)', checkNum(a), checkNum(b)) as T;
@patch
double sqrt(num x) => JS('num', r'Math.sqrt(#)', checkNum(x));
« no previous file with comments | « no previous file | pkg/dev_compiler/tool/sdk_expected_errors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698