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 #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 2732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2743 | 2743 |
2744 static RangeBoundary Sub(const RangeBoundary& a, | 2744 static RangeBoundary Sub(const RangeBoundary& a, |
2745 const RangeBoundary& b, | 2745 const RangeBoundary& b, |
2746 const RangeBoundary& overflow); | 2746 const RangeBoundary& overflow); |
2747 | 2747 |
2748 static RangeBoundary Shl(const RangeBoundary& value_boundary, | 2748 static RangeBoundary Shl(const RangeBoundary& value_boundary, |
2749 int64_t shift_count, | 2749 int64_t shift_count, |
2750 const RangeBoundary& overflow); | 2750 const RangeBoundary& overflow); |
2751 | 2751 |
2752 static RangeBoundary Shr(const RangeBoundary& value_boundary, | 2752 static RangeBoundary Shr(const RangeBoundary& value_boundary, |
2753 intptr_t shift_count) { | 2753 int64_t shift_count) { |
2754 ASSERT(value_boundary.IsConstant()); | 2754 ASSERT(value_boundary.IsConstant()); |
2755 ASSERT(shift_count >= 0); | 2755 ASSERT(shift_count >= 0); |
2756 int64_t value = static_cast<int64_t>(value_boundary.ConstantValue()); | 2756 int64_t value = static_cast<int64_t>(value_boundary.ConstantValue()); |
2757 int64_t result = value >> shift_count; | 2757 int64_t result = value >> shift_count; |
2758 return RangeBoundary(result); | 2758 return RangeBoundary(result); |
2759 } | 2759 } |
2760 | 2760 |
2761 // Attempts to calculate a + b when: | 2761 // Attempts to calculate a + b when: |
2762 // a is a symbol and b is a constant OR | 2762 // a is a symbol and b is a constant OR |
2763 // a is a constant and b is a symbol | 2763 // a is a constant and b is a symbol |
(...skipping 5862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8626 ForwardInstructionIterator* current_iterator_; | 8626 ForwardInstructionIterator* current_iterator_; |
8627 | 8627 |
8628 private: | 8628 private: |
8629 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 8629 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
8630 }; | 8630 }; |
8631 | 8631 |
8632 | 8632 |
8633 } // namespace dart | 8633 } // namespace dart |
8634 | 8634 |
8635 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8635 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |