| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 smi_range_(Range::Full(RangeBoundary::kRangeBoundarySmi)) { } | 437 smi_range_(Range::Full(RangeBoundary::kRangeBoundarySmi)) { } |
| 438 | 438 |
| 439 // Infer ranges for all values and remove overflow checks from binary smi | 439 // Infer ranges for all values and remove overflow checks from binary smi |
| 440 // operations when proven redundant. | 440 // operations when proven redundant. |
| 441 void Analyze(); | 441 void Analyze(); |
| 442 | 442 |
| 443 // Helper that should be used to access ranges of inputs during range | 443 // Helper that should be used to access ranges of inputs during range |
| 444 // inference. | 444 // inference. |
| 445 // Returns meaningful results for uses of non-smi definitions that have smi | 445 // Returns meaningful results for uses of non-smi definitions that have smi |
| 446 // as a reaching type. | 446 // as a reaching type. |
| 447 const Range* GetRange(Value* value) const; | 447 const Range* GetSmiRange(Value* value) const; |
| 448 | 448 |
| 449 private: | 449 private: |
| 450 enum JoinOperator { | 450 enum JoinOperator { |
| 451 NONE, | 451 NONE, |
| 452 WIDEN, | 452 WIDEN, |
| 453 NARROW | 453 NARROW |
| 454 }; | 454 }; |
| 455 static char OpPrefix(JoinOperator op); | 455 static char OpPrefix(JoinOperator op); |
| 456 | 456 |
| 457 // Collect all values that were proven to be smi in smi_values_ array and all | 457 // Collect all values that were proven to be smi in smi_values_ array and all |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 BitVector* selected_uint32_defs_; | 559 BitVector* selected_uint32_defs_; |
| 560 | 560 |
| 561 FlowGraph* flow_graph_; | 561 FlowGraph* flow_graph_; |
| 562 Isolate* isolate_; | 562 Isolate* isolate_; |
| 563 }; | 563 }; |
| 564 | 564 |
| 565 | 565 |
| 566 } // namespace dart | 566 } // namespace dart |
| 567 | 567 |
| 568 #endif // VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ | 568 #endif // VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ |
| OLD | NEW |