哪些应用程序虚拟机是用高级语言编写的?
有哪些应用程序虚拟机是用高级语言编写的? C/C++ 看起来像是首选语言(原因显而易见)。
我在谷歌上发现至少有两个用Java编写的(都是元循环): JikesRVM 和玛克辛。
你还发现了什么吗?
What application virtual machines are out there that are written in higher level languages? C/C++ looks like the languages of choice (for obvious reasons).
What I have found on google is at least two written in Java (both meta-circular) :
JikesRVM and Maxine.
Anything else that you have found?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
其中,最有趣的是 Klein 和 Maxine(其设计实际上是基于 Klein 的)。 Metacircular Lisp 和Scheme 实现通常假设存在一些基本的原始特殊形式,然后必须以汇编语言、C 语言或该语言的有限子集以低级样式实现它们。 Squeak 和 PyPy 使用该语言的有限子集。吉克斯使用“神奇”的方法和低级的风格。
Klein 和 Maxine 的想法是,一切都是以高级的、面向对象的、富有表现力的、惯用的风格编写的。在当前版本的Klein中,只有两个微小的地方受到了一些限制:在消息发送的实现中,你不能发送任何消息;在对象克隆的实现中,你不能克隆任何对象。然而,当前的编译器实际上可以内联甚至完全优化对象克隆和消息发送,因此这两个地方可以用正常的 OO Self 风格重写——只是还没有人这样做。
所有这些都只是超圆形虚拟机。还有其他用高级语言编写的 VM:
Of those, the most interesting are Klein and Maxine (whose design is actually based on Klein). Metacircular Lisp and Scheme implementations usually assume the existence of some basic primitive special forms, which then have to be implemented in assembler, C or a limited subset of the language in a low-level style. Squeak and PyPy use a limited subset of the language. Jikes uses "magic" methods and low-level style.
The idea of Klein and Maxine is that everything is written in high-level, object-oriented, expressive, idiomatic style. In the current version of Klein, there are only two tiny places where the style is hampered by some restriction: in the implementation of message sending, you cannot send any messages and in the implementation of object cloning you cannot clone any objects. However, the current compiler can actually inline or even completely optimize away object cloning and message sending, so those two places could be rewritten in normal OO Self style – it's just that nobody has done it yet.
All of that was just metacircular VMs. There's also other VMs written in high-level languages:
更多的VM实现是用TCL(工具命令语言)和lua(有时称为java)实现的,还有一些是用汇编程序编写的。其他变体是用制造商的计算机硬件系统编程语言编写的。
Some more VM implementations are in TCL (tool command language) and lua (sometimes named as java) and some are written in an assembler. Other variants are written in a computer hardware system programming language of the manufacturer.