HotSpot VM 是目前市面上高性能虚拟机的代表作之一。 它采用 [解释器] 与 [即时编译器] 并存 的架构。
Java编译器输入的指令流基本上是一种基于栈的指令集架构;另外还有一类指令集架构则是基于寄存器的指令集架构
int a = 2; int b = 3; int k = a + b;
0: iconst_2
1: istore_1
2: iconst_3
3: istore_2
4: iload_1
5: iload_2
6: iadd
7: istore_3
mov eax, 2 // 将eax寄存器的值设为2
add eax, 3 // 将eax寄存器的值加3
原文:https://www.cnblogs.com/liujiaqi1101/p/14784484.html