Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: runtime/vm/precompiler.h

Issue 2490363002: Clean up encoding of size and single entry flag in Instructions. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698