| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 | 4 |
| 5 #include "vm/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 Range* right_range = this->right()->definition()->range(); | 1355 Range* right_range = this->right()->definition()->range(); |
| 1356 return (right_range == NULL) | 1356 return (right_range == NULL) |
| 1357 || !right_range->IsWithin(0, RangeBoundary::kPlusInfinity); | 1357 || !right_range->IsWithin(0, RangeBoundary::kPlusInfinity); |
| 1358 } | 1358 } |
| 1359 default: | 1359 default: |
| 1360 return overflow_; | 1360 return overflow_; |
| 1361 } | 1361 } |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 | 1364 |
| 1365 bool BinarySmiOpInstr::RightIsPowerOfTwoConstant() const { |
| 1366 if (!right()->definition()->IsConstant()) return false; |
| 1367 const Object& constant = right()->definition()->AsConstant()->value(); |
| 1368 if (!constant.IsSmi()) return false; |
| 1369 const intptr_t int_value = Smi::Cast(constant).Value(); |
| 1370 return Utils::IsPowerOfTwo(Utils::Abs(int_value)); |
| 1371 } |
| 1372 |
| 1373 |
| 1365 RawAbstractType* BinaryMintOpInstr::CompileType() const { | 1374 RawAbstractType* BinaryMintOpInstr::CompileType() const { |
| 1366 return Type::IntType(); | 1375 return Type::IntType(); |
| 1367 } | 1376 } |
| 1368 | 1377 |
| 1369 | 1378 |
| 1370 intptr_t BinaryMintOpInstr::ResultCid() const { | 1379 intptr_t BinaryMintOpInstr::ResultCid() const { |
| 1371 return kDynamicCid; | 1380 return kDynamicCid; |
| 1372 } | 1381 } |
| 1373 | 1382 |
| 1374 | 1383 |
| (...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2825 default: | 2834 default: |
| 2826 UNREACHABLE(); | 2835 UNREACHABLE(); |
| 2827 } | 2836 } |
| 2828 return kPowRuntimeEntry; | 2837 return kPowRuntimeEntry; |
| 2829 } | 2838 } |
| 2830 | 2839 |
| 2831 | 2840 |
| 2832 #undef __ | 2841 #undef __ |
| 2833 | 2842 |
| 2834 } // namespace dart | 2843 } // namespace dart |
| OLD | NEW |