Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 99c160b51d5c79e93fa2675745387428fa207c31..2dcd9383bcee86bc1056dce277647e5e9bf31eb4 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -5563,7 +5563,13 @@ class DependentCode: public FixedArray { |
| // Group of code that depends on global property values in property cells |
| // not being changed. |
| kPropertyCellChangedGroup, |
| - kGroupCount = kPropertyCellChangedGroup + 1 |
| + // Group of code that depends on tenuring information in AllocationSites |
| + // not being changed. |
| + kAllocationSiteTenuringChangedGroup, |
| + // Group of code that depends on element transition information in |
| + // AllocationSites not being changed. |
| + kAllocationSiteTransitionChangedGroup, |
| + kGroupCount = kAllocationSiteTransitionChangedGroup + 1 |
| }; |
| // Array for holding the index of the first code object of each group. |
| @@ -8077,13 +8083,32 @@ class AllocationSite: public Struct { |
| // This method is expensive, it should only be called for reporting. |
| bool IsNestedSite(); |
| + class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; |
| + class UnusedBits: public BitField<int, 15, 14> {}; |
| + class DoNotInlineBit: public BitField<bool, 29, 1> {}; |
| + |
| ElementsKind GetElementsKind() { |
| ASSERT(!SitePointsToLiteral()); |
| - return static_cast<ElementsKind>(Smi::cast(transition_info())->value()); |
| + int value = Smi::cast(transition_info())->value(); |
| + return ElementsKindBits::decode(value); |
| } |
| void SetElementsKind(ElementsKind kind) { |
| - set_transition_info(Smi::FromInt(static_cast<int>(kind))); |
| + int value = Smi::cast(transition_info())->value(); |
| + set_transition_info(Smi::FromInt(ElementsKindBits::update(value, kind)), |
| + SKIP_WRITE_BARRIER); |
| + } |
| + |
| + bool CanInlineCall() { |
| + int value = Smi::cast(transition_info())->value(); |
| + return DoNotInlineBit::decode(value) == 0; |
| + } |
| + |
| + void SetDoNotInlineCall() { |
| + int value = Smi::cast(transition_info())->value(); |
| + value |= (1 << 16); |
|
Toon Verwaest
2013/11/11 13:59:28
Remove the line above.
mvstanton
2013/11/13 14:12:52
oops!
|
| + set_transition_info(Smi::FromInt(DoNotInlineBit::update(value, true)), |
| + SKIP_WRITE_BARRIER); |
| } |
| bool SitePointsToLiteral() { |
| @@ -8093,6 +8118,16 @@ class AllocationSite: public Struct { |
| return transition_info()->IsJSArray() || transition_info()->IsJSObject(); |
| } |
| + MaybeObject* DigestTransitionFeedback(ElementsKind to_kind); |
| + |
| + enum Reason { |
| + TENURING, |
| + TRANSITIONS |
| + }; |
| + |
| + void AddDependentCompilationInfo(Reason reason, CompilationInfo* info); |
| + void AddDependentCode(Reason reason, Handle<Code> code); |
| + |
| DECLARE_PRINTER(AllocationSite) |
| DECLARE_VERIFIER(AllocationSite) |
| @@ -8113,6 +8148,7 @@ class AllocationSite: public Struct { |
| kSize> BodyDescriptor; |
| private: |
| + inline DependentCode::DependencyGroup ToDependencyGroup(Reason reason); |
| DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); |
| }; |