Documentation for PerlOnJava's custom bytecode interpreter — the second execution backend that complements the primary JVM bytecode emitter.
The interpreter exists for two reasons:
eval STRING— Evaluating Perl strings at runtime without the overhead of generating and loading a new JVM class for every eval.- Large subroutine fallback — When a generated
apply()method would exceed the JVM 64 KB bytecode limit, the compiler falls back to the interpreter for that subroutine automatically.
| Document | Description |
|---|---|
| BYTECODE_DOCUMENTATION.md | Opcode reference: all custom opcodes and their semantics |
| OPCODES_ARCHITECTURE.md | How the opcode set is structured |
| CLOSURE_IMPLEMENTATION_COMPLETE.md | Closure capture and execution in the interpreter |
| CLOSURE_IMPLEMENTATION_STATUS.md | Current closure support status |
| EVAL_STRING_SPEC.md | eval STRING compilation and execution spec |
| OPTIMIZATION_RESULTS.md | Measured speedups from interpreter optimizations |
| STATUS.md | Current production-readiness status |
| TESTING.md | How to run interpreter-specific tests |
| architecture/ | Deeper architecture docs (error reporting, slow opcodes, phase-2 plan) |
| tests/ | Interpreter-specific test files |
# Force interpreter mode for a script
./jperl --interpreter script.pl
# Run with interpreter fallback enabled (default)
./jperl script.pl
# Disable fallback (JVM only, fails on >64 KB methods)
JPERL_DISABLE_INTERPRETER_FALLBACK=1 ./jperl script.pldev/architecture/large-code-refactoring.md— How the compiler decides when to fall backdev/design/interpreter.md— High-level interpreter design documentdev/design/interpreter_benchmarks.md— Performance comparison numbers