[Fred] > Have we become convinced that these cells need to be Python objects? No, it's just easier that way. The existing dict code maps PyObject* to PyObject*, so we'd have to copy and fiddle *all* of the dict code if a celldict wants to map to anything other than a PyObject*. > I must have missed that. As long as we can keep them simple > structures, we should be able to avoid individual allocations for > them. It seems we have a fixed number of cells for both module > objects and function objects (regardless of whether they are part of > the new celldict or the containing function or module), so they can be > allocated as an array rather than individually. > > So, I must be missing something. cells don't live in function objects; a function object only has a vector of pointers *to* cells, and that is indeed a contiguous, fixed-size array. cells are the values in celldicts, and that's the only place they appear, and celldicts can grow dynamically (import fred; fred.brandnew = 1).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4