TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

JavaScript: Servo’s only garbage collector

304 点作者 brson超过 10 年前

6 条评论

aboodman超过 10 年前
This is similarly motivated, and a similar approach to Oilpan in Chromium (<a href="http://www.chromium.org/blink/blink-gc" rel="nofollow">http:&#x2F;&#x2F;www.chromium.org&#x2F;blink&#x2F;blink-gc</a>).<p>But because Oilpan is written in C++, there is still some manual annotation of GC&#x27;d members that needs to be done.
评论 #8229085 未加载
mercurial超过 10 年前
Awesome writeup. It&#x27;s really interesting to see how some classes of errors can disappear entirely with the right technology.
评论 #8232567 未加载
haberman超过 10 年前
Does this suggest that &quot;Encodable&quot; isn&#x27;t the right name for this trait, if it&#x27;s being used for something that has nothing to do with encoding?<p>Visitable?
评论 #8229261 未加载
评论 #8229266 未加载
评论 #8229216 未加载
userbinator超过 10 年前
The interaction between native code and JS on the DOM is certainly an area of complexity and plenty of chance for subtle bugs in a browser implementation - I wonder if the observation that native code can only manipulate the DOM in a limited fashion compared to JS could be used to simplify things.<p>For example, the initial DOM tree will be created (by native code) when loading the document, and it needs to be freed as a whole when another (or the same) page is loaded. On the other hand, JS can create&#x2F;add&#x2F;remove objects on it, but they must not be freed if some parts of the tree still reference them. This suggests to me that some sort of ownership scheme is appropriate, and in the case of Servo they&#x27;ve decided to make the GC own everything - which certainly makes a lot of things easy - but it might be interesting to think of whether being able to transfer object ownership between GC and something else would have any advantages, e.g. &quot;all objects in the DOM tree of the document are owned by their parent, and objects not in the DOM tree because they&#x27;ve either been removed from it or newly created by JS are owned by the GC.&quot;
评论 #8231858 未加载
stonemetal超过 10 年前
Is there any plan to write a javascript engine in Rust as part of the servo project?
评论 #8233380 未加载
getsetgoweb超过 10 年前
Easy to use
评论 #8230602 未加载