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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 void AddToDeferredPrefixes(ZoneGrowableArray<const LibraryPrefix*>* from); | 256 void AddToDeferredPrefixes(ZoneGrowableArray<const LibraryPrefix*>* from); |
257 | 257 |
258 ZoneGrowableArray<const Field*>* guarded_fields() const { | 258 ZoneGrowableArray<const Field*>* guarded_fields() const { |
259 return guarded_fields_; | 259 return guarded_fields_; |
260 } | 260 } |
261 | 261 |
262 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes() const { | 262 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes() const { |
263 return deferred_prefixes_; | 263 return deferred_prefixes_; |
264 } | 264 } |
265 | 265 |
| 266 BitVector* captured_parameters() const { |
| 267 return captured_parameters_; |
| 268 } |
| 269 |
266 private: | 270 private: |
267 friend class IfConverter; | 271 friend class IfConverter; |
268 friend class BranchSimplifier; | 272 friend class BranchSimplifier; |
269 friend class ConstantPropagator; | 273 friend class ConstantPropagator; |
270 friend class DeadCodeElimination; | 274 friend class DeadCodeElimination; |
271 | 275 |
272 // SSA transformation methods and fields. | 276 // SSA transformation methods and fields. |
273 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); | 277 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); |
274 | 278 |
275 void CompressPath( | 279 void CompressPath( |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 ConstantInstr* constant_dead_; | 335 ConstantInstr* constant_dead_; |
332 | 336 |
333 BlockEffects* block_effects_; | 337 BlockEffects* block_effects_; |
334 bool licm_allowed_; | 338 bool licm_allowed_; |
335 | 339 |
336 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_; | 340 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_; |
337 ZoneGrowableArray<BitVector*>* loop_invariant_loads_; | 341 ZoneGrowableArray<BitVector*>* loop_invariant_loads_; |
338 ZoneGrowableArray<const Field*>* guarded_fields_; | 342 ZoneGrowableArray<const Field*>* guarded_fields_; |
339 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes_; | 343 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes_; |
340 DirectChainedHashMap<ConstantPoolTrait> constant_instr_pool_; | 344 DirectChainedHashMap<ConstantPoolTrait> constant_instr_pool_; |
| 345 BitVector* captured_parameters_; |
341 }; | 346 }; |
342 | 347 |
343 | 348 |
344 class LivenessAnalysis : public ValueObject { | 349 class LivenessAnalysis : public ValueObject { |
345 public: | 350 public: |
346 LivenessAnalysis(intptr_t variable_count, | 351 LivenessAnalysis(intptr_t variable_count, |
347 const GrowableArray<BlockEntryInstr*>& postorder); | 352 const GrowableArray<BlockEntryInstr*>& postorder); |
348 | 353 |
349 void Analyze(); | 354 void Analyze(); |
350 | 355 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 491 |
487 private: | 492 private: |
488 GrowableArray<Definition*> defs_; | 493 GrowableArray<Definition*> defs_; |
489 BitVector* contains_vector_; | 494 BitVector* contains_vector_; |
490 }; | 495 }; |
491 | 496 |
492 | 497 |
493 } // namespace dart | 498 } // namespace dart |
494 | 499 |
495 #endif // VM_FLOW_GRAPH_H_ | 500 #endif // VM_FLOW_GRAPH_H_ |
OLD | NEW |