Chromium Code Reviews| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 /// Compiles to `typeof x === 'number' && Math.floor(x) === x` | 135 /// Compiles to `typeof x === 'number' && Math.floor(x) === x` |
| 136 IsInteger, | 136 IsInteger, |
| 137 | 137 |
| 138 /// Returns true if the argument is not an integer. | 138 /// Returns true if the argument is not an integer. |
| 139 /// | 139 /// |
| 140 /// The argument must be repeated 3 times. | 140 /// The argument must be repeated 3 times. |
| 141 /// | 141 /// |
| 142 /// Compiles to `typeof x !== 'number' || Math.floor(x) !== x` | 142 /// Compiles to `typeof x !== 'number' || Math.floor(x) !== x` |
| 143 IsNotInteger, | 143 IsNotInteger, |
| 144 | 144 |
| 145 /// Returns true if `x` is an unsigned 32-bit integer. | |
| 146 /// | |
| 147 /// The argument must be repeated 2 times. | |
| 148 /// | |
| 149 /// Compiles to `x >>> 0 === x` | |
| 150 IsUnsigned32BitInteger, | |
| 151 | |
| 152 /// Returns true if `x` is an unsigned 32-bit integer. | |
|
Siggi Cherem (dart-lang)
2016/02/16 16:52:16
true -> false (or 'is' -> 'is not')
asgerf
2016/02/17 08:33:09
Thanks.
| |
| 153 /// | |
| 154 /// The argument must be repeated 2 times. | |
| 155 /// | |
| 156 /// Compiles to `x >>> 0 !== x` | |
| 157 IsNotUnsigned32BitInteger, | |
| 158 | |
| 145 /// Returns true if the argument is a fixed length Array. | 159 /// Returns true if the argument is a fixed length Array. |
| 146 /// | 160 /// |
| 147 /// Uses one argument. | 161 /// Uses one argument. |
| 148 /// | 162 /// |
| 149 /// Precondition: Argument is a JavaScript Array. | 163 /// Precondition: Argument is a JavaScript Array. |
| 150 IsFixedLengthJSArray, | 164 IsFixedLengthJSArray, |
| 151 | 165 |
| 152 // TODO(sra): Remove this and replace with IsFalsy(IsFixedLengthJSArray(x)). | 166 // TODO(sra): Remove this and replace with IsFalsy(IsFixedLengthJSArray(x)). |
| 153 IsExtendableJSArray, | 167 IsExtendableJSArray, |
| 154 | 168 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 196 case BuiltinOperator.NumSubtract: | 210 case BuiltinOperator.NumSubtract: |
| 197 case BuiltinOperator.NumMultiply: | 211 case BuiltinOperator.NumMultiply: |
| 198 case BuiltinOperator.NumDivide: | 212 case BuiltinOperator.NumDivide: |
| 199 case BuiltinOperator.NumRemainder: | 213 case BuiltinOperator.NumRemainder: |
| 200 case BuiltinOperator.StringConcatenate: | 214 case BuiltinOperator.StringConcatenate: |
| 201 return true; | 215 return true; |
| 202 default: | 216 default: |
| 203 return false; | 217 return false; |
| 204 } | 218 } |
| 205 } | 219 } |
| OLD | NEW |