
AbstractJust-in-time (JIT) compilation has become a common tool for language runtimes. JIT compilers have a reputation for being complex, leaving a pedagogical gap between foundational Ahead-of-Time (AOT) concepts and dynamic code generation. This paper presents an incremental, classroom-scale approach to building a JIT compiler in manageable steps. By contrasting an AOT and a JIT backend, we expose core dynamic concerns, including executable buffers, persistent interactive state, mutation, and runtime type optimizations.
The result is a minimal yet realistic educational JIT that successfully supports a Read-Eval-Print Loop (REPL) and a first-call specialization mechanism.Formats availableYou can view the full content in the following formats:References[1]Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. 1986. Compilers, Principles, Techniques, and Tools .
Addison-Wesley, Reading, MA, USA.[2]Jonathan Aldrich. 2025. 17-363/17-663: Programming Language Pragmatics. Carnegie Mellon University. https://www.cs.cmu.edu/~aldrich/courses/17-363-fa25/. Accessed: 2026-05-17.[3]John Aycock. 2003. A brief history of just-in-time.
ACM Comput. Surv. 35, 2 (June 2003), 97–113.[4]Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan Edelman. 2012. Julia: A Fast Dynamic Language for Technical Computing. arXiv:1209.5145 [cs.PL][5]Carl Friedrich Bolz, Antonio Cuni, Maciej Fijalkowski, and Armin Rigo. 2009.
Tracing the meta-level: PyPy’s tracing JIT compiler. In Proceedings of the 4th Workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems (Genova, Italy) (ICOOOLPS ’09) . Association for Computing Machinery, New York, NY, USA, 18–25.[6]CensoredUsername. 2024. dynasm-rs: A Rust assembler library for dynamic code generation. https://github.com/CensoredUsername/dynasm-rs. Accessed: 2026-05-16.[7]C.
Chambers and D. Ungar. 1989. Customization: optimizing compiler technology for SELF, a dynamically-typed object-oriented programming language. In Proceedings of the ACM SIGPLAN 1989 Conference on Programming Language Design and Implementation (Portland, Oregon, USA) (PLDI ’89) .
Association for Computing Machinery, New York, NY, USA, 146–160.[8]Maxime Chevalier-Boisvert and Marc Feeley. 2015. Simple and Effective Type Check Removal through Lazy Basic Block Versioning. In 29th European Conference on Object-Oriented Programming (ECOOP 2015) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 37), John Tang Boyland (Ed.). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 101–123.[9]Cliff Click and Michael Paleczny. 1995.
A simple graph-based intermediate representation. SIGPLAN Not. 30, 3 (March 1995), 35–49.[10]L. Peter Deutsch and Allan M. Schiffman. 1984.
Efficient implementation of the Smalltalk-80 system. In Proceedings of the 11th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (Salt Lake City, Utah, USA) (POPL ’84) . Association for Computing Machinery, New York, NY, USA, 297–302.[11]Gilles Duboscq, Lukas Stadler, Thomas Würthinger, Doug Simon, Christian Wimmer, and Hanspeter Mössenböck. 2013. Graal IR: An Extensible Declarative Intermediate Representation.
In Proceedings of the Asia-Pacific Programming Languages and Compilers Workshop (APPLC).[12]Gilles Duboscq, Thomas Würthinger, Lukas Stadler, Christian Wimmer, Doug Simon, and Hanspeter Mössenböck. 2013. An intermediate representation for speculative optimizations in a dynamic compiler. In Proceedings of the 7th ACM Workshop on Virtual Machines and Intermediate Languages (Indianapolis, Indiana, USA) (VMIL ’13) . Association for Computing Machinery, New York, NY, USA, 1–10.[13]Clark Gaebel. 2016.
The sexp crate: A small, simple, self-contained, s-expression parser and pretty-printer. https://crates.io/crates/sexp.Accessed: 2026-05-17.[14]Andreas Gal, Brendan Eich, Mike Shaver, David Anderson, David Mandelin, Mohammad R. Haghighat, Blake Kaplan, Graydon Hoare, Boris Zbarsky, Jason Orendorff, Jesse Ruderman, Edwin W. Smith, Rick Reitmaier, Michael Bebenita, Mason Chang, and Michael Franz. 2009. Trace-based just-in-time type specialization for dynamic languages.
In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation (Dublin, Ireland) (PLDI ’09) . Association for Computing Machinery, New York, NY, USA, 465–478.[15]Abdulaziz Ghuloum. 2006. An Incremental Approach to Compiler Construction. In Proceedings of the 2006 Scheme and Functional Programming Workshop . http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf[16]Google. [n. d.].
V8-TurboFan Documentation. https://v8.dev/docs/turbofan. Accessed: 2026-05-17.[17]Tobias Hartmann. 2014. JEP 197: Segmented Code Cache. https://openjdk.org/jeps/197. OpenJDK.[18]Urs Hölzle, Craig Chambers, and David Ungar. 1992.
Debugging optimized code with dynamic deoptimization. In Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation (San Francisco, California, USA) (PLDI ’92) . Association for Computing Machinery, New York, NY, USA, 32–43.[19]Urs Hölzle and David Ungar. 1994. Optimizing Dynamically-Dispatched Calls with Run-Time Type Feedback.
In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation (PLDI ’94) . Association for Computing Machinery, 326–336.[20]Neil D. Jones. 1996. An introduction to partial evaluation.
ACM Comput. Surv. 28, 3 (Sept. 1996), 480–503.[21]Ben Lerner. 2024. CS 4410/6410: Compiler Design. Northeastern University Khoury College of Computer Sciences. https://course.ccs.neu.edu/cs4410sp24/.
Accessed: 2026-05-17.[22]John McCarthy. 1960. Recursive functions of symbolic expressions and their computation by machine, Part I. Commun. ACM 3, 4 (April 1960), 184–195.[23]Steven S.
Muchnick. 1997. Advanced Compiler Design and Implementation . Morgan Kaufmann Publishers Inc., San Francisco, CA, USA. 856 pages.[24]Max S. New. 2023.
EECS 483: Compiler Construction. University of Michigan. https://maxsnew.com/teaching/eecs-483-fa23/. Accessed: 2026-05-17.[25]Michael Paleczny, Christopher Vick, and Cliff Click. 2001. The Java HotSpot™ Server Compiler.
In Proceedings of the 2001 Symposium on Java™ Virtual Machine Research and Technology Symposium - Volume 1 (Monterey, California) (JVM’01) . USENIX Association, USA, 1.[26]Mike Pall. [n. d.]. LuaJIT: The Just-In-Time Compiler for Lua. https://luajit.org/. Accessed: 2026-05-17.[27]Zachary Palmer. 2025.
CS 75: Compilers. Swarthmore College. https://www.cs.swarthmore.edu/~zpalmer/cs75/s25/. Accessed: 2026-05-17.[28]Joe Politz. 2024. CSE 231: Advanced Compiler Design.
University of California, San Diego. https://ucsd-cse231.github.io/sp24/. Accessed: 2026-05-17.[29]Matija Šipek, Branko Mihaljević, and Aleksander Radovan. 2021. Exploring Aspects of Polyglot High-Performance Virtual Machine GraalVM. CoRR abs/2112.14716 (2021). arXiv:2112.14716[30]David Van Horn. 2025.
CMSC 430: Design and Implementation of Programming Languages. University of Maryland. https://www.cs.umd.edu/class/fall2025/cmsc430/Syllabus.html. Accessed: 2026-05-17.
Texto de dl.acm.org tal como lo publicó, leído de su página y mostrado aquí con el formato de El Autómata. El original, en dl.acm.org · Volver a la noticia de El Autómata