| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 /// Compiles to `(~x) >>> 0`. | 63 /// Compiles to `(~x) >>> 0`. |
| 64 NumBitNot, | 64 NumBitNot, |
| 65 | 65 |
| 66 /// Concatenates any number of strings. | 66 /// Concatenates any number of strings. |
| 67 /// | 67 /// |
| 68 /// 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. |
| 69 /// | 69 /// |
| 70 /// Returns the empty string if no arguments are given. | 70 /// Returns the empty string if no arguments are given. |
| 71 StringConcatenate, | 71 StringConcatenate, |
| 72 | 72 |
| 73 /// Corresponds to `a.charCodeAt(b)`. `a' must be a String. The index `b` must | |
| 74 /// be in range `0 <= b < a.length`. | |
| 75 /// TODO(sra): Consider replacing with a Primitive to allow lowering when 'a' | |
| 76 /// is nullable (i.e. throws). | |
| 77 CharCodeAt, | |
| 78 | |
| 79 /// 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 |
| 80 /// 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. |
| 81 /// | 75 /// |
| 82 /// Compiled as a static method call. | 76 /// Compiled as a static method call. |
| 83 Identical, | 77 Identical, |
| 84 | 78 |
| 85 /// Like [Identical], except at most one argument may be null. | 79 /// Like [Identical], except at most one argument may be null. |
| 86 /// | 80 /// |
| 87 /// Compiles to `===`. | 81 /// Compiles to `===`. |
| 88 StrictEq, | 82 StrictEq, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 /// Compiles to `object.push(x1, ..., xN)`. | 168 /// Compiles to `object.push(x1, ..., xN)`. |
| 175 Push, | 169 Push, |
| 176 | 170 |
| 177 /// Remove and return the last item from a native list. | 171 /// Remove and return the last item from a native list. |
| 178 /// | 172 /// |
| 179 /// Takes no arguments. | 173 /// Takes no arguments. |
| 180 /// | 174 /// |
| 181 /// Compiles to `object.pop()`. | 175 /// Compiles to `object.pop()`. |
| 182 Pop, | 176 Pop, |
| 183 } | 177 } |
| OLD | NEW |