| 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/bootstrap.h" | 8 #include "vm/bootstrap.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/constant_propagator.h" | 10 #include "vm/constant_propagator.h" |
| (...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 | 1433 |
| 1434 case Token::kMOD: | 1434 case Token::kMOD: |
| 1435 return RangeUtils::CanBeZero(right_range()); | 1435 return RangeUtils::CanBeZero(right_range()); |
| 1436 | 1436 |
| 1437 default: | 1437 default: |
| 1438 return can_overflow(); | 1438 return can_overflow(); |
| 1439 } | 1439 } |
| 1440 } | 1440 } |
| 1441 | 1441 |
| 1442 | 1442 |
| 1443 bool ShiftMintOpInstr::has_shift_count_check() const { | 1443 bool ShiftMintOpInstr::IsShiftCountInRange() const { |
| 1444 return !RangeUtils::IsWithin(shift_range(), 0, kMintShiftCountLimit); | 1444 return RangeUtils::IsWithin(shift_range(), 0, kMintShiftCountLimit); |
| 1445 } | 1445 } |
| 1446 | 1446 |
| 1447 | 1447 |
| 1448 bool BinaryIntegerOpInstr::RightIsPowerOfTwoConstant() const { | 1448 bool BinaryIntegerOpInstr::RightIsPowerOfTwoConstant() const { |
| 1449 if (!right()->definition()->IsConstant()) return false; | 1449 if (!right()->definition()->IsConstant()) return false; |
| 1450 const Object& constant = right()->definition()->AsConstant()->value(); | 1450 const Object& constant = right()->definition()->AsConstant()->value(); |
| 1451 if (!constant.IsSmi()) return false; | 1451 if (!constant.IsSmi()) return false; |
| 1452 const intptr_t int_value = Smi::Cast(constant).Value(); | 1452 const intptr_t int_value = Smi::Cast(constant).Value(); |
| 1453 return Utils::IsPowerOfTwo(Utils::Abs(int_value)); | 1453 return Utils::IsPowerOfTwo(Utils::Abs(int_value)); |
| 1454 } | 1454 } |
| (...skipping 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4317 "native function '%s' (%" Pd " arguments) cannot be found", | 4317 "native function '%s' (%" Pd " arguments) cannot be found", |
| 4318 native_name().ToCString(), function().NumParameters()); | 4318 native_name().ToCString(), function().NumParameters()); |
| 4319 } | 4319 } |
| 4320 set_is_auto_scope(auto_setup_scope); | 4320 set_is_auto_scope(auto_setup_scope); |
| 4321 set_native_c_function(native_function); | 4321 set_native_c_function(native_function); |
| 4322 } | 4322 } |
| 4323 | 4323 |
| 4324 #undef __ | 4324 #undef __ |
| 4325 | 4325 |
| 4326 } // namespace dart | 4326 } // namespace dart |
| OLD | NEW |