OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 library builtin_operator; | 4 library builtin_operator; |
5 // This is shared by the CPS and Tree IRs. | 5 // This is shared by the CPS and Tree IRs. |
6 // Both cps_ir_nodes and tree_ir_nodes import and re-export this file. | 6 // Both cps_ir_nodes and tree_ir_nodes import and re-export this file. |
7 | 7 |
8 /// An operator supported natively in the CPS and Tree IRs using the | 8 /// An operator supported natively in the CPS and Tree IRs using the |
9 /// `ApplyBuiltinOperator` instructions. | 9 /// `ApplyBuiltinOperator` instructions. |
10 /// | 10 /// |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 /// Dart's modulo (`%`) is the same as remainder only when if both arguments | 48 /// Dart's modulo (`%`) is the same as remainder only when if both arguments |
49 /// are non-negative. | 49 /// are non-negative. |
50 NumRemainder, | 50 NumRemainder, |
51 | 51 |
52 /// Corresponds to `a ~/ b` when b is non-zero and the result fits in a signed | 52 /// Corresponds to `a ~/ b` when b is non-zero and the result fits in a signed |
53 /// 32 bit value. | 53 /// 32 bit value. |
54 /// | 54 /// |
55 /// This case can be compiled to `(a / b) | 0`. | 55 /// This case can be compiled to `(a / b) | 0`. |
56 NumTruncatingDivideToSigned32, | 56 NumTruncatingDivideToSigned32, |
57 | 57 |
| 58 /// Corresponds to JavaScript's negation, which converts 0 to -0.0. |
| 59 NumNegate, |
| 60 |
| 61 /// Bit inversions, with coercion to uint32. |
| 62 /// |
| 63 /// Compiles to `(~x) >>> 0`. |
| 64 NumBitNot, |
| 65 |
58 /// Concatenates any number of strings. | 66 /// Concatenates any number of strings. |
59 /// | 67 /// |
60 /// Takes any number of arguments, and each argument must be a string. | 68 /// Takes any number of arguments, and each argument must be a string. |
61 /// | 69 /// |
62 /// Returns the empty string if no arguments are given. | 70 /// Returns the empty string if no arguments are given. |
63 StringConcatenate, | 71 StringConcatenate, |
64 | 72 |
65 /// Returns true if the two arguments are the same value, and that value is | 73 /// Returns true if the two arguments are the same value, and that value is |
66 /// not NaN, or if one argument is +0 and the other is -0. | 74 /// not NaN, or if one argument is +0 and the other is -0. |
67 /// | 75 /// |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 /// Compiles to `object.push(x1, ..., xN)`. | 168 /// Compiles to `object.push(x1, ..., xN)`. |
161 Push, | 169 Push, |
162 | 170 |
163 /// Remove and return the last item from a native list. | 171 /// Remove and return the last item from a native list. |
164 /// | 172 /// |
165 /// Takes no arguments. | 173 /// Takes no arguments. |
166 /// | 174 /// |
167 /// Compiles to `object.pop()`. | 175 /// Compiles to `object.pop()`. |
168 Pop, | 176 Pop, |
169 } | 177 } |
OLD | NEW |