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

Unified Diff: runtime/vm/assembler_x64.h

Issue 848703002: Improve constant pool implementation in the assembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: updated test status file Created 5 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_x64.h
===================================================================
--- runtime/vm/assembler_x64.h (revision 42801)
+++ runtime/vm/assembler_x64.h (working copy)
@@ -1023,44 +1023,6 @@
// Patchability of pool entries.
GrowableArray<Patchability> patchable_pool_entries_;
- // Pair type parameter for DirectChainedHashMap.
- class ObjIndexPair {
- public:
- // TODO(zra): A WeakTable should be used here instead, but then it would
- // also have to be possible to register and de-register WeakTables with the
- // heap. Also, the Assembler would need to become a StackResource.
- // Issue 13305. In the meantime...
- // CAUTION: the RawObject* below is only safe because:
- // The HashMap that will use this pair type will not contain any RawObject*
- // keys that are not in the object_pool_ array. Since the keys will be
- // visited by the GC when it visits the object_pool_, and since all objects
- // in the object_pool_ are Old (and so will not be moved) the GC does not
- // also need to visit the keys here in the HashMap.
-
- // Typedefs needed for the DirectChainedHashMap template.
- typedef RawObject* Key;
- typedef intptr_t Value;
- typedef ObjIndexPair Pair;
-
- ObjIndexPair(Key key, Value value) : key_(key), value_(value) { }
-
- static Key KeyOf(Pair kv) { return kv.key_; }
-
- static Value ValueOf(Pair kv) { return kv.value_; }
-
- static intptr_t Hashcode(Key key) {
- return reinterpret_cast<intptr_t>(key) >> kObjectAlignmentLog2;
- }
-
- static inline bool IsKeyEqual(Pair kv, Key key) {
- return kv.key_ == key;
- }
-
- private:
- Key key_;
- Value value_;
- };
-
// Hashmap for fast lookup in object pool.
DirectChainedHashMap<ObjIndexPair> object_pool_index_table_;

Powered by Google App Engine
This is Rietveld 408576698