Deoptimization for Dynamic Language JITs on Typed, Stack-based Virtual Machines

被引:0
|
作者
Kedlaya, Madhukar N. [1 ]
Robatmili, Behnam [2 ]
Cascaval, Calin [2 ]
Hardekopf, Ben [1 ]
机构
[1] Univ Calif Santa Barbara, Santa Barbara, CA 93106 USA
[2] Qualcomm Res Silicon Valley, Santa Clara, CA USA
关键词
deoptimization; !text type='Java']Java[!/text]Script; type specialization; virtual machine; language implementation;
D O I
10.1145/2674025.2576209
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We are interested in implementing dynamic language runtimes on top of language-level virtual machines. Type specialization is a critical optimization for dynamic language runtimes: generic code that handles any type of data is replaced with specialized code for particular types observed during execution. However, types can change, and the runtime must recover whenever unexpected types are encountered. The state-of-the-art recovery mechanism is called deoptimization. Deoptimization is a well-known technique for dynamic language runtimes implemented in low-level languages like C. However, no dynamic language runtime implemented on top of a virtual machine such as the Common Language Runtime (CLR) or the Java Virtual Machine (JVM) uses deoptimization, because the implementation thereof used in low-level languages is not possible. In this paper we propose a novel technique that enables deoptimization for dynamic language runtimes implemented on top of typed, stack-based virtual machines. Our technique does not require any changes to the underlying virtual machine. We implement our proposed technique in a JavaScript language implementation, MCJS, running on top of the Mono runtime (CLR). We evaluate our implementation against the current state-of-the-art recovery mechanism for virtual machine-based runtimes, as implemented both in MCJS and in IronJS. We show that deoptimization provides significant performance benefits, even for runtimes running on top of a virtual machine.
引用
收藏
页码:103 / 114
页数:12
相关论文
共 26 条
  • [1] Stack-based typed assembly language
    Morrisett, G
    Crary, K
    Glew, N
    Walker, D
    [J]. JOURNAL OF FUNCTIONAL PROGRAMMING, 2002, 12 : 43 - 88
  • [2] Stack-based typed assembly language
    Morrisett, Greg
    Crary, Karl
    Glew, Neal
    Walker, David
    [J]. Journal of Functional Programming, 2002, 12 (01) : 43 - 88
  • [3] Factor: A Dynamic Stack-based Programming Language
    Pestov, Slava
    Ehrenberg, Daniel
    Groff, Joe
    [J]. ACM SIGPLAN NOTICES, 2010, 45 (12) : 43 - 57
  • [4] Treegraph-based Instruction Scheduling for Stack-based Virtual Machines
    Park, Jiin
    Park, Jinhyung
    Song, Wonjoon
    Yoon, Songwook
    Burgstaller, Bernd
    Scholz, Bernhard
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2011, 279 (01) : 33 - 45
  • [5] A typed, compositional logic for a stack-based abstract machine
    Benton, N
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2005, 3780 : 364 - 380
  • [6] Strongly-Typed Multi-View Stack-Based Computations
    Koopman, Pieter
    Lubbers, Mart
    [J]. PROCEEDINGS OF THE 25TH INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING, PPDP 2023, 2023,
  • [7] IMPLEMENTING DATA ABSTRACTION FEATURES IN A STACK-BASED LANGUAGE
    GANNON, JD
    ROSENBERG, J
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 1979, 9 (07): : 547 - 560
  • [8] A lightweight Java']Java virtual machine for a stack-based microprocessor
    Raner, M
    [J]. USENIX ASSOCIATION PROCEEDINGS OF THE 2ND JAVA(TM) VIRTUAL MACHINE RESEARCH AND TECHNOLOGY SYMPOSIUM, 2002, : 181 - 194
  • [9] Performing stack-based genetic programming using the Java']Java Virtual Machine stack
    Steinhoff, RJ
    [J]. 7TH WORLD MULTICONFERENCE ON SYSTEMICS, CYBERNETICS AND INFORMATICS, VOL XIII, PROCEEDINGS: SYSTEMICS, CYBERNETICS AND INFORMATICS: TECHNOLOGIES AND APPLICATIONS, 2003, : 65 - 69
  • [10] Cat: A functional stack-based language - An intermediate language for program verification, optimization, and more!
    Diggins, Christopher
    [J]. DR DOBBS JOURNAL, 2008, 33 (05): : 22 - +