学习在线语言
有谁知道有什么好的资源可以学习如何使用命令的深入描述等进行 CIL 编程吗? 我环顾四周但没有发现任何特别好的东西。
Does anybody know any good resources for learning how to program CIL with in-depth descriptions of commands, etc.? I have looked around but not found anything particularly good.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我书架上唯一的 CIL 书是 Serge Lidin 的 Expert .NET 2.0 IL Assembler 。 就各个操作码的作用或含义而言,System.Reflection.Emit 上的 Microsoft 文档提供了一些非常好的信息。 使用 Reflector 查看现有 IL 总是有用的。
编辑: CIL(实际上是一般的 CLR)在 .NET 2.0 和 .NET 3.5 之间没有发生任何变化——底层运行时基本相同,模数修复和性能改进。 因此,CIL 级别上没有什么比 2.0 书中的内容更新的了
The only CIL book on my shelf is Expert .NET 2.0 IL Assembler by Serge Lidin. In terms of what the individual opcodes do or mean, the Microsoft documentation on System.Reflection.Emit has some pretty good information. And it's always useful to look at existing IL with Reflector.
Edit: CIL (and indeed the CLR in general) has not changed at all between .NET 2.0 and .NET 3.5 -- the underlying runtime is basically the same, modulo fixes and performance improvements. So there's nothing newer available on a CIL level than what would be in a book on 2.0
Serge Lidin 的专家 .NET 2.0 IL 汇编程序
有一个 1.1 版本同一本书,但我还没有看到最新的 .NET 版本的任何内容。 这是一本很棒的书。 我用它在 MSIL 中编写了一个 OCR 组件,作为一个学习项目。
[编辑] @Curt 是对的,3.0 和 3.5 只是 2.0 的扩展,我还没有将其插入我的脑海中。 现在我想到了一个有趣的极客项目...将标准 2.0 代码的反汇编与执行过滤列表等常见任务的新 LINQ/Lambda 方式进行比较。 出于某种原因,我认为神奇的事情发生在新的 IL 功能中,而不仅仅是编译器。
Expert .NET 2.0 IL Assembler by Serge Lidin
There was a 1.1 version of the same book, but I haven't seen anything for the latest .NET release. It's an excellent book. I used it to write an OCR component in MSIL, as a learning project.
[Edit] @Curt is right, 3.0 and 3.5 are just extensions to 2.0, I hadn't plugged that in to my head yet. Now I've thought of a fun geek project... compare the disassembly of standard 2.0 code to the new LINQ/Lambda way of performing common tasks like filtering lists. For some reason I assumed that the magic was happening in new IL features, not just the compiler.
Expert .NET 2.0 IL Assembler 很震撼,因为作者写得很好,包含了你所看到的每一个令人惊奇的细节可以想象。 他编写了 IL 汇编器、反汇编器和验证器,这并没有什么坏处。 最重要的是,您可以购买 PDF 版本的文件,而不是购买死树。
对编译器开发感兴趣的受虐狂也会喜欢针对 .NET 公共语言运行时进行编译作者:约翰·高夫。 我发现这本书在虚拟机开发项目中非常有帮助,我从 CLR 设计中“窃取”了很多想法。
Expert .NET 2.0 IL Assembler rocks because the author writes well and includes every freaking detail you can imagine. It doesn't hurt that he wrote the IL assembler, disassembler and validator. Best of all you can buy it in a PDF instead of a dead tree.
Masochists interested in compiler development will also enjoy Compiling for the .NET Common Language Runtime by John Gough. I found this book immensely helpful during a virtual machine development project where I "stole" lots of ideas from the CLR design.