@@ -21,13 +21,23 @@ pmclass SerializationContext auto_attrs dynpmc group nqp {
21
21
/* Description (probably the file name) if any. */
22
22
ATTR STRING *description;
23
23
24
+ /* Repossession info. The following RIA and RPA have matching indexes, each
25
+ * representing the integer of an object in our root set along with the SC
26
+ * that the object was originally from. */
27
+ ATTR PMC *rep_indexes;
28
+ ATTR PMC *rep_scs;
29
+
24
30
VTABLE void init() {
25
31
PMC *root_objects = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
26
32
PMC *root_stables = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
27
33
PMC *root_codes = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
34
+ PMC *rep_indexes = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
35
+ PMC *rep_scs = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
28
36
SET_ATTR_root_objects(interp, SELF, root_objects);
29
37
SET_ATTR_root_stables(interp, SELF, root_stables);
30
38
SET_ATTR_root_codes(interp, SELF, root_codes);
39
+ SET_ATTR_rep_indexes(interp, SELF, rep_indexes);
40
+ SET_ATTR_rep_scs(interp, SELF, rep_scs);
31
41
PObj_custom_mark_SET(SELF);
32
42
if (!smo_id)
33
43
smo_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "SixModelObject", 0));
@@ -38,7 +48,7 @@ pmclass SerializationContext auto_attrs dynpmc group nqp {
38
48
}
39
49
40
50
VTABLE void mark() {
41
- PMC *root_objects, *root_stables, *root_codes;
51
+ PMC *root_objects, *root_stables, *root_codes, *rep_indexes, *rep_scs ;
42
52
STRING *handle, *description;
43
53
GET_ATTR_root_objects(interp, SELF, root_objects);
44
54
Parrot_gc_mark_PMC_alive(INTERP, root_objects);
@@ -50,6 +60,10 @@ pmclass SerializationContext auto_attrs dynpmc group nqp {
50
60
Parrot_gc_mark_STRING_alive(INTERP, handle);
51
61
GET_ATTR_description(interp, SELF, description);
52
62
Parrot_gc_mark_STRING_alive(INTERP, description);
63
+ GET_ATTR_rep_indexes(interp, SELF, rep_indexes);
64
+ Parrot_gc_mark_PMC_alive(INTERP, rep_indexes);
65
+ GET_ATTR_rep_scs(interp, SELF, rep_scs);
66
+ Parrot_gc_mark_PMC_alive(INTERP, rep_scs);
53
67
}
54
68
55
69
VTABLE PMC* get_pmc_keyed_int(INTVAL idx) {
0 commit comments