| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 2b38b1dab096bd495ba7531868ebc91be4691a0e..311bf1923a0f7e3a126bc7fb78b87625b3bf6cf4 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -5715,10 +5715,7 @@ class JSObjectCopyVisitor: public JSObjectWalkVisitor {
|
| // 2) the elements kind is palatable
|
| // 3) allow_mementos is true
|
| Handle<JSObject> copy;
|
| - if (site_context()->activated() &&
|
| - AllocationSite::CanTrack(object->map()->instance_type()) &&
|
| - AllocationSite::GetMode(object->GetElementsKind()) ==
|
| - TRACK_ALLOCATION_SITE) {
|
| + if (site_context()->ShouldCreateMemento(object)) {
|
| copy = JSObject::Copy(object, site_context()->current());
|
| } else {
|
| copy = JSObject::Copy(object);
|
| @@ -9234,7 +9231,9 @@ AllocationMemento* AllocationMemento::FindForJSObject(JSObject* object,
|
| object->GetHeap()->allocation_memento_map()) {
|
| AllocationMemento* memento = AllocationMemento::cast(
|
| reinterpret_cast<Object*>(ptr_end + kHeapObjectTag));
|
| - return memento;
|
| + if (memento->IsValid()) {
|
| + return memento;
|
| + }
|
| }
|
| }
|
| }
|
| @@ -12810,6 +12809,9 @@ void JSObject::TransitionElementsKind(Handle<JSObject> object,
|
| }
|
|
|
|
|
| +const double AllocationSite::kPretenureRatio = 0.60;
|
| +
|
| +
|
| bool AllocationSite::IsNestedSite() {
|
| ASSERT(FLAG_trace_track_allocation_sites);
|
| Object* current = GetHeap()->allocation_sites_list();
|
|
|