How to create a new JVM language
summary
Creates a tiny JVM language that parses expressions with an ANTLR lexer/parser, builds a Truffle AST, and runs on the Truffle+Graal runtime inside HotSpot. The demo supports two numeric types (long and BigDecimal), specializes fast long arithmetic and automatically rewrites to a BigDecimal fallback on overflow or exceptions. Adds a simple async arrow implemented with CompletableFuture, debugs with readable node toString, and successfully evaluates expressions and gets optimized at runtime.
AI-written summary · about
chapters (37)
- 0:00Introduction
- 0:14About Oleg
- 1:40Tools
- 4:29Why
- 5:08Tradeoffs
- 5:49Mondrian
- 8:11Creating a language
- 10:06Lexing
- 11:34Compiler
- 12:30Process
- 14:11Your goal
- 14:42Solving is expensive
- 15:46Writing a language
- 16:21GRAIL
- 18:08Truffle
- 18:59Truffle ecosystem
- 20:10Simple language
- 21:44Mirroring
- 21:54Presentation Load
- 22:34IntelliJ IDEA
- 25:19Mathematical operators
- 26:27Commonline utility
- 27:39Mathbased listener
- 31:27Main class
- 33:18Tree traversal
- 34:39Notes
- 35:58Types
- 36:54Language Context
- 37:39Long Notes
- 38:30Big Decimal Notes
- 39:04Running Example
- 39:31Implementing Operations
- 42:14Division
- 43:31Calculator
- 46:53Divide
- 47:08Arithmetic Exception
- 52:04Concurrency
related talks
28mTruffle
53mUnveiling the Mysteries of GraalVM's Least Understood Component
01h 19mTowards the tower of Babel: a Polyglot Language VM in Java
52mPolyglot on the JVM with Graal: One VM for Java, node.js, Ruby, R, and C++!
54mDeveloper's Introduction to GraalVM
43mI built my own JVM language. Here's why and how
47mThe need for speed. What is GraalVM and how can it help you?
50mOne VM to Rule Them All
