Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index bef807eaf688cd14d0278f34d3a79277dcebdb5a..95d77a25ceaaed632e4dfe689d3ed3245176450c 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -1330,6 +1330,7 @@ bool JSObject::ShouldTrackAllocationInfo() { |
| void AllocationSite::Initialize() { |
| + set_transition_info(Smi::FromInt(0)); |
| SetElementsKind(GetInitialFastElementsKind()); |
| set_nested_site(Smi::FromInt(0)); |
| set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()), |
| @@ -1367,6 +1368,17 @@ inline bool AllocationSite::CanTrack(InstanceType type) { |
| } |
| +inline DependentCode::DependencyGroup AllocationSite::ToDependencyGroup( |
| + Reason reason) { |
| + if (reason == TENURING) { |
|
Toon Verwaest
2013/11/06 16:42:44
Can we make this a switch to statically ensure we
mvstanton
2013/11/07 16:34:05
Yes, but I'm not happy that I have to return "some
|
| + return DependentCode::kAllocationSiteTenuringChangedGroup; |
| + } |
| + |
| + ASSERT(reason == TRANSITIONS); |
| + return DependentCode::kAllocationSiteTransitionChangedGroup; |
| +} |
| + |
| + |
| void JSObject::EnsureCanContainHeapObjectElements(Handle<JSObject> object) { |
| object->ValidateElements(); |
| ElementsKind elements_kind = object->map()->elements_kind(); |