So, well, I was just curious about the Android runtime, and why its whole environment is built around Java specifically. Why the fuck do people there worship Java like it's their second wife, and why do some people call it "native"? I mean, it's worth studying.

I actually found some crazy things out.

The first thing is that Android originally used the Dalvik runtime. Dalvik executed Android's .dex bytecode, initially relying heavily on interpretation and later adding JIT compilation to compile frequently executed code into native machine code at runtime.

But that was before Android 5.0.

When Android released 5.0, they introduced ART, the Android Runtime, as the replacement for Dalvik. ART initially used ahead-of-time (AOT) compilation, meaning application code could be compiled into native machine code before it was executed.

Later, Android evolved ART to use a combination of AOT and JIT compilation. The basic idea is that some compilation and optimization can happen ahead of time, while JIT can observe what actually happens at runtime and optimize code based on real execution behavior. So the runtime can make better decisions using information that simply wasn't available before the application actually ran.

Whatever, my question wasn't really about the runtime, though. I just had this weird question:

Can I make my own programming language, compile it directly to ARM64 machine code, make it compatible with my damn Android phone, and have it run there and display some text to me?

That's it.

And that's where this note is going to continue.

Right now, I'm just preserving the state of this.


references:

backlinks