Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 7b05bbe04a538084facb4f8e4008e5a4d57ff0b4..c9506595a6b1bff5c3dea54990bc372053c8dbc0 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -291,6 +291,7 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits; |
| V(OBJECT_TEMPLATE_INFO_TYPE) \ |
| V(SIGNATURE_INFO_TYPE) \ |
| V(TYPE_SWITCH_INFO_TYPE) \ |
| + V(ALLOCATION_SITE_INFO_TYPE) \ |
| V(SCRIPT_TYPE) \ |
| V(CODE_CACHE_TYPE) \ |
| V(POLYMORPHIC_CODE_CACHE_TYPE) \ |
| @@ -444,6 +445,7 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits; |
| V(SIGNATURE_INFO, SignatureInfo, signature_info) \ |
| V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \ |
| V(SCRIPT, Script, script) \ |
| + V(ALLOCATION_SITE_INFO, AllocationSiteInfo, allocation_site_info) \ |
| V(CODE_CACHE, CodeCache, code_cache) \ |
| V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \ |
| V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ |
| @@ -606,6 +608,7 @@ enum InstanceType { |
| OBJECT_TEMPLATE_INFO_TYPE, |
| SIGNATURE_INFO_TYPE, |
| TYPE_SWITCH_INFO_TYPE, |
| + ALLOCATION_SITE_INFO_TYPE, |
| SCRIPT_TYPE, |
| CODE_CACHE_TYPE, |
| POLYMORPHIC_CODE_CACHE_TYPE, |
| @@ -2012,6 +2015,8 @@ class JSObject: public JSReceiver { |
| ElementsKind to_kind); |
| MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); |
| + MUST_USE_RESULT MaybeObject* PossiblyTransitionBoilerplate( |
| + ElementsKind to_kind); |
| // Replaces an existing transition with a transition to a map with a FIELD. |
| MUST_USE_RESULT MaybeObject* ConvertTransitionToMapTransition( |
| @@ -6897,6 +6902,33 @@ class TypeFeedbackInfo: public Struct { |
| }; |
| +class AllocationSiteInfo: public Struct { |
| + public: |
| + DECL_ACCESSORS(payload, Object) |
| + |
| + static inline AllocationSiteInfo* cast(Object* obj); |
| + |
| +#ifdef OBJECT_PRINT |
| + inline void AllocationSiteInfoPrint() { |
| + AllocationSiteInfoPrint(stdout); |
| + } |
| + void AllocationSiteInfoPrint(FILE* out); |
|
danno
2013/01/04 08:50:55
Maybe use some variant of DECLARE_PRINTER?
mvstanton
2013/01/04 12:07:52
Done.
|
| +#endif |
| +#ifdef DEBUG |
| + void AllocationSiteInfoVerify(); |
|
danno
2013/01/04 08:50:55
Use DECLARE_VERIFIER instead of explicitly declari
mvstanton
2013/01/04 12:07:52
Done.
|
| +#endif |
| + |
| + // Returns NULL if no AllocationSiteInfo is available for object. |
| + static AllocationSiteInfo* FindAfterJSObject(JSObject* object); |
| + |
| + static const int kPayloadOffset = HeapObject::kHeaderSize; |
| + static const int kSize = kPayloadOffset + kPointerSize; |
| + |
| + private: |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo); |
| +}; |
| + |
| + |
| // Representation of a slow alias as part of a non-strict arguments objects. |
| // For fast aliases (if HasNonStrictArgumentsElements()): |
| // - the parameter map contains an index into the context |