技术控

    今日:68| 主题:49270
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Rust 1.12 Brings Mid-Level IR

[复制链接]
范德萨 发表于 2016-10-5 14:35:19
148 1

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
The Rust core team has released the stable version of 1.12, calling it one of the most significant Rust releases since 1.0. The release brings the long-awaited Mid-Level IR (MIR), paving the way for future compiler optimisations.
   In the blog post Introducing MIR Mozilla's Niko Matsakis said:
   MIR comes between the existing HIR (“high-level IR”, roughly an abstract syntax tree ) and LLVM (the “low-level” IR.) Previously, the “translation” phase in the compiler would convert from full-blown Rust into machine-code-like LLVM in one rather large step. But now, it will do its work in two phases, with a vastly simplified version of Rust – MIR – standing in the middle.
   Rust contributor Steve Klabnik says that the simplified translation pass creates opportunities to perform new optimisations directly on the MIR.
  While the Rust team claim that MIR doesn't bring anything "user-visible" Matsakis details a faster compilation time, with incremental compiling, along with a faster execution time, and more precise type checking.
   The latest stable release brings some significant updates that are user visible, including a new format for rustc error messages, as show below:
   
Rust 1.12 Brings Mid-Level IR-1 (simplified,abstract,releases,released,existing)

  The team explains:
  [the new error format] helps to surface a lot of the internal knowledge about why an error is occurring to you, the developer. It does this by putting your code front and center, highlighting the parts relevant to the error with annotations describing what went wrong.
  In the new error format we represent the error by showing the points in the code that matter the most.
   Initially, this error design was built to aid in understanding borrow-checking errors, but we found the format can be broadly applied to a wide variety of errors. If you would like to learn more about the design, check out the previous blog post on the subject .
   Mozilla engineer Jonathan Turner described the significance of this change in the blog post Shape of Errors to Come , saying that by using the code the developer wrote as the context, Rust gives an easy way to know at a glance where the issue is occurring.
   Also new in the 1.12 release is the workspaces feature for Cargo, allowing a group of Rust packages to share the same Cargo.lock file making it easier for developers to be able to keep shared dependencies on a single version.
   Detailed release notes for Rust 1.12 are available on GitHub , and the release can be downloaded from here .
友荐云推荐




上一篇:High-performance Computing with Amazon’s X1 Instance
下一篇:Introducing the Auth0 JWT Handbook
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

夜南 发表于 2016-10-5 21:30:52
楼主的帖子实在是写得太好了。文笔流畅,修辞得体!
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表