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

Side by Side Diff: src/objects.cc

Issue 635883003: Limit the number of transitions allowed per hidden class. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Added growth; changed limit Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 6601 matching lines...) Expand 10 before | Expand all | Expand 10 after
6612 } 6612 }
6613 6613
6614 6614
6615 void Map::ConnectTransition(Handle<Map> parent, Handle<Map> child, 6615 void Map::ConnectTransition(Handle<Map> parent, Handle<Map> child,
6616 Handle<Name> name, SimpleTransitionFlag flag) { 6616 Handle<Name> name, SimpleTransitionFlag flag) {
6617 parent->set_owns_descriptors(false); 6617 parent->set_owns_descriptors(false);
6618 if (parent->is_prototype_map()) { 6618 if (parent->is_prototype_map()) {
6619 DCHECK(child->is_prototype_map()); 6619 DCHECK(child->is_prototype_map());
6620 } else { 6620 } else {
6621 Handle<TransitionArray> transitions = 6621 Handle<TransitionArray> transitions =
6622 TransitionArray::CopyInsert(parent, name, child, flag); 6622 TransitionArray::Insert(parent, name, child, flag);
6623 parent->set_transitions(*transitions); 6623 if (!parent->HasTransitionArray() ||
6624 *transitions != parent->transitions()) {
6625 parent->set_transitions(*transitions);
6626 }
6624 child->SetBackPointer(*parent); 6627 child->SetBackPointer(*parent);
6625 } 6628 }
6626 } 6629 }
6627 6630
6628 6631
6629 Handle<Map> Map::CopyReplaceDescriptors(Handle<Map> map, 6632 Handle<Map> Map::CopyReplaceDescriptors(Handle<Map> map,
6630 Handle<DescriptorArray> descriptors, 6633 Handle<DescriptorArray> descriptors,
6631 TransitionFlag flag, 6634 TransitionFlag flag,
6632 MaybeHandle<Name> maybe_name, 6635 MaybeHandle<Name> maybe_name,
6633 SimpleTransitionFlag simple_flag) { 6636 SimpleTransitionFlag simple_flag) {
(...skipping 9835 matching lines...) Expand 10 before | Expand all | Expand 10 after
16469 Handle<DependentCode> codes = 16472 Handle<DependentCode> codes =
16470 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16473 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16471 DependentCode::kPropertyCellChangedGroup, 16474 DependentCode::kPropertyCellChangedGroup,
16472 info->object_wrapper()); 16475 info->object_wrapper());
16473 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16476 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16474 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16477 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16475 cell, info->zone()); 16478 cell, info->zone());
16476 } 16479 }
16477 16480
16478 } } // namespace v8::internal 16481 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/objects-inl.h » ('j') | src/transitions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698