@@ -51,6 +51,11 @@ class GCPointerBase : public CompressedPointer {
51
51
// / writer barriers.
52
52
inline void
53
53
set (PointerBase &base, GCCell *ptr, GC &gc, const GCCell *owningObj);
54
+ inline void set (
55
+ PointerBase &base,
56
+ CompressedPointer ptr,
57
+ GC &gc,
58
+ const GCCell *owningObj);
54
59
inline void
55
60
setNonNull (PointerBase &base, GCCell *ptr, GC &gc, const GCCell *owningObj);
56
61
@@ -122,10 +127,21 @@ class GCPointer : public GCPointerBase {
122
127
GCPointerBase::setNonNull (base, ptr, gc, owningObj);
123
128
}
124
129
125
- // / Convenience overload of GCPointer::set for other GCPointers.
130
+ // / Convenience overload of GCPointer::set for other GCPointers. This must not
131
+ // / be used if it lives in an object that supports large allocation.
126
132
void set (PointerBase &base, const GCPointer<T> &ptr, GC &gc) {
127
133
GCPointerBase::set (base, ptr, gc);
128
134
}
135
+
136
+ // / Convenience overload of GCPointer::set for other GCPointers. \p owningObj
137
+ // / is used by the writer barriers.
138
+ void set (
139
+ PointerBase &base,
140
+ const GCPointer<T> &ptr,
141
+ GC &gc,
142
+ const GCCell *owningObj) {
143
+ GCPointerBase::set (base, ptr, gc, owningObj);
144
+ }
129
145
};
130
146
131
147
} // namespace vm
0 commit comments