On 7/23/13 7:08 PM, Boris Zbarsky wrote:
On 7/23/13 6:34 PM, Josh Matthews wrote:
Accordingly, there are now branches of servo, rust-mozjs,
and mozjs (all named 'inline') that contain my work to date on storing
DOM objects inline in their JS wrappers' fixed slots. There are some
rooting problems that make it crash once in a while, but otherwise
test_bindings.html runs to completion on a regular basis.
How does the resulting rust-side code look? Is is sufficiently like
idiomatic rust?
Basically, would like to avoid us just pushing the complexity of
implementing a DOM object from CC boilerplate to access-to-members
boilerplate...
Note that the Rust compiler is missing a feature needed for automatic
generation of trace hooks: external #[deriving] implementations. This is
a sub-bug of "allow procedural macros to be defined outside the
compiler" (and should be fairly straightforward once that is
implemented). This feature is scoped for Rust 1.0 but is not yet
implemented.
Also, I imagine this feature will benefit from the yet-to-be-implemented
compiler support for custom smart pointers (and in fact this sort of
thing in Servo was much of the reason for my pushing this feature). This
should make accessing members of these DOM nodes more idiomatic. My
"Removing Garbage Collection from the Rust Language" blog post describes
the plan very briefly, but Niko and I need to iron out the exact details
still. Work related to this is underway in the Rust compiler (in
particular removing `@fn`).
Patrick
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo