代码改变世界

compiler explorer

2022-10-15 14:12  youxin  阅读(286)  评论(0编辑  收藏  举报

Compiler Explorer is an interactive compiler exploration website. Edit code in C, C++, C#, F#, Rust, Go, D, Haskell, Swift, Pascal, ispc, Python, Java or in any of the other 30+ supported languages, and see how that code looks after being compiled in real time. Multiple compilers are supported for each language, many different tools and visualisations are available, and the UI layout is configurable (thanks to GoldenLayout).

 

Compiler Explorer 是一个交互式的编译浏览网站(也可本地部署),它使用nodejs,支持30多种编程语言,可实时浏览编译后的汇编代码。

Compiler Explorer的编译浏览功能源自编译器,它通过讲编译汇编的参数传入给编译器执行,并获取相应的结果展示在网页上,极大地提高了系统底层的学习和代码验证的效率。

 

C++ insights

C++ insights[9]是基于clang的源码到源码转换工具,可以帮助我们了解编译器在背后所做的一些代码转换工作,可以用来直观理解lambda表达式、range-based循环、auto自动类型推导 和 结构化绑定等语法的工作原理,例如下图右侧窗口展示了结构化绑定和auto自动类型推导转换后的c++源代码。

 

每一个C++开发者都应该知道的线上工具