vm-implementation

Differences between Just in Time compilation and On Stack Replacement

放肆的年华 提交于 2019-11-26 20:05:53
Both of them pretty much do the same thing. Identify that the method is hot and compile it instead of interpreting. With OSR, you just move to the compiled version right after it gets compiled, unlike with JIT, where the compiled code gets called when the method is called for the second time. Other than this, are there any other differences? Jay Conrod In general, Just-in-time compilation refers to compiling native code at runtime and executing it instead of (or in addition to) interpreting. Some VMs, such as Google V8, don't even have an interpreter; they JIT compile every function that gets

What is the purpose of the Java Constant Pool?

与世无争的帅哥 提交于 2019-11-26 16:56:56
I am currently trying to dig deeper into the specification of the Java Virtual Machine. I have been reading Inside the JVM book online and there is one confusing abstraction I can't seem to grasp: Constant Pool. here is the excerpt from the book: For each type it loads, a Java virtual machine must store a constant pool. A constant pool is an ordered set of constants used by the type, including literals (string, integer, and floating point constants) and symbolic references to types, fields, and methods. Entries in the constant pool are referenced by index, much like the elements of an array.

Java's Virtual Machine and CLR

大憨熊 提交于 2019-11-26 11:44:58
问题 As a sort of follow up to the question called Differences between MSIL and Java bytecode?, what is the (major) differences or similarity in how the Java Virtual Machine works versus how the .NET Framework Common Language Runtime (CLR) works? Also, is the .NET framework CLR a \"virtual machine\" or does it not have the attributes of a virtual machine? 回答1: There are a lot of similarities between both implementations (and in my opinion: yes, they're both "virtual machines"). For one thing, they

How to write self-modifying code in x86 assembly

喜欢而已 提交于 2019-11-26 10:07:54
问题 I\'m looking at writing a JIT compiler for a hobby virtual machine I\'ve been working on recently. I know a bit of assembly, (I\'m mainly a C programmer. I can read most assembly with reference for opcodes I don\'t understand, and write some simple programs.) but I\'m having a hard time understanding the few examples of self-modifying code I\'ve found online. This is one such example: http://asm.sourceforge.net/articles/smc.html The example program provided does about four different

What is the purpose of the Java Constant Pool?

谁说胖子不能爱 提交于 2019-11-26 06:04:27
问题 I am currently trying to dig deeper into the specification of the Java Virtual Machine. I have been reading Inside the JVM book online and there is one confusing abstraction I can\'t seem to grasp: Constant Pool. here is the excerpt from the book: For each type it loads, a Java virtual machine must store a constant pool. A constant pool is an ordered set of constants used by the type, including literals (string, integer, and floating point constants) and symbolic references to types, fields,

Differences between Just in Time compilation and On Stack Replacement

≯℡__Kan透↙ 提交于 2019-11-26 05:28:33
问题 Both of them pretty much do the same thing. Identify that the method is hot and compile it instead of interpreting. With OSR, you just move to the compiled version right after it gets compiled, unlike with JIT, where the compiled code gets called when the method is called for the second time. Other than this, are there any other differences? 回答1: In general, Just-in-time compilation refers to compiling native code at runtime and executing it instead of (or in addition to) interpreting. Some