Beruflich Dokumente
Kultur Dokumente
!
!
"# !
!
!
!
!
$$
!
!%
!!
!
!
%
%
!!
&
'
!
!
!
$!
$(
!
)
%
!!
%
!
)
% ! Г
!
+
(
!!
% ,
!
!
!
! !
%
!
"
!
%!$!
$
&
!
,%
!$
%$$!!
%$
$
$
!$!
$
Г!
"
!
!
!
)
artima.com/insidejvm/ed2/jvmP.html 1/46
11/18/2010 Java Virtual Machine's Internal Archite…
&
%
!
&
!%
! !%
!
!%
!
!!
%
!
-
!
+
,!%
!!
!
)
(
!
! !!
.
!
!
main() !
/
,!
!
!!
java
!
!0
1023
Echo
0
java
&
45%
,!%
!!
)
!!
%$java%$
!
!0
1
023
!
%$Echo%$
!
Echo ! !
! main()
void
String
! 6
% $Greetings, Planet.%$
!!
!
main() !
String
!!
0
%
,!%
String
!
Echo ) arg[0]
"Greetings,"arg[1]"Planet."
!
%
!
)
"!
!
%
!
%
%
!
!
..
main()..
.!
"
,7!
8
.!
&
.!
!
% !
, ! !
%
!
exit()!
Runtime
System
Echo
% main()!
"
artima.com/insidejvm/ed2/jvmP.html 2/46
11/18/2010 Java Virtual Machine's Internal Archite…
!!
!
% main()
!
.!
%!
,
"
!
%
!
!
!%!!
%%
!
!
!
!
!!
!
+ .9
!
!
!:
!
!!
" !
%
!
) !
!
7
8
6
! -!
)
!
!
,
!
"
!
! ,
!
!
!
!!
%
6
!
!!
0
!
!!
6
-
!
!
&
!
%
!
!
!
!
"
!
%
!
:
!
0+ .1
!!
artima.com/insidejvm/ed2/jvmP.html 4/46
11/18/2010 Java Virtual Machine's Internal Archite…
,
!
7
!
8%
,
, "
7
8
!
!
% !
%
7
8%
!
!
!!
.
%
!!
.
!!
0+ .<
!!
!
=
artima.com/insidejvm/ed2/jvmP.html 5/46
11/18/2010 Java Virtual Machine's Internal Archite…
+ .<
!
,
"
%
,
!
,
!
%
$
$
!
0!
,
!
+
,
!
%
,
,
+ .<%
7
8
,
!
%
..
..
2
!
!
!
!
!
%
>
:%
:! #!%
%
artima.com/insidejvm/ed2/jvmP.html 6/46
11/18/2010 Java Virtual Machine's Internal Archite…
"!
!!
!
!
"
boolean 6 !
!
%
!
&
!
% int
byte
boolean
!
% false
;
true
.;
/
boolean
int "
boolean
byte%
!
byte
!
byte 5.
!!
7.1A
1A.9%
8
short 9@.
!!
7.19
19 .9%
8
int <1.
!!
7.1<9
1<9.9%
8
long @?.
!!
7.1@<
1@<.9%
8
char 9@.
B
7C
19@.9%
8
float <1.---A ?
.
double @?.---A ?
.
returnAddress
!!
artima.com/insidejvm/ed2/jvmP.html 7/46
11/18/2010 Java Virtual Machine's Internal Archite…
reference
:
%
null
"
# !
&
0;
;
!
.., ;
!
!!
; !
byte% short% int% char% float% returnAddress%
reference
!
long
double "
!!
!
; <1%
; !
!!
;
;
!
Г
0!
!
!!
9% $
"%$
! <% $0%$
!
!
!
!
!
!
" !
9% !
)
!
!!
%
.
!
!
!
!
! java.lang +
,!% .
:
! java.lang.ClassLoader !
ClassLoader
!
!
"
%
!
%
java.lang.Class
Г
:% .
Class
2
!
Г
%Г
;
!
!
:
!
artima.com/insidejvm/ed2/jvmP.html 8/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
!
%
;
!!
%
!
!
)
9 Г
)
!
1 Г
)
!
%
%
7
8
)
!
#
)
!!
;
!!
>
)
!
!
!
<
;
)
;
A%$Г!
$
Г
;
!%!
;
%
%
"# !
!!
! !
/
!!
!
!
!!
0
9 923
&
45 !!
.
!
! CLASSPATH
%
CLASSPATH%
!)!
!$.class$ B
! %
,
CLASSPATH
!
!
!
+
,!%
java.lang.Object%
Object.class
java\lang
CLASSPATH
9 1%
0
1 023
!!
!
! 0
1 023
CLASSPATH
0
1023!
%
:
% .
!
!
!
!
0
1023
5%$Г
$
B.2
Г
"
.
!
%
!
ClassLoader
!
)
artima.com/insidejvm/ed2/jvmP.html 9/46
11/18/2010 Java Virtual Machine's Internal Archite…
// Four of the methods declared in class java.lang.ClassLoader:
protected final Class defineClass(String name, byte data[],
int offset, int length);
protected final Class defineClass(String name, byte data[],
int offset, int length, ProtectionDomain protectionDomain);
protected final Class findSystemClass(String name);
protected final void resolveClass(Class c);
defineClass()!
byte% data[]%
0
offset
length % ClassLoader ,
!
!..
..6
!
name
!
%
defineClass() %
!
:
protectionDomain ! -
!
!!
! ! defineClass() !
ClassLoader
!
!
%
Class
:
%
ClassNotFoundException
9 1% findSystemClass()!
!
6
!!
-!
!!
!
! findSystemClass() !
7
9 C
9 98
!7
9 1
8
resolveClass()!
Class
!
Class
7
8
defineClass() !
%
%
70
% $Г
% Г
%
;
$
! 8 &
defineClass()
Class
%
!
!
%
;
!
!!
! resolveClass()!
ClassLoader
!
!
!
!
%
%
;
%
.
5%$Г
$
=!0
"!
<%$0%$
!
!
! %
! ! 6
! " 6
!%
%
6
!
!
!
!
!%
7
!
8
6
"
!
%
!
!!
!
&
!
%
..
!
..
!
!
,
!
!
!
!
!
78
!!
!
%
% !
!
!!
.
%
!
!.
!
.
!
!
!
,
2
!!
,
% !
!
!!
!!
%
!
!,
!
!!
!!
!%
%
!
!
!
,
7
!!
%
%
!!
!
!!
82
;
!; !!
!
%
,
6!
;
!
, "
% !
,
!
"
%!!
!
..
!
!!
!
!!
;
!
%!,!!
!
!!;
!
!
!
,
.
%
!$
$
!
% !
7
8
!
+
%!
!
!
!
)
!
%!
!
)
+
!
!
"78
%,
"
ClassLoader
"
Class
#
+
% !
!
"
%
7
%
%
8
!
%%
!
-
,%!!
!
!
!
!
@%$+ $
+
!
+
%
!
!
!
!
%
!
F
)
artima.com/insidejvm/ed2/jvmP.html 12/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
7
!
public% private% protected% static% final%
volatile%transient8
!
+
!
%
!
!
!
"%
!
!
F)
!
!
!
7
void8
!
7
8
!
!
!
!
7
!
public% private% protected% static% final%
synchronized%native%abstract8
!
%
!
!
!
)
!
;
!
!
7
8
"
,
7
9A%$-,
$8
!
..
..
!
!
%!
!!
!!
.
7
8
!
.
-
"
%
!
..:
.
.
!%
! !
,
!
@%$
+ $
+
% !
!
.
+
.
% !
!
.
!
!
% !
6
! !
!
artima.com/insidejvm/ed2/jvmP.html 13/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
!
!
!
!
!
!
!%!
!
!
!
5%
$Г
$
(
!
Class
: /
!
Class%
Class
)
forName("java.lang.Object")%
,!%
Class
:
java.lang.Object
forName("java.util.Enumeration")%
Class
:
Enumeration
!java.util (
forName()
:
java.lang.Integer%
,!%
Class
:
java.lang.Integer !
getClass()
Integer
:
!
%
6;
Class
!
!
F
!
!
Class)
!
:
!
getName()
6
!
getSuperClass()
Class
java.lang.Object
%
%getSuperClass()
null isInterface()
true Class
:
%false getInterfaces()
Class
:%
%
getInterfaces()
;
getClassLoader()
artima.com/insidejvm/ed2/jvmP.html 14/46
11/18/2010 Java Virtual Machine's Internal Archite…
ClassLoader
:
%
null
"
!
!
!
!
!
!
;
6
!
%!!
!
/
,!
+
. !
%
!
!
!
" !
!
!
%
!
! 7" !
%
!
8"!
!
6
!
:
5%$Г
$
"
-,!
"B
"
,!
!
!
!
%
)
!!
!,
main()!
Volcano
2
!!
!
..
.. !
,
Volcanomain()!
Volcano
%
!$Volcano$
!
!!
.
!
D
! Volcano% !
Volcano.class ,
Volcano
!
!
!
!
!
main() !
%
!
"
!
, main()%!
7
!
8
7Volcano8
=
!
,
main()
Volcano
Lava Г !
7
!
8
!!
!
% !!
artima.com/insidejvm/ed2/jvmP.html 15/46
11/18/2010 Java Virtual Machine's Internal Archite…
,
main()
!
!
Volcano
!
Lava !
Lava
!
:
6
!) "Lava" F
!
!
;
..6
..
6
! !!
!
..%%
!
!
!
forName()!
Class%
Class
6
!
% :
"Lava"%
Lava
!
Volcano
%
!
Lava
!
%
"Lava"
:
!
6
Lava
!
7
%
8
!
!
%
8
Lava 7 :
!
!
8
!6Lava
:
!
!
6
:%
% !!
.
:
!
!!
/:
!
;
7
;
:
A%$Г!
$8
artima.com/insidejvm/ed2/jvmP.html 16/46
11/18/2010 Java Virtual Machine's Internal Archite…
F
&
% !!
:
!
"
!
%
$
$,
!
%
!
!
%
%
!
!
;
!.
: 7
8
!
D
"
!
! ! !!
:
!
!
:
!
"
6 !
6
!!
!
+
,!%
!!
! , !
OutOfMemory,
&!!
!
!
;%
6!
!
!!!
!!
!!
!
!!
! !
!!
!
!!
!%
=
6 !
2
6 ! !
%
%
:
,
!
.. 0% % !
%
!
..
6
!!
!
6
4%$D
$
"!
%!!
!
%
!
,
!
"
!!
!
%
% !!
%
!
!!
%
!!
!!
: !
!!
:
7
8
!!
!
!!
;
% !,!!
!
!!;
artima.com/insidejvm/ed2/jvmP.html 17/46
11/18/2010 Java Virtual Machine's Internal Archite…
/:>
!!
!
:
:
D
:
%!
!
6
:
% !
!
:7
!
8
: +
% !!
:
!
!
/
)
:
"
:
!
)
:
!
!!
!
!
!
&
!
!
:
:
%
:
)
:
6
:
+
.
!
F/+ %
4%$D
$
artima.com/insidejvm/ed2/jvmP.html 18/46
11/18/2010 Java Virtual Machine's Internal Archite…
$!"%
!"%!
"
!
:
:
:
6
:
%!!
:!
!
&
!
!
:
!!
%!
:
!
:
+ .@
: &
!
!
% !
!
!
!
) !
=
!
:
!!
% !
:
%
!
%
!
!
!
artima.com/insidejvm/ed2/jvmP.html 19/46
11/18/2010 Java Virtual Machine's Internal Archite…
!!
6 !
!
,
!!
!!
,!
!!
6!
%
% !
, !!
!
!!
!
%
%
: !
6
:
:
"
:
!
:!
!
:
!
!
)
;
!
!
"
,
artima.com/insidejvm/ed2/jvmP.html 20/46
11/18/2010 Java Virtual Machine's Internal Archite…
('!
"
!
GG%
!
; !
!
Г
GG
:
GG%
:
:
!
!!
"
!!
!
!
!!
+
.A% !
!
!
:
6
!!
/
+ .
.@%
:
%
:
-
:
!
7
8
!
!.
:
/
!
$
$
:
&
:
%
:
"
!
:
:
6
% 6
/
%
6
!
!!%
!
!
!
!
6
!%
,!%
!
:
!
6
!!
:
6
"%!
!!
%
+ .
.@%!
$
$
: 0!!
!
6
!
!%
!
!
:
!
%
:
"
!!
%
:
!!
&
%
..
!!
&
:
!
-
!Object
$!
$7
!
!
! wait()8
$
!
$
7notify()
notifyAll()8 &
!
:%
!
: &
!
:%!
!!
!
!
: "!!
:
%
!!
:
!
: "%!
!!
!
!
!
: 0 !!
:
!
:
+
!
!
%
1C%$0
;
$
/
,!
!
!
:
artima.com/insidejvm/ed2/jvmP.html 21/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
!
:
!
6
:
6
6
+
,!%
!!
!%
!
!
:
+
:%
!
:
;
"
%
!
!
:! 0
!
6
6 ,
" !
!%
%
!
!
:
6%
6
!%
4%$D
$
:%
:
,
; D
!
;
:
! !!
:
,
:
;
%
;
$$
:)
!
:
&
:
!
!%
!
;
!
:
;%
:%
!
:
,! "%
:
;%
:%
:
!
%
!
4%
$D
%$!
!
;
">
:%!!
!
6
!
+
,!%
!
int "[I"
!
.!
byte "[[[B"
!
.
!
Object "[[Ljava.lang.Object"
!
@%$+ $
.!
"
!
int%
,!%
!
!
int
+ .5
artima.com/insidejvm/ed2/jvmP.html 22/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
%%
!
D
%!
!
!
%
!
, 7
!
,8%
!
Object%
#
!
-
!
%
!
%
;%
returnAddress ",!
%
, "
$$
!
!
,
!
%
0
&
%!
" !
%
!
!
!
0)
!
artima.com/insidejvm/ed2/jvmP.html 23/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
,
!
" , !
% !
&
!
%!
!
" !
!
!
!
%
!
,
%
&
!
!%
!
% !
!
! !
!
!
!
%
;
!.
! &
!
%!
!
/
)
!
0+!
! )
%
%
! ;
%!
%
!
;!
!!
!
;
!!!
Г
!
; ;
.
!
,
;
.
int% float% reference%
returnAddress
byte% short%
char
int
long
double
%
,
artima.com/insidejvm/ed2/jvmP.html 24/46
11/18/2010 Java Virtual Machine's Internal Archite…
+
,!%long
%
long
, "
.
2.
long
double
,
!
!
!
!
%
+ .
4
!
)
return 0;
}
}
=
+ .4
!
runInstanceMethod()
reference%
!
this
!
!
:
"
artima.com/insidejvm/ed2/jvmP.html 25/46
11/18/2010 Java Virtual Machine's Internal Archite…
runClassMethod()
+ .4%!
this !
: (
! !
%
!
=
byte% short% char%
boolean
! int
"!
% boolean
!
! int
"
Object o
runClassMethod()
%
:
"
:
%
!
:
%
:
"
!!
!%
!!
%
!
!
!
%
!
!
+
,!%
!
%i
j
Example3b%
!
!
2
!
%
j
!
%
;
i 2
!
%i
%
;
j
/ 0
Г
%
;
%
%
%
artima.com/insidejvm/ed2/jvmP.html 26/46
11/18/2010 Java Virtual Machine's Internal Archite…
/
!
%
%
!
!
.
.
!
!
!
%!!
7
8
!%
!
!
!
%
%
!
!
%
!%
+
,!% iadd
int
%
!%
int F
!
int
int
)
6
%
% iload_0
iload_1% int
;
iadd
int % !%
int
% istore_2%
+ .9C%
,
%
artima.com/insidejvm/ed2/jvmP.html 27/46
11/18/2010 Java Virtual Machine's Internal Archite…
./0"
+!2
%!
%
!!
%
,
!
!
0
!
!
int% long% float% double%
String
!
0
!
%
%
!
/
!
:
%!
!
"
!
%
% %
!
!
&
!
"
!
%!!!
!
!
!
!
!
! 7
8%
artima.com/insidejvm/ed2/jvmP.html 28/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
!
!
!
!
!
!
!
!
!
% !
!
!
!!
!
!
,
%
!
,
,
!
"
,
%
9A% $-,
%$
!
-
,
%
,
,
%
&
!
,
%!
,
%
! !
%
,
%!!
!
!!
%
#
!!
0
!!
"!
%
!!
!
!
"
,!
%
)
+ .99
addAndPrint()!
!!
!
% !
!
addTwoTypes() !
%
addAndPrint()!
int
double55 55
addTwoTypes()!
artima.com/insidejvm/ed2/jvmP.html 29/46
11/18/2010 Java Virtual Machine's Internal Archite…
/ !
addTwoTypes()
=
addAndPrint() !
addTwoTypes()
!
%
! Г
!
%
!
!
!
!
!
addTwoTypes() !
!
!
!
;
6addTwoTypes()
0
javac
!
! 23 9 9% addTwoTypes() 6
7"!
% ;
!
!!
8 !
!!
addTwoTypes() !
!
double
int ! 755 55
8
!addAndPrint()
!
addTwoType()
;
!
!
!
!
!
% addAndPrint() double
addAndPrint()
!!
addTwoType()!
artima.com/insidejvm/ed2/jvmP.html 30/46
11/18/2010 Java Virtual Machine's Internal Archite…
!addAndPrint()!
,
addAndPrint()!
addTwoType()!
+ .91
!
!!
,
! !
!
! %
!!
!
!
!!
!
:
!
!
!
!
!
!
,!% addAndPrint()
!addTwoType()
/-
!!
!!!
!
!
!
! !
!
!
!
!
!
=
!$
$
"
!
;
!!
!!
+ .91%
!
!!
7"!
%
!
%
$
$
!
8
7
8
! %
artima.com/insidejvm/ed2/jvmP.html 31/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
%
$
$
!
/
!!
+ .99
+ .91 " !
!!
!!
!
!!
%
!
!
+ .91
!!
% !
!!
!
!
+ .99
!
!
!
!
&
%
!!
=
0
!
!
%
!
!
&
!
%
!
!
! "
!
!
!
7
!
8%
!
%
!!
!
%
=!
!!
!!
"
!
!
!
&
!
%!
!
&
!
%
%
!
% !
!
!
!
/
!
! ,
!
!!
:
7
!
8!
%
!
!!
!
.
!
%
!
&
!
%
!
!
!!
"
!
7
%
8
!
!
%
!
+ .9<
!
!
!
,
!
" !
!
,
!
%
!
/%!:!
artima.com/insidejvm/ed2/jvmP.html 32/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
-
-
-,
-
"
!
!!
,
!
%
,
!
+
%
!!
,
%
"
artima.com/insidejvm/ed2/jvmP.html 33/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
% !!
!!
,
!!
% :.
.!
!% ,
%
!
%
!
!
6
0!
!$ !
$
% ! $,
$
)
%
!!
%
!
,
!
!!
%
!
6%
%%
!
"
!
,
-
!
,
+
!
!
% ,
!
"!,
%
,
%
% :.
.!
!
,
"
!
!!
!
%
!
0
$
$
!!
,
"
%
%
,
0
" !
! 6
!
-
.
;
!
! /
,
!
!
!
%
!
7
8
!
%
2
%!
!
7
8
&
,
%!
!
,
,
!
7,
8
!
"
,
%
%
,
6
%
-,
!
!
!
,
+
! !
!% ,
!
6
!
/
%,
!
!
&
!
7
!
!%
,
8% ,
,
,
!
/
!
%
%
!!.
!;,
!
6
!
%
,
!
>
!
artima.com/insidejvm/ed2/jvmP.html 34/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
,
&
!
% !
!
,
!
! 7
,
8%!
!
,
,
#
:
,
!
,
, "
,
!
,
+
!
%
,
,
%
%
! +
!
% goto
return% ,
!
,
,
,
%,
!
,
0
,
athrow
%
,!%
,
,
!
!
throw!
-!athrow
,%
,
/
,
+
,!%
!
%
%
!!
!
;
%
ArithmeticException
,
..idiv% ldiv% irem%
lrem..
!
!
int
long
-
!
!
!
!
% !
!
!
7
8
+
,!
!
!
!
!
%
doMathForever()
!
)
!
doMathForever()
!
!
!
, !
,
!
!
!
, !
!
!
!
// Bytecode stream: 03 3b 84 00 01 1a 05 68 3b a7 ff f9
// Disassembly:
// Method void doMathForever()
// Left column: offset of instruction from beginning of method
// | Center column: instruction mnemonic and any operands
// | | Right column: comment
0 iconst_0 // 03
1 istore_0 // 3b
2 iinc 0, 1 // 84 00 01
artima.com/insidejvm/ed2/jvmP.html 35/46
11/18/2010 Java Virtual Machine's Internal Archite…
5 iload_0 // 1a
6 iconst_2 // 05
7 imul // 68
8 istore_0 // 3b
9 goto 2 // a7 ff f9
!
!
!
javap
!
0
1 023 javap
!
!
!
=
:!
!
!
goto
!
:!
7
iinc8
!!
,
%!
iinc
! !
!
%
:!
$goto -7%$
!
!
%$goto 2 $
!
"
!
% !
%
%
, =%
iinc
%
!
%
!!
+
,!%
%!
!
%
!
%
!
!
:
%!
!
%
!
:
%!
!
+%
!
%
!
:
0
..
!
..
!
!
#
!
)
!
%
!
%
!
!:
.
%
%
.
!!
%
5CH5@
.. .
..
!
!!
!
"
!
.
!.
!
!
!
!
!
I
!; %
!
!
B=H .o
&
.obj !
!%
!
!
!
!
% !
7
!8
!
!; .
!
!;
!
!
.!
:
,
!:.
.!
!
!;
" !
?% $=
%$
!:
!
!
!
!
artima.com/insidejvm/ed2/jvmP.html 36/46
11/18/2010 Java Virtual Machine's Internal Archite…
%
..,
:!
..
!
!
!
!
!
!
! !
!!
%
,
%
.
!
!;
!
!
"
%
!
!
!!!
!
.
.
7"
!!
!%
!
!
.
!
,
!!
!
8
"
%
;
!
;
%
,%,
/
!
!
+
,!%
!
!
%!
/
%
istore%
int
%fstore%
float
!,!
,)
2
int float !
+
!
%!
!
+
,!% !
%
.
/
int%
float
%
!
!
!
double d daload
double
!
reference a aaload
reference
!
!
!
%
,!%
int%
!
long
float
!
%
int
double
!
:
%
!
reference
!!
!
!!
!!
!
,
!
" !
% dup
%
)
int%float%reference%
returnAddress %
%
dup
long
double%
" long
double
dup2
%
.
!
%
byte%
short%
char
int
!
!
!
!
int%
byte% short%
char
!
.<
!
!
"%
!
"
!
!
,34! 5
$ ! 1! !
,
/ $-
byte 5 int 9
short 9@ int 9
int <1 int 9
long @? long 1
char 9@ int 9
float <1 float 9
double @? double 1
reference <1 reference 9
artima.com/insidejvm/ed2/jvmP.html 38/46
11/18/2010 Java Virtual Machine's Internal Archite…
!!
!
!
!
%
! ,%
!
!
!
A%$Г!
$
9C
1C
-,
6
,
6 !
!!
..
%:.
.!
!
%
!;
%
,
..
9%
$
" $!
!!
,
6
!!
6
,
!
!
/
!
..
.. ,
6
!;
!;
6% ,
!
!!
%
0
F
!
%
!
6
!
!!
!
0
.
!%
!!
,
%
,
%
!
%
, "
!;%
!
.!%!
!
!
!!
!
"
!;
!
% !
,
!
5C
4C
! ,
9C
1C
!
! ,
% !
!
! $
$ .. 9C
1C
,5C
4C
!
&
!;
!
!
%
!
!;
%
!
,!
!
!
!
!;
$
$ 7 9C
1C
8% !
!
!
!
!;
!;
!
,5C
4C
!
!;
!GG%!!
!
!
% "
!;
!
!
!
7
!!
!
! , 8 !
!
%!
!
!
"
!
%
!;
!
!
!
!!
!
!
!
"
!;
!
%
!
!
%
$!
!;
$
!;
!
"
!
%!
$
$
!
!
artima.com/insidejvm/ed2/jvmP.html 39/46
11/18/2010 Java Virtual Machine's Internal Archite…
$
%$9C
1C
,5C
4C
! "
!!%
!;
!
:
!;
!.
!
!;
"
!;
.!
!..
%
$.
$
!
"
2 D
%F
!
0
% $
!
:.
GG (
! J
!;
!;
!
!
" %
!;
!
"
!
6
%
!;
!
%
!;
!
!
:.
%
GG%
.
:.
% %
:.
!
"
!
GG%
6
!
GG
"
!;
!
!
!!
:.
! !
!
! !
7
!
8 !!
% ! !
!!
!
!
!%
:
!
/
!
!!
:
!
!!
!
.!
!
!!
%;
!;
/
!;
!
%
!%
!
! +
,!%
!<C
!!
!
!
%
.!
!
!;
artima.com/insidejvm/ed2/jvmP.html 40/46
11/18/2010 Java Virtual Machine's Internal Archite…
%!
!;
;
!;
/
!
.
!!
.
!
"
#
%
%
!
!!
!
!#B!
#B!
Г
! #B !
%
" !
1% $#
!
%$
!
!.
!
(
!
!
!
!%
;
!
!!
>
!
%
wait()%notify()%
notifyAll()
!
Object +
!
%1C%$0
;
$
artima.com/insidejvm/ed2/jvmP.html 41/46
11/18/2010 Java Virtual Machine's Internal Archite…
int%
;
%
%
!
%
%
%
$
$
,
long
double
volatile >
! @?. % !
!
!!
! <1. 0
.
long
!!
%
,!%
<1.
.
! !
long
double !
!
long
double
"
!!
6
.
long
double
!%!
!
.
! !
long
double
,
!
! ,
!!
!
@?.
!!!
%,
!!
+
!
%
%
!! !
;
long
double
9
!!
!!
!!
%
1
!
!!
!
!!
+
%
!!
+
%
%
!!
!.
! ,
%
!!
! , ,
!
!!
6
!
!
!.
=
!
!!
6
!
0
! !!
!
!
/ !
%
artima.com/insidejvm/ed2/jvmP.html 42/46
11/18/2010 Java Virtual Machine's Internal Archite…
6
:
!!
! 7=
!8
!
=.
!
!!
!
!!
!
%
%=
%=
!
!
%
!!
!
.
!
!!
2
.
!
=%
:
!
!
%
!
!
!
!
+
,!%
!
!
!
!
)
9
:
!
!
%
1
:
!
!
: "
%
!
!
>
" !
% !%
! %
!
2
6
; !!
$$
!
!
!
!
!
6 ,
!
!!
%
!!
%
!
!!
!
;
artima.com/insidejvm/ed2/jvmP.html 43/46
11/18/2010 Java Virtual Machine's Internal Archite…
!
!
%
F
,%
!
;%
!%
!!
%
%
!
..
!
!
!!
,
!
!!
!
!!!
%!
!;
!
!!
%
% !,!;
!
!
-
)"0!
2.>/
!
!
+ .9?!!
,
(
applets/EternalMath.html
!2.>/
239 C
!
doMathForever()!
Act%
$
0$
!
!% %
!
%
!
!!
!
)0%>%>
%
0
-!
0
%
!
!
,
%
iconst_0
!
0
%
% !
, iconst_0 ;
,
, 06
0
,6
>
%!
,
0
!
%>
7
8
%
!
!
%
, "
% !
7$M$
$
M$8
!
7
!!
8
!
doMathForever()!
% i%
;
% iconst_0
istore_0
;
;
,
artima.com/insidejvm/ed2/jvmP.html 44/46
11/18/2010 Java Virtual Machine's Internal Archite…
%iinc%
!
i
!!
i += 1!
!
doMathForever()
,
% iload_0%
iconst_2
int 1
imul
ints
!
%!!%
istore_0
!
!!
i *= 2!
!doMathForever()
% goto%
!
iinc
goto !!
for (;;)
doMathForever()
&
0
7
>
8%
!
&
!
%
:
%
!
,
+
!
%
!
,
,
F
!!
/
2.>/
2.>/
,!
!
jvm
!
2.>/
applets/EternalMath.html
%
applets/JVMSimulators
applets/JVMSimulators/COM/artima/jvmsim
>
#
+
!
!
!
%
)
artima.com/insidejvm/ed2/jvmP.html 45/46
11/18/2010 Java Virtual Machine's Internal Archite…
http://www.artima.com/insidejvm/resources/
N/
Sponsored Links
Free online Flex training
Download the OpenSource Flex 4 SDK
Explore Flex Capabilities - Install Tour de Flex
Programming in Scala - Download PDF eBook
now, only $27.50
New Adobe® Flash® Builder™. Download yours
today!
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us
artima.com/insidejvm/ed2/jvmP.html 46/46