| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 typedef ConstantInstr* Pair; | 49 typedef ConstantInstr* Pair; |
| 50 | 50 |
| 51 static Key KeyOf(Pair kv) { | 51 static Key KeyOf(Pair kv) { |
| 52 return kv->value(); | 52 return kv->value(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 static Value ValueOf(Pair kv) { | 55 static Value ValueOf(Pair kv) { |
| 56 return kv; | 56 return kv; |
| 57 } | 57 } |
| 58 | 58 |
| 59 static Value NoValue() { return NULL; } |
| 60 |
| 59 static inline intptr_t Hashcode(Key key) { | 61 static inline intptr_t Hashcode(Key key) { |
| 60 if (key.IsSmi()) { | 62 if (key.IsSmi()) { |
| 61 return Smi::Cast(key).Value(); | 63 return Smi::Cast(key).Value(); |
| 62 } | 64 } |
| 63 if (key.IsDouble()) { | 65 if (key.IsDouble()) { |
| 64 return static_cast<intptr_t>( | 66 return static_cast<intptr_t>( |
| 65 bit_cast<int32_t, float>( | 67 bit_cast<int32_t, float>( |
| 66 static_cast<float>(Double::Cast(key).value()))); | 68 static_cast<float>(Double::Cast(key).value()))); |
| 67 } | 69 } |
| 68 if (key.IsMint()) { | 70 if (key.IsMint()) { |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 507 |
| 506 private: | 508 private: |
| 507 GrowableArray<Definition*> defs_; | 509 GrowableArray<Definition*> defs_; |
| 508 BitVector* contains_vector_; | 510 BitVector* contains_vector_; |
| 509 }; | 511 }; |
| 510 | 512 |
| 511 | 513 |
| 512 } // namespace dart | 514 } // namespace dart |
| 513 | 515 |
| 514 #endif // VM_FLOW_GRAPH_H_ | 516 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |