Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(598)

Side by Side Diff: src/objects.h

Issue 1468933004: Allow in-object properties in JSCollections, JSWeakCollections and JSRegExp. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 9828 matching lines...) Expand 10 before | Expand all | Expand 10 after
9839 static void Initialize(Handle<JSWeakCollection> collection, Isolate* isolate); 9839 static void Initialize(Handle<JSWeakCollection> collection, Isolate* isolate);
9840 static void Set(Handle<JSWeakCollection> collection, Handle<Object> key, 9840 static void Set(Handle<JSWeakCollection> collection, Handle<Object> key,
9841 Handle<Object> value, int32_t hash); 9841 Handle<Object> value, int32_t hash);
9842 static bool Delete(Handle<JSWeakCollection> collection, Handle<Object> key, 9842 static bool Delete(Handle<JSWeakCollection> collection, Handle<Object> key,
9843 int32_t hash); 9843 int32_t hash);
9844 9844
9845 static const int kTableOffset = JSObject::kHeaderSize; 9845 static const int kTableOffset = JSObject::kHeaderSize;
9846 static const int kNextOffset = kTableOffset + kPointerSize; 9846 static const int kNextOffset = kTableOffset + kPointerSize;
9847 static const int kSize = kNextOffset + kPointerSize; 9847 static const int kSize = kNextOffset + kPointerSize;
9848 9848
9849 class BodyDescriptor; 9849 // Visiting policy defines whether the table and next collection fields
9850 // should be visited or not.
9851 enum BodyVisitingPolicy { kVisitStrong, kVisitWeak };
9852
9853 // Iterates the function object according to the visiting policy.
9854 template <BodyVisitingPolicy>
9855 class BodyDescriptorImpl;
9856
9857 // Visit the whole object.
9858 typedef BodyDescriptorImpl<kVisitStrong> BodyDescriptor;
9859
9860 // Don't visit table and next collection fields.
9861 typedef BodyDescriptorImpl<kVisitWeak> BodyDescriptorWeak;
9850 9862
9851 private: 9863 private:
9852 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakCollection); 9864 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakCollection);
9853 }; 9865 };
9854 9866
9855 9867
9856 // The JSWeakMap describes EcmaScript Harmony weak maps 9868 // The JSWeakMap describes EcmaScript Harmony weak maps
9857 class JSWeakMap: public JSWeakCollection { 9869 class JSWeakMap: public JSWeakCollection {
9858 public: 9870 public:
9859 DECLARE_CAST(JSWeakMap) 9871 DECLARE_CAST(JSWeakMap)
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
10738 } 10750 }
10739 return value; 10751 return value;
10740 } 10752 }
10741 }; 10753 };
10742 10754
10743 10755
10744 } // NOLINT, false-positive due to second-order macros. 10756 } // NOLINT, false-positive due to second-order macros.
10745 } // NOLINT, false-positive due to second-order macros. 10757 } // NOLINT, false-positive due to second-order macros.
10746 10758
10747 #endif // V8_OBJECTS_H_ 10759 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698