| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
| 6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1713 | 1713 |
| 1714 const RangeBoundary& min() const { return min_; } | 1714 const RangeBoundary& min() const { return min_; } |
| 1715 const RangeBoundary& max() const { return max_; } | 1715 const RangeBoundary& max() const { return max_; } |
| 1716 | 1716 |
| 1717 bool Equals(Range* other) { | 1717 bool Equals(Range* other) { |
| 1718 return min_.Equals(other->min_) && max_.Equals(other->max_); | 1718 return min_.Equals(other->min_) && max_.Equals(other->max_); |
| 1719 } | 1719 } |
| 1720 | 1720 |
| 1721 static RangeBoundary ConstantMin(Range* range) { | 1721 static RangeBoundary ConstantMin(Range* range) { |
| 1722 if (range == NULL) return RangeBoundary::MinSmi(); | 1722 if (range == NULL) return RangeBoundary::MinSmi(); |
| 1723 return range->min().LowerBound(); | 1723 return range->min().LowerBound().Clamp(); |
| 1724 } | 1724 } |
| 1725 | 1725 |
| 1726 static RangeBoundary ConstantMax(Range* range) { | 1726 static RangeBoundary ConstantMax(Range* range) { |
| 1727 if (range == NULL) return RangeBoundary::MaxSmi(); | 1727 if (range == NULL) return RangeBoundary::MaxSmi(); |
| 1728 return range->max().UpperBound(); | 1728 return range->max().UpperBound().Clamp(); |
| 1729 } | 1729 } |
| 1730 | 1730 |
| 1731 // Inclusive. | 1731 // Inclusive. |
| 1732 bool IsWithin(intptr_t min_int, intptr_t max_int) const; | 1732 bool IsWithin(intptr_t min_int, intptr_t max_int) const; |
| 1733 | 1733 |
| 1734 private: | 1734 private: |
| 1735 RangeBoundary min_; | 1735 RangeBoundary min_; |
| 1736 RangeBoundary max_; | 1736 RangeBoundary max_; |
| 1737 }; | 1737 }; |
| 1738 | 1738 |
| (...skipping 2584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4323 ForwardInstructionIterator* current_iterator_; | 4323 ForwardInstructionIterator* current_iterator_; |
| 4324 | 4324 |
| 4325 private: | 4325 private: |
| 4326 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 4326 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 4327 }; | 4327 }; |
| 4328 | 4328 |
| 4329 | 4329 |
| 4330 } // namespace dart | 4330 } // namespace dart |
| 4331 | 4331 |
| 4332 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 4332 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |