Suppose I write a programming language; for the namesake, I'll call him lang .
To start the long road of writing lang , I decided to start by writing lang on my own. I can not start it, because there is nothing to start a program that starts itself.
So, I start by writing another compiler for lang in Java. This time, when I finished, I decided to convert it to Bytecode and leave it to that. I now have a working compiler that converts all my lang code to Bytecode.
So, I decided to plug my own compiler for the language into the compiler that I just made in Java. Then I convert the self-compiler to Bytecode and pull out the Java compiler. I now have a lang compiler written by itself, converted to Bytecode, ready to use.
This creates a solid program, and I understand all this, but my question is about the compiler design for the JVM , what if I decide to release an update for my language? How do I update Bytecode? Am I just overwriting the updated version of the language in an older version?
I ask about it because it is what I want to do. Write a non-existent language by itself, and then load it into the JVM, first creating a compiler in Java.
This is the same as with C ++. C with classes was written, and then C ++ in it, and finally C with classes was left for loaded C ++. But then, how did they generally update the language?
source
share