-
Notifications
You must be signed in to change notification settings - Fork 21
Commit 71875f4
Correct the order of constructor and static initialization
In `new` opcode, jvm needs to call constructor and initialization
in order. The sequence is begin at base class static initialization,
and then derived class static initialization. After all classes are
initialized, base class constructor will be executed, then execute
its child class constructor.
Add a new test script: Initializer.java1 parent dd4ca90 commit 71875f4
3 files changed
+60
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | - | ||
52 | + | ||
53 | + | ||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1196 | 1196 | | |
1197 | 1197 | | |
1198 | 1198 | | |
1199 | - | ||
1200 | - | ||
1199 | + | ||
1200 | + | ||
1201 | + | ||
1202 | + | ||
1203 | + | ||
1204 | + | ||
1205 | + | ||
1206 | + | ||
1207 | + | ||
1208 | + | ||
1209 | + | ||
1210 | + | ||
1211 | + | ||
1212 | + | ||
1213 | + | ||
1214 | + | ||
1215 | + | ||
1216 | + | ||
1217 | + | ||
1218 | + | ||
1201 | 1219 | | |
1202 | 1220 | | |
1203 | 1221 | | |
| |||
1208 | 1226 | | |
1209 | 1227 | | |
1210 | 1228 | | |
1211 | - | ||
1229 | + | ||
1212 | 1230 | | |
1213 | 1231 | | |
1214 | 1232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
0 commit comments