How Does the Just in Time Compiler for Java Works?

The working of the Just-In-Time compiler is more or less the same for all the JIT compilers. The source code is compiled to the bytecode by the Java Virtual Machine (JVM).

The JVM also comes with the JIT compiler which is used when the application is run. Upon executing the application the bytecode is converted to the machine code or the native code that is run by the machine.

The job of the JIT compiler is to convert this bytecode to the machine code. All the JIT compilers work in the same manner. The JIT compiler uses a V-table which is a pointer to the methods in the class. This internal table is used to compile the methods to native code.

The address of the JIT compiler itself is placed in the V-table and this address is called during execution and the JIT compiler executes the native code and stores that address to the V-table. And from now on this address is called whenever that method is called and the native code is executed.

Only during the first call to a method it is compiled and for the subsequent calls the native code for that particular method is called. The V-table maintains the addresses of the native code for all the methods that are compiled. V-table also maintains another table which has the addresses of the bytecode itself in case there is a need to compile it for the first time.



REAL Software Announces REAL Studio Web Edition; Revolutionizes How Web Applications Are Developed
AUSTIN, Texas--(BUSINESS WIRE)--REAL Software, creator of REAL Studio, a powerful, cross-platform software development tool for Mac OS X, Windows and Linux, today announced a new platform for their development tool, the web, which will be available in REAL Studio Web Edition. REAL Studio has a low learning curve, making it the perfect development tool for users who are new to programming as well ...

A very grumpy editor's thoughts on Oracle
LWN.net: "Your editor is somewhat reluctant to contribute to the flood; at this point, the amount of real information which is available is minimal while the amount of speculation is high. This will be an important case, though; the world will be watching to see how it turns out. So here are a few thoughts to add to the pile."

Google calls Oracle lawsuit "baseless" as conspiracies mount
Google today responded to Oracle's patent lawsuit with an intention to defend itself. It called the anti-Android dispute "baseless" and argued that the complaint wasn't just attacking Google but anyone using open-source Java. Work would keep going on Android during the lawsuit.... Google - Oracle Corporation - Java - Oracle - Lawsuit




______________________________________________________

Recommended Resource



| Understanding How Just in Time Compiler | Different types of Java Just in Time Compilers | How Does the Just in Time Compiler for Java Works | Understanding Just In Time Java Compiler |



_______________

FREE Subscription

Stay Current With the Latest Technology Developments Realted to .NET. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.


 

| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |