Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

JavaScript Expression to Stack IR

This example demonstrates the core concept of compiling a simple JavaScript-like arithmetic expression into a low-level, stack-based Intermediate Representation (IR). It then simulates the execution of this IR using a minimalistic virtual machine, devoid of typical JavaScript runtime features like garbage collection or dynamic typing. This approach mirrors the article's goal of running JavaScript on bare-metal with a minimal footprint.

Language

python

How to Run

Save the code as main.py. Run from your terminal: python main.py

Original Article

This example accompanies the Turkish article: JavaScript Sözdizimini LLVM IR Üzerinden Bare-Metal x86'ya Derlemek: Çalışma Zamanı Olmayan, Çöp Toplayıcısız, 64KB Unikernel Macerası.

License

MIT — see LICENSE.

About

This example demonstrates the core concept of compiling a simple JavaScript-like arithmetic expression into a low-level, stack-based Intermediate Representation (IR). It then simulates the execution of this IR using a minimalistic virtual machine, devoid of typical JavaScript runtime features like garbage collection or dynamic typing. This approach

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages