Closed dcurrie closed 8 years ago
Storage is necessary, because some data types want to hold picrin objects, and GC needs to properly mark&sweep them.
OK, but isn't that what pic_data_type.mark is for?
@dcurrie
Well, yes it is, but normal users should not use it. I originally planned to get rid of that field because it extremely slows down the mark phase in some cases. But I found it was hard to refactor, so have left it unrefactorred. As of now pic_data_type.mark is only used by callcc-nitro, which copies the interpreter stack, callframes, jmp_buf, and almost everything unfriendly to GC. In order to remove custom markers, making the continuation object a part of the core would be straightforward, though it is difficult to design clean and reusable APIs and I have had no good idea about that. Also, thinking about adding a native implementation of delimited continuations or something in future, I haven't decided my mind yet.
@dcurrie
I noticed that attribute
replaces pic_data's dict, so I'll merge this :)
struct pic_data
has adict
field that is initialized but never referenced. This patch removes that field.