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:
parent
4373f89013
commit
238ccdef91
2
BUILD.gn
2
BUILD.gn
@ -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",
|
||||
|
2582
src/objects.cc
2582
src/objects.cc
File diff suppressed because it is too large
Load Diff
@ -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
2611
src/objects/map.cc
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user