OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 10657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10668 DECL_ACCESSORS(table, Object) | 10668 DECL_ACCESSORS(table, Object) |
10669 | 10669 |
10670 // [next]: linked list of encountered weak maps during GC. | 10670 // [next]: linked list of encountered weak maps during GC. |
10671 DECL_ACCESSORS(next, Object) | 10671 DECL_ACCESSORS(next, Object) |
10672 | 10672 |
10673 static void Initialize(Handle<JSWeakCollection> collection, Isolate* isolate); | 10673 static void Initialize(Handle<JSWeakCollection> collection, Isolate* isolate); |
10674 static void Set(Handle<JSWeakCollection> collection, Handle<Object> key, | 10674 static void Set(Handle<JSWeakCollection> collection, Handle<Object> key, |
10675 Handle<Object> value, int32_t hash); | 10675 Handle<Object> value, int32_t hash); |
10676 static bool Delete(Handle<JSWeakCollection> collection, Handle<Object> key, | 10676 static bool Delete(Handle<JSWeakCollection> collection, Handle<Object> key, |
10677 int32_t hash); | 10677 int32_t hash); |
| 10678 static Handle<JSArray> GetEntries(Handle<JSWeakCollection> holder, |
| 10679 int max_entries); |
10678 | 10680 |
10679 static const int kTableOffset = JSObject::kHeaderSize; | 10681 static const int kTableOffset = JSObject::kHeaderSize; |
10680 static const int kNextOffset = kTableOffset + kPointerSize; | 10682 static const int kNextOffset = kTableOffset + kPointerSize; |
10681 static const int kSize = kNextOffset + kPointerSize; | 10683 static const int kSize = kNextOffset + kPointerSize; |
10682 | 10684 |
10683 // Visiting policy defines whether the table and next collection fields | 10685 // Visiting policy defines whether the table and next collection fields |
10684 // should be visited or not. | 10686 // should be visited or not. |
10685 enum BodyVisitingPolicy { kVisitStrong, kVisitWeak }; | 10687 enum BodyVisitingPolicy { kVisitStrong, kVisitWeak }; |
10686 | 10688 |
10687 // Iterates the function object according to the visiting policy. | 10689 // Iterates the function object according to the visiting policy. |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11620 } | 11622 } |
11621 }; | 11623 }; |
11622 | 11624 |
11623 | 11625 |
11624 } // NOLINT, false-positive due to second-order macros. | 11626 } // NOLINT, false-positive due to second-order macros. |
11625 } // NOLINT, false-positive due to second-order macros. | 11627 } // NOLINT, false-positive due to second-order macros. |
11626 | 11628 |
11627 #include "src/objects/object-macros-undef.h" | 11629 #include "src/objects/object-macros-undef.h" |
11628 | 11630 |
11629 #endif // V8_OBJECTS_H_ | 11631 #endif // V8_OBJECTS_H_ |
OLD | NEW |