OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 RUNTIME_VM_PRECOMPILER_H_ | 5 #ifndef RUNTIME_VM_PRECOMPILER_H_ |
6 #define RUNTIME_VM_PRECOMPILER_H_ | 6 #define RUNTIME_VM_PRECOMPILER_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/hash_map.h" | 9 #include "vm/hash_map.h" |
10 #include "vm/hash_table.h" | 10 #include "vm/hash_table.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 public: | 132 public: |
133 // Typedefs needed for the DirectChainedHashMap template. | 133 // Typedefs needed for the DirectChainedHashMap template. |
134 typedef const Instructions* Key; | 134 typedef const Instructions* Key; |
135 typedef const Instructions* Value; | 135 typedef const Instructions* Value; |
136 typedef const Instructions* Pair; | 136 typedef const Instructions* Pair; |
137 | 137 |
138 static Key KeyOf(Pair kv) { return kv; } | 138 static Key KeyOf(Pair kv) { return kv; } |
139 | 139 |
140 static Value ValueOf(Pair kv) { return kv; } | 140 static Value ValueOf(Pair kv) { return kv; } |
141 | 141 |
142 static inline intptr_t Hashcode(Key key) { return key->size(); } | 142 static inline intptr_t Hashcode(Key key) { return key->Size(); } |
143 | 143 |
144 static inline bool IsKeyEqual(Pair pair, Key key) { | 144 static inline bool IsKeyEqual(Pair pair, Key key) { |
145 return pair->Equals(*key); | 145 return pair->Equals(*key); |
146 } | 146 } |
147 }; | 147 }; |
148 | 148 |
149 typedef DirectChainedHashMap<InstructionsKeyValueTrait> InstructionsSet; | 149 typedef DirectChainedHashMap<InstructionsKeyValueTrait> InstructionsSet; |
150 | 150 |
151 | 151 |
152 class UnlinkedCallKeyValueTrait { | 152 class UnlinkedCallKeyValueTrait { |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 } | 481 } |
482 static RawObject* NewKey(const Function& function) { return function.raw(); } | 482 static RawObject* NewKey(const Function& function) { return function.raw(); } |
483 }; | 483 }; |
484 | 484 |
485 typedef UnorderedHashSet<FunctionsTraits> UniqueFunctionsSet; | 485 typedef UnorderedHashSet<FunctionsTraits> UniqueFunctionsSet; |
486 | 486 |
487 | 487 |
488 } // namespace dart | 488 } // namespace dart |
489 | 489 |
490 #endif // RUNTIME_VM_PRECOMPILER_H_ | 490 #endif // RUNTIME_VM_PRECOMPILER_H_ |
OLD | NEW |