OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4164 // Accessors for global property cells holding the cache values. | 4164 // Accessors for global property cells holding the cache values. |
4165 inline JSGlobalPropertyCell* Cell(int index); | 4165 inline JSGlobalPropertyCell* Cell(int index); |
4166 inline void SetCell(int index, JSGlobalPropertyCell* cell); | 4166 inline void SetCell(int index, JSGlobalPropertyCell* cell); |
4167 | 4167 |
4168 // The object that indicates an uninitialized cache. | 4168 // The object that indicates an uninitialized cache. |
4169 static inline Handle<Object> UninitializedSentinel(Isolate* isolate); | 4169 static inline Handle<Object> UninitializedSentinel(Isolate* isolate); |
4170 | 4170 |
4171 // The object that indicates a megamorphic state. | 4171 // The object that indicates a megamorphic state. |
4172 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate); | 4172 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate); |
4173 | 4173 |
4174 // The object that indicates a monomorphic state of Array with | |
4175 // ElementsKind | |
4176 static inline Handle<Object> MonomorphicArraySentinel( | |
4177 ElementsKind elements_kind); | |
4178 | |
4174 // A raw version of the uninitialized sentinel that's safe to read during | 4179 // A raw version of the uninitialized sentinel that's safe to read during |
4175 // garbage collection (e.g., for patching the cache). | 4180 // garbage collection (e.g., for patching the cache). |
4176 static inline Object* RawUninitializedSentinel(Heap* heap); | 4181 static inline Object* RawUninitializedSentinel(Heap* heap); |
4177 | 4182 |
4178 // Casting. | 4183 // Casting. |
4179 static inline TypeFeedbackCells* cast(Object* obj); | 4184 static inline TypeFeedbackCells* cast(Object* obj); |
4180 | 4185 |
4181 static const int kForInFastCaseMarker = 0; | 4186 static const int kForInFastCaseMarker = 0; |
4182 static const int kForInSlowCaseMarker = 1; | 4187 static const int kForInSlowCaseMarker = 1; |
4183 }; | 4188 }; |
(...skipping 2787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6971 }; | 6976 }; |
6972 | 6977 |
6973 | 6978 |
6974 enum AllocationSiteMode { | 6979 enum AllocationSiteMode { |
6975 DONT_TRACK_ALLOCATION_SITE, | 6980 DONT_TRACK_ALLOCATION_SITE, |
6976 TRACK_ALLOCATION_SITE, | 6981 TRACK_ALLOCATION_SITE, |
6977 LAST_ALLOCATION_SITE_MODE = TRACK_ALLOCATION_SITE | 6982 LAST_ALLOCATION_SITE_MODE = TRACK_ALLOCATION_SITE |
6978 }; | 6983 }; |
6979 | 6984 |
6980 | 6985 |
6986 | |
Toon Verwaest
2013/02/13 15:14:51
Remove.
Toon Verwaest
2013/02/21 12:13:03
... remove.
On 2013/02/13 15:14:51, Toon Verwaest
mvstanton
2013/02/27 14:37:07
Done.
| |
6987 | |
6981 class AllocationSiteInfo: public Struct { | 6988 class AllocationSiteInfo: public Struct { |
6982 public: | 6989 public: |
6983 DECL_ACCESSORS(payload, Object) | 6990 DECL_ACCESSORS(payload, Object) |
6984 | 6991 |
6985 static inline AllocationSiteInfo* cast(Object* obj); | 6992 static inline AllocationSiteInfo* cast(Object* obj); |
6986 | 6993 |
6987 DECLARE_PRINTER(AllocationSiteInfo) | 6994 DECLARE_PRINTER(AllocationSiteInfo) |
6988 DECLARE_VERIFIER(AllocationSiteInfo) | 6995 DECLARE_VERIFIER(AllocationSiteInfo) |
6989 | 6996 |
6990 // Returns NULL if no AllocationSiteInfo is available for object. | 6997 // Returns NULL if no AllocationSiteInfo is available for object. |
6991 static AllocationSiteInfo* FindForJSObject(JSObject* object); | 6998 static AllocationSiteInfo* FindForJSObject(JSObject* object); |
6992 | 6999 |
6993 static AllocationSiteMode GetMode(ElementsKind boilerplate_elements_kind); | 7000 static AllocationSiteMode GetMode(ElementsKind boilerplate_elements_kind); |
6994 static AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); | 7001 static AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); |
6995 | 7002 |
6996 static const int kPayloadOffset = HeapObject::kHeaderSize; | 7003 static const int kPayloadOffset = HeapObject::kHeaderSize; |
6997 static const int kSize = kPayloadOffset + kPointerSize; | 7004 static const int kSize = kPayloadOffset + kPointerSize; |
6998 | 7005 |
7006 bool GetElementsKindPayload(ElementsKind* kind); | |
6999 private: | 7007 private: |
7000 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo); | 7008 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo); |
7001 }; | 7009 }; |
7002 | 7010 |
7003 | 7011 |
7004 // Representation of a slow alias as part of a non-strict arguments objects. | 7012 // Representation of a slow alias as part of a non-strict arguments objects. |
7005 // For fast aliases (if HasNonStrictArgumentsElements()): | 7013 // For fast aliases (if HasNonStrictArgumentsElements()): |
7006 // - the parameter map contains an index into the context | 7014 // - the parameter map contains an index into the context |
7007 // - all attributes of the element have default values | 7015 // - all attributes of the element have default values |
7008 // For slow aliases (if HasDictionaryArgumentsElements()): | 7016 // For slow aliases (if HasDictionaryArgumentsElements()): |
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8950 } else { | 8958 } else { |
8951 value &= ~(1 << bit_position); | 8959 value &= ~(1 << bit_position); |
8952 } | 8960 } |
8953 return value; | 8961 return value; |
8954 } | 8962 } |
8955 }; | 8963 }; |
8956 | 8964 |
8957 } } // namespace v8::internal | 8965 } } // namespace v8::internal |
8958 | 8966 |
8959 #endif // V8_OBJECTS_H_ | 8967 #endif // V8_OBJECTS_H_ |
OLD | NEW |