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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Browser as an Interactive Disassembler (2015)

66 点作者 Halienja将近 9 年前

2 条评论

userbinator将近 9 年前
<i>The code produced by a compiler is usually well-behaved: it uses well-defined calling conventions, keeps the stack balanced, does not self-modify at all or limits self-modification to certain sites.</i><p>Incidentally, this is one of the ways in which you can distinguish between compiler output and human-written Asm... and likewise, why compilers just &quot;aren&#x27;t quite there&quot; in terms of &quot;extreme&quot; optimisation. Calling conventions are pretty much the first thing to go; it&#x27;s common to have functions that return as many values as there are registers, use a per-function combination of registers for arguments&#x2F;return values, or access its <i>caller</i>&#x27;s &quot;local variables&quot; directly --- all of which compilers would find very difficult to produce via optimisation even if it could be expressed in the higher-level language.
评论 #11748552 未加载
rosstex将近 9 年前
TLDR; Compilers break a for loop into three distinct loop portions -- a main loop where special invariants are satisfied (and thus less checks are required), and pre&#x2F;post loops with additional bounds checks.