Closed
Bug 543738
Opened 16 years ago
Closed 16 years ago
implement runtime type-descriptors
Categories
(Servo Graveyard :: Rust, enhancement)
Servo Graveyard
Rust
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: graydon, Assigned: graydon)
Details
The time has nearly come to wire the (currently ad-hoc generated and called) per-type glue functions together into general runtime type-descriptors. This is due to a requirement in bindings (bound functions and modules): the code working with the binding doesn't know the exact type of the bound tuple, so can't infer the type of memory operations required to properly free it when the binding refcount drops to zero.
Until this is done, bindings can *work* -- we can just call free() on the binding tuple -- but they'll be a bit limited; storing an exterior slot in a binding will cause it to leak. GC'ing them won't work at all, but GC is busted at the moment anyway. No big loss, yet.
We have two broad categories of type-descriptor available to us as options. The first is to reuse DWARF for the task, and write DWARF-driven generic functions. The second is to make up our own in-memory structure (eg. "tables full of pointers to helper functions"). The latter will almost certainly run faster, the former will help other tools interact with us better.
A possible blended approach is to use DWARF extension fields, such that we store pointers to DWARF DIEs as our type-descriptors, but the DWARF DIEs in turn have some custom attributes that point back into various bits of glue code as helpers.
This problem involves a pair of tradeoff dimensions: space/time and complexity/generality. Happy to discuss further. I can get bindings limping along (no exteriors) using the existing approach so it's not super urgent, just needs to be done eventually.
| Assignee | ||
Updated•16 years ago
|
Assignee: nobody → graydon
| Assignee | ||
Comment 1•16 years ago
|
||
Implemented in 355140d43eda.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Group: servo
You need to log in
before you can comment on or make changes to this bug.
Description
•