How julialang/julia works
Julia is a high-level, high-performance dynamic language for technical computing. The principal user workflow is entering expressions at the terminal prompt and having the runtime evaluate them; internally, Julia also provides compilation, memory management, I/O, and coverage capabilities. The graph combines README-described behavior with source-index references. Many runtime stages are represented from the tree and module names, but their call relationships are omitted or marked unverified where the excerpts do not establish them.
Main entry points: interpreter.c Interpreter · loader_exe.c CLI and loader · julia_scanning.rs Julia GC scanning · pipeline.cpp LLVM pipeline
Components 20
User entry
- CLI and loader
cli/loader_exe.c
Language runtime
- FemtoLisp
src/flisp/flisp.c - Syntax and AST
src/ast.c - Interpreter
src/interpreter.c - Types and values
src/jltypes.c - Methods and dispatch
src/method.c
Compilation
- Inference engine
src/engine.c - LLVM pipeline
src/pipeline.cpp - Code generation
src/codegen.cpp - JIT layers
src/jitlayers.cpp - AOT compilation
src/aotcompile.cpp
Memory management
- MMTk collector bridge
src/gc-mmtk/gc-mmtk.c - Julia GC scanning
src/gc-mmtk/mmtk_julia/src/julia_scanning.rs - MMTk Julia API
src/gc-mmtk/mmtk_julia/src/api.rs - GC slots
src/gc-mmtk/mmtk_julia/src/slots.rs
Runtime services
- Buffered I/O
src/support/ios.c - Code coverage
src/coverage.c - Tasks and scheduling
src/scheduler.c - Runtime API
src/jlapi.c
Other components
- Terminal user
Connections 20
- Terminal user → CLI and loader: enters expressions
README.md - CLI and loader → Interpreter: evaluates input
- Interpreter → Syntax and AST: uses syntax
- Interpreter → FemtoLisp: uses interpreter
- Interpreter → Methods and dispatch: dispatches methods
- Methods and dispatch → Types and values: uses type data
- Interpreter → Inference engine: requests inference
- Inference engine → LLVM pipeline: compiles code
- LLVM pipeline → JIT layers: uses JIT layers
src/pipeline.cpp - LLVM pipeline → Code generation: uses code generation
- JIT layers → Code generation: uses code generation
- CLI and loader → AOT compilation: offers compilation
- MMTk collector bridge → MMTk Julia API: uses API
src/gc-mmtk/gc-mmtk.c - Julia GC scanning → MMTk Julia API: uses API
src/gc-mmtk/mmtk_julia/src/julia_scanning.rs - Julia GC scanning → GC slots: uses slots
src/gc-mmtk/mmtk_julia/src/julia_scanning.rs - Julia GC scanning → MMTk collector bridge: coordinates collection
- Interpreter → Buffered I/O: uses I/O
- JIT layers → Code coverage: registers counters
src/coverage.c - Interpreter → Tasks and scheduling: uses tasks
- CLI and loader → Runtime API: loads runtime