当前位置: X-MOL 学术Softw. Pract. Exp. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Two decades of live coding and debugging of virtual machines through simulation
Software: Practice and Experience ( IF 2.6 ) Pub Date : 2020-05-08 , DOI: 10.1002/spe.2841
Daniel Ingalls 1 , Eliot Miranda 1 , Clément Béra 2 , Elisa Gonzalez Boix 2
Affiliation  

OpenSmalltalk‐VM is a virtual machine (VM) for languages in the Smalltalk family (eg, Squeak and Pharo), which is itself written in a subset of Smalltalk that can easily be translated to C. VM development is done in Smalltalk, an activity we call “simulation.” The production VM is then derived by translating the core VM code to C. As a result, two execution models coexist: simulation, where the Smalltalk code is executed on top of a Smalltalk VM, and production, where the same code is compiled to an executable through a C compiler. The whole VM execution can be simulated: the heap is represented as a huge byte array, the VM code is executed as Smalltalk, and the native code generated by the just‐in‐time (JIT) compiler is executed by a processor simulator. All the Smalltalk development tools, such as the debugger, are then available while simulating. In addition, in simulation, it is also possible to use debugging features such as single stepping in the machine code generated by the JIT compiler. The Smalltalk development tools combined with the simulation debugging features provide developers with a productive environment in which to extend and debug the VM. In this article, we detail the VM simulation infrastructure and report our experiences developing and debugging VM features within it such as the garbage collector and the JIT compiler.

中文翻译:

二十年通过仿真对虚拟机进行实时编码和调试

OpenSmalltalk-VM 是 Smalltalk 家族中的语言(例如 Squeak 和 Pharo)的虚拟机 (VM),它本身是用 Smalltalk 的一个子集编写的,可以很容易地翻译成 C。VM 开发是在 Smalltalk 中完成的,一个活动我们称之为“模拟”。然后通过将核心 VM 代码转换为 C 来派生生产 VM。因此,两种执行模型共存:模拟,其中 Smalltalk 代码在 Smalltalk VM 之上执行,以及生产,其中相同的代码被编译为可以通过 C 编译器执行。可以模拟整个 VM 执行:堆表示为一个巨大的字节数组,VM 代码作为 Smalltalk 执行,由即时 (JIT) 编译器生成的本机代码由处理器模拟器执行。所有 Smalltalk 开发工具,例如调试器,然后在模拟时可用。此外,在仿真中,还可以在 JIT 编译器生成的机器代码中使用单步调试等调试功能。Smalltalk 开发工具与模拟调试功能相结合,为开发人员提供了一个可扩展和调试 VM 的高效环境。在本文中,我们详细介绍了 VM 模拟基础架构,并报告了我们在其中开发和调试 VM 功能(例如垃圾收集器和 JIT 编译器)的经验。
更新日期:2020-05-08
down
wechat
bug