@@ -57,6 +57,11 @@ class GCPointerBase : public CompressedPointer {
57
57
set (PointerBase &base, GCCell *ptr, GC &gc, const GCCell *owningObj) {
58
58
setImpl<MaybeLargeObj::Yes, NonNull::No>(base, ptr, gc, owningObj);
59
59
}
60
+ inline void set (
61
+ PointerBase &base,
62
+ CompressedPointer ptr,
63
+ GC &gc,
64
+ const GCCell *owningObj);
60
65
inline void
61
66
setNonNull (PointerBase &base, GCCell *ptr, GC &gc, const GCCell *owningObj) {
62
67
setImpl<MaybeLargeObj::Yes, NonNull::Yes>(base, ptr, gc, owningObj);
@@ -140,10 +145,21 @@ class GCPointer : public GCPointerBase {
140
145
GCPointerBase::setNonNull (base, ptr, gc, owningObj);
141
146
}
142
147
143
- // / Convenience overload of GCPointer::set for other GCPointers.
148
+ // / Convenience overload of GCPointer::set for other GCPointers. This must not
149
+ // / be used if it lives in an object that supports large allocation.
144
150
void set (PointerBase &base, const GCPointer<T> &ptr, GC &gc) {
145
151
GCPointerBase::set (base, ptr, gc);
146
152
}
153
+
154
+ // / Convenience overload of GCPointer::set for other GCPointers. \p owningObj
155
+ // / is used by the writer barriers.
156
+ void set (
157
+ PointerBase &base,
158
+ const GCPointer<T> &ptr,
159
+ GC &gc,
160
+ const GCCell *owningObj) {
161
+ GCPointerBase::set (base, ptr, gc, owningObj);
162
+ }
147
163
};
148
164
149
165
} // namespace vm
0 commit comments