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

Unified Diff: src/serialize.h

Issue 1003363003: Serializer: cache hashmaps on the isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove bogus test. rebased Created 5 years, 9 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/isolate.cc ('k') | src/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.h
diff --git a/src/serialize.h b/src/serialize.h
index 1614ecd45459099ad78de707895cacd0492b75b4..3f56c53b9878120aa1664ded41c173fa156f1d52 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -63,7 +63,7 @@ class ExternalReferenceEncoder {
kPointerSizeLog2);
}
- HashMap map_;
+ HashMap* map_;
DISALLOW_COPY_AND_ASSIGN(ExternalReferenceEncoder);
};
@@ -102,13 +102,13 @@ class RootIndexMap : public AddressMapBase {
static const int kInvalidRootIndex = -1;
int Lookup(HeapObject* obj) {
- HashMap::Entry* entry = LookupEntry(&map_, obj, false);
+ HashMap::Entry* entry = LookupEntry(map_, obj, false);
if (entry) return GetValue(entry);
return kInvalidRootIndex;
}
private:
- HashMap map_;
+ HashMap* map_;
DISALLOW_COPY_AND_ASSIGN(RootIndexMap);
};
@@ -687,7 +687,7 @@ class Serializer : public SerializerDeserializer {
BackReference AllocateLargeObject(int size);
BackReference Allocate(AllocationSpace space, int size);
int EncodeExternalReference(Address addr) {
- return external_reference_encoder_->Encode(addr);
+ return external_reference_encoder_.Encode(addr);
}
// GetInt reads 4 bytes at once, requiring padding at the end.
@@ -714,7 +714,7 @@ class Serializer : public SerializerDeserializer {
Isolate* isolate_;
SnapshotByteSink* sink_;
- ExternalReferenceEncoder* external_reference_encoder_;
+ ExternalReferenceEncoder external_reference_encoder_;
BackReferenceMap back_reference_map_;
RootIndexMap root_index_map_;
« no previous file with comments | « src/isolate.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698