diff options
Diffstat (limited to 'chromium/v8/src/objects/map.h')
-rw-r--r-- | chromium/v8/src/objects/map.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/chromium/v8/src/objects/map.h b/chromium/v8/src/objects/map.h index 2bbf7ac1ce9..5806a24ae0f 100644 --- a/chromium/v8/src/objects/map.h +++ b/chromium/v8/src/objects/map.h @@ -406,6 +406,8 @@ class Map : public HeapObject { int NumberOfFields() const; + bool HasOutOfObjectProperties() const; + // Returns true if transition to the given map requires special // synchronization with the concurrent marker. bool TransitionRequiresSynchronizationWithGC(Map* target) const; @@ -436,6 +438,18 @@ class Map : public HeapObject { Representation representation, FieldType* field_type); + // Generalizes constness, representation and field_type if objects with given + // instance type can have fast elements that can be transitioned by stubs or + // optimized code to more general elements kind. + // This generalization is necessary in order to ensure that elements kind + // transitions performed by stubs / optimized code don't silently transition + // kMutable fields back to kConst state or fields with HeapObject + // representation and "Any" type back to "Class" type. + static inline void GeneralizeIfCanHaveTransitionableFastElementsKind( + Isolate* isolate, InstanceType instance_type, + PropertyConstness* constness, Representation* representation, + Handle<FieldType>* field_type); + static Handle<Map> ReconfigureProperty(Handle<Map> map, int modify_index, PropertyKind new_kind, PropertyAttributes new_attributes, @@ -823,6 +837,16 @@ class Map : public HeapObject { static VisitorId GetVisitorId(Map* map); + // Returns true if objects with given instance type are allowed to have + // fast transitionable elements kinds. This predicate is used to ensure + // that objects that can have transitionable fast elements kind will not + // get in-place generalizable fields because the elements kind transition + // performed by stubs or optimized code can't properly generalize such + // fields. + static inline bool CanHaveFastTransitionableElementsKind( + InstanceType instance_type); + inline bool CanHaveFastTransitionableElementsKind() const; + private: // Returns the map that this (root) map transitions to if its elements_kind // is changed to |elements_kind|, or |nullptr| if no such map is cached yet. |