Java Source to Byte Code Transformation - The Hidden Story!
summary
Explains how ECJ turns .java text into .class bytes by running a generated scanner/parser to produce an abstract syntax tree, then layering phases: symbol resolution, type inference (diamond, lambdas), flow analysis (uninitialized vars, liveness), and codegen that computes max stack and emits local variable tables, stack map table and synthetic parameters like the implicit this. Mentions parser-generator use, refactoring via AST APIs, IDE hooks (type index used for Ctrl‑Shift‑T), and how finally/exception tables can produce duplicated bytecode paths.
AI-written summary · about
chapters (9)
- 0:00Java bytecode transformation intro
- 3:19Front end compilation
- 10:09Compiler grammar and errors
- 14:09Back end compilation stages
- 17:07Type inference and flow
- 23:05Stack maps and verification
- 25:22IDE compiler integration
- 27:32Records synthetic code
- 30:53Finally blocks in bytecode
related talks
57mDecoding Java: From Source Code to Bytecode
53mWell there's your problem! Your engine's missing! A look under Java's hood
39mBytecode Pattern Matching
36mFrom Scala to ByteCode...
41mUsing Byte Code Analysis to Modernize Your Java EE Applications
38mSource code manipulation (...)
45mMaking Java more dynamic
55mMaking Java More Dynamic
