polyglot-compiler / JLang

JLang: Ahead-of-time compilation of Java programs to LLVM
http://polyglot-compiler.github.io/JLang/
Other
284 stars 29 forks source link

Move initialization of thread and system classes before the main function starts #49

Closed guoyiteng closed 4 years ago

guoyiteng commented 4 years ago

I plan to add those global locks later in the PR adding the multithread support. If we assume the program is single-threaded, this PR should be safe to use. A roadmap I had in mind is to implement synchronized in the frontend first and then add multithreading support (including global locks, active threads data structure).

dz333 commented 4 years ago

Ok cool that sounds perfectly reasonable.

andrewcmyers commented 4 years ago

If you don't have multithreading, how will you know if synchronized is implemented correctly?