尚未生成 AI 速览(可能缺少 API key 或等待下次运行补跑)。
Dynamic programming languages pose significant challenges for optimizing compilers due to features such as dynamic typing, late binding, reflection, copy-on-write, and delayed evaluation. To generate efficient code, compilers must speculate on which dynamic features will be exercised and produce specialized code based on these assumptions. This article presents the design of a statically typed, high-level intermediate representation (IR) that makes dynamic behaviors explicit and amenable to static analysis. Our IR combines gradual typing with ownership tracking, and explicitly represents promises, multiple function versions, and contextual dispatch. Together, these features directly support optimizations such as specialization, inlining, scope elision, and copy elimination. We formalize a core calculus, called FIŘ, that captures the essential features required for these optimizations. We provide an operational semantics, a type system, and flow and reflection analyses, and we prove the soundness of the type system.
DOI 原文 ·
@article{paperbot3953,
title = {A Typed Intermediate Representation for Dynamic Languages},
author = {Mickaël Laurent and Jakob Hain and Filip Křikava and Sebastián Krynski and Jan Vitek},
journal = {ACM Transactions on Programming Languages and Systems},
volume = {48},
number = {2},
year = {2026},
doi = {10.1145/3811921}
}