| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index bf598307a2f456dd618289aa0b431255f4e816ee..c4913b60e06da066dc0648fd29e2a4b60bbcdac3 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -3592,6 +3592,19 @@ class Map: public HeapObject {
|
| return ((1 << kHasFastElements) & bit_field2()) != 0;
|
| }
|
|
|
| + // Tells whether an instance has pixel array elements.
|
| + inline void set_has_pixel_array_elements(bool value) {
|
| + if (value) {
|
| + set_bit_field2(bit_field2() | (1 << kHasPixelArrayElements));
|
| + } else {
|
| + set_bit_field2(bit_field2() & ~(1 << kHasPixelArrayElements));
|
| + }
|
| + }
|
| +
|
| + inline bool has_pixel_array_elements() {
|
| + return ((1 << kHasPixelArrayElements) & bit_field2()) != 0;
|
| + }
|
| +
|
| // Tells whether the map is attached to SharedFunctionInfo
|
| // (for inobject slack tracking).
|
| inline void set_attached_to_shared_function_info(bool value);
|
| @@ -3650,6 +3663,11 @@ class Map: public HeapObject {
|
| // from the descriptors and the fast elements bit cleared.
|
| MUST_USE_RESULT inline MaybeObject* GetSlowElementsMap();
|
|
|
| + // Returns this map if it has the pixel array elements bit is set, otherwise
|
| + // returns a copy of the map, with all transitions dropped from the
|
| + // descriptors and the pixel array elements bit set.
|
| + MUST_USE_RESULT inline MaybeObject* GetPixelArrayElementsMap();
|
| +
|
| // Returns the property index for name (only valid for FAST MODE).
|
| int PropertyIndexFor(String* name);
|
|
|
| @@ -3768,6 +3786,7 @@ class Map: public HeapObject {
|
| static const int kStringWrapperSafeForDefaultValueOf = 3;
|
| static const int kAttachedToSharedFunctionInfo = 4;
|
| static const int kIsShared = 5;
|
| + static const int kHasPixelArrayElements = 6;
|
|
|
| // Layout of the default cache. It holds alternating name and code objects.
|
| static const int kCodeCacheEntrySize = 2;
|
|
|