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

Unified Diff: src/ast/ast.h

Issue 2345233003: [base] Move hashmap allocator to a field (Closed)
Patch Set: Remove zone arguments where the parameters were removed so that the bloody thing compiles again Created 4 years, 3 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
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | src/ast/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index 644dcb483b7d8e8f0ae18682cc3b894c2963a40e..c41da42e9ca092a35276ad432bd59c87031bcbae 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -134,14 +134,13 @@ typedef ZoneList<Handle<Object>> ZoneObjectList;
class FeedbackVectorSlotCache {
public:
explicit FeedbackVectorSlotCache(Zone* zone)
- : zone_(zone),
- hash_map_(base::HashMap::PointersMatch,
+ : hash_map_(base::HashMap::PointersMatch,
ZoneHashMap::kDefaultHashMapCapacity,
ZoneAllocationPolicy(zone)) {}
void Put(Variable* variable, FeedbackVectorSlot slot) {
- ZoneHashMap::Entry* entry = hash_map_.LookupOrInsert(
- variable, ComputePointerHash(variable), ZoneAllocationPolicy(zone_));
+ ZoneHashMap::Entry* entry =
+ hash_map_.LookupOrInsert(variable, ComputePointerHash(variable));
entry->value = reinterpret_cast<void*>(slot.ToInt());
}
@@ -150,7 +149,6 @@ class FeedbackVectorSlotCache {
}
private:
- Zone* zone_;
ZoneHashMap hash_map_;
};
@@ -1477,7 +1475,7 @@ class AccessorTable
zone_(zone) {}
Iterator lookup(Literal* literal) {
- Iterator it = find(literal, true, ZoneAllocationPolicy(zone_));
+ Iterator it = find(literal, true);
if (it->second == NULL) it->second = new (zone_) ObjectLiteral::Accessors();
return it;
}
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | src/ast/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698