On Fri, Jul 12, 2013 at 5:25 PM, Patrick Walton <pwal...@mozilla.com> wrote:
> On 7/12/13 4:45 PM, Patrick Walton wrote: > >> 1. Use the JS GC for everything; eat the cost of eagerly creating all >> wrappers. As Boris mentioned, maybe this isn't so bad. I would assume >> this is what Oilpan is doing in Blink. >> > > After talking to Terrence from the JS team, apparently with a month or two > of hacking on SpiderMonkey we might be able to allocate Rust objects of 18 > 64-bit words or fewer into the JS heap directly. In other words, fuse the > Rust structure with its wrapper. We could spill to the Rust heap from the > wrapper if and only if the object is more than 18 words. > > This would be similar to Blink's Oilpan project, but better because we can > take advantage of the compiler to generate the trace hooks instead of > having to manually write trace hooks and trace all the pointers. What would the developer experience be like with this approach? I mean, what kind of code would developers have to write to declare classes managed by JS and to declare references to such objects? Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o w * * _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo