| 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_FLOW_GRAPH_H_ | 5 #ifndef VM_FLOW_GRAPH_H_ |
| 6 #define VM_FLOW_GRAPH_H_ | 6 #define VM_FLOW_GRAPH_H_ |
| 7 | 7 |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/growable_array.h" | 9 #include "vm/growable_array.h" |
| 10 #include "vm/hash_map.h" | 10 #include "vm/hash_map.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 void ComputeBlockEffects(); | 223 void ComputeBlockEffects(); |
| 224 BlockEffects* block_effects() const { return block_effects_; } | 224 BlockEffects* block_effects() const { return block_effects_; } |
| 225 | 225 |
| 226 // Remove the redefinition instructions inserted to inhibit code motion. | 226 // Remove the redefinition instructions inserted to inhibit code motion. |
| 227 void RemoveRedefinitions(); | 227 void RemoveRedefinitions(); |
| 228 | 228 |
| 229 // Copy deoptimization target from one instruction to another if we still | 229 // Copy deoptimization target from one instruction to another if we still |
| 230 // have to keep deoptimization environment at gotos for LICM purposes. | 230 // have to keep deoptimization environment at gotos for LICM purposes. |
| 231 void CopyDeoptTarget(Instruction* to, Instruction* from) { | 231 void CopyDeoptTarget(Instruction* to, Instruction* from) { |
| 232 if (is_licm_allowed()) { | 232 if (is_licm_allowed()) { |
| 233 to->InheritDeoptTarget(isolate(), from); | 233 to->InheritDeoptTarget(zone(), from); |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 | 236 |
| 237 // Returns true if every Goto in the graph is expected to have a | 237 // Returns true if every Goto in the graph is expected to have a |
| 238 // deoptimization environment and can be used as deoptimization target | 238 // deoptimization environment and can be used as deoptimization target |
| 239 // for hoisted instructions. | 239 // for hoisted instructions. |
| 240 bool is_licm_allowed() const { return licm_allowed_; } | 240 bool is_licm_allowed() const { return licm_allowed_; } |
| 241 | 241 |
| 242 // Stop preserving environments on Goto instructions. LICM is not allowed | 242 // Stop preserving environments on Goto instructions. LICM is not allowed |
| 243 // after this point. | 243 // after this point. |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 | 516 |
| 517 private: | 517 private: |
| 518 GrowableArray<Definition*> defs_; | 518 GrowableArray<Definition*> defs_; |
| 519 BitVector* contains_vector_; | 519 BitVector* contains_vector_; |
| 520 }; | 520 }; |
| 521 | 521 |
| 522 | 522 |
| 523 } // namespace dart | 523 } // namespace dart |
| 524 | 524 |
| 525 #endif // VM_FLOW_GRAPH_H_ | 525 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |