Extract Map class from objects.cc

I extracted following class member functions to map.cc
* Map
* NormalizedMapCache

Declaration of all above class are in map.h.

This patch makes compile time of objects.cc from 18.9s to 17.6s on Z840 Linux.
And map.cc takes 6.14s for compile.

Bug: v8:7629
Change-Id: Id1e45dff243ab3f5449c0a7e2a861fba0bc7abf6
Reviewed-on: https://chromium-review.googlesource.com/c/1447914
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59270}
This commit is contained in:
Takuto Ikuta 2019-02-01 15:37:59 +09:00 committed by Commit Bot
parent 4373f89013
commit 238ccdef91
4 changed files with 2618 additions and 2581 deletions

View File

@ -832,6 +832,7 @@ action("postmortem-metadata") {
"src/objects/js-regexp-string-iterator-inl.h",
"src/objects/js-regexp-string-iterator.h",
"src/objects/map.h",
"src/objects/map.cc",
"src/objects/map-inl.h",
"src/objects/name.h",
"src/objects/name-inl.h",
@ -2273,6 +2274,7 @@ v8_source_set("v8_base") {
"src/objects/managed.cc",
"src/objects/managed.h",
"src/objects/map-inl.h",
"src/objects/map.cc",
"src/objects/map.h",
"src/objects/maybe-object-inl.h",
"src/objects/maybe-object.h",

File diff suppressed because it is too large Load Diff

View File

@ -782,6 +782,10 @@ int Map::SlackForArraySize(int old_size, int size_limit) {
return Min(max_slack, old_size / 4);
}
int Map::InstanceSizeFromSlack(int slack) const {
return instance_size() - slack * kTaggedSize;
}
NEVER_READ_ONLY_SPACE_IMPL(NormalizedMapCache)
int NormalizedMapCache::GetIndex(Handle<Map> map) {

2611
src/objects/map.cc Normal file

File diff suppressed because it is too large Load Diff