面向对象虚拟机中的跨语言协作
Inter-language Collaboration in an Object-oriented Virtual Machine
摘要:
多语言虚拟机有很多优点。它们允许软件开发人员使用为不同的程序设计语言编写的软件库。此外,语言实现者不必为低级VM功能而烦恼,并且它们的实现可以从现有虚拟机中的优化中受益。MagLev是Ruby程序设计语言在GemStone/S虚拟机上的实现,用于Smalltalk程序设计语言。在这项工作中,我们提出了如何在这两种语言编写的软件组件可以相互作用。我们将展示MagLev如何统一Smalltalk和Ruby对象模型,同时考虑Smalltalk Meta类、Ruby单例类和Ruby模块。此外,我们还展示了如何从Smalltalk调用Ruby方法,反之亦然。我们还提出了MagLev的桥方法实现Ruby方法调用约定的概念。最后,我们将我们的解决方案与其他语言实现和虚拟机进行比较。
英文摘要:
Multi-language virtual machines have a number of advantages. They allow software developers to use software libraries that were written for different programming languages. Furthermore, language implementors do not have to bother with low-level VM functionality and their implementation can benefit from optimizations in existing virtual machines. MagLev is an implementation of the Ruby programming language on top of the GemStone/S virtual machine for the Smalltalk programming language. In this work, we present how software components written in both languages can interact. We show how MagLev unifies the Smalltalk and the Ruby object model, taking into account Smalltalk meta classes, Ruby singleton classes, and Ruby modules. Besides, we show how we can call Ruby methods from Smalltalk and vice versa. We also present MagLev's concept of bridge methods for implementing Ruby method calling conventions. Finally, we compare our solution to other language implementations and virtual machines.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。