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

Unified Diff: pkg/compiler/lib/src/cps_ir/builtin_operator.dart

Issue 1393763004: dart2js cps_ir: BuiltinOperation improvements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/compiler/lib/src/cps_ir/type_mask_system.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/builtin_operator.dart
diff --git a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
index 3b80af447150a6af7c2d8044e53d417cabdf064b..31f815a6c5a57f211dfd4d1673cb4c84582f5514 100644
--- a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
+++ b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
@@ -29,6 +29,7 @@ enum BuiltinOperator {
NumAdd,
NumSubtract,
NumMultiply,
+ NumDivide,
NumAnd,
NumOr,
NumXor,
@@ -38,6 +39,22 @@ enum BuiltinOperator {
NumGt,
NumGe,
+ /// NumShr behaves like JS '>>>' but is valid only when the left is in the
+ /// uint32 range and the right in the range [0, 31].
+ NumShr,
+
+ /// NumRemainder corresponds to JavaScript's `a % b`, and Dart's
+ /// `a.remainder(b)`, except at zero, since JavaScript `1 % 0` is `NaN`.
+ /// Dart's modulo (`%`) is the same as remainder only when if both arguments
+ /// are non-negative.
+ NumRemainder,
+
+ /// Corresponds to `a ~/ b` when b is non-zero and the result fits in a signed
+ /// 32 bit value.
+ ///
+ /// This case can be compiled to `(a / b) | 0`.
+ NumTruncatingDivideToSigned32,
+
/// Concatenates any number of strings.
///
/// Takes any number of arguments, and each argument must be a string.
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/type_mask_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698