Commit Graph

6 Commits

Author SHA1 Message Date
leszeks
837c91e87b [base] Template MatchFun in TemplateHashMapImpl
Make MatchFun a template parameter in TemplateHashMapImpl, moving the
PointersMatch function down to an implementation which extends
TemplateHashMapImpl to void* key and value (i.e. the same as the current
HashMap and ZoneHashMap typedefs).

This will allow other instantiations of TemplateHashMapImpl, with
different MatchFun values, e.g. std::equal_to, to have their key
equality test inlined, rather than calling a function pointer,

Review-Url: https://codereview.chromium.org/2354593002
Cr-Commit-Position: refs/heads/master@{#39868}
2016-09-29 13:53:24 +00:00
yangguo
ead3188129 [serializer] reserve maps one by one to avoid fragmentation.
R=hpayer@chromium.org
BUG=chromium:612816,chromium:634900

Review-Url: https://codereview.chromium.org/2229583003
Cr-Commit-Position: refs/heads/master@{#38515}
2016-08-10 06:31:31 +00:00
lpy
2fd55667a6 Move hashmap into src/base.
We ported hashmap.h into libsampler as a workaround before, so the main focus of
this patch is to reduce code duplication. This patch moves the hashmap into
src/base as well as creates DefaultAllocationPolicy using malloc and free.

BUG=v8:5050
LOG=n

Review-Url: https://codereview.chromium.org/2010243003
Cr-Commit-Position: refs/heads/master@{#36873}
2016-06-09 18:00:31 +00:00
yangguo
2b60b3580e [serializer] cosmetic changes to SerializerReference.
R=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/1991793002
Cr-Commit-Position: refs/heads/master@{#36327}
2016-05-18 14:39:42 +00:00
yangguo
735fa0c478 [serializer] prepare attached references for general use.
Currently attached references are only used for global proxy, source
string and code stubs. Mid-term future we want to use attached
references for arbitrary objects (in fixed order) provided from outside.

This change renames BackReference to SerializerReference to include both
back references and attached references.

R=mtrofin@chromium.org, vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/1992723002
Cr-Commit-Position: refs/heads/master@{#36318}
2016-05-18 11:30:33 +00:00
yangguo
11cd1f77ae Move RootIndexMap out of serializer file.
This is in preparation of using it elsewhere.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1408163003

Cr-Commit-Position: refs/heads/master@{#31499}
2015-10-23 08:28:38 +00:00