Do not track transitions for built-in objects.

Objects created during bootstrapping do not need a transition
tree except for elements kind transitions.

R=ishell@chromium.org

Bug: v8:6596
Change-Id: I237b8b2792f201336e1c9731c815095dd06bc182
Reviewed-on: https://chromium-review.googlesource.com/571750
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46693}
This commit is contained in:
Yang Guo 2017-07-14 12:52:05 +02:00 committed by Commit Bot
parent 048dbc6491
commit 182caaf4a9

View File

@ -8993,7 +8993,13 @@ void Map::TraceAllTransitions(Map* map) {
void Map::ConnectTransition(Handle<Map> parent, Handle<Map> child,
Handle<Name> name, SimpleTransitionFlag flag) {
if (!parent->GetBackPointer()->IsUndefined(parent->GetIsolate())) {
Isolate* isolate = parent->GetIsolate();
// Do not track transitions during bootstrap except for element transitions.
if (isolate->bootstrapper()->IsActive() &&
!name.is_identical_to(isolate->factory()->elements_transition_symbol())) {
return;
}
if (!parent->GetBackPointer()->IsUndefined(isolate)) {
parent->set_owns_descriptors(false);
} else {
// |parent| is initial map and it must keep the ownership, there must be no