| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_FLOW_GRAPH_RANGE_ANALYSIS_H_ | 5 #ifndef VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ |
| 6 #define VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ | 6 #define VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ |
| 7 | 7 |
| 8 #include "vm/flow_graph.h" | 8 #include "vm/flow_graph.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 | 10 |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 466 |
| 467 // Both the a and b ranges are >= 0. | 467 // Both the a and b ranges are >= 0. |
| 468 static bool OnlyPositiveOrZero(const Range& a, const Range& b); | 468 static bool OnlyPositiveOrZero(const Range& a, const Range& b); |
| 469 | 469 |
| 470 // Both the a and b ranges are <= 0. | 470 // Both the a and b ranges are <= 0. |
| 471 static bool OnlyNegativeOrZero(const Range& a, const Range& b); | 471 static bool OnlyNegativeOrZero(const Range& a, const Range& b); |
| 472 | 472 |
| 473 // Return the maximum absolute value included in range. | 473 // Return the maximum absolute value included in range. |
| 474 static int64_t ConstantAbsMax(const Range* range); | 474 static int64_t ConstantAbsMax(const Range* range); |
| 475 | 475 |
| 476 // Return the minimum absolute value included in range. |
| 477 static int64_t ConstantAbsMin(const Range* range); |
| 478 |
| 476 static void BinaryOp(const Token::Kind op, | 479 static void BinaryOp(const Token::Kind op, |
| 477 const Range* left_range, | 480 const Range* left_range, |
| 478 const Range* right_range, | 481 const Range* right_range, |
| 479 Definition* left_defn, | 482 Definition* left_defn, |
| 480 Range* result); | 483 Range* result); |
| 481 | 484 |
| 482 private: | 485 private: |
| 483 RangeBoundary min_; | 486 RangeBoundary min_; |
| 484 RangeBoundary max_; | 487 RangeBoundary max_; |
| 485 }; | 488 }; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 BitVector* selected_uint32_defs_; | 657 BitVector* selected_uint32_defs_; |
| 655 | 658 |
| 656 FlowGraph* flow_graph_; | 659 FlowGraph* flow_graph_; |
| 657 Isolate* isolate_; | 660 Isolate* isolate_; |
| 658 }; | 661 }; |
| 659 | 662 |
| 660 | 663 |
| 661 } // namespace dart | 664 } // namespace dart |
| 662 | 665 |
| 663 #endif // VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ | 666 #endif // VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ |
| OLD | NEW |