Logo
Explore Help
Register Sign In
admin/j-lang
1
0
Fork 0
You've already forked j-lang
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
4442886afacfaccc8fe4e9964f2ba9be9e8c7e13
j-lang/projects/vm_simple.j

7 lines
69 B
Plaintext
Raw Normal View History

Add bytecode VM backend (compile AST to bytecodes + stack-based VM) New execution mode: ./run vm <file.j> compiles AST to bytecodes and runs them in a while/switch loop. Ints/floats live on the stack (no heap allocation), ~7.7x faster than the tree-walking interpreter. Implements: opcodes, compiler with backpatching (if/while), stack VM with arithmetic, comparisons, variables, strings, and print/println. Reorganizes backend into src/backend/eval/ and src/backend/bytecode/.
2026-02-18 01:01:22 +01:00
x = 0
while x < 10:
x = x + 1
if x > 1000000:
println("OK")
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 33ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API