mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-15 13:59:40 +01:00
Compare commits
550 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d918271d5 | ||
|
|
069b902c3d | ||
|
|
f0bbae6b26 | ||
|
|
cb9bbf84e9 | ||
|
|
76c0e546f9 | ||
|
|
c23a0c829c | ||
|
|
903f64c7e0 | ||
|
|
08bc6f6c37 | ||
|
|
0cbcd44d1d | ||
|
|
5231d0f568 | ||
|
|
0b0864c6a0 | ||
|
|
6ed538c2f9 | ||
|
|
e19ece417c | ||
|
|
23f4a764cc | ||
|
|
07974fe56c | ||
|
|
6d493ab8c7 | ||
|
|
30795df1f9 | ||
|
|
608a24a077 | ||
|
|
1d83f691b5 | ||
|
|
1ad2667331 | ||
|
|
b569d4f083 | ||
|
|
46c7bd230b | ||
|
|
8ffeb9198c | ||
|
|
4be4e2435b | ||
|
|
21694f8b3f | ||
|
|
01f21a6de3 | ||
|
|
4b5fc49d99 | ||
|
|
05a64fecfc | ||
|
|
3a5105829d | ||
|
|
d1b22548f7 | ||
|
|
9d9464e69f | ||
|
|
28535fab17 | ||
|
|
423befc9a0 | ||
|
|
63d0d6341e | ||
|
|
e8a73fedc4 | ||
|
|
3a439c4575 | ||
|
|
7f5de13442 | ||
|
|
cdc164def3 | ||
|
|
b3f376acc1 | ||
|
|
2e266fe5de | ||
|
|
6e1d4b9a47 | ||
|
|
d4df05123c | ||
|
|
9fe908f70c | ||
|
|
8074acb8e5 | ||
|
|
c95e5f7be1 | ||
|
|
acd8ec4775 | ||
|
|
7c47fb7795 | ||
|
|
1fcb5893bd | ||
|
|
9d14bdc3f8 | ||
|
|
11f703169a | ||
|
|
72f8b88373 | ||
|
|
257b3156a0 | ||
|
|
d5f146c728 | ||
|
|
813710bde8 | ||
|
|
9795a8f232 | ||
|
|
fd20a6a950 | ||
|
|
8844da387d | ||
|
|
1e148bf0f8 | ||
|
|
d51178243e | ||
|
|
cb67468c6b | ||
|
|
f4e479b786 | ||
|
|
975611d880 | ||
|
|
ee48026e26 | ||
|
|
0f6b9a919b | ||
|
|
a31fce833b | ||
|
|
236059bc4e | ||
|
|
702a13b785 | ||
|
|
78f516d04e | ||
|
|
708863fcf9 | ||
|
|
a529aee20c | ||
|
|
9d698bded0 | ||
|
|
9135d7552c | ||
|
|
dc73a83365 | ||
|
|
5a15b20036 | ||
|
|
b020505579 | ||
|
|
c724f6fbe7 | ||
|
|
f9618e7435 | ||
|
|
40b682817a | ||
|
|
7df98bfb6b | ||
|
|
dacaa6b65d | ||
|
|
67fd924e0e | ||
|
|
2827b06412 | ||
|
|
955a453996 | ||
|
|
4b2a0a80b5 | ||
|
|
e703c7c158 | ||
|
|
21e4bf1052 | ||
|
|
96139033e6 | ||
|
|
d1277d1d57 | ||
|
|
a9fe649f3d | ||
|
|
825bafa0ea | ||
|
|
8f52d15f97 | ||
|
|
fb6164cec8 | ||
|
|
92afe130d1 | ||
|
|
716c78f080 | ||
|
|
553fed80a4 | ||
|
|
2c819571f1 | ||
|
|
32b0fa3461 | ||
|
|
7a94d5e47f | ||
|
|
076ac3ae62 | ||
|
|
5c0a4e4514 | ||
|
|
9ca99a7f17 | ||
|
|
df05badc49 | ||
|
|
1f70f71621 | ||
|
|
0bbebf3a62 | ||
|
|
5ba10ad9ad | ||
|
|
2b96ebbe49 | ||
|
|
221af5e5e1 | ||
|
|
1e41f46948 | ||
|
|
e4f45d0a0b | ||
|
|
907a41e100 | ||
|
|
2c08c535e0 | ||
|
|
3c70cff23a | ||
|
|
55750920b4 | ||
|
|
bb0d22f385 | ||
|
|
56074531b7 | ||
|
|
798d1746b9 | ||
|
|
a5b6b6ecdc | ||
|
|
b2a4da69f0 | ||
|
|
e4251b62c9 | ||
|
|
b87234f8cd | ||
|
|
e329e92190 | ||
|
|
cdc2e5a6af | ||
|
|
232190dc7b | ||
|
|
e2a126f80d | ||
|
|
f40f23b2f0 | ||
|
|
2c4602adb3 | ||
|
|
934dac40ef | ||
|
|
035ca4f0c8 | ||
|
|
0e307b3211 | ||
|
|
2756e99316 | ||
|
|
33484a2710 | ||
|
|
6887885b5b | ||
|
|
06a805b13f | ||
|
|
b7456052cd | ||
|
|
68a4665158 | ||
|
|
101e0eb871 | ||
|
|
70b0bc68ce | ||
|
|
de24cb0a4d | ||
|
|
9be05f339d | ||
|
|
a06bb2ee0a | ||
|
|
86adbce1ec | ||
|
|
db68fa7326 | ||
|
|
9e0929adba | ||
|
|
a1533dafce | ||
|
|
5213d97280 | ||
|
|
f7b87611c6 | ||
|
|
8b8c52ada8 | ||
|
|
c738ebdc67 | ||
|
|
8e16f6b5c4 | ||
|
|
60e1a19b44 | ||
|
|
003ca0f848 | ||
|
|
ce6f939956 | ||
|
|
48643afa72 | ||
|
|
494c3eb4f6 | ||
|
|
a17987f7b4 | ||
|
|
97e6e7e277 | ||
|
|
2906215abb | ||
|
|
103983356d | ||
|
|
bff91cc1a4 | ||
|
|
57d7af3e23 | ||
|
|
6719f78363 | ||
|
|
cefc566e6e | ||
|
|
04fdef79fa | ||
|
|
c2578847e2 | ||
|
|
b5ace034c3 | ||
|
|
e84d20271d | ||
|
|
273a47426e | ||
|
|
ee78b15d5a | ||
|
|
b9f27b5eea | ||
|
|
34c1d72421 | ||
|
|
cdcdf54d1e | ||
|
|
9e2e7197f6 | ||
|
|
2e43a0450f | ||
|
|
57d945fd3d | ||
|
|
a14c950998 | ||
|
|
af422c1d2f | ||
|
|
9331eed2d6 | ||
|
|
176a41f92e | ||
|
|
e01ed73046 | ||
|
|
1633b4781d | ||
|
|
c0b32f4e3c | ||
|
|
4910f50ea2 | ||
|
|
8d5b9cfad8 | ||
|
|
2fa719cdb7 | ||
|
|
71315ac3a3 | ||
|
|
fd05c28901 | ||
|
|
f662d4d726 | ||
|
|
fbea8d87f4 | ||
|
|
76fedc71ad | ||
|
|
75d9b0f986 | ||
|
|
d4a0d0c66d | ||
|
|
cab29c9b7a | ||
|
|
e13875dd4e | ||
|
|
f70e9b8dd9 | ||
|
|
38d8fb8017 | ||
|
|
425fb8197e | ||
|
|
6615262737 | ||
|
|
d3af1f284c | ||
|
|
4b321c2bfc | ||
|
|
c0f20f9d47 | ||
|
|
b426a72177 | ||
|
|
2f6783dce5 | ||
|
|
e06ad08fd4 | ||
|
|
b136abc344 | ||
|
|
9a0763bf6b | ||
|
|
d15fceaa77 | ||
|
|
8d4e786794 | ||
|
|
a758339886 | ||
|
|
fd76ca6d80 | ||
|
|
dd28a663e4 | ||
|
|
4f420274a7 | ||
|
|
885f8851c5 | ||
|
|
617835c850 | ||
|
|
32bc86d541 | ||
|
|
c435a0905d | ||
|
|
c9560133fd | ||
|
|
88ac170f53 | ||
|
|
c45cade441 | ||
|
|
6451f9b113 | ||
|
|
d53e0f773f | ||
|
|
8ad7837221 | ||
|
|
faaab0292b | ||
|
|
09334a554e | ||
|
|
593402d1ad | ||
|
|
970eb79fc4 | ||
|
|
26ae13fe80 | ||
|
|
cdcc52dcab | ||
|
|
3119cce77d | ||
|
|
1097f94525 | ||
|
|
dce704d578 | ||
|
|
26dc2b8949 | ||
|
|
9e2590b7bf | ||
|
|
15dd62fcba | ||
|
|
62717f091a | ||
|
|
1c53c596df | ||
|
|
9c7b1e8b5b | ||
|
|
b290c5dc99 | ||
|
|
e7903bf295 | ||
|
|
9769fa9e3b | ||
|
|
bca01e0826 | ||
|
|
b482e41692 | ||
|
|
8ac601577f | ||
|
|
29e370d911 | ||
|
|
e8f11acb07 | ||
|
|
bf7fc212cc | ||
|
|
b5b691accb | ||
|
|
08466ce0ca | ||
|
|
f8fbfdf5bc | ||
|
|
92f020bb7c | ||
|
|
23d8c5ddc1 | ||
|
|
7a543510bd | ||
|
|
87b1e69996 | ||
|
|
1965d90445 | ||
|
|
415053276d | ||
|
|
029e1d422b | ||
|
|
ab095606fe | ||
|
|
9f18b194b0 | ||
|
|
1f7564a7d6 | ||
|
|
baa83308c5 | ||
|
|
929ed1911c | ||
|
|
1fb3cbf4e9 | ||
|
|
2827ff39e5 | ||
|
|
e19d0ec5d0 | ||
|
|
1f75d1c6dd | ||
|
|
ce0c084720 | ||
|
|
0470f91e7f | ||
|
|
7e58d1b497 | ||
|
|
318da3f68c | ||
|
|
67bb035b94 | ||
|
|
ca3a3504be | ||
|
|
8e36dcb9a5 | ||
|
|
a0258fbcc8 | ||
|
|
014e5cdefb | ||
|
|
39202ea815 | ||
|
|
406119889a | ||
|
|
193bce6e2e | ||
|
|
a2a7ded4d4 | ||
|
|
c10f593c2c | ||
|
|
62fa852746 | ||
|
|
72afcb0285 | ||
|
|
91db470ae6 | ||
|
|
2c63f90f19 | ||
|
|
560560dc55 | ||
|
|
3d480f960f | ||
|
|
5e68f20160 | ||
|
|
5f10e8e82e | ||
|
|
e1b2c1c442 | ||
|
|
9676f044cb | ||
|
|
090346b4e8 | ||
|
|
a7d6b2c707 | ||
|
|
df35adf83b | ||
|
|
793be7342c | ||
|
|
b01525e89b | ||
|
|
73696dd5a4 | ||
|
|
067a3d9ad6 | ||
|
|
503abb135a | ||
|
|
6103649b6b | ||
|
|
9d4aff2eaf | ||
|
|
223f8354ad | ||
|
|
b1371af3b7 | ||
|
|
f907f0a9d2 | ||
|
|
a91d2cfe7a | ||
|
|
21e44848b0 | ||
|
|
21aa30606a | ||
|
|
d4f2196cd0 | ||
|
|
208dfa22cd | ||
|
|
78e9762656 | ||
|
|
1f5324fed4 | ||
|
|
e36afee3bd | ||
|
|
8b6fca5d9f | ||
|
|
f83fd900a9 | ||
|
|
a8f9284064 | ||
|
|
15bf5db9c7 | ||
|
|
d2cd251815 | ||
|
|
0244538b93 | ||
|
|
06a5796034 | ||
|
|
8ed0a99cb6 | ||
|
|
4be7c3c672 | ||
|
|
4d34a77121 | ||
|
|
36ce084168 | ||
|
|
028a93578f | ||
|
|
1e18bf2d6e | ||
|
|
4c089452ee | ||
|
|
5953ff9720 | ||
|
|
6996b27f46 | ||
|
|
af876f1345 | ||
|
|
0a24bf67c2 | ||
|
|
c81e6c29c1 | ||
|
|
1870624c08 | ||
|
|
f3946ad215 | ||
|
|
c9ce349372 | ||
|
|
53b5f6ae6b | ||
|
|
a4fccad415 | ||
|
|
183aabe3b5 | ||
|
|
0a7ba6e27e | ||
|
|
b857081608 | ||
|
|
c0d62ad9e6 | ||
|
|
851190bb2e | ||
|
|
681d216332 | ||
|
|
aee9449305 | ||
|
|
edd49c4cf2 | ||
|
|
a2371fe1f8 | ||
|
|
39aa31ca05 | ||
|
|
f38ce53536 | ||
|
|
705188bb7b | ||
|
|
dcd2283896 | ||
|
|
445c56f3ea | ||
|
|
0c7428a720 | ||
|
|
d37d544754 | ||
|
|
137a679446 | ||
|
|
350ce4d28b | ||
|
|
e4f3d13dbb | ||
|
|
99aa7292a3 | ||
|
|
0f23916d8b | ||
|
|
ace77b0dc3 | ||
|
|
d8cd1fc432 | ||
|
|
93a90129b2 | ||
|
|
422ea850e0 | ||
|
|
a83e0c0925 | ||
|
|
9bac626c1a | ||
|
|
2a7822f94f | ||
|
|
6d21b1e4cd | ||
|
|
de8096cf48 | ||
|
|
f59df4d489 | ||
|
|
51ef95c396 | ||
|
|
595ff704c0 | ||
|
|
739414c177 | ||
|
|
ec207ef682 | ||
|
|
2ce9a96c01 | ||
|
|
69c8b43f09 | ||
|
|
7bb1e5eae1 | ||
|
|
ab419e86a9 | ||
|
|
68cf08d2c3 | ||
|
|
3b786f8edc | ||
|
|
134debb0ba | ||
|
|
ae0f3167d3 | ||
|
|
b63d6d68d9 | ||
|
|
74e0691df5 | ||
|
|
a1fd30eb7a | ||
|
|
93751b6e8c | ||
|
|
cf2ae8d98d | ||
|
|
5d6fffa036 | ||
|
|
cec3a034d1 | ||
|
|
101468324d | ||
|
|
cb822b7e10 | ||
|
|
be5021d224 | ||
|
|
584c02dfa8 | ||
|
|
d0892edd69 | ||
|
|
8321605121 | ||
|
|
01a36018d3 | ||
|
|
8888335104 | ||
|
|
ffff71c1cf | ||
|
|
5231fcdc40 | ||
|
|
a5396e1107 | ||
|
|
1a0a9da570 | ||
|
|
fface2e4ca | ||
|
|
b2f54efed2 | ||
|
|
312ee333ac | ||
|
|
6af949fe24 | ||
|
|
4654daefa2 | ||
|
|
a2b46bd320 | ||
|
|
7d94fdb066 | ||
|
|
d0799cc37d | ||
|
|
8f3723561b | ||
|
|
7c23bf3736 | ||
|
|
283deccd89 | ||
|
|
1cafadfd3e | ||
|
|
4db0a48b10 | ||
|
|
df71af8d55 | ||
|
|
3f0b988cfc | ||
|
|
472349069b | ||
|
|
cd71edadc5 | ||
|
|
1a1db06a37 | ||
|
|
4ce28ac8a0 | ||
|
|
b1d6f69a58 | ||
|
|
542f88fae5 | ||
|
|
d5e5e5a3d1 | ||
|
|
e969cae170 | ||
|
|
ffa70f7fdd | ||
|
|
cfb08c72ba | ||
|
|
c8da21faa9 | ||
|
|
94bd6b212a | ||
|
|
df65a88edb | ||
|
|
34d8fbb5e2 | ||
|
|
7f2828e070 | ||
|
|
fba4182589 | ||
|
|
dc5ad18362 | ||
|
|
fd5bc72005 | ||
|
|
f714e2735c | ||
|
|
a78838a019 | ||
|
|
62b683190f | ||
|
|
b742371799 | ||
|
|
7f88fc4697 | ||
|
|
ad903b11ed | ||
|
|
6e7e0b172c | ||
|
|
41463d1d3a | ||
|
|
827d425560 | ||
|
|
e85a4d8536 | ||
|
|
25de21d620 | ||
|
|
5e66955173 | ||
|
|
a2e046f672 | ||
|
|
f8c3115e4e | ||
|
|
a787d51eea | ||
|
|
61485906a3 | ||
|
|
30beae5a8c | ||
|
|
6a44e920f6 | ||
|
|
736e8a2d4b | ||
|
|
f210928e73 | ||
|
|
8e6208656a | ||
|
|
217739210d | ||
|
|
82619cc8da | ||
|
|
f9f538c7fd | ||
|
|
ecdb99412d | ||
|
|
9dff23337b | ||
|
|
b8dbe8d8f6 | ||
|
|
21b3d4aea0 | ||
|
|
2bd1e0578b | ||
|
|
a45005f646 | ||
|
|
05a81fae18 | ||
|
|
de67e52949 | ||
|
|
e6ea9147f9 | ||
|
|
cc57a283fb | ||
|
|
aa0baf128e | ||
|
|
95ef28ff0d | ||
|
|
d6f2afc28f | ||
|
|
78ae650f8f | ||
|
|
1e875ce562 | ||
|
|
5f9073cac0 | ||
|
|
69f9ddee90 | ||
|
|
2f06b83dfc | ||
|
|
0a64902056 | ||
|
|
e466180135 | ||
|
|
93c4a7033c | ||
|
|
66cecec230 | ||
|
|
97942f9872 | ||
|
|
006e84fc77 | ||
|
|
56f4a68e6b | ||
|
|
4ca96d3f88 | ||
|
|
f17489b0d4 | ||
|
|
0de7d29a95 | ||
|
|
28e94fa2a3 | ||
|
|
dd8a3b1a34 | ||
|
|
a0ec52da33 | ||
|
|
576a962dcb | ||
|
|
f9e73b6fb3 | ||
|
|
fbcaea5fc1 | ||
|
|
b047886b2f | ||
|
|
2f5bb727a1 | ||
|
|
605e712ecd | ||
|
|
6c11535cdd | ||
|
|
c9de141417 | ||
|
|
d033b16582 | ||
|
|
be8bd14e3c | ||
|
|
e63a1bf460 | ||
|
|
8a7cd86a28 | ||
|
|
de4c8e0eb5 | ||
|
|
bc706440bd | ||
|
|
ce3f3161da | ||
|
|
7a593ea895 | ||
|
|
4fd14806a4 | ||
|
|
95a3c4a81f | ||
|
|
34f01f340e | ||
|
|
07338e17b5 | ||
|
|
2ba8da1975 | ||
|
|
ddc1549079 | ||
|
|
f9a987bf43 | ||
|
|
22f94de7e6 | ||
|
|
a1117d31b6 | ||
|
|
dcbd65a1c3 | ||
|
|
c59552fc2d | ||
|
|
e05fd5d6f5 | ||
|
|
0d79cc7529 | ||
|
|
022fb387d9 | ||
|
|
ce1993bf8e | ||
|
|
3ca96fa445 | ||
|
|
b8af3d5019 | ||
|
|
e67e7cb5a7 | ||
|
|
d83e26cba4 | ||
|
|
a21476939e | ||
|
|
8f96eb9cea | ||
|
|
837ece487d | ||
|
|
06d5f1e07f | ||
|
|
b56f073148 | ||
|
|
454a7c0732 | ||
|
|
0d1c16da0e | ||
|
|
2a2bbe2879 | ||
|
|
55076b2558 | ||
|
|
2726f2a362 | ||
|
|
8c2a336349 | ||
|
|
47a5b98c7f | ||
|
|
57a1271b06 | ||
|
|
bf4d190698 | ||
|
|
729f2789f0 | ||
|
|
a0930ff4d4 | ||
|
|
c357cbe4e0 | ||
|
|
e33cec202f | ||
|
|
14b56dc3a0 | ||
|
|
6f0de04c87 | ||
|
|
fa5248c9db | ||
|
|
5b1de891b3 | ||
|
|
8848b3ab63 | ||
|
|
6f7b6c816a | ||
|
|
b44236abdf | ||
|
|
92992b2e76 | ||
|
|
01bf987244 | ||
|
|
3a902871ef | ||
|
|
3729356740 | ||
|
|
3a7a9cc557 | ||
|
|
6aab63dd37 | ||
|
|
87a408a846 |
8
.hgtags
8
.hgtags
@@ -25,3 +25,11 @@ caf58ffa084568990cbb3441f9ae188e36b31770 jdk7-b42
|
||||
1bf51a4c2627c2f0e0cbcc2cf0421bdb37f1f2b2 jdk7-b48
|
||||
6b84b04a80afe23262377c60913eebfc898f14c4 jdk7-b49
|
||||
5da0e6b9f4f18ef483c977337214b12ee0e1fc8f jdk7-b50
|
||||
a25c5ec5e40e07733d1ff9898a0abe36159288ff jdk7-b51
|
||||
7a90e89e36d103038f8667f6a7daae34ecfa1ad8 jdk7-b52
|
||||
d52186ee770dac57950536cd00ccbfdef360b04c jdk7-b53
|
||||
15096652c4d48dfb9fc0b2cb135304db94c65ba0 jdk7-b54
|
||||
c8b275d62d6b0a980c510e839b70292245863e85 jdk7-b55
|
||||
a8134c4ee2cf451cf9b5e1609f39d83ecd53acc5 jdk7-b56
|
||||
b44f05654c26fcd1f995e712992f9b07ffd7c0c6 jdk7-b57
|
||||
d60a9ce3c3eabf28f5d50ae839d18be04a551bc2 jdk7-b58
|
||||
|
||||
@@ -25,3 +25,11 @@ d7744e86dedc21a8ecf6bdb73eb191b8eaf5b0da jdk7-b47
|
||||
4ae9f4bfdb98f65bd957e3fe72471b320150b38e jdk7-b48
|
||||
aee93a8992d2389121eb610c00a86196f3e2b9b0 jdk7-b49
|
||||
5111e13e44e542fe945b47ab154546daec36737d jdk7-b50
|
||||
0f0189d55ce4a1f7840da7582ac7d970b3b7ab15 jdk7-b51
|
||||
4264c2fe66493e57c411045a1b61377796641e45 jdk7-b52
|
||||
c235f4a8559d196879c56af80159f67ee5d0e720 jdk7-b53
|
||||
2ef382b1bbd58a68e668391c6145a4b2066c5b96 jdk7-b54
|
||||
aea0ace7a1e43619800931d42bbf69c579361c2d jdk7-b55
|
||||
ba12117a5e6c918578d6b2a8c693232a33289024 jdk7-b56
|
||||
ffd09e767dfa6d21466183a400f72cf62d53297f jdk7-b57
|
||||
59b497130f82ec809c245ffb5e521e3a5fabf8af jdk7-b58
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
</li>
|
||||
<li><a href="#zip">Zip and Unzip</a> </li>
|
||||
<li><a href="#freetype">FreeType2 Fonts</a> </li>
|
||||
<li><a href="#jibx">JIBX Libraries</a> </li>
|
||||
<li>Linux and Solaris:
|
||||
<ul>
|
||||
<li><a href="#cups">CUPS Include files</a> </li>
|
||||
@@ -585,6 +586,11 @@
|
||||
Install or upgrade the <a href="#freetype">FreeType development
|
||||
package</a>.
|
||||
</li>
|
||||
<li>
|
||||
Install the
|
||||
<a href="#jibx">JIBX Libraries</a>, set
|
||||
<tt><a href="#ALT_JIBX_LIBS_PATH">ALT_JIBX_LIBS_PATH</a></tt>.
|
||||
</li>
|
||||
<li>
|
||||
Install
|
||||
<a href="#ant">Ant</a>,
|
||||
@@ -650,6 +656,11 @@
|
||||
<a href="#cups">CUPS Include files</a>, set
|
||||
<tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
|
||||
</li>
|
||||
<li>
|
||||
Install the
|
||||
<a href="#jibx">JIBX Libraries</a>, set
|
||||
<tt><a href="#ALT_JIBX_LIBS_PATH">ALT_JIBX_LIBS_PATH</a></tt>.
|
||||
</li>
|
||||
<li>
|
||||
Install
|
||||
<a href="#ant">Ant</a>,
|
||||
@@ -745,6 +756,11 @@
|
||||
Install
|
||||
<a href="#dxsdk">Microsoft DirectX SDK</a>.
|
||||
</li>
|
||||
<li>
|
||||
Install the
|
||||
<a href="#jibx">JIBX Libraries</a>, set
|
||||
<tt><a href="#ALT_JIBX_LIBS_PATH">ALT_JIBX_LIBS_PATH</a></tt>.
|
||||
</li>
|
||||
<li>
|
||||
Install
|
||||
<a href="#ant">Ant</a>,
|
||||
@@ -874,6 +890,27 @@
|
||||
fine for most JDK developers.
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="jibx">JIBX</a></h4>
|
||||
<blockquote>
|
||||
JIBX libraries version 1.1.5 is required for building the OpenJDK.
|
||||
Namely, the following JAR files from the JIBX distribution package
|
||||
are required:
|
||||
<ul>
|
||||
<li>bcel.jar
|
||||
<li>jibx-bind.jar
|
||||
<li>jibx-run.jar
|
||||
<li>xpp3.jar
|
||||
</ul>
|
||||
<p>
|
||||
You can download the package from the
|
||||
<a href="http://jibx.sourceforge.net" target="_blank">JIBX site</a>.
|
||||
<p>
|
||||
You will need to set the
|
||||
<tt><a href="#ALT_JIBX_LIBS_PATH">ALT_JIBX_LIBS_PATH</a></tt>
|
||||
environment variable to refer to place where the JAR files,
|
||||
above, are located.
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="compilers">Compilers</a></h4>
|
||||
<blockquote>
|
||||
<strong><a name="gcc">Linux gcc/binutils</a></strong>
|
||||
@@ -1425,6 +1462,12 @@
|
||||
The default will refer to
|
||||
<tt>jdk/src/share/lib/security/cacerts</tt>.
|
||||
</dd>
|
||||
<dt><tt><a name="ALT_JIBX_LIBS_PATH">ALT_JIBX_LIBS_PATH</a></tt></dt>
|
||||
<dd>
|
||||
The location of the <a href="#jibx">JIBX libraries</a> file.
|
||||
The default value is
|
||||
<tt>$(ALT_SLASH_JAVA)/devtools/share/jibx/lib</tt>.
|
||||
</dd>
|
||||
<dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt>
|
||||
<dd>
|
||||
The location of the CUPS header files.
|
||||
|
||||
@@ -25,3 +25,11 @@ ccd6a16502e0650d91d85c4b86be05cbcd461a87 jdk7-b42
|
||||
0be222241fd405e48915647facfaa176621b39b9 jdk7-b48
|
||||
d70978bc64bc7a04be7797ab0dcd9b7b1b3a6bff jdk7-b49
|
||||
0edbd0074b02b42b2b83cc47cb391d4869b7a8ec jdk7-b50
|
||||
3eb8f1047a7402a9a79937d1c39560e931e91da2 jdk7-b51
|
||||
bec82237d694f9802b820fa11bbb4f7fa9bf8e77 jdk7-b52
|
||||
3c4d73194f6f89f040ae3b2d257335dfa8a1b2b5 jdk7-b53
|
||||
8130ac858d6789d5853d23044ba4a992afda574a jdk7-b54
|
||||
7a869f16ba83060c34b77620406cfa89d1cd7084 jdk7-b55
|
||||
553a664b807bb3a3c93f3b5a3c20ff0a90e08371 jdk7-b56
|
||||
972c6157fae57850694675da82fd58a17930db0a jdk7-b57
|
||||
2e3b8edab3ef55406494d3dd562e06882e6fc15e jdk7-b58
|
||||
|
||||
@@ -80,11 +80,11 @@ ORBUTIL.MC = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/ORBUtil.mc
|
||||
POA.MC = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/POA.mc
|
||||
UTIL.MC = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/Util.mc
|
||||
|
||||
MC_GENERATE_CLASS = $(SRC_DIR)/com/sun/tools/corba/se/logutil/scripts/mc.scm -main main make-class
|
||||
MC_GENERATE_LOG_RB = $(SRC_DIR)/com/sun/tools/corba/se/logutil/scripts/mc.scm -main main make-resource
|
||||
MC_GENERATE_CLASS = make-class
|
||||
MC_GENERATE_LOG_RB = make-resource
|
||||
|
||||
JSCHEME_GENERATE_CLASS = $(BOOT_JAVA_CMD) jscheme.REPL $(MC_GENERATE_CLASS)
|
||||
JSCHEME_GENERATE_LOG_RB = $(BOOT_JAVA_CMD) jscheme.REPL $(MC_GENERATE_LOG_RB)
|
||||
JSCHEME_GENERATE_CLASS = $(BOOT_JAVA_CMD) com.sun.tools.corba.se.logutil.MC $(MC_GENERATE_CLASS)
|
||||
JSCHEME_GENERATE_LOG_RB = $(BOOT_JAVA_CMD) com.sun.tools.corba.se.logutil.MC $(MC_GENERATE_LOG_RB)
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -1,330 +0,0 @@
|
||||
#!echo "This is not a shell script"
|
||||
#############################################################################
|
||||
#
|
||||
# Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Sun designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Sun in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# JPRT shell configuration for building.
|
||||
#
|
||||
# Input environment variables:
|
||||
# ALT_BOOTDIR
|
||||
# ALT_SLASH_JAVA
|
||||
# ALT_JDK_IMPORT_PATH
|
||||
# Windows Only:
|
||||
# PATH
|
||||
# VS71COMNTOOLS
|
||||
# PROCESSOR_IDENTIFIER
|
||||
# ROOTDIR
|
||||
#
|
||||
# Output variable settings:
|
||||
# make Full path to GNU make
|
||||
# compiler_path Path to compiler bin directory
|
||||
# compiler_name Unique name of this compiler
|
||||
#
|
||||
# Output environment variables:
|
||||
# PATH
|
||||
# ALT_COMPILER_PATH
|
||||
# Windows Only:
|
||||
# ALT_MSDEVTOOLS_PATH
|
||||
# ALT_DEVTOOLS_PATH (To avoid the C:/UTILS default)
|
||||
# LIB
|
||||
# INCLUDE
|
||||
#
|
||||
# After JDK6, most settings will be found via ALT_SLASH_JAVA or
|
||||
# by way of other system environment variables. If this was JDK5
|
||||
# or an older JDK, you might need to export more ALT_* variables.
|
||||
#
|
||||
# On Windows AMD64, if MSSDK is not set, assumes Platform SDK is installed at:
|
||||
# C:/Program Files/Microsoft Platform SDK
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
#############################################################################
|
||||
# Error
|
||||
error() # message
|
||||
{
|
||||
echo "ERROR: $1"
|
||||
exit 6
|
||||
}
|
||||
# Directory must exist
|
||||
dirMustExist() # dir name
|
||||
{
|
||||
if [ ! -d "$1" ] ; then
|
||||
error "Directory for $2 does not exist: $1"
|
||||
fi
|
||||
}
|
||||
# File must exist
|
||||
fileMustExist() # dir name
|
||||
{
|
||||
if [ ! -f "$1" ] ; then
|
||||
error "File for $2 does not exist: $1"
|
||||
fi
|
||||
}
|
||||
#############################################################################
|
||||
|
||||
# Should be set by JPRT as the 3 basic inputs
|
||||
bootdir="${ALT_BOOTDIR}"
|
||||
slashjava="${ALT_SLASH_JAVA}"
|
||||
jdk_import="${ALT_JDK_IMPORT_PATH}"
|
||||
|
||||
# The /java/devtools items
|
||||
jdk_devtools="${slashjava}/devtools"
|
||||
share="${jdk_devtools}/share"
|
||||
|
||||
# The 3 bin directories in common to all platforms
|
||||
sharebin="${share}/bin"
|
||||
|
||||
# Check input
|
||||
dirMustExist "${bootdir}" ALT_BOOTDIR
|
||||
dirMustExist "${slashjava}" ALT_SLASH_JAVA
|
||||
dirMustExist "${jdk_import}" ALT_JDK_IMPORT_PATH
|
||||
|
||||
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
|
||||
osname=`uname -s`
|
||||
if [ "${osname}" = SunOS ] ; then
|
||||
|
||||
# SOLARIS: Sparc or X86
|
||||
osarch=`uname -p`
|
||||
if [ "${osarch}" = sparc ] ; then
|
||||
solaris_arch=sparc
|
||||
else
|
||||
solaris_arch=i386
|
||||
fi
|
||||
|
||||
# Get the compilers into path (make sure it matches ALT setting)
|
||||
if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
|
||||
compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
|
||||
else
|
||||
compiler_name=SS12
|
||||
fi
|
||||
compiler_path=${jdk_devtools}/${solaris_arch}/SUNWspro/${compiler_name}/bin
|
||||
ALT_COMPILER_PATH="${compiler_path}"
|
||||
export ALT_COMPILER_PATH
|
||||
dirMustExist "${compiler_path}" ALT_COMPILER_PATH
|
||||
path4sdk=${compiler_path}:${sharebin}
|
||||
|
||||
# Add basic solaris system paths
|
||||
path4sdk=${path4sdk}:/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
|
||||
|
||||
# Get the previous JDK to be used to bootstrap the build
|
||||
path4sdk=${bootdir}/bin:${path4sdk}
|
||||
|
||||
# Find GNU make
|
||||
make=/usr/sfw/bin/gmake
|
||||
if [ ! -f ${make} ] ; then
|
||||
make=/opt/sfw/bin/gmake
|
||||
if [ ! -f ${make} ] ; then
|
||||
make=${jdk_devtools}/${solaris_arch}/bin/gnumake
|
||||
fi
|
||||
fi
|
||||
fileMustExist "${make}" make
|
||||
|
||||
# File creation mask
|
||||
umask 002
|
||||
|
||||
elif [ "${osname}" = Linux ] ; then
|
||||
|
||||
# LINUX: X86, AMD64
|
||||
osarch=`uname -m`
|
||||
if [ "${osarch}" = i686 ] ; then
|
||||
linux_arch=i586
|
||||
elif [ "${osarch}" = x86_64 ] ; then
|
||||
linux_arch=amd64
|
||||
fi
|
||||
|
||||
# Get the compilers into path (make sure it matches ALT setting)
|
||||
compiler_path=/usr/bin
|
||||
compiler_name=usr_bin
|
||||
ALT_COMPILER_PATH="${compiler_path}"
|
||||
export ALT_COMPILER_PATH
|
||||
dirMustExist "${compiler_path}" ALT_COMPILER_PATH
|
||||
path4sdk=${compiler_path}:${sharebin}
|
||||
|
||||
# Add basic paths
|
||||
path4sdk=${path4sdk}:/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
# Get the previous JDK to be used to bootstrap the build
|
||||
path4sdk=${bootdir}/bin:${path4sdk}
|
||||
|
||||
# Find GNU make
|
||||
make=/usr/bin/make
|
||||
fileMustExist "${make}" make
|
||||
|
||||
umask 002
|
||||
|
||||
else
|
||||
|
||||
# Windows: Differs on CYGWIN vs. MKS, and the compiler available.
|
||||
# Also, blanks in pathnames gives GNU make headaches, so anything placed
|
||||
# in any ALT_* variable should be the short windows dosname.
|
||||
|
||||
# WINDOWS: Install and use MKS or CYGWIN (should have already been done)
|
||||
# Assumption here is that you are in a shell window via MKS or cygwin.
|
||||
# MKS install should have defined the environment variable ROOTDIR.
|
||||
# We also need to figure out which one we have: X86, AMD64
|
||||
if [ "`echo ${PROCESSOR_IDENTIFIER} | fgrep AMD64`" != "" ] ; then
|
||||
windows_arch=amd64
|
||||
else
|
||||
windows_arch=i586
|
||||
fi
|
||||
|
||||
# We need to determine if we are running a CYGWIN shell or an MKS shell
|
||||
# (if uname isn't available, then it will be unix_toolset=unknown)
|
||||
unix_toolset=unknown
|
||||
if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
|
||||
# We kind of assume ROOTDIR is where MKS is and it's ok
|
||||
unix_toolset=MKS
|
||||
mkshome=`dosname -s "${ROOTDIR}"`
|
||||
# Utility to convert to short pathnames without spaces
|
||||
dosname="${mkshome}/mksnt/dosname -s"
|
||||
# Most unix utilities are in the mksnt directory of ROOTDIR
|
||||
unixcommand_path="${mkshome}/mksnt"
|
||||
path4sdk="${sharebin};${unixcommand_path}"
|
||||
dirMustExist "${unixcommand_path}" ALT_UNIXCOMMAND_PATH
|
||||
devtools_path="${jdk_devtools}/win32/bin"
|
||||
path4sdk="${devtools_path};${path4sdk}"
|
||||
# Normally this need not be set, but on Windows it's default is C:/UTILS
|
||||
ALT_DEVTOOLS_PATH="${devtools_path}"
|
||||
export ALT_DEVTOOLS_PATH
|
||||
dirMustExist "${devtools_path}" ALT_DEVTOOLS_PATH
|
||||
# Find GNU make
|
||||
make="${devtools_path}/gnumake.exe"
|
||||
fileMustExist "${make}" make
|
||||
elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
|
||||
# For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
|
||||
unix_toolset=CYGWIN
|
||||
# Utility to convert to short pathnames without spaces
|
||||
dosname="/usr/bin/cygpath -a -m -s"
|
||||
# Most unix utilities are in the /usr/bin
|
||||
unixcommand_path="/usr/bin"
|
||||
path4sdk="${sharebin};${unixcommand_path}"
|
||||
dirMustExist "${unixcommand_path}" ALT_UNIXCOMMAND_PATH
|
||||
# Find GNU make
|
||||
make="${unixcommand_path}/make.exe"
|
||||
fileMustExist "${make}" make
|
||||
else
|
||||
echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
|
||||
fi
|
||||
|
||||
# WINDOWS: Compiler setup (nasty part)
|
||||
# NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
|
||||
# NOTE: CYGWIN has a link.exe too, make sure the compilers are first
|
||||
if [ "${windows_arch}" = i586 ] ; then
|
||||
# 32bit Windows compiler settings
|
||||
# VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined)
|
||||
vs_root=`${dosname} "${VS71COMNTOOLS}/../.."`
|
||||
# Fill in PATH, LIB, and INCLUDE (unset all others to make sure)
|
||||
msdev_root="${vs_root}/Common7/Tools"
|
||||
msdevtools_path="${msdev_root}/bin"
|
||||
vc7_root="${vs_root}/Vc7"
|
||||
compiler_path="${vc7_root}/bin"
|
||||
compiler_name=VS2003
|
||||
platform_sdk="${vc7_root}/PlatformSDK"
|
||||
# LIB and INCLUDE must use ; as a separator
|
||||
include4sdk="${vc7_root}/atlmfc/include"
|
||||
include4sdk="${include4sdk};${vc7_root}/include"
|
||||
include4sdk="${include4sdk};${platform_sdk}/include/prerelease"
|
||||
include4sdk="${include4sdk};${platform_sdk}/include"
|
||||
include4sdk="${include4sdk};${vs_root}/SDK/v1.1/include"
|
||||
lib4sdk="${vc7_root}/atlmfc/lib"
|
||||
lib4sdk="${lib4sdk};${vc7_root}/lib"
|
||||
lib4sdk="${lib4sdk};${platform_sdk}/lib/prerelease"
|
||||
lib4sdk="${lib4sdk};${platform_sdk}/lib"
|
||||
lib4sdk="${lib4sdk};${vs_root}/SDK/v1.1/lib"
|
||||
# Search path and DLL locating path
|
||||
# WARNING: CYGWIN has a link.exe too, make sure compilers are first
|
||||
path4sdk="${vs_root}/Common7/Tools/bin;${path4sdk}"
|
||||
path4sdk="${vs_root}/SDK/v1.1/bin;${path4sdk}"
|
||||
path4sdk="${vs_root}/Common7/Tools;${path4sdk}"
|
||||
path4sdk="${vs_root}/Common7/Tools/bin/prerelease;${path4sdk}"
|
||||
path4sdk="${vs_root}/Common7/IDE;${path4sdk}"
|
||||
path4sdk="${compiler_path};${path4sdk}"
|
||||
elif [ "${windows_arch}" = amd64 ] ; then
|
||||
# AMD64 64bit Windows compiler settings
|
||||
if [ "${MSSDK}" != "" ] ; then
|
||||
platform_sdk="${MSSDK}"
|
||||
else
|
||||
platform_sdk=`${dosname} "C:/Program Files/Microsoft Platform SDK/"`
|
||||
fi
|
||||
compiler_path="${platform_sdk}/Bin/win64/x86/AMD64"
|
||||
compiler_name=VS2005_PSDK
|
||||
msdevtools_path="${platform_sdk}/Bin"
|
||||
# LIB and INCLUDE must use ; as a separator
|
||||
include4sdk="${platform_sdk}/Include"
|
||||
include4sdk="${include4sdk};${platform_sdk}/Include/crt/sys"
|
||||
include4sdk="${include4sdk};${platform_sdk}/Include/mfc"
|
||||
include4sdk="${include4sdk};${platform_sdk}/Include/atl"
|
||||
include4sdk="${include4sdk};${platform_sdk}/Include/crt"
|
||||
lib4sdk="${platform_sdk}/Lib/AMD64"
|
||||
lib4sdk="${lib4sdk};${platform_sdk}/Lib/AMD64/atlmfc"
|
||||
# Search path and DLL locating path
|
||||
# WARNING: CYGWIN has a link.exe too, make sure compilers are first
|
||||
path4sdk="${platform_sdk}/bin;${path4sdk}"
|
||||
path4sdk="${compiler_path};${path4sdk}"
|
||||
fi
|
||||
# Export LIB and INCLUDE
|
||||
unset lib
|
||||
unset Lib
|
||||
LIB="${lib4sdk}"
|
||||
export LIB
|
||||
unset include
|
||||
unset Include
|
||||
INCLUDE="${include4sdk}"
|
||||
export INCLUDE
|
||||
# Set the ALT variable
|
||||
ALT_COMPILER_PATH=`${dosname} "${compiler_path}"`
|
||||
export ALT_COMPILER_PATH
|
||||
dirMustExist "${compiler_path}" ALT_COMPILER_PATH
|
||||
ALT_MSDEVTOOLS_PATH=`${dosname} "${msdevtools_path}"`
|
||||
export ALT_MSDEVTOOLS_PATH
|
||||
dirMustExist "${msdevtools_path}" ALT_MSDEVTOOLS_PATH
|
||||
|
||||
# WINDOWS: Get the previous JDK to be used to bootstrap the build
|
||||
path4sdk="${bootdir}/bin;${path4sdk}"
|
||||
|
||||
# Turn all \\ into /, remove duplicates and trailing /
|
||||
slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
|
||||
|
||||
# For windows, it's hard to know where the system is, so we just add this
|
||||
# to PATH.
|
||||
path4sdk="${slash_path};${PATH}"
|
||||
|
||||
# Convert path4sdk to cygwin style
|
||||
if [ "${unix_toolset}" = CYGWIN ] ; then
|
||||
path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Export PATH setting
|
||||
PATH="${path4sdk}"
|
||||
export PATH
|
||||
|
||||
# Things we need to unset
|
||||
unset LD_LIBRARY_PATH
|
||||
unset LD_LIBRARY_PATH_32
|
||||
unset LD_LIBRARY_PATH_64
|
||||
unset JAVA_HOME
|
||||
|
||||
@@ -32,8 +32,8 @@ solaris_sparc_5.10,\
|
||||
solaris_sparcv9_5.10,\
|
||||
solaris_i586_5.10,\
|
||||
solaris_x64_5.10,\
|
||||
linux_i586,\
|
||||
linux_x64,\
|
||||
linux_i586_2.6,\
|
||||
linux_x64_2.6,\
|
||||
windows_i586,\
|
||||
windows_x64
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -75,15 +75,14 @@ ORBUTIL.MC = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/ORBUtil.mc
|
||||
POA.MC = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/POA.mc
|
||||
UTIL.MC = $(SRC_DIR)/com/sun/corba/se/spi/logging/data/Util.mc
|
||||
|
||||
MC_GENERATE_CLASS = $(SRC_DIR)/com/sun/tools/corba/se/logutil/scripts/mc.scm -main main make-class
|
||||
MC_GENERATE_LOG_RB = $(SRC_DIR)/com/sun/tools/corba/se/logutil/scripts/mc.scm -main main make-resource
|
||||
MC_GENERATE_CLASS = make-class
|
||||
MC_GENERATE_LOG_RB = make-resource
|
||||
|
||||
JSCHEME_LIB_DIRECTORY=$(SRC_DIR)/com/sun/tools/corba/se/logutil/lib
|
||||
JSCHEME_CLASSPATH=$(JSCHEME_LIB_DIRECTORY)/jscheme.jar$(CLASSPATH_SEPARATOR)$(JSCHEME_LIB_DIRECTORY)/jschemelogutil.jar
|
||||
JSCHEME_GENERATE_CLASS = $(BOOT_JAVA_CMD) \
|
||||
-cp "$(JSCHEME_CLASSPATH)" jscheme.REPL $(MC_GENERATE_CLASS)
|
||||
JSCHEME_GENERATE_LOG_RB = $(BOOT_JAVA_CMD) \
|
||||
-cp "$(JSCHEME_CLASSPATH)" jscheme.REPL $(MC_GENERATE_LOG_RB)
|
||||
MC_CLASSPATH=$(BUILDTOOLJARDIR)/MC.jar
|
||||
MCJ_GENERATE_CLASS = $(BOOT_JAVA_CMD) \
|
||||
-cp "$(MC_CLASSPATH)" com.sun.tools.corba.se.logutil.MC $(MC_GENERATE_CLASS)
|
||||
MCJ_GENERATE_LOG_RB = $(BOOT_JAVA_CMD) \
|
||||
-cp "$(MC_CLASSPATH)" com.sun.tools.corba.se.logutil.MC $(MC_GENERATE_LOG_RB)
|
||||
|
||||
|
||||
#
|
||||
@@ -104,28 +103,28 @@ $(LOG_GENDIRECTORY):
|
||||
$(MKDIR) -p $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/ActivationSystemException.java : $(ACTIVATION.MC)
|
||||
$(JSCHEME_GENERATE_CLASS) $(ACTIVATION.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_CLASS) $(ACTIVATION.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/IORSystemException.java : $(IOR.MC)
|
||||
$(JSCHEME_GENERATE_CLASS) $(IOR.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_CLASS) $(IOR.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/InterceptorsSystemException.java : $(INTERCEPTORS.MC)
|
||||
$(JSCHEME_GENERATE_CLASS) $(INTERCEPTORS.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_CLASS) $(INTERCEPTORS.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/NamingSystemException.java : $(NAMING.MC)
|
||||
$(JSCHEME_GENERATE_CLASS) $(NAMING.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_CLASS) $(NAMING.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/OMGSystemException.java : $(OMG.MC)
|
||||
$(JSCHEME_GENERATE_CLASS) $(OMG.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_CLASS) $(OMG.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/ORBUtilSystemException.java : $(ORBUTIL.MC)
|
||||
$(JSCHEME_GENERATE_CLASS) $(ORBUTIL.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_CLASS) $(ORBUTIL.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/POASystemException.java : $(POA.MC)
|
||||
$(JSCHEME_GENERATE_CLASS) $(POA.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_CLASS) $(POA.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/UtilSystemException.java : $(UTIL.MC)
|
||||
$(JSCHEME_GENERATE_CLASS) $(UTIL.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_CLASS) $(UTIL.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
logresource.generate: $(LOG_GENDIRECTORY)/LogStrings.properties
|
||||
|
||||
@@ -142,28 +141,28 @@ $(LOG_GENDIRECTORY)/LogStrings.properties: \
|
||||
$(CAT) $(LOG_GENDIRECTORY)/*.resource > $(LOG_GENDIRECTORY)/LogStrings.properties
|
||||
|
||||
$(LOG_GENDIRECTORY)/ActivationSystemException.resource : $(ACTIVATION.MC)
|
||||
$(JSCHEME_GENERATE_LOG_RB) $(ACTIVATION.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_LOG_RB) $(ACTIVATION.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/IORSystemException.resource : $(IOR.MC)
|
||||
$(JSCHEME_GENERATE_LOG_RB) $(IOR.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_LOG_RB) $(IOR.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/InterceptorsSystemException.resource : $(INTERCEPTORS.MC)
|
||||
$(JSCHEME_GENERATE_LOG_RB) $(INTERCEPTORS.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_LOG_RB) $(INTERCEPTORS.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/NamingSystemException.resource : $(NAMING.MC)
|
||||
$(JSCHEME_GENERATE_LOG_RB) $(NAMING.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_LOG_RB) $(NAMING.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/OMGSystemException.resource : $(OMG.MC)
|
||||
$(JSCHEME_GENERATE_LOG_RB) $(OMG.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_LOG_RB) $(OMG.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/ORBUtilSystemException.resource : $(ORBUTIL.MC)
|
||||
$(JSCHEME_GENERATE_LOG_RB) $(ORBUTIL.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_LOG_RB) $(ORBUTIL.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/POASystemException.resource : $(POA.MC)
|
||||
$(JSCHEME_GENERATE_LOG_RB) $(POA.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_LOG_RB) $(POA.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
$(LOG_GENDIRECTORY)/UtilSystemException.resource : $(UTIL.MC)
|
||||
$(JSCHEME_GENERATE_LOG_RB) $(UTIL.MC) $(LOG_GENDIRECTORY)
|
||||
$(MCJ_GENERATE_LOG_RB) $(UTIL.MC) $(LOG_GENDIRECTORY)
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -33,6 +33,7 @@ include $(BUILDDIR)/common/Defs.gmk
|
||||
SUBDIRS = \
|
||||
strip_properties \
|
||||
idlj \
|
||||
logutil \
|
||||
|
||||
all build clean clobber::
|
||||
$(SUBDIRS-loop)
|
||||
|
||||
43
corba/make/tools/logutil/Makefile
Normal file
43
corba/make/tools/logutil/Makefile
Normal file
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Sun designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Sun in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile for building the idlj tool
|
||||
#
|
||||
|
||||
BUILDDIR = ../..
|
||||
PACKAGE = com.sun.tools.corba.se.logutil
|
||||
PRODUCT = tools
|
||||
PROGRAM = MC
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
BUILDTOOL_SOURCE_ROOT = $(SHARE_SRC)/classes
|
||||
BUILDTOOL_MAIN = $(PKGDIR)/MC.java
|
||||
|
||||
#
|
||||
# Build tool jar rules.
|
||||
#
|
||||
include $(BUILDDIR)/common/BuildToolJar.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -44,6 +44,7 @@ public class BufferManagerReadStream
|
||||
// We should convert endOfStream to a final static dummy end node
|
||||
private boolean endOfStream = true;
|
||||
private BufferQueue fragmentQueue = new BufferQueue();
|
||||
private long FRAGMENT_TIMEOUT = 60000;
|
||||
|
||||
// REVISIT - This should go in BufferManagerRead. But, since
|
||||
// BufferManagerRead is an interface. BufferManagerRead
|
||||
@@ -111,9 +112,16 @@ public class BufferManagerReadStream
|
||||
throw wrapper.endOfStream() ;
|
||||
}
|
||||
|
||||
boolean interrupted = false;
|
||||
try {
|
||||
fragmentQueue.wait();
|
||||
} catch (InterruptedException e) {}
|
||||
fragmentQueue.wait(FRAGMENT_TIMEOUT);
|
||||
} catch (InterruptedException e) {
|
||||
interrupted = true;
|
||||
}
|
||||
|
||||
if (!interrupted && fragmentQueue.size() == 0) {
|
||||
throw wrapper.bufferReadManagerTimeout();
|
||||
}
|
||||
|
||||
if (receivedCancel) {
|
||||
throw new RequestCanceledException(cancelReqId);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -153,22 +153,22 @@ public class ObjectStreamClass implements java.io.Serializable {
|
||||
desc = new ObjectStreamClass(cl, superdesc,
|
||||
serializable, externalizable);
|
||||
}
|
||||
// Must always call init. See bug 4488137. This code was
|
||||
// incorrectly changed to return immediately on a non-null
|
||||
// cache result. That allowed threads to gain access to
|
||||
// unintialized instances.
|
||||
//
|
||||
// History: Note, the following init() call was originally within
|
||||
// the synchronization block, as it currently is now. Later, the
|
||||
// init() call was moved outside the synchronization block, and
|
||||
// the init() method used a private member variable lock, to
|
||||
// avoid performance problems. See bug 4165204. But that lead to
|
||||
// a deadlock situation, see bug 5104239. Hence, the init() method
|
||||
// has now been moved back into the synchronization block. The
|
||||
// right approach to solving these problems would be to rewrite
|
||||
// this class, based on the latest java.io.ObjectStreamClass.
|
||||
desc.init();
|
||||
}
|
||||
|
||||
// Must always call init. See bug 4488137. This code was
|
||||
// incorrectly changed to return immediately on a non-null
|
||||
// cache result. That allowed threads to gain access to
|
||||
// unintialized instances.
|
||||
//
|
||||
// All threads must sync on the member variable lock
|
||||
// and check the initialization state.
|
||||
//
|
||||
// Another possibility is to continue to synchronize on the
|
||||
// descriptorFor array, but that leads to poor performance
|
||||
// (see bug 4165204 "ObjectStreamClass can hold global lock
|
||||
// for a very long time").
|
||||
desc.init();
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -76,6 +76,7 @@ public class POAFactory implements ObjectAdapterFactory
|
||||
private ORB orb ;
|
||||
private POASystemException wrapper ;
|
||||
private OMGSystemException omgWrapper ;
|
||||
private boolean isShuttingDown = false;
|
||||
|
||||
public POASystemException getWrapper()
|
||||
{
|
||||
@@ -166,6 +167,7 @@ public class POAFactory implements ObjectAdapterFactory
|
||||
// pm.deactivate removes itself from poaManagers!
|
||||
Iterator managers = null ;
|
||||
synchronized (this) {
|
||||
isShuttingDown = true ;
|
||||
managers = (new HashSet(poaManagers)).iterator();
|
||||
}
|
||||
|
||||
@@ -208,9 +210,15 @@ public class POAFactory implements ObjectAdapterFactory
|
||||
ClosureFactory.makeFuture( rpClosure ) ) ;
|
||||
}
|
||||
|
||||
|
||||
public synchronized POA getRootPOA()
|
||||
{
|
||||
if (rootPOA == null) {
|
||||
// See if we are trying to getRootPOA while shutting down the ORB.
|
||||
if (isShuttingDown) {
|
||||
throw omgWrapper.noObjectAdaptor( ) ;
|
||||
}
|
||||
|
||||
try {
|
||||
Object obj = orb.resolve_initial_references(
|
||||
ORBConstants.ROOT_POA_NAME ) ;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -185,7 +185,6 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
private java.lang.Object runObj = new java.lang.Object();
|
||||
private java.lang.Object shutdownObj = new java.lang.Object();
|
||||
private java.lang.Object waitForCompletionObj = new java.lang.Object();
|
||||
private static final byte STATUS_OPERATING = 1;
|
||||
private static final byte STATUS_SHUTTING_DOWN = 2;
|
||||
private static final byte STATUS_SHUTDOWN = 3;
|
||||
@@ -194,7 +193,6 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
// XXX Should we move invocation tracking to the first level server dispatcher?
|
||||
private java.lang.Object invocationObj = new java.lang.Object();
|
||||
private int numInvocations = 0;
|
||||
|
||||
// thread local variable to store a boolean to detect deadlock in
|
||||
// ORB.shutdown(true).
|
||||
@@ -1245,37 +1243,48 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void shutdown(boolean wait_for_completion)
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
// to wait for completion, we would deadlock, so throw a standard
|
||||
// OMG exception.
|
||||
if (wait_for_completion && ((Boolean)isProcessingInvocation.get()).booleanValue()) {
|
||||
throw omgWrapper.shutdownWaitForCompletionDeadlock() ;
|
||||
}
|
||||
|
||||
// Avoid more than one thread performing shutdown at a time.
|
||||
synchronized (shutdownObj) {
|
||||
checkShutdownState();
|
||||
// This is to avoid deadlock
|
||||
if (wait_for_completion &&
|
||||
isProcessingInvocation.get() == Boolean.TRUE) {
|
||||
throw omgWrapper.shutdownWaitForCompletionDeadlock() ;
|
||||
}
|
||||
boolean doShutdown = false ;
|
||||
|
||||
status = STATUS_SHUTTING_DOWN;
|
||||
// XXX access to requestDispatcherRegistry should be protected
|
||||
// by the ORBImpl instance monitor, but is not here in the
|
||||
// shutdownServants call.
|
||||
shutdownServants(wait_for_completion);
|
||||
if (wait_for_completion) {
|
||||
synchronized ( waitForCompletionObj ) {
|
||||
while (numInvocations > 0) {
|
||||
try {
|
||||
waitForCompletionObj.wait();
|
||||
} catch (InterruptedException ex) {}
|
||||
}
|
||||
synchronized (this) {
|
||||
checkShutdownState() ;
|
||||
|
||||
if (status == STATUS_SHUTTING_DOWN) {
|
||||
if (!wait_for_completion)
|
||||
// If we are already shutting down and don't want
|
||||
// to wait, nothing to do: return.
|
||||
return ;
|
||||
} else {
|
||||
// The ORB status was STATUS_OPERATING, so start the shutdown.
|
||||
status = STATUS_SHUTTING_DOWN ;
|
||||
doShutdown = true ;
|
||||
}
|
||||
}
|
||||
|
||||
// At this point, status is SHUTTING_DOWN.
|
||||
// All shutdown calls with wait_for_completion == true must synchronize
|
||||
// here. Only the first call will be made with doShutdown == true.
|
||||
synchronized (shutdownObj) {
|
||||
if (doShutdown) {
|
||||
// shutdownServants will set all POAManagers into the
|
||||
// INACTIVE state, causing request to be rejected.
|
||||
// If wait_for_completion is true, this will not return until
|
||||
// all invocations have completed.
|
||||
shutdownServants(wait_for_completion);
|
||||
|
||||
synchronized (runObj) {
|
||||
runObj.notifyAll();
|
||||
}
|
||||
|
||||
synchronized (this) {
|
||||
status = STATUS_SHUTDOWN;
|
||||
}
|
||||
}
|
||||
synchronized ( runObj ) {
|
||||
runObj.notifyAll();
|
||||
}
|
||||
status = STATUS_SHUTDOWN;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1314,23 +1323,13 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
{
|
||||
synchronized (invocationObj) {
|
||||
isProcessingInvocation.set(Boolean.TRUE);
|
||||
numInvocations++;
|
||||
}
|
||||
}
|
||||
|
||||
public void finishedDispatch()
|
||||
{
|
||||
synchronized (invocationObj) {
|
||||
numInvocations--;
|
||||
isProcessingInvocation.set(Boolean.FALSE);
|
||||
if (numInvocations == 0) {
|
||||
synchronized (waitForCompletionObj) {
|
||||
waitForCompletionObj.notifyAll();
|
||||
}
|
||||
} else if (numInvocations < 0) {
|
||||
throw wrapper.numInvocationsAlreadyZero(
|
||||
CompletionStatus.COMPLETED_YES ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1341,12 +1340,24 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
*/
|
||||
public synchronized void destroy()
|
||||
{
|
||||
if (status == STATUS_OPERATING) {
|
||||
boolean shutdownFirst = false ;
|
||||
|
||||
synchronized (this) {
|
||||
shutdownFirst = (status == STATUS_OPERATING) ;
|
||||
}
|
||||
|
||||
if (shutdownFirst) {
|
||||
shutdown(true);
|
||||
}
|
||||
getCorbaTransportManager().close();
|
||||
getPIHandler().destroyInterceptors() ;
|
||||
status = STATUS_DESTROYED;
|
||||
|
||||
synchronized (this) {
|
||||
if (status < STATUS_DESTROYED) {
|
||||
getCorbaTransportManager().close();
|
||||
getPIHandler().destroyInterceptors() ;
|
||||
status = STATUS_DESTROYED;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -135,7 +135,7 @@ import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo;
|
||||
public class ORBSingleton extends ORB
|
||||
{
|
||||
// This is used to support read_Object.
|
||||
private static ORB fullORB;
|
||||
private ORB fullORB;
|
||||
private static PresentationManager.StubFactoryFactory staticStubFactoryFactory =
|
||||
PresentationDefaults.getStaticStubFactoryFactory() ;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -806,25 +806,6 @@ public final class ORBUtility {
|
||||
return result ;
|
||||
}
|
||||
|
||||
public static void setDaemon(Thread thread)
|
||||
{
|
||||
// Catch exceptions since setDaemon can cause a
|
||||
// security exception to be thrown under netscape
|
||||
// in the Applet mode
|
||||
final Thread finalThread = thread;
|
||||
try {
|
||||
AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public java.lang.Object run() {
|
||||
finalThread.setDaemon(true);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
// REVISIT: Object to get static method. Ignore it.
|
||||
dprint(new Object(), "setDaemon: Exception: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
public static String operationNameAndRequestId(CorbaMessageMediator m)
|
||||
{
|
||||
return "op/" + m.getOperationName() + " id/" + m.getRequestId();
|
||||
|
||||
@@ -202,6 +202,10 @@ public class IDLNameTranslatorImpl implements IDLNameTranslator {
|
||||
private IDLNameTranslatorImpl(Class[] interfaces)
|
||||
{
|
||||
|
||||
SecurityManager s = System.getSecurityManager();
|
||||
if (s != null) {
|
||||
s.checkPermission(new DynamicAccessPermission("access"));
|
||||
}
|
||||
try {
|
||||
IDLTypesUtil idlTypesUtil = new IDLTypesUtil();
|
||||
for (int ctr=0; ctr<interfaces.length; ctr++)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -53,7 +53,8 @@ import com.sun.corba.se.spi.orb.ORB;
|
||||
import com.sun.corba.se.spi.resolver.Resolver;
|
||||
|
||||
import com.sun.corba.se.impl.encoding.EncapsInputStream;
|
||||
import com.sun.corba.se.impl.logging.ORBUtilSystemException ;
|
||||
import com.sun.corba.se.impl.logging.ORBUtilSystemException;
|
||||
import com.sun.corba.se.impl.logging.OMGSystemException;
|
||||
import com.sun.corba.se.impl.naming.namingutil.INSURLHandler;
|
||||
import com.sun.corba.se.impl.naming.namingutil.IIOPEndpointInfo;
|
||||
import com.sun.corba.se.impl.naming.namingutil.INSURL;
|
||||
@@ -76,6 +77,7 @@ public class INSURLOperationImpl implements Operation
|
||||
{
|
||||
ORB orb;
|
||||
ORBUtilSystemException wrapper ;
|
||||
OMGSystemException omgWrapper ;
|
||||
Resolver bootstrapResolver ;
|
||||
|
||||
// Root Naming Context for default resolution of names.
|
||||
@@ -90,6 +92,8 @@ public class INSURLOperationImpl implements Operation
|
||||
this.orb = orb ;
|
||||
wrapper = ORBUtilSystemException.get( orb,
|
||||
CORBALogDomains.ORB_RESOLVER ) ;
|
||||
omgWrapper = OMGSystemException.get( orb,
|
||||
CORBALogDomains.ORB_RESOLVER ) ;
|
||||
this.bootstrapResolver = bootstrapResolver ;
|
||||
}
|
||||
|
||||
@@ -126,6 +130,8 @@ public class INSURLOperationImpl implements Operation
|
||||
return getIORFromString( str ) ;
|
||||
else {
|
||||
INSURL insURL = insURLHandler.parseURL( str ) ;
|
||||
if (insURL == null)
|
||||
throw omgWrapper.soBadSchemeName() ;
|
||||
return resolveINSURL( insURL ) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -1057,7 +1057,9 @@ public class SocketOrChannelConnectionImpl
|
||||
|
||||
// IIOPOutputStream will cleanup the connection info when it
|
||||
// sees this exception.
|
||||
throw wrapper.writeErrorSend(e1) ;
|
||||
SystemException exc = wrapper.writeErrorSend(e1);
|
||||
purgeCalls(exc, false, true);
|
||||
throw exc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
;
|
||||
|
||||
; Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
; Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
; DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
;
|
||||
; This code is free software; you can redistribute it and/or modify it
|
||||
@@ -144,6 +144,8 @@
|
||||
15 WARNING "Read of full message failed : bytes requested = {0} bytes read = {1} max wait time = {2} total time spent waiting = {3}")
|
||||
(CREATE_LISTENER_FAILED
|
||||
16 SEVERE "Unable to create listener thread on the specified port: {0}")
|
||||
(BUFFER_READ_MANAGER_TIMEOUT
|
||||
17 WARNING "Timeout while reading data in buffer manager")
|
||||
)
|
||||
(DATA_CONVERSION
|
||||
(BAD_STRINGIFIED_IOR_LEN 1 WARNING "A character did not map to the transmission code set")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -2086,8 +2086,8 @@ class Parser
|
||||
|
||||
if (token.type == Token.LeftBrace) {
|
||||
repIDStack.push(((IDLID)repIDStack.peek ()).clone ()) ;
|
||||
((IDLID)repIDStack.peek ()).appendToName (name);
|
||||
structEntry = makeStructEntry( name, entry, false ) ;
|
||||
((IDLID)repIDStack.peek ()).appendToName (name);
|
||||
prep.openScope (structEntry);
|
||||
match (Token.LeftBrace) ;
|
||||
member (structEntry) ;
|
||||
@@ -2174,8 +2174,8 @@ class Parser
|
||||
|
||||
if (token.type == Token.Switch) {
|
||||
repIDStack.push (((IDLID)repIDStack.peek ()).clone ());
|
||||
((IDLID)repIDStack.peek ()).appendToName (name);
|
||||
unionEntry = makeUnionEntry( name, entry, false ) ;
|
||||
((IDLID)repIDStack.peek ()).appendToName (name);
|
||||
match (Token.Switch);
|
||||
match (Token.LeftParen);
|
||||
unionEntry.type (switchTypeSpec (unionEntry));
|
||||
@@ -2641,8 +2641,8 @@ class Parser
|
||||
private void exceptDcl (SymtabEntry entry) throws IOException, ParseException
|
||||
{
|
||||
match (Token.Exception);
|
||||
ExceptionEntry exceptEntry = stFactory.exceptionEntry (entry, (IDLID)repIDStack.peek ());
|
||||
repIDStack.push (((IDLID)repIDStack.peek ()).clone ());
|
||||
ExceptionEntry exceptEntry = stFactory.exceptionEntry (entry, (IDLID)repIDStack.peek ());
|
||||
((IDLID)repIDStack.peek ()).appendToName (token.name);
|
||||
exceptEntry.sourceFile (scanner.fileEntry ());
|
||||
// Comment must immediately precede "exception" keyword
|
||||
|
||||
@@ -1,11 +1,35 @@
|
||||
/*
|
||||
* Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COMPONENT_NAME: idl.parser
|
||||
*
|
||||
*
|
||||
* ORIGINS: 27
|
||||
*
|
||||
* THIS PRODUCT CONTAINS RESTRICTED MATERIALS OF IBM
|
||||
* 5639-D57, (C) COPYRIGHT International Business Machines Corp., 1997, 1998
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
CORBA IDL
|
||||
|
||||
@@ -1,11 +1,35 @@
|
||||
/*
|
||||
* Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COMPONENT_NAME: idl.parser
|
||||
*
|
||||
*
|
||||
* ORIGINS: 27
|
||||
*
|
||||
* THIS PRODUCT CONTAINS RESTRICTED MATERIALS OF IBM
|
||||
* 5639-D57, (C) COPYRIGHT International Business Machines Corp., 1997, 1998
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
CORBA IDL
|
||||
|
||||
@@ -1,14 +1,38 @@
|
||||
/*
|
||||
* COMPONENT_NAME: idl.parser
|
||||
*
|
||||
* ORIGINS: 27
|
||||
* Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* THIS PRODUCT CONTAINS RESTRICTED MATERIALS OF IBM
|
||||
* 5639-D57, (C) COPYRIGHT International Business Machines Corp., 1997, 1998
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
CORBA 2.3 IDL
|
||||
/*
|
||||
* COMPONENT_NAME: idl.parser
|
||||
*
|
||||
* ORIGINS: 27
|
||||
*
|
||||
* 5639-D57, (C) COPYRIGHT International Business Machines Corp., 1997, 1998
|
||||
*
|
||||
*/
|
||||
|
||||
CORBA 2.3 IDL
|
||||
---------------
|
||||
|
||||
(1) <specification> <definition><specification'>
|
||||
@@ -83,7 +107,7 @@ CORBA 2.3 IDL
|
||||
|
||||
(16) <vad> e
|
||||
<export> <vad>
|
||||
|
||||
|
||||
(17) <value_dcl> <value_header> "{" <value_element> <ve> "}"
|
||||
|
||||
(17) <ve> e
|
||||
@@ -91,9 +115,9 @@ CORBA 2.3 IDL
|
||||
|
||||
(18) <value_header> "custom" "valuetype" <id> <value_inheritance_spec>
|
||||
"valuetype" <id> <value_inheritance_spec>
|
||||
"custom" "valuetype" <id>
|
||||
"valuetype" <id>
|
||||
|
||||
"custom" "valuetype" <id>
|
||||
"valuetype" <id>
|
||||
|
||||
(19) <value_inheritance_spec> <opt_inherits> <opt_supports>
|
||||
|
||||
(19) <opt_inherits> e
|
||||
@@ -107,7 +131,7 @@ CORBA 2.3 IDL
|
||||
"supports" <interface_name> <interface_name_list>
|
||||
|
||||
(19) <interface_name_list> e
|
||||
"," <interface_name> <interface_name_list>
|
||||
"," <interface_name> <interface_name_list>
|
||||
|
||||
(20) <value_name> <scoped_name>
|
||||
|
||||
@@ -121,7 +145,7 @@ CORBA 2.3 IDL
|
||||
(23) <init_dcl> "factory" <id> "(" ")"
|
||||
"factory" <id> "(" <init_param_dcls> ")"
|
||||
|
||||
(24) <init_param_dcls> <init_param_decl>
|
||||
(24) <init_param_dcls> <init_param_decl>
|
||||
<init_param_decl> "," <init_param_dcls>
|
||||
|
||||
(25) <init_param_dcl> <init_param_attribute> <param_type_spec> <simple_declarator>
|
||||
@@ -349,7 +373,7 @@ CORBA 2.3 IDL
|
||||
|
||||
(87) <op_dcl''> e
|
||||
<context_expr>
|
||||
<raises_expr>
|
||||
<raises_expr>
|
||||
<raises_expr> <context_expr>
|
||||
|
||||
(88) <op_attribute> "oneway"
|
||||
@@ -386,7 +410,7 @@ CORBA 2.3 IDL
|
||||
<wide_string_type>
|
||||
<scoped_name>
|
||||
|
||||
(96) <fixed_pt_type> "fixed" "<" <positive_int_const> "," <positive_int_const> ">"
|
||||
(96) <fixed_pt_type> "fixed" "<" <positive_int_const> "," <positive_int_const> ">"
|
||||
|
||||
(97) <fixed_pt_const_type> "fixed"
|
||||
|
||||
|
||||
@@ -1,11 +1,35 @@
|
||||
/*
|
||||
* Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COMPONENT_NAME: idl.parser
|
||||
*
|
||||
*
|
||||
* ORIGINS: 27
|
||||
*
|
||||
* THIS PRODUCT CONTAINS RESTRICTED MATERIALS OF IBM
|
||||
* 5639-D57, (C) COPYRIGHT International Business Machines Corp., 1997, 1998
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
(1) <specification> <imports> <definition> <specification'> // CORBA3
|
||||
@@ -98,7 +122,7 @@
|
||||
|
||||
(16) <vad> e
|
||||
<export> <vad>
|
||||
|
||||
|
||||
(17) <value_dcl> <value_header> "{" <value_element> <ve> "}"
|
||||
|
||||
(17) <ve> e
|
||||
@@ -106,9 +130,9 @@
|
||||
|
||||
(18) <value_header> "custom" "valuetype" <id> <value_inheritance_spec>
|
||||
"valuetype" <id> <value_inheritance_spec>
|
||||
"custom" "valuetype" <id>
|
||||
"valuetype" <id>
|
||||
|
||||
"custom" "valuetype" <id>
|
||||
"valuetype" <id>
|
||||
|
||||
(19) <value_inheritance_spec> <opt_inherits> <opt_supports>
|
||||
|
||||
(19) <opt_inherits> e
|
||||
@@ -122,7 +146,7 @@
|
||||
"supports" <interface_name> <interface_name_list>
|
||||
|
||||
(19) <interface_name_list> e
|
||||
"," <interface_name> <interface_name_list>
|
||||
"," <interface_name> <interface_name_list>
|
||||
|
||||
(20) <value_name> <scoped_name>
|
||||
|
||||
@@ -136,7 +160,7 @@
|
||||
(23) <init_dcl> "factory" <id> "(" ")"
|
||||
"factory" <id> "(" <init_param_dcls> ")"
|
||||
|
||||
(24) <init_param_dcls> <init_param_dcl>
|
||||
(24) <init_param_dcls> <init_param_dcl>
|
||||
<init_param_dcl> "," <init_param_dcls>
|
||||
|
||||
(25) <init_param_dcl> <init_param_attribute> <param_type_spec> <simple_declarator>
|
||||
@@ -351,7 +375,7 @@
|
||||
(85) <readonly_attr_spec> <readonly_attr_header> <readonly_attr_declarator> // CORBA3
|
||||
|
||||
(85) <readonly_attr_header> "readonly" "attribute" <param_type_spec> // CORBA3
|
||||
|
||||
|
||||
(85) <readonly_attr_declarator> <simple_declarator> <get_excep_expr> // CORBA3
|
||||
<simple_declarator> <sds> // CORBA3
|
||||
|
||||
@@ -389,7 +413,7 @@
|
||||
|
||||
(87) <op_dcl''> e
|
||||
<context_expr>
|
||||
<raises_expr>
|
||||
<raises_expr>
|
||||
<raises_expr> <context_expr>
|
||||
|
||||
(88) <op_attribute> "oneway"
|
||||
@@ -426,7 +450,7 @@
|
||||
<wide_string_type>
|
||||
<scoped_name>
|
||||
|
||||
(96) <fixed_pt_type> "fixed" "<" <positive_int_const> "," <positive_int_const> ">"
|
||||
(96) <fixed_pt_type> "fixed" "<" <positive_int_const> "," <positive_int_const> ">"
|
||||
|
||||
(97) <fixed_pt_const_type> "fixed"
|
||||
|
||||
@@ -450,7 +474,7 @@
|
||||
|
||||
(204) <snames> e
|
||||
"," <scoped_name> <snames>
|
||||
|
||||
|
||||
(205) <component_inheritance_spec> ":" <scoped_name>
|
||||
|
||||
(206) <component_body> <component_export> <ces>
|
||||
@@ -458,8 +482,8 @@
|
||||
(206) <ces> e
|
||||
<component_export> <ces>
|
||||
|
||||
(207) <component_export> <provides_dcl> ";"
|
||||
<uses_dcl> ";"
|
||||
(207) <component_export> <provides_dcl> ";"
|
||||
<uses_dcl> ";"
|
||||
<emits_dcl> ";"
|
||||
<publishes_dcl> ";"
|
||||
<consumes_dcl> ";"
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
#
|
||||
# Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Sun designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Sun in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
|
||||
#
|
||||
# COMPONENT_NAME: idl.parser
|
||||
#
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
#
|
||||
# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Sun designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Sun in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
|
||||
#
|
||||
# COMPONENT_NAME: idl.parser
|
||||
#
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
#
|
||||
# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Sun designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Sun in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
|
||||
#
|
||||
# COMPONENT_NAME: idl.parser
|
||||
#
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
#
|
||||
# Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Sun designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Sun in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
|
||||
#
|
||||
# COMPONENT_NAME: idl.toJava
|
||||
#
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
#
|
||||
# Copyright 2001-2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Sun designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Sun in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
|
||||
#
|
||||
# COMPONENT_NAME: idl.toJava
|
||||
#
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
#
|
||||
# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Sun designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Sun in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
|
||||
#
|
||||
# COMPONENT_NAME: idl.toJava
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -30,7 +30,6 @@ import java.io.Writer ;
|
||||
import java.io.OutputStream ;
|
||||
import java.io.BufferedWriter ;
|
||||
import java.io.OutputStreamWriter ;
|
||||
import jsint.Pair ;
|
||||
import java.util.StringTokenizer ;
|
||||
|
||||
public class IndentingPrintWriter extends PrintWriter {
|
||||
@@ -38,22 +37,20 @@ public class IndentingPrintWriter extends PrintWriter {
|
||||
private int indentWidth = 4 ;
|
||||
private String indentString = "" ;
|
||||
|
||||
public void printMsg( String msg, Pair data )
|
||||
public void printMsg( String msg, Object... data )
|
||||
{
|
||||
// System.out.println( "printMsg called with msg=" + msg + " data=" + data ) ;
|
||||
StringTokenizer st = new StringTokenizer( msg, "@", true ) ;
|
||||
StringBuffer result = new StringBuffer() ;
|
||||
Object head = data.first ;
|
||||
Pair tail = (Pair)data.rest ;
|
||||
String token = null ;
|
||||
int pos = 0;
|
||||
|
||||
while (st.hasMoreTokens()) {
|
||||
token = st.nextToken() ;
|
||||
if (token.equals("@")) {
|
||||
if (head != null) {
|
||||
result.append( head ) ;
|
||||
head = tail.first ;
|
||||
tail = (Pair)tail.rest ;
|
||||
if (pos < data.length) {
|
||||
result.append( data[pos] );
|
||||
++pos;
|
||||
} else {
|
||||
throw new Error( "List too short for message" ) ;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.corba.se.logutil;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class Input {
|
||||
|
||||
/**
|
||||
* The name of the package this class will inhabit.
|
||||
*/
|
||||
private String packageName;
|
||||
|
||||
/**
|
||||
* The name of the generated class.
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* The name of the group of exceptions handled by the class.
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* The group of exceptions.
|
||||
*/
|
||||
private Queue<InputException> exceptions;
|
||||
|
||||
/**
|
||||
* Represents the current state of parsing the input.
|
||||
*/
|
||||
private enum State
|
||||
{
|
||||
OUTER,
|
||||
IN_CLASS,
|
||||
IN_EXCEPTION_LIST
|
||||
};
|
||||
|
||||
/**
|
||||
* Regular expression to match each code line.
|
||||
*/
|
||||
private static final Pattern EXCEPTION_INFO_REGEX =
|
||||
Pattern.compile("(\\w+)\\s*(\\d+)\\s*(\\w+)");
|
||||
|
||||
/**
|
||||
* Parses the specified file to create a new {@link Input}
|
||||
* object.
|
||||
*
|
||||
* @param filename the file to parse.
|
||||
* @throws FileNotFoundException if the file can't be found.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
public Input(final String filename)
|
||||
throws FileNotFoundException, IOException {
|
||||
BufferedReader r =
|
||||
new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
|
||||
State state = State.OUTER;
|
||||
InputException current = null;
|
||||
exceptions = new LinkedList<InputException>();
|
||||
String line;
|
||||
while ((line = r.readLine()) != null) {
|
||||
// Skip ; comments
|
||||
if (line.startsWith(";"))
|
||||
continue;
|
||||
|
||||
int index = line.indexOf("(");
|
||||
if (index == -1)
|
||||
continue;
|
||||
|
||||
switch (state) {
|
||||
case OUTER:
|
||||
state = State.IN_CLASS;
|
||||
String[] classInfo = line.substring(index).split(" ");
|
||||
packageName = classInfo[0].substring(2, classInfo[0].length() - 1);
|
||||
className = classInfo[1].substring(1, classInfo[1].length() - 1);
|
||||
groupName = classInfo[2];
|
||||
break;
|
||||
case IN_CLASS:
|
||||
state = State.IN_EXCEPTION_LIST;
|
||||
break;
|
||||
case IN_EXCEPTION_LIST:
|
||||
boolean inQuote = false;
|
||||
boolean inCode = false;
|
||||
boolean end = false;
|
||||
int start = index + 1;
|
||||
Queue<String> lines = new LinkedList<String>();
|
||||
for (int a = start; a < line.length(); ++a) {
|
||||
if (line.charAt(a) == '(' && !inCode && !inQuote) {
|
||||
if (current == null)
|
||||
current =
|
||||
new InputException(line.substring(start, a).trim());
|
||||
start = a + 1;
|
||||
inCode = true;
|
||||
}
|
||||
if (line.charAt(a) == '"')
|
||||
inQuote = !inQuote;
|
||||
if (line.charAt(a) == ')' && !inQuote) {
|
||||
if (inCode) {
|
||||
lines.offer(line.substring(start, a));
|
||||
inCode = false;
|
||||
} else
|
||||
end = true;
|
||||
}
|
||||
if (!end && a == line.length() - 1)
|
||||
line += r.readLine();
|
||||
}
|
||||
for (String l : lines) {
|
||||
int stringStart = l.indexOf("\"") + 1;
|
||||
int stringEnd = l.indexOf("\"", stringStart);
|
||||
Matcher matcher = EXCEPTION_INFO_REGEX.matcher(l.substring(0, stringStart));
|
||||
if (matcher.find())
|
||||
current.add(new InputCode(matcher.group(1),
|
||||
Integer.parseInt(matcher.group(2)),
|
||||
matcher.group(3),
|
||||
l.substring(stringStart, stringEnd)));
|
||||
}
|
||||
exceptions.offer(current);
|
||||
current = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of this group of exceptions.
|
||||
*
|
||||
* @return the name of this group of exceptions.
|
||||
*/
|
||||
public String getGroupName()
|
||||
{
|
||||
return groupName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the package this class will go in.
|
||||
*
|
||||
* @return the name of the package.
|
||||
*/
|
||||
public String getPackageName()
|
||||
{
|
||||
return packageName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the generated class.
|
||||
*
|
||||
* @return the name of the class.
|
||||
*/
|
||||
public String getClassName()
|
||||
{
|
||||
return className;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the exceptions contained in this class.
|
||||
*
|
||||
* @return the exceptions.
|
||||
*/
|
||||
public Queue<InputException> getExceptions() {
|
||||
return exceptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a textual representation of this input.
|
||||
*
|
||||
* @return a textual representation.
|
||||
*/
|
||||
public String toString() {
|
||||
return getClass().getName() +
|
||||
"[packageName=" + packageName +
|
||||
",className=" + className +
|
||||
",groupName=" + groupName +
|
||||
",exceptions=" + exceptions +
|
||||
"]";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
package com.sun.tools.corba.se.logutil;
|
||||
|
||||
public class InputCode {
|
||||
|
||||
/**
|
||||
* The name of this code.
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* The code.
|
||||
*/
|
||||
private final int code;
|
||||
|
||||
/**
|
||||
* The log level for this code.
|
||||
*/
|
||||
private final String logLevel;
|
||||
|
||||
/**
|
||||
* The error message for this code.
|
||||
*/
|
||||
private final String message;
|
||||
|
||||
/**
|
||||
* Creates a new error code with the specified name, code,
|
||||
* log level and error message.
|
||||
*
|
||||
* @param name the name of the new code.
|
||||
* @param code the code itself.
|
||||
* @param logLevel the level of severity of this error.
|
||||
* @param message the error message for this code.
|
||||
*/
|
||||
public InputCode(final String name, final int code,
|
||||
final String logLevel, final String message) {
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
this.logLevel = logLevel;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of this code.
|
||||
*
|
||||
* @return the name of the code.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code.
|
||||
*
|
||||
* @return the code.
|
||||
*/
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the severity of this code.
|
||||
*
|
||||
* @return the log level severity of the code.
|
||||
*/
|
||||
public String getLogLevel() {
|
||||
return logLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the error message for this code.
|
||||
*
|
||||
* @return the error message for this code.
|
||||
*/
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a textual representation of this code.
|
||||
*
|
||||
* @return a textual representation.
|
||||
*/
|
||||
public String toString() {
|
||||
return getClass().getName() +
|
||||
"[name=" + name +
|
||||
",code=" + code +
|
||||
",logLevel=" + logLevel +
|
||||
",message=" + message +
|
||||
"]";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
package com.sun.tools.corba.se.logutil;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
|
||||
public class InputException {
|
||||
|
||||
/**
|
||||
* The name of this exception.
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* The codes associated with this exception.
|
||||
*/
|
||||
private final Queue<InputCode> codes;
|
||||
|
||||
/**
|
||||
* Constructs a new {@link InputException} with the
|
||||
* specified name.
|
||||
*
|
||||
* @param name the name of the new exception;
|
||||
*/
|
||||
public InputException(final String name) {
|
||||
this.name = name;
|
||||
codes = new LinkedList<InputCode>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new code to this exception.
|
||||
*
|
||||
* @param c the code to add.
|
||||
*/
|
||||
public void add(InputCode c)
|
||||
{
|
||||
codes.offer(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of this exception.
|
||||
*
|
||||
* @return the exception's name.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the codes associated with this exception.
|
||||
*
|
||||
* @return the exception's codes.
|
||||
*/
|
||||
public Queue<InputCode> getCodes() {
|
||||
return codes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a textual representation of this exception.
|
||||
*
|
||||
* @return a textual representation.
|
||||
*/
|
||||
public String toString() {
|
||||
return getClass().getName()
|
||||
+ "[name=" + name
|
||||
+ ",codes=" + codes
|
||||
+ "]";
|
||||
}
|
||||
|
||||
}
|
||||
559
corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java
Normal file
559
corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java
Normal file
@@ -0,0 +1,559 @@
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
package com.sun.tools.corba.se.logutil;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.Formatter;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
|
||||
public class MC {
|
||||
|
||||
private static final String VERSION = "1.0";
|
||||
|
||||
private static final List<String> SUN_EXCEPTION_GROUPS = Arrays.asList(new String[]
|
||||
{ "SUNBASE", "ORBUTIL", "ACTIVATION", "NAMING", "INTERCEPTORS", "POA", "IOR", "UTIL" });
|
||||
|
||||
private static final List<String> EXCEPTIONS = Arrays.asList(new String[]
|
||||
{ "UNKNOWN", "BAD_PARAM", "NO_MEMORY", "IMP_LIMIT", "COMM_FAILURE", "INV_OBJREF", "NO_PERMISSION",
|
||||
"INTERNAL", "MARSHAL", "INITIALIZE", "NO_IMPLEMENT", "BAD_TYPECODE", "BAD_OPERATION", "NO_RESOURCES",
|
||||
"NO_RESPONSE", "PERSIST_STORE", "BAD_INV_ORDER", "TRANSIENT", "FREE_MEM", "INV_IDENT", "INV_FLAG",
|
||||
"INTF_REPOS", "BAD_CONTEXT", "OBJ_ADAPTER", "DATA_CONVERSION", "OBJECT_NOT_EXIST", "TRANSACTION_REQUIRED",
|
||||
"TRANSACTION_ROLLEDBACK", "INVALID_TRANSACTION", "INV_POLICY", "CODESET_INCOMPATIBLE", "REBIND",
|
||||
"TIMEOUT", "TRANSACTION_UNAVAILABLE", "BAD_QOS", "INVALID_ACTIVITY", "ACTIVITY_COMPLETED",
|
||||
"ACTIVITY_REQUIRED" });
|
||||
|
||||
/**
|
||||
* Read the minor codes from the input file and
|
||||
* write out a resource file.
|
||||
*
|
||||
* @param inFile the file to read the codes from.
|
||||
* @param outDir the directory to write the resource file to.
|
||||
* @throws FileNotFoundException if the input file can not be found.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
private void makeResource(String inFile, String outDir)
|
||||
throws FileNotFoundException, IOException {
|
||||
writeResource(outDir, new Input(inFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Java source file using the specified Scheme input file,
|
||||
* and writing the result to the given output directory.
|
||||
*
|
||||
* @param inFile the file to read the data from.
|
||||
* @param outDir the directory to write the Java class to.
|
||||
* @throws FileNotFoundException if the input file can not be found.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
private void makeClass(String inFile, String outDir)
|
||||
throws FileNotFoundException, IOException {
|
||||
writeClass(inFile, outDir, new Input(inFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a Java source file using the data from the given
|
||||
* {@link Input} object. The result is written to {@code outDir}.
|
||||
* The name of the input file is just used in the header of the
|
||||
* resulting source file.
|
||||
*
|
||||
* @param inFile the name of the file the data was read from.
|
||||
* @param outDir the directory to write the Java class to.
|
||||
* @param input the parsed input data.
|
||||
* @throws FileNotFoundException if the output file can't be written.
|
||||
*/
|
||||
private void writeClass(String inFile, String outDir, Input input)
|
||||
throws FileNotFoundException {
|
||||
String packageName = input.getPackageName();
|
||||
String className = input.getClassName();
|
||||
String groupName = input.getGroupName();
|
||||
Queue<InputException> exceptions = input.getExceptions();
|
||||
FileOutputStream file = new FileOutputStream(outDir + File.separator + className + ".java");
|
||||
IndentingPrintWriter pw = new IndentingPrintWriter(file);
|
||||
|
||||
writeClassHeader(inFile, groupName, pw);
|
||||
pw.printMsg("package @ ;", packageName);
|
||||
pw.println();
|
||||
pw.println("import java.util.logging.Logger ;");
|
||||
pw.println("import java.util.logging.Level ;");
|
||||
pw.println();
|
||||
pw.println("import org.omg.CORBA.OMGVMCID ;");
|
||||
pw.println( "import com.sun.corba.se.impl.util.SUNVMCID ;");
|
||||
pw.println( "import org.omg.CORBA.CompletionStatus ;");
|
||||
pw.println( "import org.omg.CORBA.SystemException ;");
|
||||
pw.println();
|
||||
pw.println( "import com.sun.corba.se.spi.orb.ORB ;");
|
||||
pw.println();
|
||||
pw.println( "import com.sun.corba.se.spi.logging.LogWrapperFactory;");
|
||||
pw.println();
|
||||
pw.println( "import com.sun.corba.se.spi.logging.LogWrapperBase;");
|
||||
pw.println();
|
||||
writeImports(exceptions, pw);
|
||||
pw.println();
|
||||
pw.indent();
|
||||
pw.printMsg("public class @ extends LogWrapperBase {", className);
|
||||
pw.println();
|
||||
pw.printMsg("public @( Logger logger )", className);
|
||||
pw.indent();
|
||||
pw.println( "{");
|
||||
pw.undent();
|
||||
pw.println( "super( logger ) ;");
|
||||
pw.println( "}");
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeFactoryMethod(className, groupName, pw);
|
||||
writeExceptions(groupName, exceptions, className, pw);
|
||||
pw.undent();
|
||||
pw.println( );
|
||||
pw.println( "}");
|
||||
pw.flush();
|
||||
pw.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out the header of a Java source file.
|
||||
*
|
||||
* @param inFile the input file the file was generated from.
|
||||
* @param groupName the group of exceptions the Java source file is for.
|
||||
* @param pw the print writer used to write the output.
|
||||
*/
|
||||
private void writeClassHeader(String inFile, String groupName,
|
||||
IndentingPrintWriter pw) {
|
||||
if (groupName.equals("OMG"))
|
||||
pw.println("// Log wrapper class for standard exceptions");
|
||||
else
|
||||
pw.printMsg("// Log wrapper class for Sun private system exceptions in group @",
|
||||
groupName);
|
||||
pw.println("//");
|
||||
pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION);
|
||||
pw.printMsg("// Generated from input file @ on @", inFile, new Date());
|
||||
pw.println();
|
||||
}
|
||||
|
||||
/**
|
||||
* Write out the import list for the exceptions.
|
||||
*
|
||||
* @param groups the exceptions that were parsed.
|
||||
* @param pw the {@link IndentingPrintWriter} for writing to the file.
|
||||
*/
|
||||
private void writeImports(Queue<InputException> exceptions,
|
||||
IndentingPrintWriter pw) {
|
||||
if (exceptions == null)
|
||||
return;
|
||||
for (InputException e : exceptions)
|
||||
pw.println("import org.omg.CORBA." + e.getName() + " ;");
|
||||
}
|
||||
|
||||
/**
|
||||
* Write out the factory method for this group of exceptions.
|
||||
*
|
||||
* @param className the name of the generated class.
|
||||
* @param groupName the name of this group of exceptions.
|
||||
* @param pw the {@link IndentingPrintWriter} for writing to the file.
|
||||
*/
|
||||
private void writeFactoryMethod(String className, String groupName,
|
||||
IndentingPrintWriter pw) {
|
||||
pw.indent();
|
||||
pw.println( "private static LogWrapperFactory factory = new LogWrapperFactory() {");
|
||||
pw.println( "public LogWrapperBase create( Logger logger )" );
|
||||
pw.indent();
|
||||
pw.println( "{");
|
||||
pw.undent();
|
||||
pw.printMsg("return new @( logger ) ;", className);
|
||||
pw.undent();
|
||||
pw.println( "}" );
|
||||
pw.println( "} ;" );
|
||||
pw.println();
|
||||
pw.printMsg("public static @ get( ORB orb, String logDomain )", className);
|
||||
pw.indent();
|
||||
pw.println( "{");
|
||||
pw.indent();
|
||||
pw.printMsg( "@ wrapper = ", className);
|
||||
pw.indent();
|
||||
pw.printMsg( "(@) orb.getLogWrapper( logDomain, ", className);
|
||||
pw.undent();
|
||||
pw.undent();
|
||||
pw.printMsg( "\"@\", factory ) ;", groupName);
|
||||
pw.undent();
|
||||
pw.println( "return wrapper ;" );
|
||||
pw.println( "} " );
|
||||
pw.println();
|
||||
pw.printMsg( "public static @ get( String logDomain )", className);
|
||||
pw.indent();
|
||||
pw.println( "{");
|
||||
pw.indent();
|
||||
pw.printMsg( "@ wrapper = ", className);
|
||||
pw.indent();
|
||||
pw.printMsg( "(@) ORB.staticGetLogWrapper( logDomain, ", className);
|
||||
pw.undent();
|
||||
pw.undent();
|
||||
pw.printMsg( "\"@\", factory ) ;", groupName);
|
||||
pw.undent();
|
||||
pw.println( "return wrapper ;" );
|
||||
pw.println( "} " );
|
||||
pw.println();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out the exceptions themselves.
|
||||
*
|
||||
* @param groupName the name of this group of exceptions.
|
||||
* @param exceptions the exceptions to write out.
|
||||
* @param className the name of the generated class.
|
||||
* @param pw the {@link IndentingPrintWriter} for writing to the file.
|
||||
*/
|
||||
private void writeExceptions(String groupName, Queue<InputException> exceptions,
|
||||
String className, IndentingPrintWriter pw) {
|
||||
for (InputException e : exceptions) {
|
||||
pw.println("///////////////////////////////////////////////////////////");
|
||||
pw.printMsg("// @", e.getName());
|
||||
pw.println("///////////////////////////////////////////////////////////");
|
||||
pw.println();
|
||||
for (InputCode c : e.getCodes())
|
||||
writeMethods(groupName, e.getName(), c.getName(), c.getCode(),
|
||||
c.getLogLevel(), className, StringUtil.countArgs(c.getMessage()), pw);
|
||||
pw.flush();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out the methods for a particular error.
|
||||
*
|
||||
* @param groupName the name of this group of exceptions.
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param errorName the name of this particular error.
|
||||
* @param code the minor code for this particular error.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param level the level at which to place log messages.
|
||||
* @param className the name of the class for this group of exceptions.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethods(String groupName, String exceptionName, String errorName,
|
||||
int code, String level, String className, int numParams,
|
||||
IndentingPrintWriter pw) {
|
||||
String ident = StringUtil.toMixedCase(errorName);
|
||||
pw.printMsg("public static final int @ = @ ;", errorName, getBase(groupName, code));
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeMethodStatusCause(groupName, exceptionName, errorName, ident, level,
|
||||
numParams, className, pw);
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeMethodStatus(exceptionName, ident, numParams, pw);
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeMethodCause(exceptionName, ident, numParams, pw);
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeMethodNoArgs(exceptionName, ident, numParams, pw);
|
||||
pw.println();
|
||||
pw.flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a method for an error that takes a
|
||||
* {@link org.omg.CORBA.CompletionStatus} and a cause.
|
||||
*
|
||||
* @param groupName the name of this group of exceptions.
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param errorName the name of this particular error.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param logLevel the level at which to place log messages.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param className the name of the class for this group of exceptions.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethodStatusCause(String groupName, String exceptionName,
|
||||
String errorName, String ident,
|
||||
String logLevel, int numParams,
|
||||
String className, IndentingPrintWriter pw) {
|
||||
pw.indent();
|
||||
pw.printMsg( "public @ @( CompletionStatus cs, Throwable t@) {", exceptionName,
|
||||
ident, makeDeclArgs(true, numParams));
|
||||
pw.printMsg( "@ exc = new @( @, cs ) ;", exceptionName, exceptionName, errorName);
|
||||
pw.indent();
|
||||
pw.println( "if (t != null)" );
|
||||
pw.undent();
|
||||
pw.println( "exc.initCause( t ) ;" );
|
||||
pw.println();
|
||||
pw.indent();
|
||||
pw.printMsg( "if (logger.isLoggable( Level.@ )) {", logLevel);
|
||||
if (numParams > 0) {
|
||||
pw.printMsg( "Object[] parameters = new Object[@] ;", numParams);
|
||||
for (int a = 0; a < numParams; ++a)
|
||||
pw.printMsg("parameters[@] = arg@ ;", a, a);
|
||||
} else
|
||||
pw.println( "Object[] parameters = null ;");
|
||||
pw.indent();
|
||||
pw.printMsg( "doLog( Level.@, \"@.@\",", logLevel, groupName, ident);
|
||||
pw.undent();
|
||||
pw.undent();
|
||||
pw.printMsg( "parameters, @.class, exc ) ;", className);
|
||||
pw.println( "}");
|
||||
pw.println();
|
||||
|
||||
pw.undent();
|
||||
pw.println( "return exc ;");
|
||||
pw.println( "}");
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a method for an error that takes a
|
||||
* {@link org.omg.CORBA.CompletionStatus}.
|
||||
*
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethodStatus(String exceptionName, String ident,
|
||||
int numParams, IndentingPrintWriter pw) {
|
||||
pw.indent();
|
||||
pw.printMsg("public @ @( CompletionStatus cs@) {", exceptionName,
|
||||
ident, makeDeclArgs(true, numParams));
|
||||
pw.undent();
|
||||
pw.printMsg("return @( cs, null@ ) ;", ident, makeCallArgs(true, numParams));
|
||||
pw.println("}");
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a method for an error that takes a cause.
|
||||
*
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethodCause(String exceptionName, String ident,
|
||||
int numParams, IndentingPrintWriter pw) {
|
||||
pw.indent();
|
||||
pw.printMsg("public @ @( Throwable t@) {", exceptionName, ident,
|
||||
makeDeclArgs(true, numParams));
|
||||
pw.undent();
|
||||
pw.printMsg("return @( CompletionStatus.COMPLETED_NO, t@ ) ;", ident,
|
||||
makeCallArgs(true, numParams));
|
||||
pw.println("}");
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a method for an error that takes no arguments.
|
||||
*
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethodNoArgs(String exceptionName, String ident,
|
||||
int numParams, IndentingPrintWriter pw) {
|
||||
|
||||
pw.indent();
|
||||
pw.printMsg("public @ @( @) {", exceptionName, ident,
|
||||
makeDeclArgs(false, numParams));
|
||||
pw.undent();
|
||||
pw.printMsg("return @( CompletionStatus.COMPLETED_NO, null@ ) ;",
|
||||
ident, makeCallArgs(true, numParams));
|
||||
pw.println("}");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of comma-separated arguments with type declarations.
|
||||
*
|
||||
* @param leadingComma true if the list should start with a comma.
|
||||
* @param numArgs the number of arguments to generate.
|
||||
* @return the generated string.
|
||||
*/
|
||||
private String makeDeclArgs(boolean leadingComma, int numArgs) {
|
||||
return makeArgString("Object arg", leadingComma, numArgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of comma-separated arguments without type declarations.
|
||||
*
|
||||
* @param leadingComma true if the list should start with a comma.
|
||||
* @param numArgs the number of arguments to generate.
|
||||
* @return the generated string.
|
||||
*/
|
||||
private String makeCallArgs(boolean leadingComma, int numArgs) {
|
||||
return makeArgString("arg", leadingComma, numArgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of comma-separated arguments.
|
||||
*
|
||||
* @param prefixString the string with which to prefix each argument.
|
||||
* @param leadingComma true if the list should start with a comma.
|
||||
* @param numArgs the number of arguments to generate.
|
||||
* @return the generated string.
|
||||
*/
|
||||
private String makeArgString(String prefixString, boolean leadingComma,
|
||||
int numArgs) {
|
||||
if (numArgs == 0)
|
||||
return " ";
|
||||
if (numArgs == 1) {
|
||||
if (leadingComma)
|
||||
return ", " + prefixString + (numArgs - 1);
|
||||
else
|
||||
return " " + prefixString + (numArgs - 1);
|
||||
}
|
||||
return makeArgString(prefixString, leadingComma, numArgs - 1) +
|
||||
", " + prefixString + (numArgs - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link String} containing the calculation of the
|
||||
* error code.
|
||||
*
|
||||
* @param groupName the group of exception to which the code belongs.
|
||||
* @param code the minor code number representing the exception within the group.
|
||||
* @return the unique error code.
|
||||
*/
|
||||
private String getBase(String groupName, int code) {
|
||||
if (groupName.equals("OMG"))
|
||||
return "OMGVMCID.value + " + code;
|
||||
else
|
||||
return "SUNVMCID.value + " + (code + getSunBaseNumber(groupName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the base number for Sun-specific exceptions.
|
||||
*
|
||||
* @return the base number.
|
||||
*/
|
||||
private int getSunBaseNumber(String groupName) {
|
||||
return 200 * SUN_EXCEPTION_GROUPS.indexOf(groupName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a resource file using the data from the given
|
||||
* {@link Input} object. The result is written to {@code outDir}.
|
||||
*
|
||||
* @param outDir the directory to write the Java class to.
|
||||
* @param input the parsed input data.
|
||||
* @throws FileNotFoundException if the output file can't be written.
|
||||
*/
|
||||
private void writeResource(String outDir, Input input)
|
||||
throws FileNotFoundException {
|
||||
FileOutputStream file = new FileOutputStream(outDir + File.separator +
|
||||
input.getClassName() + ".resource");
|
||||
IndentingPrintWriter pw = new IndentingPrintWriter(file);
|
||||
String groupName = input.getGroupName();
|
||||
for (InputException e : input.getExceptions()) {
|
||||
String exName = e.getName();
|
||||
for (InputCode c : e.getCodes()) {
|
||||
String ident = StringUtil.toMixedCase(c.getName());
|
||||
pw.printMsg("@.@=\"@: (@) @\"", groupName, ident,
|
||||
getMessageID(groupName, exName, c.getCode()), exName, c.getMessage());
|
||||
}
|
||||
pw.flush();
|
||||
}
|
||||
pw.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message ID corresponding to the given group name,
|
||||
* exception name and error code.
|
||||
*
|
||||
* @param groupName the name of the group of exceptions.
|
||||
* @param exception the name of the particular exception.
|
||||
* @param code an error code from the given exception.
|
||||
* @return the message ID.
|
||||
*/
|
||||
private String getMessageID(String groupName, String exceptionName, int code) {
|
||||
if (groupName.equals("OMG"))
|
||||
return getStandardMessageID(exceptionName, code);
|
||||
else
|
||||
return getSunMessageID(groupName, exceptionName, code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the standard (OMG) message ID corresponding to the given
|
||||
* exception name and error code.
|
||||
*
|
||||
* @param exceptionName the name of the particular exception.
|
||||
* @param code an error code from the given exception.
|
||||
* @return the message ID.
|
||||
*/
|
||||
private String getStandardMessageID(String exceptionName, int code) {
|
||||
return new Formatter().format("IOP%s0%04d", getExceptionID(exceptionName),
|
||||
code).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Sun message ID corresponding to the given group name,
|
||||
* exception name and error code.
|
||||
*
|
||||
* @param groupName the name of the group of exceptions.
|
||||
* @param exceptionName the name of the particular exception.
|
||||
* @param code an error code from the given exception.
|
||||
* @return the message ID.
|
||||
*/
|
||||
private String getSunMessageID(String groupName, String exceptionName, int code) {
|
||||
return new Formatter().format("IOP%s1%04d", getExceptionID(exceptionName),
|
||||
getSunBaseNumber(groupName) + code).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the exception ID corresponding to the given exception name.
|
||||
*
|
||||
* @param exceptionName the name of the particular exception.
|
||||
* @return the message ID.
|
||||
*/
|
||||
private String getExceptionID(String exceptionName) {
|
||||
return new Formatter().format("%03d", EXCEPTIONS.indexOf(exceptionName)).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Entry point for running the generator from the command
|
||||
* line. Users can specify either "make-class" or "make-resource"
|
||||
* as the first argument to generate the specified type of file.
|
||||
*
|
||||
* @param args the command-line arguments.
|
||||
* @throws FileNotFoundException if the input file can not be found.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
throws FileNotFoundException, IOException
|
||||
{
|
||||
if (args.length < 3)
|
||||
{
|
||||
System.err.println("(make-class|make-resource) <input file> <output dir>");
|
||||
System.exit(-1);
|
||||
}
|
||||
if (args[0].equals("make-class"))
|
||||
new MC().makeClass(args[1], args[2]);
|
||||
else if (args[0].equals("make-resource"))
|
||||
new MC().makeResource(args[1], args[2]);
|
||||
else
|
||||
System.err.println("Invalid command: " + args[0]);
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
#! /bin/sh
|
||||
java -cp lib/jscheme.jar:lib/util.jar jscheme.REPL mc.scm -main main $@
|
||||
@@ -1,662 +0,0 @@
|
||||
; Scheme program to produce CORBA standard exceptions class
|
||||
; requires Jscheme Java extensions
|
||||
; Makes use of some custom Java classes also
|
||||
|
||||
(import "com.sun.tools.corba.se.logutil.IndentingPrintWriter" )
|
||||
(import "com.sun.tools.corba.se.logutil.StringUtil" )
|
||||
(import "java.io.FileOutputStream")
|
||||
|
||||
(define version-string "1.3")
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Utility functions
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; reload this file (convenience definition)
|
||||
(define (reload) (load "mc.scm"))
|
||||
|
||||
; Simple little function to report an error
|
||||
(define (error msg)
|
||||
(throw (Error. msg)))
|
||||
|
||||
; some debug support
|
||||
(define debug #f)
|
||||
|
||||
(define (dprint msg)
|
||||
(if debug
|
||||
(.println System.out$ msg)))
|
||||
|
||||
; Replace dprint with noprint to avoid seeing messages when debug is #t
|
||||
(define (noprint msg) ())
|
||||
|
||||
; Helper function present so that a scheme method taking strings as args
|
||||
; can be easily run from a command line.
|
||||
; arg: vector containing argument strings. Element 0 is the function name
|
||||
; to execute
|
||||
(define (main arg)
|
||||
(let*
|
||||
(
|
||||
(arg-list (vector->list arg))
|
||||
(function-symbol (string->symbol (car arg-list)))
|
||||
(args (cdr arg-list)))
|
||||
(apply (eval function-symbol) args)))
|
||||
|
||||
; Returns the position of key in lst, numbering from 0. key is matched using eqv?
|
||||
(define (get-list-position key lst)
|
||||
(letrec
|
||||
(
|
||||
(helper (lambda (k l accum)
|
||||
(cond
|
||||
((null? l) (error (string-append "Could not find " k)))
|
||||
((eqv? k (car l)) accum)
|
||||
(else (helper k (cdr l) (+ accum 1))) ))))
|
||||
(begin
|
||||
(noprint (string-append "get-list-position called with key " key " lst " lst ))
|
||||
(helper key lst 0))))
|
||||
|
||||
; Return a string representing number in decimal padded to length with leading 0s.
|
||||
(define (pad-number-string number length)
|
||||
(let*
|
||||
(
|
||||
(number-string (number->string number))
|
||||
(pad-length (- length (string-length number-string)))
|
||||
)
|
||||
(string-append (make-string pad-length #\0) number-string)))
|
||||
|
||||
; Read an S-expression from a file that contains all of the data.
|
||||
;
|
||||
; The S-expression used for minor codes must have the structure
|
||||
; (package-name class-name exception-group-name
|
||||
; (exception
|
||||
; (name value level explanation)
|
||||
; ...
|
||||
; )
|
||||
; ...
|
||||
; )
|
||||
(define (read-file fname)
|
||||
(read (open-input-file fname)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Functions for handling major system exceptions and exception groups
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Function to find the base ID given an exception group name. Result is a function that
|
||||
; maps the minor code into the Java expression for that minor code's actual value.
|
||||
(define (get-base group-name)
|
||||
(if (eqv? group-name 'OMG)
|
||||
(lambda (minor-code)
|
||||
(string-append "OMGVMCID.value + " (number->string minor-code)))
|
||||
(let ; bind base-number outside the lambda so it is only evaluated once
|
||||
(
|
||||
(base-number (get-sun-base-number group-name)))
|
||||
(lambda (minor-code)
|
||||
(string-append "SUNVMCID.value + " (number->string (+ base-number minor-code)))))))
|
||||
|
||||
; Function to get a base value for the group-name
|
||||
(define (get-sun-base-number group-name)
|
||||
(let*
|
||||
(
|
||||
(lst (list 'SUNBASE 'ORBUTIL 'ACTIVATION 'NAMING 'INTERCEPTORS 'POA 'IOR 'UTIL))
|
||||
(subsystem-size 200))
|
||||
(* subsystem-size (get-list-position group-name lst))))
|
||||
|
||||
; Function to get a 3 digit number for a system exception
|
||||
(define (get-exception-id exception-name)
|
||||
(let
|
||||
(
|
||||
(lst (list 'UNKNOWN 'BAD_PARAM 'NO_MEMORY 'IMP_LIMIT 'COMM_FAILURE 'INV_OBJREF 'NO_PERMISSION
|
||||
'INTERNAL 'MARSHAL 'INITIALIZE 'NO_IMPLEMENT 'BAD_TYPECODE 'BAD_OPERATION 'NO_RESOURCES
|
||||
'NO_RESPONSE 'PERSIST_STORE 'BAD_INV_ORDER 'TRANSIENT 'FREE_MEM 'INV_IDENT 'INV_FLAG
|
||||
'INTF_REPOS 'BAD_CONTEXT 'OBJ_ADAPTER 'DATA_CONVERSION 'OBJECT_NOT_EXIST 'TRANSACTION_REQUIRED
|
||||
'TRANSACTION_ROLLEDBACK 'INVALID_TRANSACTION 'INV_POLICY 'CODESET_INCOMPATIBLE 'REBIND
|
||||
'TIMEOUT 'TRANSACTION_UNAVAILABLE 'BAD_QOS 'INVALID_ACTIVITY 'ACTIVITY_COMPLETED
|
||||
'ACTIVITY_REQUIRED )))
|
||||
(pad-number-string (get-list-position exception-name lst) 3)))
|
||||
|
||||
; Return the message id string for any system exception
|
||||
;
|
||||
(define (get-message-id exception-type group-name minor)
|
||||
(if (eqv? group-name 'OMG)
|
||||
(get-standard-message-id exception-type minor)
|
||||
(get-sun-message-id exception-type group-name minor)))
|
||||
|
||||
; Return the message id string for a particular standard exception
|
||||
;
|
||||
(define (get-standard-message-id exception-type minor)
|
||||
(string-append
|
||||
"IOP"
|
||||
(get-exception-id exception-type)
|
||||
"0"
|
||||
(pad-number-string (number->string minor) 4)))
|
||||
|
||||
; Return the sun message id for this exception-type, group-name, and minor code.
|
||||
(define (get-sun-message-id exception-type group-name minor)
|
||||
(string-append
|
||||
"IOP"
|
||||
(get-exception-id exception-type)
|
||||
"1"
|
||||
(pad-number-string (+ (get-sun-base-number group-name) minor) 4)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; visitor framework for the input file format
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define (visit-top obj func1)
|
||||
(let*
|
||||
(
|
||||
(package (car obj))
|
||||
(class (cadr obj))
|
||||
(group (caddr obj))
|
||||
(func2 (func1 package class group))
|
||||
(exceptions (cadddr obj)))
|
||||
(visit-exceptions exceptions func2)))
|
||||
|
||||
; visit the elements of an arbitrary list
|
||||
; lst: the list to visit
|
||||
; func: the function to apply to each element of lst
|
||||
; next-level the function on lst element and func that visits the next level
|
||||
(define (visit-list lst func next-level)
|
||||
(if (null? (cdr lst))
|
||||
(next-level #t (car lst) func)
|
||||
(begin
|
||||
(next-level #f (car lst) func)
|
||||
(visit-list (cdr lst) func next-level))))
|
||||
|
||||
(define (visit-exceptions exceptions func2)
|
||||
(visit-list exceptions func2 (lambda (last-flag element func) (visit-exception last-flag element func))))
|
||||
|
||||
(define (visit-exception last-flag exception func2)
|
||||
(let*
|
||||
(
|
||||
(major (car exception))
|
||||
(minor-codes (cdr exception))
|
||||
(func3 (func2 last-flag major)))
|
||||
(visit-minor-codes minor-codes func3)))
|
||||
|
||||
(define (visit-minor-codes minor-codes func3)
|
||||
(visit-list minor-codes func3 (lambda (last-flag element func) (visit-minor-code last-flag element func))))
|
||||
|
||||
(define (visit-minor-code last-flag minor-code func3)
|
||||
(let*
|
||||
(
|
||||
(name (car minor-code))
|
||||
(minor (cadr minor-code))
|
||||
(level (caddr minor-code))
|
||||
(msg (cadddr minor-code)))
|
||||
(func3 last-flag name minor level msg)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; The visitors
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; A simple visitor that just echoes the input for test purposes
|
||||
(define (simple-visitor package class group)
|
||||
(let*
|
||||
(
|
||||
(pw (IndentingPrintWriter. System.out$)))
|
||||
(begin
|
||||
(.indent pw)
|
||||
(.printMsg pw "package=@ class=@ group=@" (list package class group))
|
||||
(.flush pw)
|
||||
(lambda (last-flag major)
|
||||
(begin
|
||||
(.indent pw)
|
||||
(.printMsg pw "major=@" (list major))
|
||||
(.flush pw)
|
||||
(lambda (last-flag name minor level message)
|
||||
(begin
|
||||
(if last-flag (.undent pw))
|
||||
(.printMsg pw "name=@ minor=@ level=@ message=@" (list name minor level message))
|
||||
(.flush pw))))))))
|
||||
|
||||
; Function that returns a visitor that writes out the resource file in the form:
|
||||
; id="MSGID: explanation"
|
||||
; outdir: Output directory
|
||||
(define (resource-visitor outdir)
|
||||
(lambda (package class group)
|
||||
(let*
|
||||
(
|
||||
(file-name (string-append outdir java.io.File.separator$ class ".resource"))
|
||||
(pw (IndentingPrintWriter. (FileOutputStream. file-name))))
|
||||
(begin
|
||||
(dprint (string-append "package= " package " class=" class " group=" group " file-name=" file-name))
|
||||
(lambda (last-flag1 major)
|
||||
(begin
|
||||
; (dprint (string-append "last-flag1=" last-flag1 " major=" major))
|
||||
(lambda (last-flag2 name minor level message)
|
||||
(begin
|
||||
; (dprint (string-append "last-flag2=" last-flag2 " name=" name
|
||||
; " minor=" minor " level=" level " message=" message))
|
||||
(let*
|
||||
(
|
||||
(msgid (get-message-id major group minor))
|
||||
(ident (StringUtil.toMixedCase (symbol->string name))))
|
||||
(begin
|
||||
; (dprint (string-append "msgid=" msgid " ident=" ident))
|
||||
(.printMsg pw "@.@=\"@: (@) @\"" (list group ident msgid major message))
|
||||
(.flush pw)
|
||||
(if (and last-flag1 last-flag2)
|
||||
(begin
|
||||
; (dprint "closing file")
|
||||
(.close pw)))))))))))))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Top-level functions for creating the products. All have names of the form make-xxx
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Read the minor codes from the infile and write out a resource file.
|
||||
(define (make-resource infile outdir)
|
||||
(tryCatch
|
||||
(visit-top (read-file infile) (resource-visitor outdir))
|
||||
(lambda (exc)
|
||||
(begin
|
||||
(.println System.out$ (string-append "make-resource failed with exception " (.toString exc)))
|
||||
(System.exit 1)))))
|
||||
|
||||
; Read the minor codes from the infile and write a Java implementation to
|
||||
; handle them to outfile under outdir
|
||||
(define (make-class infile outdir)
|
||||
(tryCatch
|
||||
(write-class infile outdir (read-file infile))
|
||||
(lambda (exc)
|
||||
(begin
|
||||
(.println System.out$ (string-append "make-class failed with exception " (.toString exc)))
|
||||
(System.exit 1)))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; The original make-class implementation (this should be replaced by two visitors)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Write out the Java source code for the StandardExceptions class
|
||||
; outdir: Output directory to write the generated files
|
||||
; obj: the data from the input file
|
||||
(define (write-class infile outdir obj)
|
||||
(let*
|
||||
(
|
||||
(package-name (car obj))
|
||||
(class-name (cadr obj))
|
||||
(exception-group-name (caddr obj))
|
||||
(exceptions (cadddr obj))
|
||||
(file (FileOutputStream. (string-append outdir java.io.File.separator$ class-name ".java")))
|
||||
(pw (IndentingPrintWriter. file))
|
||||
)
|
||||
(begin
|
||||
(write-class-header infile package-name class-name exception-group-name pw)
|
||||
(.printMsg pw "package @ ;"
|
||||
(list package-name))
|
||||
(.println pw)
|
||||
(.println pw "import java.util.logging.Logger ;")
|
||||
(.println pw "import java.util.logging.Level ;")
|
||||
(.println pw)
|
||||
(.println pw "import org.omg.CORBA.OMGVMCID ;")
|
||||
(.println pw "import com.sun.corba.se.impl.util.SUNVMCID ;")
|
||||
(.println pw "import org.omg.CORBA.CompletionStatus ;")
|
||||
(.println pw "import org.omg.CORBA.SystemException ;")
|
||||
(.println pw)
|
||||
(.println pw "import com.sun.corba.se.spi.orb.ORB ;")
|
||||
(.println pw)
|
||||
(.println pw "import com.sun.corba.se.spi.logging.LogWrapperFactory;")
|
||||
(.println pw)
|
||||
(.println pw "import com.sun.corba.se.spi.logging.LogWrapperBase;")
|
||||
(.println pw)
|
||||
(write-imports exceptions pw)
|
||||
(.println pw)
|
||||
(.indent pw)
|
||||
(.printMsg pw "public class @ extends LogWrapperBase {"
|
||||
(list class-name))
|
||||
(.println pw)
|
||||
(.printMsg pw "public @( Logger logger )"
|
||||
(list class-name))
|
||||
(.indent pw)
|
||||
(.println pw "{")
|
||||
(.undent pw)
|
||||
(.println pw "super( logger ) ;")
|
||||
(.println pw "}")
|
||||
(.println pw)
|
||||
(.flush pw)
|
||||
(write-factory-method class-name exception-group-name pw)
|
||||
(write-exceptions exception-group-name exceptions (get-base exception-group-name) class-name pw)
|
||||
(.undent pw)
|
||||
(.println pw )
|
||||
(.println pw "}")
|
||||
(.flush pw)
|
||||
(.close pw)
|
||||
)))
|
||||
|
||||
; Write out the header for the resource file
|
||||
(define (write-class-header infile package class group pw)
|
||||
(begin
|
||||
(if (eqv? group 'OMG)
|
||||
(.println pw "// Log wrapper class for standard exceptions")
|
||||
(.printMsg pw "// Log wrapper class for Sun private system exceptions in group @" (list group)))
|
||||
(.println pw "//")
|
||||
(.printMsg pw "// Generated by mc.scm version @, DO NOT EDIT BY HAND!" (list version-string))
|
||||
(.printMsg pw "// Generated from input file @ on @" (list infile (java.util.Date.)))
|
||||
(.println pw)))
|
||||
|
||||
(define (write-factory-method class-name exception-group-name pw)
|
||||
(begin
|
||||
(.indent pw)
|
||||
(.println pw "private static LogWrapperFactory factory = new LogWrapperFactory() {")
|
||||
(.println pw "public LogWrapperBase create( Logger logger )" )
|
||||
(.indent pw)
|
||||
(.println pw "{")
|
||||
(.undent pw)
|
||||
(.printMsg pw "return new @( logger ) ;" (list class-name))
|
||||
(.undent pw)
|
||||
(.println pw "}" )
|
||||
(.println pw "} ;" )
|
||||
(.println pw)
|
||||
(.printMsg pw "public static @ get( ORB orb, String logDomain )" (list class-name))
|
||||
(.indent pw)
|
||||
(.println pw "{")
|
||||
(.indent pw)
|
||||
(.printMsg pw "@ wrapper = "
|
||||
(list class-name))
|
||||
(.indent pw)
|
||||
(.printMsg pw "(@) orb.getLogWrapper( logDomain, "
|
||||
(list class-name))
|
||||
(.undent pw)
|
||||
(.undent pw)
|
||||
(.printMsg pw "\"@\", factory ) ;"
|
||||
(list exception-group-name))
|
||||
(.undent pw)
|
||||
(.println pw "return wrapper ;" )
|
||||
(.println pw "} " )
|
||||
(.println pw)
|
||||
(.printMsg pw "public static @ get( String logDomain )" (list class-name))
|
||||
(.indent pw)
|
||||
(.println pw "{")
|
||||
(.indent pw)
|
||||
(.printMsg pw "@ wrapper = "
|
||||
(list class-name))
|
||||
(.indent pw)
|
||||
(.printMsg pw "(@) ORB.staticGetLogWrapper( logDomain, "
|
||||
(list class-name))
|
||||
(.undent pw)
|
||||
(.undent pw)
|
||||
(.printMsg pw "\"@\", factory ) ;"
|
||||
(list exception-group-name))
|
||||
(.undent pw)
|
||||
(.println pw "return wrapper ;" )
|
||||
(.println pw "} " )
|
||||
(.println pw)))
|
||||
|
||||
; Write out the import list for the exceptions listed in obj
|
||||
; obj: the data from the input file
|
||||
; pw: an IndentingPrintWriter for the output file
|
||||
(define (write-imports obj pw)
|
||||
(if (null? obj)
|
||||
()
|
||||
(let
|
||||
(
|
||||
(exception (caar obj))
|
||||
)
|
||||
(begin
|
||||
(.print pw "import org.omg.CORBA.")
|
||||
(.print pw exception)
|
||||
(.println pw " ;")
|
||||
(write-imports (cdr obj) pw)
|
||||
))))
|
||||
|
||||
; Write out the list of exceptions starting with the first one
|
||||
; obj: the data from the input file
|
||||
; base: the lambda that returns the string defining the minor code value
|
||||
; pw: an IndentingPrintWriter for the output file
|
||||
(define (write-exceptions group-name obj base class-name pw)
|
||||
(if (null? obj)
|
||||
()
|
||||
(let*
|
||||
(
|
||||
(record (car obj))
|
||||
(exception (car record))
|
||||
(minor-codes (cdr record))
|
||||
)
|
||||
(begin
|
||||
(write-exception group-name exception minor-codes base class-name pw)
|
||||
(write-exceptions group-name (cdr obj) base class-name pw)
|
||||
))))
|
||||
|
||||
; Write out a single exception
|
||||
; exception: the CORBA SystemException type
|
||||
; base: the base for the minor code value
|
||||
; minor-codes: a list of minor code data for each minor exception type
|
||||
; pw: an IndentingPrintWriter for the output file
|
||||
(define (write-exception group-name exception minor-codes base class-name pw)
|
||||
(begin
|
||||
(.println pw "///////////////////////////////////////////////////////////")
|
||||
(.printMsg pw "// @" (list exception))
|
||||
(.println pw "///////////////////////////////////////////////////////////")
|
||||
(.println pw)
|
||||
(write-methods group-name exception minor-codes base class-name pw)
|
||||
(.flush pw)))
|
||||
|
||||
; Write all of the methods for a single exception
|
||||
; exception: the CORBA SystemException type
|
||||
; base: the base for the minor code value
|
||||
; minor-codes: a list of minor code data for each minor exception type
|
||||
; pw: an IndentingPrintWriter for the output file
|
||||
(define (write-methods group-name exception minor-codes base class-name pw)
|
||||
(if (null? minor-codes)
|
||||
()
|
||||
(begin
|
||||
(write-method group-name exception (car minor-codes) base class-name pw)
|
||||
(write-methods group-name exception (cdr minor-codes) base class-name pw)
|
||||
)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Code that writes out the Java methods for exception handling
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Write the methods for a single minor code within an exception
|
||||
; exception: the CORBA SystemException type
|
||||
; minor-code: minor code data for one minor exception type
|
||||
; (name value level explanation)
|
||||
; base: the base for the minor code value
|
||||
; pw: an IndentingPrintWriter for the output file
|
||||
(define (write-method group-name exception minor-code base class-name pw)
|
||||
(let*
|
||||
(
|
||||
(x (symbol->string (car minor-code)))
|
||||
(ident (cons x (StringUtil.toMixedCase x)))
|
||||
(value (cadr minor-code))
|
||||
(level (symbol->string (caddr minor-code)))
|
||||
(explanation (cadddr minor-code))
|
||||
(num-params (StringUtil.countArgs explanation)))
|
||||
(begin
|
||||
(.printMsg pw "public static final int @ = @ ;"
|
||||
(list x (base value)))
|
||||
(.println pw )
|
||||
(.flush pw )
|
||||
(write-method-status-cause group-name exception ident level num-params class-name pw)
|
||||
(.println pw)
|
||||
(.flush pw)
|
||||
(write-method-status exception ident level num-params pw)
|
||||
(.println pw)
|
||||
(.flush pw)
|
||||
(write-method-cause exception ident level num-params pw)
|
||||
(.println pw)
|
||||
(.flush pw)
|
||||
(write-method-no-args exception ident level num-params pw)
|
||||
(.println pw)
|
||||
(.flush pw))))
|
||||
|
||||
; Construct a string of the form arg1, ..., argn where n is num-params
|
||||
(define (make-arg-string fixed leading-comma-flag num-args)
|
||||
(let
|
||||
(
|
||||
(helper (lambda (lcf n)
|
||||
(let*
|
||||
(
|
||||
(numstr (number->string (- n 1))))
|
||||
(if (or lcf (> n 1))
|
||||
(string-append ", " fixed numstr)
|
||||
(string-append " " fixed numstr))))))
|
||||
(cond
|
||||
((eqv? num-args 0) " ")
|
||||
((eqv? num-args 1) (helper leading-comma-flag 1))
|
||||
(else (string-append
|
||||
(make-arg-string fixed leading-comma-flag (- num-args 1))
|
||||
(helper leading-comma-flag num-args ))))))
|
||||
|
||||
(define (make-decl-args leading-comma-flag num-args)
|
||||
(make-arg-string "Object arg" leading-comma-flag num-args))
|
||||
|
||||
(define (make-call-args leading-comma-flag num-args)
|
||||
(make-arg-string "arg" leading-comma-flag num-args))
|
||||
|
||||
; make-xxx-args patterns:
|
||||
; leading-comma-flag #t
|
||||
;
|
||||
; 0 " "
|
||||
; 1 ", arg0"
|
||||
; 2 ", arg0, arg1"
|
||||
; 3 ", arg0, arg1, arg2"
|
||||
;
|
||||
; 0 " "
|
||||
; 1 ", Object arg0"
|
||||
; 2 ", Object arg0, Object arg1"
|
||||
; 3 ", Object arg0, Object arg1, Object arg2"
|
||||
;
|
||||
; leading-comma-flag #f
|
||||
;
|
||||
; 0 " "
|
||||
; 1 " arg0"
|
||||
; 2 " arg0, arg1"
|
||||
; 3 " arg0, arg1, arg2"
|
||||
;
|
||||
; 0 " "
|
||||
; 1 " Object arg0"
|
||||
; 2 " Object arg0, Object arg1"
|
||||
; 3 " Object arg0, Object arg1, Object arg2"
|
||||
|
||||
(define (emit-assignments num pw)
|
||||
(let
|
||||
(
|
||||
(helper
|
||||
(lambda (n)
|
||||
(.printMsg pw "parameters[@] = arg@ ;" (list n n)))))
|
||||
(if (= num 1)
|
||||
(helper (- num 1))
|
||||
(begin
|
||||
(emit-assignments (- num 1) pw)
|
||||
(helper (- num 1))))))
|
||||
|
||||
; Write a method for an exception that takes a CompletionStatus and a cause
|
||||
; exception: the CORBA system exception type
|
||||
; id: the identifier for this exception in the form ( ident . mixed-case-ident )
|
||||
; level: the logging level
|
||||
; num-params: number of parameters in the explanation string, which determines
|
||||
; how many argn parameters we need
|
||||
; pw: the indenting print writer we are using
|
||||
(define (write-method-status-cause group-name exception id level num-params class-name pw)
|
||||
(let*
|
||||
(
|
||||
(ident (car id))
|
||||
(ident-mc (cdr id)))
|
||||
(begin
|
||||
(.indent pw)
|
||||
(.printMsg pw "public @ @( CompletionStatus cs, Throwable t@) {"
|
||||
(list exception ident-mc (make-decl-args #t num-params)))
|
||||
(.printMsg pw "@ exc = new @( @, cs ) ;"
|
||||
(list exception exception ident ))
|
||||
|
||||
(.indent pw)
|
||||
(.println pw "if (t != null)" )
|
||||
(.undent pw)
|
||||
(.println pw "exc.initCause( t ) ;" )
|
||||
(.println pw)
|
||||
|
||||
(.indent pw)
|
||||
(.printMsg pw "if (logger.isLoggable( Level.@ )) {"
|
||||
(list level))
|
||||
|
||||
(if (> num-params 0)
|
||||
(begin
|
||||
(.printMsg pw "Object[] parameters = new Object[@] ;"
|
||||
(list (number->string num-params)))
|
||||
(emit-assignments num-params pw)
|
||||
)
|
||||
(begin
|
||||
(.println pw "Object[] parameters = null ;"
|
||||
)))
|
||||
|
||||
(.indent pw)
|
||||
(.printMsg pw "doLog( Level.@, \"@.@\"," (list level group-name ident-mc))
|
||||
(.undent pw)
|
||||
(.undent pw)
|
||||
(.printMsg pw "parameters, @.class, exc ) ;" (list class-name))
|
||||
(.println pw "}")
|
||||
(.println pw)
|
||||
|
||||
(.undent pw)
|
||||
(.println pw "return exc ;")
|
||||
|
||||
(.println pw "}"))))
|
||||
|
||||
; Write a method for an exception that takes a CompletionStatus. The cause is null.
|
||||
;
|
||||
; exception: the CORBA system exception type
|
||||
; id: the identifier for this exception in the form ( ident . mixed-case-ident )
|
||||
; level: the logging level
|
||||
; num-params: number of parameters in the explanation string, which determines
|
||||
; how many argn parameters we need
|
||||
; pw: the indenting print writer we are using
|
||||
(define (write-method-status exception id level num-params pw)
|
||||
(let*
|
||||
(
|
||||
(ident-mc (cdr id)))
|
||||
(begin
|
||||
(.indent pw)
|
||||
(.printMsg pw "public @ @( CompletionStatus cs@) {"
|
||||
(list exception ident-mc (make-decl-args #t num-params)))
|
||||
(.undent pw)
|
||||
(.printMsg pw "return @( cs, null@ ) ;"
|
||||
(list ident-mc (make-call-args #t num-params)))
|
||||
(.println pw "}"))))
|
||||
|
||||
; Write a method for an exception that takes a cause. The status is COMPLETED_NO.
|
||||
;
|
||||
; exception: the CORBA system exception type
|
||||
; id: the identifier for this exception in the form ( ident . mixed-case-ident )
|
||||
; level: the logging level
|
||||
; num-params: number of parameters in the explanation string, which determines
|
||||
; how many argn parameters we need
|
||||
; pw: the indenting print writer we are using
|
||||
(define (write-method-cause exception id level num-params pw)
|
||||
(let*
|
||||
(
|
||||
(ident-mc (cdr id)))
|
||||
(begin
|
||||
(.indent pw)
|
||||
(.printMsg pw "public @ @( Throwable t@) {"
|
||||
(list exception ident-mc (make-decl-args #t num-params)))
|
||||
(.undent pw)
|
||||
(.printMsg pw "return @( CompletionStatus.COMPLETED_NO, t@ ) ;"
|
||||
(list ident-mc (make-call-args #t num-params)))
|
||||
(.println pw "}"))))
|
||||
|
||||
; Write a method for an exception that takes no arguments. This is COMPLETED_NO and
|
||||
; a null cause.
|
||||
;
|
||||
; exception: the CORBA system exception type
|
||||
; id: the identifier for this exception in the form ( ident . mixed-case-ident )
|
||||
; level: the logging level
|
||||
; num-params: number of parameters in the explanation string, which determines
|
||||
; how many argn parameters we need
|
||||
; pw: the indenting print writer we are using
|
||||
(define (write-method-no-args exception id level num-params pw)
|
||||
(let*
|
||||
(
|
||||
(ident-mc (cdr id)))
|
||||
(begin
|
||||
(.indent pw)
|
||||
(.printMsg pw "public @ @( @) {"
|
||||
(list exception ident-mc (make-decl-args #f num-params)))
|
||||
(.undent pw)
|
||||
(.printMsg pw "return @( CompletionStatus.COMPLETED_NO, null@ ) ;"
|
||||
(list ident-mc (make-call-args #t num-params)))
|
||||
(.println pw "}"))))
|
||||
|
||||
;;; end of file
|
||||
@@ -1,2 +0,0 @@
|
||||
#! /bin/sh
|
||||
java -cp ${CLASSPATH}:lib/jscheme.jar:lib/util.jar jscheme.REPL mc.scm
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1995-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -289,7 +289,7 @@ abstract public class ORB {
|
||||
*
|
||||
* @return the singleton ORB
|
||||
*/
|
||||
public static ORB init() {
|
||||
public static synchronized ORB init() {
|
||||
if (singleton == null) {
|
||||
String className = getSystemProperty(ORBSingletonClassKey);
|
||||
if (className == null)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
^build/
|
||||
^dist/
|
||||
^nbproject/private/
|
||||
^src/share/tools/hsdis/bin/
|
||||
^src/share/tools/hsdis/build/
|
||||
^src/share/tools/IdealGraphVisualizer/[a-zA-Z0-9]*/build/
|
||||
^src/share/tools/IdealGraphVisualizer/build/
|
||||
^src/share/tools/IdealGraphVisualizer/dist/
|
||||
|
||||
@@ -25,3 +25,11 @@ fcb923bad68e2b10380a030ea83a723f4dc3d4d6 jdk7-b47
|
||||
bcb33806d186561c781992e5f4d8a90bb033f9f0 jdk7-b48
|
||||
8b22ccb5aba2c6c11bddf6488a7bb7ef5b4bf2be jdk7-b49
|
||||
dae503d9f04c1a11e182dbf7f770509c28dc0609 jdk7-b50
|
||||
2581d90c6c9b2012da930eb4742add94a03069a0 jdk7-b51
|
||||
1b1e8f1a4fe8cebc01c022484f78148e17b62a0d jdk7-b52
|
||||
032c6af894dae8d939b3dd31d82042549e7793e0 jdk7-b53
|
||||
fafab5d5349c7c066d677538db67a1ee0fb33bd2 jdk7-b54
|
||||
f8e839c086152da70d6ec5913ba6f9f509282e8d jdk7-b55
|
||||
a3fd9e40ff2e854f6169eb6d09d491a28634d04f jdk7-b56
|
||||
f4cbf78110c726919f46b59a3b054c54c7e889b4 jdk7-b57
|
||||
53d9bf689e80fcc76b221bbe6c5d58e08b80cbc6 jdk7-b58
|
||||
|
||||
@@ -60,6 +60,14 @@ ifndef LDNOMAP
|
||||
LFLAGS_LIBSA = -Xlinker --version-script=mapfile
|
||||
endif
|
||||
|
||||
# If this is a --hash-style=gnu system, use --hash-style=both
|
||||
# The gnu .hash section won't work on some Linux systems like SuSE 10.
|
||||
_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | grep -- '--hash-style=gnu')
|
||||
ifneq ($(_HAS_HASH_STYLE_GNU),)
|
||||
LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
|
||||
endif
|
||||
LFLAGS_LIBSA += $(LDFLAGS_HASH_STYLE)
|
||||
|
||||
$(LIBSA): $(OBJS) mapfile
|
||||
if [ ! -d $(ARCH) ] ; then mkdir $(ARCH) ; fi
|
||||
$(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
|
||||
|
||||
@@ -306,8 +306,6 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
|
||||
|
||||
entryAddr = entryAddr.addOffsetTo(intConstantEntryArrayStride);
|
||||
} while (nameAddr != null);
|
||||
String symbol = "heapOopSize"; // global int constant and value is initialized at runtime.
|
||||
addIntConstant(symbol, (int)lookupInProcess(symbol).getCIntegerAt(0, 4, false));
|
||||
}
|
||||
|
||||
private void readVMLongConstants() {
|
||||
|
||||
@@ -118,9 +118,9 @@ public interface Debugger extends SymbolLookup, ThreadAccess {
|
||||
public long getJIntSize();
|
||||
public long getJLongSize();
|
||||
public long getJShortSize();
|
||||
public long getHeapBase();
|
||||
public long getHeapOopSize();
|
||||
public long getLogMinObjAlignmentInBytes();
|
||||
public long getNarrowOopBase();
|
||||
public int getNarrowOopShift();
|
||||
|
||||
public ReadResult readBytesFromProcess(long address, long numBytes)
|
||||
throws DebuggerException;
|
||||
|
||||
@@ -56,8 +56,8 @@ public abstract class DebuggerBase implements Debugger {
|
||||
// heap data.
|
||||
protected long oopSize;
|
||||
protected long heapOopSize;
|
||||
protected long heapBase; // heap base for compressed oops.
|
||||
protected long logMinObjAlignmentInBytes; // Used to decode compressed oops.
|
||||
protected long narrowOopBase; // heap base for compressed oops.
|
||||
protected int narrowOopShift; // shift to decode compressed oops.
|
||||
// Should be initialized if desired by calling initCache()
|
||||
private PageCache cache;
|
||||
|
||||
@@ -159,10 +159,10 @@ public abstract class DebuggerBase implements Debugger {
|
||||
javaPrimitiveTypesConfigured = true;
|
||||
}
|
||||
|
||||
public void putHeapConst(long heapBase, long heapOopSize, long logMinObjAlignmentInBytes) {
|
||||
this.heapBase = heapBase;
|
||||
public void putHeapConst(long heapOopSize, long narrowOopBase, int narrowOopShift) {
|
||||
this.heapOopSize = heapOopSize;
|
||||
this.logMinObjAlignmentInBytes = logMinObjAlignmentInBytes;
|
||||
this.narrowOopBase = narrowOopBase;
|
||||
this.narrowOopShift = narrowOopShift;
|
||||
}
|
||||
|
||||
/** May be called by subclasses if desired to initialize the page
|
||||
@@ -459,7 +459,7 @@ public abstract class DebuggerBase implements Debugger {
|
||||
long value = readCInteger(address, getHeapOopSize(), true);
|
||||
if (value != 0) {
|
||||
// See oop.inline.hpp decode_heap_oop
|
||||
value = (long)(heapBase + (long)(value << logMinObjAlignmentInBytes));
|
||||
value = (long)(narrowOopBase + (long)(value << narrowOopShift));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
@@ -545,10 +545,10 @@ public abstract class DebuggerBase implements Debugger {
|
||||
return heapOopSize;
|
||||
}
|
||||
|
||||
public long getHeapBase() {
|
||||
return heapBase;
|
||||
public long getNarrowOopBase() {
|
||||
return narrowOopBase;
|
||||
}
|
||||
public long getLogMinObjAlignmentInBytes() {
|
||||
return logMinObjAlignmentInBytes;
|
||||
public int getNarrowOopShift() {
|
||||
return narrowOopShift;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,5 +42,5 @@ public interface JVMDebugger extends Debugger {
|
||||
long jintSize,
|
||||
long jlongSize,
|
||||
long jshortSize);
|
||||
public void putHeapConst(long heapBase, long heapOopSize, long logMinObjAlignment);
|
||||
public void putHeapConst(long heapOopSize, long narrowOopBase, int narrowOopShift);
|
||||
}
|
||||
|
||||
@@ -65,9 +65,10 @@ public interface RemoteDebugger extends Remote {
|
||||
public long getJIntSize() throws RemoteException;
|
||||
public long getJLongSize() throws RemoteException;
|
||||
public long getJShortSize() throws RemoteException;
|
||||
public long getHeapBase() throws RemoteException;
|
||||
public long getHeapOopSize() throws RemoteException;
|
||||
public long getLogMinObjAlignmentInBytes() throws RemoteException;
|
||||
public long getNarrowOopBase() throws RemoteException;
|
||||
public int getNarrowOopShift() throws RemoteException;
|
||||
|
||||
public boolean areThreadsEqual(long addrOrId1, boolean isAddress1,
|
||||
long addrOrId2, boolean isAddress2) throws RemoteException;
|
||||
public int getThreadHashCode(long addrOrId, boolean isAddress) throws RemoteException;
|
||||
|
||||
@@ -85,9 +85,9 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger {
|
||||
jlongSize = remoteDebugger.getJLongSize();
|
||||
jshortSize = remoteDebugger.getJShortSize();
|
||||
javaPrimitiveTypesConfigured = true;
|
||||
heapBase = remoteDebugger.getHeapBase();
|
||||
narrowOopBase = remoteDebugger.getNarrowOopBase();
|
||||
narrowOopShift = remoteDebugger.getNarrowOopShift();
|
||||
heapOopSize = remoteDebugger.getHeapOopSize();
|
||||
logMinObjAlignmentInBytes = remoteDebugger.getLogMinObjAlignmentInBytes();
|
||||
}
|
||||
catch (RemoteException e) {
|
||||
throw new DebuggerException(e);
|
||||
|
||||
@@ -114,17 +114,18 @@ public class RemoteDebuggerServer extends UnicastRemoteObject
|
||||
return debugger.getJShortSize();
|
||||
}
|
||||
|
||||
public long getHeapBase() throws RemoteException {
|
||||
return debugger.getHeapBase();
|
||||
}
|
||||
|
||||
public long getHeapOopSize() throws RemoteException {
|
||||
return debugger.getHeapOopSize();
|
||||
}
|
||||
|
||||
public long getLogMinObjAlignmentInBytes() throws RemoteException {
|
||||
return debugger.getLogMinObjAlignmentInBytes();
|
||||
public long getNarrowOopBase() throws RemoteException {
|
||||
return debugger.getNarrowOopBase();
|
||||
}
|
||||
|
||||
public int getNarrowOopShift() throws RemoteException {
|
||||
return debugger.getNarrowOopShift();
|
||||
}
|
||||
|
||||
public boolean areThreadsEqual(long addrOrId1, boolean isAddress1,
|
||||
long addrOrId2, boolean isAddress2) throws RemoteException {
|
||||
ThreadProxy t1 = getThreadProxy(addrOrId1, isAddress1);
|
||||
|
||||
@@ -53,7 +53,8 @@ public class Universe {
|
||||
// system obj array klass object
|
||||
private static sun.jvm.hotspot.types.OopField systemObjArrayKlassObjField;
|
||||
|
||||
private static AddressField heapBaseField;
|
||||
private static AddressField narrowOopBaseField;
|
||||
private static CIntegerField narrowOopShiftField;
|
||||
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
@@ -86,7 +87,8 @@ public class Universe {
|
||||
|
||||
systemObjArrayKlassObjField = type.getOopField("_systemObjArrayKlassObj");
|
||||
|
||||
heapBaseField = type.getAddressField("_heap_base");
|
||||
narrowOopBaseField = type.getAddressField("_narrow_oop._base");
|
||||
narrowOopShiftField = type.getCIntegerField("_narrow_oop._shift");
|
||||
}
|
||||
|
||||
public Universe() {
|
||||
@@ -100,14 +102,18 @@ public class Universe {
|
||||
}
|
||||
}
|
||||
|
||||
public static long getHeapBase() {
|
||||
if (heapBaseField.getValue() == null) {
|
||||
public static long getNarrowOopBase() {
|
||||
if (narrowOopBaseField.getValue() == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return heapBaseField.getValue().minus(null);
|
||||
return narrowOopBaseField.getValue().minus(null);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getNarrowOopShift() {
|
||||
return (int)narrowOopShiftField.getValue();
|
||||
}
|
||||
|
||||
/** Returns "TRUE" iff "p" points into the allocated area of the heap. */
|
||||
public boolean isIn(Address p) {
|
||||
return heap().isIn(p);
|
||||
|
||||
@@ -142,34 +142,35 @@ public interface ClassConstants
|
||||
// from jvm.h
|
||||
|
||||
public static final long JVM_RECOGNIZED_CLASS_MODIFIERS = (JVM_ACC_PUBLIC |
|
||||
JVM_ACC_FINAL |
|
||||
JVM_ACC_SUPER |
|
||||
JVM_ACC_INTERFACE |
|
||||
JVM_ACC_ABSTRACT |
|
||||
JVM_ACC_ANNOTATION |
|
||||
JVM_ACC_SYNTHETIC);
|
||||
JVM_ACC_FINAL |
|
||||
JVM_ACC_SUPER |
|
||||
JVM_ACC_INTERFACE |
|
||||
JVM_ACC_ABSTRACT |
|
||||
JVM_ACC_ANNOTATION |
|
||||
JVM_ACC_ENUM |
|
||||
JVM_ACC_SYNTHETIC);
|
||||
|
||||
|
||||
public static final long JVM_RECOGNIZED_FIELD_MODIFIERS = (JVM_ACC_PUBLIC |
|
||||
JVM_ACC_PRIVATE |
|
||||
JVM_ACC_PROTECTED |
|
||||
JVM_ACC_STATIC |
|
||||
JVM_ACC_FINAL |
|
||||
JVM_ACC_VOLATILE |
|
||||
JVM_ACC_TRANSIENT |
|
||||
JVM_ACC_ENUM |
|
||||
JVM_ACC_SYNTHETIC);
|
||||
JVM_ACC_PRIVATE |
|
||||
JVM_ACC_PROTECTED |
|
||||
JVM_ACC_STATIC |
|
||||
JVM_ACC_FINAL |
|
||||
JVM_ACC_VOLATILE |
|
||||
JVM_ACC_TRANSIENT |
|
||||
JVM_ACC_ENUM |
|
||||
JVM_ACC_SYNTHETIC);
|
||||
|
||||
public static final long JVM_RECOGNIZED_METHOD_MODIFIERS = (JVM_ACC_PUBLIC |
|
||||
JVM_ACC_PRIVATE |
|
||||
JVM_ACC_PROTECTED |
|
||||
JVM_ACC_STATIC |
|
||||
JVM_ACC_FINAL |
|
||||
JVM_ACC_SYNCHRONIZED |
|
||||
JVM_ACC_BRIDGE |
|
||||
JVM_ACC_VARARGS |
|
||||
JVM_ACC_NATIVE |
|
||||
JVM_ACC_ABSTRACT |
|
||||
JVM_ACC_STRICT |
|
||||
JVM_ACC_SYNTHETIC);
|
||||
JVM_ACC_PRIVATE |
|
||||
JVM_ACC_PROTECTED |
|
||||
JVM_ACC_STATIC |
|
||||
JVM_ACC_FINAL |
|
||||
JVM_ACC_SYNCHRONIZED |
|
||||
JVM_ACC_BRIDGE |
|
||||
JVM_ACC_VARARGS |
|
||||
JVM_ACC_NATIVE |
|
||||
JVM_ACC_ABSTRACT |
|
||||
JVM_ACC_STRICT |
|
||||
JVM_ACC_SYNTHETIC);
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ public class JavaThread extends Thread {
|
||||
private static AddressField lastJavaPCField;
|
||||
private static CIntegerField threadStateField;
|
||||
private static AddressField osThreadField;
|
||||
private static AddressField stackBaseField;
|
||||
private static CIntegerField stackSizeField;
|
||||
|
||||
private static JavaThreadPDAccess access;
|
||||
|
||||
@@ -83,6 +85,8 @@ public class JavaThread extends Thread {
|
||||
lastJavaPCField = anchorType.getAddressField("_last_Java_pc");
|
||||
threadStateField = type.getCIntegerField("_thread_state");
|
||||
osThreadField = type.getAddressField("_osthread");
|
||||
stackBaseField = type.getAddressField("_stack_base");
|
||||
stackSizeField = type.getCIntegerField("_stack_size");
|
||||
|
||||
UNINITIALIZED = db.lookupIntConstant("_thread_uninitialized").intValue();
|
||||
NEW = db.lookupIntConstant("_thread_new").intValue();
|
||||
@@ -312,6 +316,14 @@ public class JavaThread extends Thread {
|
||||
return (OSThread) VMObjectFactory.newObject(OSThread.class, osThreadField.getValue(addr));
|
||||
}
|
||||
|
||||
public Address getStackBase() {
|
||||
return stackBaseField.getValue();
|
||||
}
|
||||
|
||||
public long getStackSize() {
|
||||
return stackSizeField.getValue();
|
||||
}
|
||||
|
||||
/** Gets the Java-side thread object for this JavaThread */
|
||||
public Oop getThreadObj() {
|
||||
return VM.getVM().getObjectHeap().newOop(threadObjField.getValue(addr));
|
||||
@@ -345,11 +357,18 @@ public class JavaThread extends Thread {
|
||||
if (Assert.ASSERTS_ENABLED) {
|
||||
Assert.that(VM.getVM().isDebugging(), "Not yet implemented for non-debugging system");
|
||||
}
|
||||
Address highest = highestLock();
|
||||
Address sp = lastSPDbg();
|
||||
Address stackBase = getStackBase();
|
||||
// Be robust
|
||||
if ((highest == null) || (sp == null)) return false;
|
||||
return (highest.greaterThanOrEqual(a) && sp.lessThanOrEqual(a));
|
||||
if (sp == null) return false;
|
||||
return stackBase.greaterThanOrEqual(a) && sp.lessThanOrEqual(a);
|
||||
}
|
||||
|
||||
public boolean isLockOwned(Address a) {
|
||||
Address stackBase = getStackBase();
|
||||
Address stackLimit = stackBase.addOffsetTo(-getStackSize());
|
||||
|
||||
return stackBase.greaterThanOrEqual(a) && stackLimit.lessThanOrEqual(a);
|
||||
|
||||
// FIXME: should traverse MonitorArray/MonitorChunks as in VM
|
||||
}
|
||||
|
||||
@@ -46,12 +46,18 @@ public class StubRoutines {
|
||||
Type type = db.lookupType("StubRoutines");
|
||||
|
||||
callStubReturnAddressField = type.getAddressField("_call_stub_return_address");
|
||||
// Only some platforms have specif return from compiled to call_stub
|
||||
// Only some platforms have specific return from compiled to call_stub
|
||||
try {
|
||||
callStubCompiledReturnAddressField = type.getAddressField("_call_stub_compiled_return");
|
||||
type = db.lookupType("StubRoutines::x86");
|
||||
if (type != null) {
|
||||
callStubCompiledReturnAddressField = type.getAddressField("_call_stub_compiled_return");
|
||||
}
|
||||
} catch (RuntimeException re) {
|
||||
callStubCompiledReturnAddressField = null;
|
||||
}
|
||||
if (callStubCompiledReturnAddressField == null && VM.getVM().getCPU().equals("x86")) {
|
||||
throw new InternalError("Missing definition for _call_stub_compiled_return");
|
||||
}
|
||||
}
|
||||
|
||||
public StubRoutines() {
|
||||
|
||||
@@ -38,7 +38,6 @@ public class Thread extends VMObject {
|
||||
private static int HAS_ASYNC_EXCEPTION;
|
||||
|
||||
private static AddressField activeHandlesField;
|
||||
private static AddressField highestLockField;
|
||||
private static AddressField currentPendingMonitorField;
|
||||
private static AddressField currentWaitingMonitorField;
|
||||
|
||||
@@ -60,7 +59,6 @@ public class Thread extends VMObject {
|
||||
|
||||
tlabFieldOffset = type.getField("_tlab").getOffset();
|
||||
activeHandlesField = type.getAddressField("_active_handles");
|
||||
highestLockField = type.getAddressField("_highest_lock");
|
||||
currentPendingMonitorField = type.getAddressField("_current_pending_monitor");
|
||||
currentWaitingMonitorField = type.getAddressField("_current_waiting_monitor");
|
||||
}
|
||||
@@ -121,10 +119,6 @@ public class Thread extends VMObject {
|
||||
// pending exception
|
||||
}
|
||||
|
||||
public Address highestLock() {
|
||||
return highestLockField.getValue(addr);
|
||||
}
|
||||
|
||||
public ObjectMonitor getCurrentPendingMonitor() {
|
||||
Address monitorAddr = currentPendingMonitorField.getValue(addr);
|
||||
if (monitorAddr == null) {
|
||||
|
||||
@@ -164,20 +164,11 @@ public class Threads {
|
||||
}
|
||||
}
|
||||
|
||||
long leastDiff = 0;
|
||||
boolean leastDiffInitialized = false;
|
||||
JavaThread theOwner = null;
|
||||
for (JavaThread thread = first(); thread != null; thread = thread.next()) {
|
||||
Address addr = thread.highestLock();
|
||||
if (addr == null || addr.lessThan(o)) continue;
|
||||
long diff = addr.minus(o);
|
||||
if (!leastDiffInitialized || diff < leastDiff) {
|
||||
leastDiffInitialized = true;
|
||||
leastDiff = diff;
|
||||
theOwner = thread;
|
||||
}
|
||||
if (thread.isLockOwned(o))
|
||||
return thread;
|
||||
}
|
||||
return theOwner;
|
||||
return null;
|
||||
}
|
||||
|
||||
public JavaThread owningThreadFromMonitor(ObjectMonitor monitor) {
|
||||
|
||||
@@ -318,11 +318,17 @@ public class VM {
|
||||
logMinObjAlignmentInBytes = db.lookupIntConstant("LogMinObjAlignmentInBytes").intValue();
|
||||
heapWordSize = db.lookupIntConstant("HeapWordSize").intValue();
|
||||
oopSize = db.lookupIntConstant("oopSize").intValue();
|
||||
heapOopSize = db.lookupIntConstant("heapOopSize").intValue();
|
||||
|
||||
intxType = db.lookupType("intx");
|
||||
uintxType = db.lookupType("uintx");
|
||||
boolType = (CIntegerType) db.lookupType("bool");
|
||||
|
||||
if (isCompressedOopsEnabled()) {
|
||||
// Size info for oops within java objects is fixed
|
||||
heapOopSize = (int)getIntSize();
|
||||
} else {
|
||||
heapOopSize = (int)getOopSize();
|
||||
}
|
||||
}
|
||||
|
||||
/** This could be used by a reflective runtime system */
|
||||
@@ -342,11 +348,13 @@ public class VM {
|
||||
throw new RuntimeException("Attempt to initialize VM twice");
|
||||
}
|
||||
soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian());
|
||||
debugger.putHeapConst(Universe.getHeapBase(), soleInstance.getHeapOopSize(),
|
||||
soleInstance.logMinObjAlignmentInBytes);
|
||||
|
||||
for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) {
|
||||
((Observer) iter.next()).update(null, null);
|
||||
}
|
||||
|
||||
debugger.putHeapConst(soleInstance.getHeapOopSize(), Universe.getNarrowOopBase(),
|
||||
Universe.getNarrowOopShift());
|
||||
}
|
||||
|
||||
/** This is used by the debugging system */
|
||||
|
||||
@@ -89,29 +89,6 @@ public class ByteCodeRewriter
|
||||
// update the code buffer hotspot specific bytecode with the jvm bytecode
|
||||
code[bci] = (byte) (0xFF & bytecode);
|
||||
|
||||
// RewriteFrequentPairs
|
||||
if(hotspotcode == Bytecodes._fast_iaccess_0 ||
|
||||
hotspotcode == Bytecodes._fast_aaccess_0 ||
|
||||
hotspotcode == Bytecodes._fast_faccess_0) {
|
||||
// rewrite next bytecode as _getfield
|
||||
bci++;
|
||||
code[bci] = (byte) (0xFF & Bytecodes._getfield);
|
||||
bytecode = Bytecodes._getfield;
|
||||
hotspotcode = Bytecodes._getfield;
|
||||
} else if (hotspotcode == Bytecodes._fast_iload2) {
|
||||
// rewrite next bytecode as _iload
|
||||
bci++;
|
||||
code[bci] = (byte) (0xFF & Bytecodes._iload);
|
||||
bytecode = Bytecodes._iload;
|
||||
hotspotcode = Bytecodes._iload;
|
||||
} else if (hotspotcode == Bytecodes._fast_icaload) {
|
||||
// rewrite next bytecode as _caload
|
||||
bci++;
|
||||
code[bci] = (byte) (0xFF & Bytecodes._caload);
|
||||
bytecode = Bytecodes._caload;
|
||||
bytecode = Bytecodes._caload;
|
||||
}
|
||||
|
||||
short cpoolIndex = 0;
|
||||
switch (bytecode) {
|
||||
// bytecodes with ConstantPoolCache index
|
||||
|
||||
@@ -59,8 +59,14 @@ public class ClassDump extends Tool {
|
||||
SystemDictionary dict = VM.getVM().getSystemDictionary();
|
||||
dict.classesDo(new SystemDictionary.ClassVisitor() {
|
||||
public void visit(Klass k) {
|
||||
if (k instanceof InstanceKlass)
|
||||
dumpKlass((InstanceKlass) k);
|
||||
if (k instanceof InstanceKlass) {
|
||||
try {
|
||||
dumpKlass((InstanceKlass) k);
|
||||
} catch (Exception e) {
|
||||
System.out.println(k.getName().asString());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
protected InstanceKlass klass;
|
||||
protected DataOutputStream dos;
|
||||
protected ConstantPool cpool;
|
||||
protected boolean is15Format;
|
||||
|
||||
// Map between class name to index of type CONSTANT_Class
|
||||
protected Map classToIndex = new HashMap();
|
||||
@@ -73,7 +72,6 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
klass = kls;
|
||||
dos = new DataOutputStream(os);
|
||||
cpool = klass.getConstants();
|
||||
is15Format = is15ClassFile();
|
||||
}
|
||||
|
||||
public void write() throws IOException {
|
||||
@@ -82,7 +80,7 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
// write magic
|
||||
dos.writeInt(0xCAFEBABE);
|
||||
|
||||
writeVersion(is15Format);
|
||||
writeVersion();
|
||||
writeConstantPool();
|
||||
writeClassAccessFlags();
|
||||
writeThisClass();
|
||||
@@ -96,43 +94,14 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
dos.flush();
|
||||
}
|
||||
|
||||
protected boolean is15ClassFile() {
|
||||
// if klass has generic signature, then it is 1.5 class file.
|
||||
if (klass.getGenericSignature() != null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// if atleast one method has generic signature
|
||||
// , then we have 1.5 class file.
|
||||
ObjArray methods = klass.getMethods();
|
||||
final int numMethods = (int) methods.getLength();
|
||||
for (int m = 0; m < numMethods; m++) {
|
||||
Method curMethod = (Method) methods.getObjAt(m);
|
||||
if (curMethod.getGenericSignature() != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// if atleast one field has non-zero generic signature index, then we have
|
||||
// 1.5 class file
|
||||
TypeArray fields = klass.getFields();
|
||||
final int numFields = (int) fields.getLength();
|
||||
for (int f = 0; f < numFields; f += InstanceKlass.NEXT_OFFSET) {
|
||||
short genSigIndex = fields.getShortAt(f + InstanceKlass.GENERIC_SIGNATURE_INDEX_OFFSET);
|
||||
if (genSigIndex != (short)0) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
protected void writeVersion() throws IOException {
|
||||
dos.writeShort((short)klass.minorVersion());
|
||||
dos.writeShort((short)klass.majorVersion());
|
||||
}
|
||||
|
||||
protected void writeVersion(boolean is15Format) throws IOException {
|
||||
if (is15Format) {
|
||||
dos.writeShort(MINOR_VERSION);
|
||||
dos.writeShort(MAJOR_VERSION);
|
||||
} else {
|
||||
dos.writeShort(MINOR_VERSION_OLD);
|
||||
dos.writeShort(MAJOR_VERSION_OLD);
|
||||
}
|
||||
protected void writeIndex(int index) throws IOException {
|
||||
if (index == 0) throw new InternalError();
|
||||
dos.writeShort(index);
|
||||
}
|
||||
|
||||
protected void writeConstantPool() throws IOException {
|
||||
@@ -392,8 +361,8 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
if (DEBUG) debugMessage("\tfield name = " + nameIndex + ", signature = " + signatureIndex);
|
||||
|
||||
short fieldAttributeCount = 0;
|
||||
boolean isSyn = isSynthetic(accessFlags);
|
||||
if (isSyn)
|
||||
boolean hasSyn = hasSyntheticAttribute(accessFlags);
|
||||
if (hasSyn)
|
||||
fieldAttributeCount++;
|
||||
|
||||
short initvalIndex = fields.getShortAt(index + InstanceKlass.INITVAL_INDEX_OFFSET);
|
||||
@@ -407,18 +376,18 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
dos.writeShort(fieldAttributeCount);
|
||||
|
||||
// write synthetic, if applicable
|
||||
if (isSyn)
|
||||
if (hasSyn)
|
||||
writeSynthetic();
|
||||
|
||||
if (initvalIndex != 0) {
|
||||
dos.writeShort(_constantValueIndex);
|
||||
writeIndex(_constantValueIndex);
|
||||
dos.writeInt(2);
|
||||
dos.writeShort(initvalIndex);
|
||||
if (DEBUG) debugMessage("\tfield init value = " + initvalIndex);
|
||||
}
|
||||
|
||||
if (genSigIndex != 0) {
|
||||
dos.writeShort(_signatureIndex);
|
||||
writeIndex(_signatureIndex);
|
||||
dos.writeInt(2);
|
||||
dos.writeShort(genSigIndex);
|
||||
if (DEBUG) debugMessage("\tfield generic signature index " + genSigIndex);
|
||||
@@ -430,8 +399,13 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
return (accessFlags & (short) JVM_ACC_SYNTHETIC) != 0;
|
||||
}
|
||||
|
||||
protected boolean hasSyntheticAttribute(short accessFlags) {
|
||||
// Check if flags have the attribute and if the constant pool contains an entry for it.
|
||||
return isSynthetic(accessFlags) && _syntheticIndex != 0;
|
||||
}
|
||||
|
||||
protected void writeSynthetic() throws IOException {
|
||||
dos.writeShort(_syntheticIndex);
|
||||
writeIndex(_syntheticIndex);
|
||||
dos.writeInt(0);
|
||||
}
|
||||
|
||||
@@ -459,8 +433,8 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
|
||||
short methodAttributeCount = 0;
|
||||
|
||||
final boolean isSyn = isSynthetic((short)accessFlags);
|
||||
if (isSyn)
|
||||
final boolean hasSyn = hasSyntheticAttribute((short)accessFlags);
|
||||
if (hasSyn)
|
||||
methodAttributeCount++;
|
||||
|
||||
final boolean hasCheckedExceptions = m.hasCheckedExceptions();
|
||||
@@ -478,27 +452,11 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
dos.writeShort(methodAttributeCount);
|
||||
if (DEBUG) debugMessage("\tmethod attribute count = " + methodAttributeCount);
|
||||
|
||||
if (isSyn) {
|
||||
if (hasSyn) {
|
||||
if (DEBUG) debugMessage("\tmethod is synthetic");
|
||||
writeSynthetic();
|
||||
}
|
||||
|
||||
if (hasCheckedExceptions) {
|
||||
CheckedExceptionElement[] exceptions = m.getCheckedExceptions();
|
||||
dos.writeShort(_exceptionsIndex);
|
||||
|
||||
int attrSize = 2 /* number_of_exceptions */ +
|
||||
exceptions.length * 2 /* exception_index */;
|
||||
dos.writeInt(attrSize);
|
||||
dos.writeShort(exceptions.length);
|
||||
if (DEBUG) debugMessage("\tmethod has " + exceptions.length
|
||||
+ " checked exception(s)");
|
||||
for (int e = 0; e < exceptions.length; e++) {
|
||||
short cpIndex = (short) exceptions[e].getClassCPIndex();
|
||||
dos.writeShort(cpIndex);
|
||||
}
|
||||
}
|
||||
|
||||
if (isCodeAvailable) {
|
||||
byte[] code = m.getByteCode();
|
||||
short codeAttrCount = 0;
|
||||
@@ -574,7 +532,7 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
|
||||
// start writing Code
|
||||
|
||||
dos.writeShort(_codeIndex);
|
||||
writeIndex(_codeIndex);
|
||||
|
||||
dos.writeInt(codeSize);
|
||||
if (DEBUG) debugMessage("\tcode attribute length = " + codeSize);
|
||||
@@ -608,7 +566,7 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
|
||||
// write LineNumberTable, if available.
|
||||
if (hasLineNumberTable) {
|
||||
dos.writeShort(_lineNumberTableIndex);
|
||||
writeIndex(_lineNumberTableIndex);
|
||||
dos.writeInt(lineNumberAttrLen);
|
||||
dos.writeShort((short) lineNumberTable.length);
|
||||
for (int l = 0; l < lineNumberTable.length; l++) {
|
||||
@@ -619,7 +577,7 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
|
||||
// write LocalVariableTable, if available.
|
||||
if (hasLocalVariableTable) {
|
||||
dos.writeShort((short) _localVariableTableIndex);
|
||||
writeIndex((short) _localVariableTableIndex);
|
||||
dos.writeInt(localVarAttrLen);
|
||||
dos.writeShort((short) localVariableTable.length);
|
||||
for (int l = 0; l < localVariableTable.length; l++) {
|
||||
@@ -632,6 +590,22 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
}
|
||||
}
|
||||
|
||||
if (hasCheckedExceptions) {
|
||||
CheckedExceptionElement[] exceptions = m.getCheckedExceptions();
|
||||
writeIndex(_exceptionsIndex);
|
||||
|
||||
int attrSize = 2 /* number_of_exceptions */ +
|
||||
exceptions.length * 2 /* exception_index */;
|
||||
dos.writeInt(attrSize);
|
||||
dos.writeShort(exceptions.length);
|
||||
if (DEBUG) debugMessage("\tmethod has " + exceptions.length
|
||||
+ " checked exception(s)");
|
||||
for (int e = 0; e < exceptions.length; e++) {
|
||||
short cpIndex = (short) exceptions[e].getClassCPIndex();
|
||||
dos.writeShort(cpIndex);
|
||||
}
|
||||
}
|
||||
|
||||
if (isGeneric) {
|
||||
writeGenericSignature(m.getGenericSignature().asString());
|
||||
}
|
||||
@@ -643,7 +617,7 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
}
|
||||
|
||||
protected void writeGenericSignature(String signature) throws IOException {
|
||||
dos.writeShort(_signatureIndex);
|
||||
writeIndex(_signatureIndex);
|
||||
if (DEBUG) debugMessage("signature attribute = " + _signatureIndex);
|
||||
dos.writeInt(2);
|
||||
Short index = (Short) utf8ToIndex.get(signature);
|
||||
@@ -653,12 +627,12 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
|
||||
protected void writeClassAttributes() throws IOException {
|
||||
final long flags = klass.getAccessFlags();
|
||||
final boolean isSyn = isSynthetic((short) flags);
|
||||
final boolean hasSyn = hasSyntheticAttribute((short) flags);
|
||||
|
||||
// check for source file
|
||||
short classAttributeCount = 0;
|
||||
|
||||
if (isSyn)
|
||||
if (hasSyn)
|
||||
classAttributeCount++;
|
||||
|
||||
Symbol sourceFileName = klass.getSourceFileName();
|
||||
@@ -677,12 +651,12 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
dos.writeShort(classAttributeCount);
|
||||
if (DEBUG) debugMessage("class attribute count = " + classAttributeCount);
|
||||
|
||||
if (isSyn)
|
||||
if (hasSyn)
|
||||
writeSynthetic();
|
||||
|
||||
// write SourceFile, if any
|
||||
if (sourceFileName != null) {
|
||||
dos.writeShort(_sourceFileIndex);
|
||||
writeIndex(_sourceFileIndex);
|
||||
if (DEBUG) debugMessage("source file attribute = " + _sourceFileIndex);
|
||||
dos.writeInt(2);
|
||||
Short index = (Short) utf8ToIndex.get(sourceFileName.asString());
|
||||
@@ -697,7 +671,7 @@ public class ClassWriter implements /* imports */ ClassConstants
|
||||
|
||||
// write inner classes, if any
|
||||
if (numInnerClasses != 0) {
|
||||
dos.writeShort(_innerClassesIndex);
|
||||
writeIndex(_innerClassesIndex);
|
||||
final int innerAttrLen = 2 /* number_of_inner_classes */ +
|
||||
numInnerClasses * (
|
||||
2 /* inner_class_info_index */ +
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
#
|
||||
|
||||
# Don't put quotes (fail windows build).
|
||||
HOTSPOT_VM_COPYRIGHT=Copyright 2008
|
||||
HOTSPOT_VM_COPYRIGHT=Copyright 2009
|
||||
|
||||
HS_MAJOR_VER=15
|
||||
HS_MAJOR_VER=16
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=03
|
||||
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
#!echo "This is not a shell script"
|
||||
#
|
||||
# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
#
|
||||
|
||||
#############################################################################
|
||||
# Error
|
||||
error() # message
|
||||
{
|
||||
echo "ERROR: $1"
|
||||
exit 6
|
||||
}
|
||||
# Directory must exist
|
||||
dirMustExist() # dir name
|
||||
{
|
||||
if [ ! -d "$1" ] ; then
|
||||
error "Directory for $2 does not exist: $1"
|
||||
fi
|
||||
}
|
||||
# File must exist
|
||||
fileMustExist() # dir name
|
||||
{
|
||||
if [ ! -f "$1" ] ; then
|
||||
error "File for $2 does not exist: $1"
|
||||
fi
|
||||
}
|
||||
#############################################################################
|
||||
|
||||
# Should be set by JPRT as the 3 basic inputs
|
||||
bootdir="${ALT_BOOTDIR}"
|
||||
slashjava="${ALT_SLASH_JAVA}"
|
||||
jdk_import="${ALT_JDK_IMPORT_PATH}"
|
||||
|
||||
# Check input
|
||||
dirMustExist "${bootdir}" ALT_BOOTDIR
|
||||
dirMustExist "${slashjava}" ALT_SLASH_JAVA
|
||||
dirMustExist "${jdk_import}" ALT_JDK_IMPORT_PATH
|
||||
|
||||
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
|
||||
osname=`uname -s`
|
||||
if [ "${osname}" = SunOS ] ; then
|
||||
|
||||
# SOLARIS: Sparc or X86
|
||||
osarch=`uname -p`
|
||||
if [ "${osarch}" = sparc ] ; then
|
||||
solaris_arch=sparc
|
||||
else
|
||||
solaris_arch=i386
|
||||
fi
|
||||
|
||||
if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
|
||||
compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
|
||||
else
|
||||
if [ "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6" -o \
|
||||
"${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6u10" -o \
|
||||
"${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6perf" ] ; then
|
||||
# All jdk6 builds use SS11
|
||||
compiler_name=SS11
|
||||
else
|
||||
compiler_name=SS12
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get into path (make sure it matches ALT setting)
|
||||
compiler_path=${slashjava}/devtools/${solaris_arch}/SUNWspro/${compiler_name}/bin
|
||||
dirMustExist "${compiler_path}" COMPILER_PATH
|
||||
path4sdk=${compiler_path}
|
||||
|
||||
# Add basic solaris system paths
|
||||
path4sdk=${path4sdk}:/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
|
||||
|
||||
# Get the previous JDK to be used to bootstrap the build
|
||||
path4sdk=${bootdir}/bin:${path4sdk}
|
||||
|
||||
# Find GNU make
|
||||
make=/usr/sfw/bin/gmake
|
||||
if [ ! -f ${make} ] ; then
|
||||
make=/opt/sfw/bin/gmake
|
||||
if [ ! -f ${make} ] ; then
|
||||
make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
|
||||
fi
|
||||
fi
|
||||
fileMustExist "${make}" make
|
||||
|
||||
# File creation mask
|
||||
umask 002
|
||||
|
||||
elif [ "${osname}" = Linux ] ; then
|
||||
|
||||
# LINUX: X86, AMD64
|
||||
osarch=`uname -m`
|
||||
if [ "${osarch}" = i686 ] ; then
|
||||
linux_arch=i586
|
||||
elif [ "${osarch}" = x86_64 ] ; then
|
||||
linux_arch=amd64
|
||||
fi
|
||||
|
||||
# Get the compilers into path (make sure it matches ALT setting)
|
||||
compiler_path=/usr/bin
|
||||
dirMustExist "${compiler_path}" COMPILER_PATH
|
||||
path4sdk=${compiler_path}
|
||||
|
||||
# Add basic paths
|
||||
path4sdk=${path4sdk}:/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
# Get the previous JDK to be used to bootstrap the build
|
||||
path4sdk=${bootdir}/bin:${path4sdk}
|
||||
|
||||
# Find GNU make
|
||||
make=/usr/bin/make
|
||||
fileMustExist "${make}" make
|
||||
|
||||
umask 002
|
||||
|
||||
else
|
||||
|
||||
# Windows: Differs on CYGWIN vs. MKS, and the compiler available.
|
||||
# Also, blanks in pathnames gives GNU make headaches, so anything placed
|
||||
# in any ALT_* variable should be the short windows dosname.
|
||||
|
||||
# WINDOWS: Install and use MKS or CYGWIN (should have already been done)
|
||||
# Assumption here is that you are in a shell window via MKS or cygwin.
|
||||
# MKS install should have defined the environment variable ROOTDIR.
|
||||
# We also need to figure out which one we have: X86, AMD64
|
||||
if [ "`echo ${PROCESSOR_IDENTIFIER} | fgrep AMD64`" != "" ] ; then
|
||||
windows_arch=amd64
|
||||
else
|
||||
windows_arch=i586
|
||||
fi
|
||||
|
||||
# We need to determine if we are running a CYGWIN shell or an MKS shell
|
||||
# (if uname isn't available, then it will be unix_toolset=unknown)
|
||||
unix_toolset=unknown
|
||||
if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
|
||||
# We kind of assume ROOTDIR is where MKS is and it's ok
|
||||
unix_toolset=MKS
|
||||
mkshome=`dosname -s "${ROOTDIR}"`
|
||||
# Utility to convert to short pathnames without spaces
|
||||
dosname="${mkshome}/mksnt/dosname -s"
|
||||
# Most unix utilities are in the mksnt directory of ROOTDIR
|
||||
unixcommand_path="${mkshome}/mksnt"
|
||||
path4sdk="${unixcommand_path}"
|
||||
dirMustExist "${unixcommand_path}" UNIXCOMMAND_PATH
|
||||
devtools_path="${slashjava}/devtools/win32/bin"
|
||||
path4sdk="${devtools_path};${path4sdk}"
|
||||
dirMustExist "${devtools_path}" DEVTOOLS_PATH
|
||||
# Find GNU make
|
||||
make="${devtools_path}/gnumake.exe"
|
||||
fileMustExist "${make}" make
|
||||
elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
|
||||
# For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
|
||||
unix_toolset=CYGWIN
|
||||
# Utility to convert to short pathnames without spaces
|
||||
dosname="/usr/bin/cygpath -a -m -s"
|
||||
# Most unix utilities are in the /usr/bin
|
||||
unixcommand_path="/usr/bin"
|
||||
path4sdk="${unixcommand_path}"
|
||||
dirMustExist "${unixcommand_path}" UNIXCOMMAND_PATH
|
||||
# Find GNU make
|
||||
make="${unixcommand_path}/make.exe"
|
||||
fileMustExist "${make}" make
|
||||
else
|
||||
echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
|
||||
fi
|
||||
|
||||
# WINDOWS: Compiler setup (nasty part)
|
||||
# NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
|
||||
# NOTE: CYGWIN has a link.exe too, make sure the compilers are first
|
||||
if [ "${windows_arch}" = i586 ] ; then
|
||||
# 32bit Windows compiler settings
|
||||
# VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined)
|
||||
vs_root=`${dosname} "${VS71COMNTOOLS}/../.."`
|
||||
# Fill in PATH, LIB, and INCLUDE (unset all others to make sure)
|
||||
vc7_root="${vs_root}/Vc7"
|
||||
compiler_path="${vc7_root}/bin"
|
||||
platform_sdk="${vc7_root}/PlatformSDK"
|
||||
# LIB and INCLUDE must use ; as a separator
|
||||
include4sdk="${vc7_root}/atlmfc/include"
|
||||
include4sdk="${include4sdk};${vc7_root}/include"
|
||||
include4sdk="${include4sdk};${platform_sdk}/include/prerelease"
|
||||
include4sdk="${include4sdk};${platform_sdk}/include"
|
||||
include4sdk="${include4sdk};${vs_root}/SDK/v1.1/include"
|
||||
lib4sdk="${vc7_root}/atlmfc/lib"
|
||||
lib4sdk="${lib4sdk};${vc7_root}/lib"
|
||||
lib4sdk="${lib4sdk};${platform_sdk}/lib/prerelease"
|
||||
lib4sdk="${lib4sdk};${platform_sdk}/lib"
|
||||
lib4sdk="${lib4sdk};${vs_root}/SDK/v1.1/lib"
|
||||
# Search path and DLL locating path
|
||||
# WARNING: CYGWIN has a link.exe too, make sure compilers are first
|
||||
path4sdk="${vs_root}/Common7/Tools/bin;${path4sdk}"
|
||||
path4sdk="${vs_root}/SDK/v1.1/bin;${path4sdk}"
|
||||
path4sdk="${vs_root}/Common7/Tools;${path4sdk}"
|
||||
path4sdk="${vs_root}/Common7/Tools/bin/prerelease;${path4sdk}"
|
||||
path4sdk="${vs_root}/Common7/IDE;${path4sdk}"
|
||||
path4sdk="${compiler_path};${path4sdk}"
|
||||
elif [ "${windows_arch}" = amd64 ] ; then
|
||||
# AMD64 64bit Windows compiler settings
|
||||
if [ "${MSSDK}" != "" ] ; then
|
||||
platform_sdk="${MSSDK}"
|
||||
else
|
||||
platform_sdk=`${dosname} "C:/Program Files/Microsoft Platform SDK/"`
|
||||
fi
|
||||
compiler_path="${platform_sdk}/Bin/win64/x86/AMD64"
|
||||
# LIB and INCLUDE must use ; as a separator
|
||||
include4sdk="${platform_sdk}/Include"
|
||||
include4sdk="${include4sdk};${platform_sdk}/Include/crt/sys"
|
||||
include4sdk="${include4sdk};${platform_sdk}/Include/mfc"
|
||||
include4sdk="${include4sdk};${platform_sdk}/Include/atl"
|
||||
include4sdk="${include4sdk};${platform_sdk}/Include/crt"
|
||||
lib4sdk="${platform_sdk}/Lib/AMD64"
|
||||
lib4sdk="${lib4sdk};${platform_sdk}/Lib/AMD64/atlmfc"
|
||||
# Search path and DLL locating path
|
||||
# WARNING: CYGWIN has a link.exe too, make sure compilers are first
|
||||
path4sdk="${platform_sdk}/bin;${path4sdk}"
|
||||
path4sdk="${compiler_path};${path4sdk}"
|
||||
fi
|
||||
# Export LIB and INCLUDE
|
||||
unset lib
|
||||
unset Lib
|
||||
LIB="${lib4sdk}"
|
||||
export LIB
|
||||
unset include
|
||||
unset Include
|
||||
INCLUDE="${include4sdk}"
|
||||
export INCLUDE
|
||||
# Set the ALT variable
|
||||
dirMustExist "${compiler_path}" COMPILER_PATH
|
||||
|
||||
# WINDOWS: Get the previous JDK to be used to bootstrap the build
|
||||
path4sdk="${bootdir}/bin;${path4sdk}"
|
||||
|
||||
# Turn all \\ into /, remove duplicates and trailing /
|
||||
slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
|
||||
|
||||
# For windows, it's hard to know where the system is, so we just add this
|
||||
# to PATH.
|
||||
path4sdk="${slash_path};${PATH}"
|
||||
|
||||
# Convert path4sdk to cygwin style
|
||||
if [ "${unix_toolset}" = CYGWIN ] ; then
|
||||
path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Export PATH setting
|
||||
PATH="${path4sdk}"
|
||||
export PATH
|
||||
|
||||
# Unset certain vars
|
||||
unset LD_LIBRARY_PATH
|
||||
unset LD_LIBRARY_PATH_32
|
||||
unset LD_LIBRARY_PATH_64
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
# CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
# have any questions.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# Properties for jprt
|
||||
|
||||
# All build result bundles are full jdks, so the 64bit testing does not
|
||||
# All build result bundles are full jdks, so the 64bit testing does not
|
||||
# need the 32bit sibling bundle installed.
|
||||
# Note: If the hotspot/make/Makefile changed to only bundle the 64bit files
|
||||
# when bundling 64bit, and stripped out the 64bit files from any 32bit
|
||||
@@ -46,30 +46,57 @@ jprt.my.solaris.sparc.jdk7=solaris_sparc_5.10
|
||||
jprt.my.solaris.sparc.jdk6=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc.jdk6perf=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc.jdk6u10=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc.jdk6u14=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc=${jprt.my.solaris.sparc.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.solaris.sparcv9.jdk7=solaris_sparcv9_5.10
|
||||
jprt.my.solaris.sparcv9.jdk6=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9.jdk6perf=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9.jdk6u10=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9.jdk6u14=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9=${jprt.my.solaris.sparcv9.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.solaris.i586.jdk7=solaris_i586_5.10
|
||||
jprt.my.solaris.i586.jdk6=solaris_i586_5.8
|
||||
jprt.my.solaris.i586.jdk6perf=solaris_i586_5.8
|
||||
jprt.my.solaris.i586.jdk6u10=solaris_i586_5.8
|
||||
jprt.my.solaris.i586.jdk6u14=solaris_i586_5.8
|
||||
jprt.my.solaris.i586=${jprt.my.solaris.i586.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.solaris.x64.jdk7=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6perf=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
|
||||
jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.i586=linux_i586
|
||||
jprt.my.linux.x64=linux_x64
|
||||
jprt.my.windows.i586=windows_i586
|
||||
jprt.my.windows.x64=windows_x64
|
||||
jprt.my.linux.i586.jdk7=linux_i586_2.6
|
||||
jprt.my.linux.i586.jdk6=linux_i586_2.4
|
||||
jprt.my.linux.i586.jdk6perf=linux_i586_2.4
|
||||
jprt.my.linux.i586.jdk6u10=linux_i586_2.4
|
||||
jprt.my.linux.i586.jdk6u14=linux_i586_2.4
|
||||
jprt.my.linux.i586=${jprt.my.linux.i586.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.x64.jdk7=linux_x64_2.6
|
||||
jprt.my.linux.x64.jdk6=linux_x64_2.4
|
||||
jprt.my.linux.x64.jdk6perf=linux_x64_2.4
|
||||
jprt.my.linux.x64.jdk6u10=linux_x64_2.4
|
||||
jprt.my.linux.x64.jdk6u14=linux_x64_2.4
|
||||
jprt.my.linux.x64=${jprt.my.linux.x64.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.windows.i586.jdk7=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6perf=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6u10=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6u14=windows_i586_5.0
|
||||
jprt.my.windows.i586=${jprt.my.windows.i586.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.windows.x64.jdk7=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6perf=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6u10=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6u14=windows_x64_5.2
|
||||
jprt.my.windows.x64=${jprt.my.windows.x64.${jprt.tools.default.release}}
|
||||
|
||||
# Standard list of jprt build targets for this source tree
|
||||
|
||||
@@ -89,60 +116,52 @@ jprt.my.solaris.sparc.test.targets= \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jvm98, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-scimark, \
|
||||
${jprt.my.solaris.sparc}-product-{c1|c2}-runThese, \
|
||||
${jprt.my.solaris.sparc}-product-{c1|c2}-runThese_Xcomp, \
|
||||
${jprt.my.solaris.sparc}-product-{c1|c2}-runThese_Xcomp_2, \
|
||||
${jprt.my.solaris.sparc}-product-{c1|c2}-runThese_Xcomp_3, \
|
||||
${jprt.my.solaris.sparc}-fastdebug-c1-runThese_Xshare, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_default_2, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC_2, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC_2, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC_2, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_CMS_2, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_G1, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCBasher_ParOldGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_default, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_SerialGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_ParallelGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_ParNewGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_CMS, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_G1, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-GCOld_ParOldGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_default, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_SerialGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_ParallelGC, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_CMS, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-scimark_2, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-scimark_3
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_G1, \
|
||||
${jprt.my.solaris.sparc}-{product|fastdebug}-{c1|c2}-jbb_ParOldGC
|
||||
|
||||
jprt.my.solaris.sparcv9.test.targets= \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark, \
|
||||
${jprt.my.solaris.sparcv9}-product-c2-runThese, \
|
||||
${jprt.my.solaris.sparcv9}-product-c2-runThese_Xcomp, \
|
||||
${jprt.my.solaris.sparcv9}-product-c2-runThese_Xcomp_2, \
|
||||
${jprt.my.solaris.sparcv9}-product-c2-runThese_Xcomp_3, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_default, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_SerialGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_CMS, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_default_2, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_SerialGC_2, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParallelGC_2, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParNewGC_2, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_CMS_2, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_G1, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParOldGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_default, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_SerialGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_ParallelGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_ParNewGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_CMS, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_G1, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCOld_ParOldGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_default, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_SerialGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_ParallelGC, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_CMS, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark_2, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark_3
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_G1, \
|
||||
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jbb_ParOldGC
|
||||
|
||||
jprt.my.solaris.x64.test.targets= \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98, \
|
||||
@@ -154,73 +173,80 @@ jprt.my.solaris.x64.test.targets= \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_CMS, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_default_2, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_SerialGC_2, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC_2, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC_2, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_CMS_2, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_G1, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParOldGC, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_default, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_SerialGC, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_ParallelGC, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_ParNewGC, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_CMS, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_G1, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_ParOldGC, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_default, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_SerialGC, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_ParallelGC, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jbb_CMS
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_CMS, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_G1, \
|
||||
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCOld_ParOldGC
|
||||
|
||||
jprt.my.solaris.i586.test.targets= \
|
||||
${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
|
||||
${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark, \
|
||||
${jprt.my.solaris.i586}-product-{c1|c2}-runThese_Xcomp, \
|
||||
${jprt.my.solaris.i586}-product-c2-runThese_Xcomp_2, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c1-runThese_Xcomp_2, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c1-runThese_Xcomp, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c1-runThese_Xshare, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCBasher_default, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCBasher_SerialGC, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCBasher_ParallelGC, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCBasher_ParNewGC, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCBasher_CMS, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCBasher_G1, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCBasher_ParOldGC, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_default, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_SerialGC, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_ParallelGC, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_ParNewGC, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_CMS, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_G1, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-GCBasher_ParOldGC, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCOld_default, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCOld_SerialGC, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCOld_ParallelGC, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCOld_ParNewGC, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCOld_CMS, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCOld_G1, \
|
||||
${jprt.my.solaris.i586}-product-c1-GCOld_ParOldGC, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-jbb_default, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-jbb_ParallelGC, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-jbb_CMS, \
|
||||
${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
|
||||
${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-jbb_G1, \
|
||||
${jprt.my.solaris.i586}-fastdebug-c2-jbb_ParOldGC
|
||||
|
||||
jprt.my.linux.i586.test.targets = \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
|
||||
${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
|
||||
${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
|
||||
${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
|
||||
${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
|
||||
${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
|
||||
${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_G1, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParOldGC, \
|
||||
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
|
||||
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
|
||||
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
|
||||
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
|
||||
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
|
||||
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_G1, \
|
||||
${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParOldGC, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_G1, \
|
||||
${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParOldGC
|
||||
|
||||
jprt.my.linux.x64.test.targets = \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
|
||||
@@ -230,15 +256,19 @@ jprt.my.linux.x64.test.targets = \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_CMS, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_G1, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCBasher_ParOldGC, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_default, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_SerialGC, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_ParallelGC, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_ParNewGC, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_CMS, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_G1, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-GCOld_ParOldGC, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_default, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_ParallelGC, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-scimark_2, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-scimark_3
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_G1, \
|
||||
${jprt.my.linux.x64}-{product|fastdebug}-c2-jbb_ParOldGC
|
||||
|
||||
jprt.my.windows.i586.test.targets = \
|
||||
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
|
||||
@@ -251,16 +281,20 @@ jprt.my.windows.i586.test.targets = \
|
||||
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
|
||||
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
|
||||
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
|
||||
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_G1, \
|
||||
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParOldGC, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_default, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_SerialGC, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_ParallelGC, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_ParNewGC, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_CMS, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_G1, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-GCOld_ParOldGC, \
|
||||
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jbb_default, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-jbb_ParallelGC, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-jbb_CMS, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-scimark_2, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-scimark_3
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-jbb_G1, \
|
||||
${jprt.my.windows.i586}-product-{c1|c2}-jbb_ParOldGC
|
||||
|
||||
jprt.my.windows.x64.test.targets = \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98, \
|
||||
@@ -272,16 +306,20 @@ jprt.my.windows.x64.test.targets = \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_CMS, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_G1, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParOldGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_default, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_SerialGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_ParallelGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_ParNewGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_CMS, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_G1, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCOld_ParOldGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-jbb_default, \
|
||||
${jprt.my.windows.x64}-product-c2-jbb_CMS, \
|
||||
${jprt.my.windows.x64}-product-c2-jbb_ParallelGC, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-scimark_2, \
|
||||
${jprt.my.windows.x64}-{product|fastdebug}-c2-scimark_3
|
||||
${jprt.my.windows.x64}-product-c2-jbb_G1, \
|
||||
${jprt.my.windows.x64}-product-c2-jbb_ParOldGC
|
||||
|
||||
# The complete list of test targets for jprt
|
||||
|
||||
|
||||
@@ -113,6 +113,11 @@ endif
|
||||
|
||||
OPT_CFLAGS/NOOPT=-O0
|
||||
|
||||
# 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
|
||||
ifneq "$(shell expr \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) = 3 \) \))" "0"
|
||||
OPT_CFLAGS/mulnode.o += -O0
|
||||
endif
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Linker flags
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
|
||||
# cause problems with interposing. See CR: 6466665
|
||||
# LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
|
||||
|
||||
LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT
|
||||
LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE)
|
||||
|
||||
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
|
||||
@echo Making signal interposition lib...
|
||||
|
||||
@@ -51,7 +51,7 @@ checkAndBuildSA:
|
||||
$(MAKE) -f vm.make $(LIBSAPROC); \
|
||||
fi
|
||||
|
||||
SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE))
|
||||
SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
|
||||
|
||||
$(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
|
||||
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
|
||||
|
||||
@@ -46,7 +46,7 @@ C_COMPILER_REV := \
|
||||
$(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
|
||||
|
||||
# Pick which compiler is validated
|
||||
ifeq ($(JDK_MINOR_VERSION),6)
|
||||
ifeq ($(JRE_RELEASE_VER),1.6.0)
|
||||
# Validated compiler for JDK6 is SS11 (5.8)
|
||||
VALIDATED_COMPILER_REV := 5.8
|
||||
VALIDATED_C_COMPILER_REV := 5.8
|
||||
@@ -101,18 +101,9 @@ CFLAGS += ${SOLARIS_7_OR_LATER}
|
||||
|
||||
# New architecture options started in SS12 (5.9), we need both styles to build.
|
||||
# The older arch options for SS11 (5.8) or older and also for /usr/ccs/bin/as.
|
||||
# Note: SS12 default for 32bit sparc is now the same as v8plus, so the
|
||||
# settings below have changed all SS12 32bit sparc builds to be v8plus.
|
||||
# The older SS11 (5.8) settings have remained as they always have been.
|
||||
ifeq ($(TYPE),COMPILER2)
|
||||
ARCHFLAG_OLD/sparc = -xarch=v8plus
|
||||
else
|
||||
ifeq ($(TYPE),TIERED)
|
||||
ARCHFLAG_OLD/sparc = -xarch=v8plus
|
||||
else
|
||||
ARCHFLAG_OLD/sparc = -xarch=v8
|
||||
endif
|
||||
endif
|
||||
# Note: default for 32bit sparc is now the same as v8plus, so the
|
||||
# settings below have changed all 32bit sparc builds to be v8plus.
|
||||
ARCHFLAG_OLD/sparc = -xarch=v8plus
|
||||
ARCHFLAG_NEW/sparc = -m32 -xarch=sparc
|
||||
ARCHFLAG_OLD/sparcv9 = -xarch=v9
|
||||
ARCHFLAG_NEW/sparcv9 = -m64 -xarch=sparc
|
||||
|
||||
@@ -52,6 +52,19 @@ CAT="$MKS_HOME/cat.exe"
|
||||
RM="$MKS_HOME/rm.exe"
|
||||
DUMPBIN="link.exe /dump"
|
||||
|
||||
# When called from IDE the first param should contain the link version, otherwise may be nill
|
||||
if [ "x$1" != "x" ]; then
|
||||
LINK_VER="$1"
|
||||
fi
|
||||
|
||||
if [ "x$LINK_VER" != "x800" -a "x$LINK_VER" != "x900" ]; then
|
||||
$DUMPBIN /symbols *.obj | "$GREP" "??_7.*@@6B@" | "$AWK" '{print $7}' | "$SORT" | "$UNIQ" > vm2.def
|
||||
else
|
||||
# Can't use pipes when calling cl.exe or link.exe from IDE. Using transit file vm3.def
|
||||
$DUMPBIN /OUT:vm3.def /symbols *.obj
|
||||
"$CAT" vm3.def | "$GREP" "??_7.*@@6B@" | "$AWK" '{print $7}' | "$SORT" | "$UNIQ" > vm2.def
|
||||
"$RM" -f vm3.def
|
||||
fi
|
||||
|
||||
"$CAT" vm1.def vm2.def > vm.def
|
||||
"$RM" -f vm1.def vm2.def
|
||||
|
||||
@@ -72,12 +72,20 @@ REM figure out MSC version
|
||||
for /F %%i in ('sh %HotSpotWorkSpace%/make/windows/get_msc_ver.sh') do set %%i
|
||||
|
||||
echo **************************************************************
|
||||
set ProjectFile=vm.vcproj
|
||||
if "%MSC_VER%" == "1200" (
|
||||
set ProjectFile=vm.dsp
|
||||
echo Will generate VC6 project {unsupported}
|
||||
) else (
|
||||
set ProjectFile=vm.vcproj
|
||||
echo Will generate VC7 project
|
||||
if "%MSC_VER%" == "1400" (
|
||||
echo Will generate VC8 {Visual Studio 2005}
|
||||
) else (
|
||||
if "%MSC_VER%" == "1500" (
|
||||
echo Will generate VC9 {Visual Studio 2008}
|
||||
) else (
|
||||
echo Will generate VC7 project {Visual Studio 2003 .NET}
|
||||
)
|
||||
)
|
||||
)
|
||||
echo %ProjectFile%
|
||||
echo **************************************************************
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
# cl version 13.10.3077 returns "MSC_VER=1310"
|
||||
# cl version 14.00.30701 returns "MSC_VER=1399" (OLD_MSSDK version)
|
||||
# cl version 14.00.40310.41 returns "MSC_VER=1400"
|
||||
# cl version 15.00.21022.8 returns "MSC_VER=1500"
|
||||
|
||||
# Note that we currently do not have a way to set HotSpotMksHome in
|
||||
# the batch build, but so far this has not seemed to be a problem. The
|
||||
|
||||
@@ -46,6 +46,7 @@ ADLCFLAGS=-q -T -D_LP64
|
||||
ADLCFLAGS=-q -T -U_LP64
|
||||
!endif
|
||||
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
CPP_INCLUDE_DIRS=\
|
||||
/I "..\generated" \
|
||||
|
||||
@@ -170,10 +170,6 @@ LINK_FLAGS = /manifest $(LINK_FLAGS) $(BUFFEROVERFLOWLIB)
|
||||
# Manifest Tool - used in VS2005 and later to adjust manifests stored
|
||||
# as resources inside build artifacts.
|
||||
MT=mt.exe
|
||||
!if "$(BUILDARCH)" == "i486"
|
||||
# VS2005 on x86 restricts the use of certain libc functions without this
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_DEPRECATE
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if "$(COMPILER_NAME)" == "VS2008"
|
||||
@@ -185,10 +181,6 @@ LINK_FLAGS = /manifest $(LINK_FLAGS)
|
||||
# Manifest Tool - used in VS2005 and later to adjust manifests stored
|
||||
# as resources inside build artifacts.
|
||||
MT=mt.exe
|
||||
!if "$(BUILDARCH)" == "i486"
|
||||
# VS2005 on x86 restricts the use of certain libc functions without this
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_DEPRECATE
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Compile for space above time.
|
||||
|
||||
@@ -48,6 +48,8 @@ MakeDepsSources=\
|
||||
$(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatform.java \
|
||||
$(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatformVC6.java \
|
||||
$(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatformVC7.java \
|
||||
$(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatformVC8.java \
|
||||
$(WorkSpace)\src\share\tools\MakeDeps\WinGammaPlatformVC9.java \
|
||||
$(WorkSpace)\src\share\tools\MakeDeps\Util.java \
|
||||
$(WorkSpace)\src\share\tools\MakeDeps\BuildConfig.java \
|
||||
$(WorkSpace)\src\share\tools\MakeDeps\ArgsParser.java
|
||||
@@ -121,7 +123,7 @@ MakeDepsIDEOptions=\
|
||||
-additionalFile includeDB_gc_shared \
|
||||
-additionalFile includeDB_gc_serial \
|
||||
-additionalGeneratedFile $(HOTSPOTBUILDSPACE)\%f\%b vm.def \
|
||||
-prelink "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b $(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh" \
|
||||
-prelink "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME) $(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh $(LINK_VER)" \
|
||||
$(MakeDepsIncludesPRIVATE)
|
||||
|
||||
# Add in build-specific options
|
||||
|
||||
@@ -42,10 +42,23 @@ COMPILE_RMIC=rmic
|
||||
BOOT_JAVA_HOME=
|
||||
!endif
|
||||
|
||||
ProjectFile=vm.vcproj
|
||||
|
||||
!if "$(MSC_VER)" == "1200"
|
||||
|
||||
VcVersion=VC6
|
||||
ProjectFile=vm.dsp
|
||||
|
||||
!elseif "$(MSC_VER)" == "1400"
|
||||
|
||||
VcVersion=VC8
|
||||
|
||||
!elseif "$(MSC_VER)" == "1500"
|
||||
|
||||
VcVersion=VC9
|
||||
|
||||
!else
|
||||
|
||||
VcVersion=VC7
|
||||
ProjectFile=vm.vcproj
|
||||
|
||||
!endif
|
||||
|
||||
@@ -89,9 +89,11 @@ checkAndBuildSA:: $(SAWINDBG)
|
||||
SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 $(GX_OPTION) /Od /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
!elseif "$(BUILDARCH)" == "amd64"
|
||||
SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 $(GX_OPTION) /Od /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
!if "$(COMPILER_NAME)" == "VS2005"
|
||||
# On amd64, VS2005 compiler requires bufferoverflowU.lib on the link command line,
|
||||
# otherwise we get missing __security_check_cookie externals at link time.
|
||||
SA_LINK_FLAGS = bufferoverflowU.lib
|
||||
!endif
|
||||
!else
|
||||
SA_CFLAGS = /nologo $(MS_RUNTIME_OPTION) /W3 /Gm $(GX_OPTION) /ZI /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
!endif
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
all: checkCL checkLink
|
||||
|
||||
checkCL:
|
||||
@ if "$(MSC_VER)" NEQ "1310" if "$(MSC_VER)" NEQ "1399" if "$(MSC_VER)" NEQ "1400" \
|
||||
@ if "$(MSC_VER)" NEQ "1310" if "$(MSC_VER)" NEQ "1399" if "$(MSC_VER)" NEQ "1400" if "$(MSC_VER)" NEQ "1500" \
|
||||
echo *** WARNING *** unrecognized cl.exe version $(MSC_VER) ($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection.
|
||||
|
||||
checkLink:
|
||||
@ if "$(LINK_VER)" NEQ "710" if "$(LINK_VER)" NEQ "800" \
|
||||
@ if "$(LINK_VER)" NEQ "710" if "$(LINK_VER)" NEQ "800" if "$(LINK_VER)" NEQ "900" \
|
||||
echo *** WARNING *** unrecognized link.exe version $(LINK_VER) ($(RAW_LINK_VER)). Use FORCE_LINK_VER to override automatic detection.
|
||||
|
||||
@@ -55,10 +55,16 @@ CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER2"
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER1" /D "COMPILER2"
|
||||
!endif
|
||||
|
||||
!if "$(BUILDARCH)" == "i486"
|
||||
HOTSPOT_LIB_ARCH=i386
|
||||
!else
|
||||
HOTSPOT_LIB_ARCH=$(BUILDARCH)
|
||||
!endif
|
||||
|
||||
# The following variables are defined in the generated local.make file.
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_RELEASE_VERSION=\"$(HS_BUILD_VER)\""
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D "JRE_RELEASE_VERSION=\"$(JRE_RELEASE_VER)\""
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_LIB_ARCH=\"$(BUILDARCH)\""
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_LIB_ARCH=\"$(HOTSPOT_LIB_ARCH)\""
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\""
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\""
|
||||
CPP_FLAGS=$(CPP_FLAGS) /D "HOTSPOT_VM_DISTRO=\"$(HOTSPOT_VM_DISTRO)\""
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -84,6 +84,10 @@ REGISTER_DECLARATION(Register, G4_scratch , G4);
|
||||
|
||||
REGISTER_DECLARATION(Register, Gtemp , G5);
|
||||
|
||||
// JSR 292 fixed register usages:
|
||||
REGISTER_DECLARATION(Register, G5_method_type , G5);
|
||||
REGISTER_DECLARATION(Register, G3_method_handle , G3);
|
||||
|
||||
// The compiler requires that G5_megamorphic_method is G5_inline_cache_klass,
|
||||
// because a single patchable "set" instruction (NativeMovConstReg,
|
||||
// or NativeMovConstPatching for compiler1) instruction
|
||||
@@ -91,9 +95,13 @@ REGISTER_DECLARATION(Register, Gtemp , G5);
|
||||
// call site is an inline cache or is megamorphic. See the function
|
||||
// CompiledIC::set_to_megamorphic.
|
||||
//
|
||||
// On the other hand, G5_inline_cache_klass must differ from G5_method,
|
||||
// because both registers are needed for an inline cache that calls
|
||||
// an interpreted method.
|
||||
// If a inline cache targets an interpreted method, then the
|
||||
// G5 register will be used twice during the call. First,
|
||||
// the call site will be patched to load a compiledICHolder
|
||||
// into G5. (This is an ordered pair of ic_klass, method.)
|
||||
// The c2i adapter will first check the ic_klass, then load
|
||||
// G5_method with the method part of the pair just before
|
||||
// jumping into the interpreter.
|
||||
//
|
||||
// Note that G5_method is only the method-self for the interpreter,
|
||||
// and is logically unrelated to G5_megamorphic_method.
|
||||
@@ -266,21 +274,90 @@ REGISTER_DECLARATION(Register, Oissuing_pc , O1); // where the exception is comi
|
||||
|
||||
class Address VALUE_OBJ_CLASS_SPEC {
|
||||
private:
|
||||
Register _base;
|
||||
#ifdef _LP64
|
||||
int _hi32; // bits 63::32
|
||||
int _low32; // bits 31::0
|
||||
#endif
|
||||
int _hi;
|
||||
int _disp;
|
||||
RelocationHolder _rspec;
|
||||
Register _base; // Base register.
|
||||
RegisterOrConstant _index_or_disp; // Index register or constant displacement.
|
||||
RelocationHolder _rspec;
|
||||
|
||||
RelocationHolder rspec_from_rtype(relocInfo::relocType rt, address a = NULL) {
|
||||
switch (rt) {
|
||||
public:
|
||||
Address() : _base(noreg), _index_or_disp(noreg) {}
|
||||
|
||||
Address(Register base, RegisterOrConstant index_or_disp)
|
||||
: _base(base),
|
||||
_index_or_disp(index_or_disp) {
|
||||
}
|
||||
|
||||
Address(Register base, Register index)
|
||||
: _base(base),
|
||||
_index_or_disp(index) {
|
||||
}
|
||||
|
||||
Address(Register base, int disp)
|
||||
: _base(base),
|
||||
_index_or_disp(disp) {
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
Address(Register base, ByteSize disp)
|
||||
: _base(base),
|
||||
_index_or_disp(in_bytes(disp)) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// accessors
|
||||
Register base() const { return _base; }
|
||||
Register index() const { return _index_or_disp.as_register(); }
|
||||
int disp() const { return _index_or_disp.as_constant(); }
|
||||
|
||||
bool has_index() const { return _index_or_disp.is_register(); }
|
||||
bool has_disp() const { return _index_or_disp.is_constant(); }
|
||||
|
||||
const relocInfo::relocType rtype() { return _rspec.type(); }
|
||||
const RelocationHolder& rspec() { return _rspec; }
|
||||
|
||||
RelocationHolder rspec(int offset) const {
|
||||
return offset == 0 ? _rspec : _rspec.plus(offset);
|
||||
}
|
||||
|
||||
inline bool is_simm13(int offset = 0); // check disp+offset for overflow
|
||||
|
||||
Address plus_disp(int plusdisp) const { // bump disp by a small amount
|
||||
assert(_index_or_disp.is_constant(), "must have a displacement");
|
||||
Address a(base(), disp() + plusdisp);
|
||||
return a;
|
||||
}
|
||||
|
||||
Address after_save() const {
|
||||
Address a = (*this);
|
||||
a._base = a._base->after_save();
|
||||
return a;
|
||||
}
|
||||
|
||||
Address after_restore() const {
|
||||
Address a = (*this);
|
||||
a._base = a._base->after_restore();
|
||||
return a;
|
||||
}
|
||||
|
||||
// Convert the raw encoding form into the form expected by the
|
||||
// constructor for Address.
|
||||
static Address make_raw(int base, int index, int scale, int disp, bool disp_is_oop);
|
||||
|
||||
friend class Assembler;
|
||||
};
|
||||
|
||||
|
||||
class AddressLiteral VALUE_OBJ_CLASS_SPEC {
|
||||
private:
|
||||
address _address;
|
||||
RelocationHolder _rspec;
|
||||
|
||||
RelocationHolder rspec_from_rtype(relocInfo::relocType rtype, address addr) {
|
||||
switch (rtype) {
|
||||
case relocInfo::external_word_type:
|
||||
return external_word_Relocation::spec(a);
|
||||
return external_word_Relocation::spec(addr);
|
||||
case relocInfo::internal_word_type:
|
||||
return internal_word_Relocation::spec(a);
|
||||
return internal_word_Relocation::spec(addr);
|
||||
#ifdef _LP64
|
||||
case relocInfo::opt_virtual_call_type:
|
||||
return opt_virtual_call_Relocation::spec();
|
||||
@@ -297,127 +374,86 @@ class Address VALUE_OBJ_CLASS_SPEC {
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
// creation
|
||||
AddressLiteral() : _address(NULL), _rspec(NULL) {}
|
||||
|
||||
public:
|
||||
Address(Register b, address a, relocInfo::relocType rt = relocInfo::none)
|
||||
: _rspec(rspec_from_rtype(rt, a))
|
||||
{
|
||||
_base = b;
|
||||
AddressLiteral(address addr, RelocationHolder const& rspec)
|
||||
: _address(addr),
|
||||
_rspec(rspec) {}
|
||||
|
||||
// Some constructors to avoid casting at the call site.
|
||||
AddressLiteral(jobject obj, RelocationHolder const& rspec)
|
||||
: _address((address) obj),
|
||||
_rspec(rspec) {}
|
||||
|
||||
AddressLiteral(intptr_t value, RelocationHolder const& rspec)
|
||||
: _address((address) value),
|
||||
_rspec(rspec) {}
|
||||
|
||||
AddressLiteral(address addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
// Some constructors to avoid casting at the call site.
|
||||
AddressLiteral(address* addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
AddressLiteral(bool* addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
AddressLiteral(const bool* addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
AddressLiteral(signed char* addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
AddressLiteral(int* addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
AddressLiteral(intptr_t addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
#ifdef _LP64
|
||||
_hi32 = (intptr_t)a >> 32; // top 32 bits in 64 bit word
|
||||
_low32 = (intptr_t)a & ~0; // low 32 bits in 64 bit word
|
||||
// 32-bit complains about a multiple declaration for int*.
|
||||
AddressLiteral(intptr_t* addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
#endif
|
||||
_hi = (intptr_t)a & ~0x3ff; // top 22 bits in low word
|
||||
_disp = (intptr_t)a & 0x3ff; // bottom 10 bits
|
||||
}
|
||||
|
||||
Address(Register b, address a, RelocationHolder const& rspec)
|
||||
: _rspec(rspec)
|
||||
{
|
||||
_base = b;
|
||||
#ifdef _LP64
|
||||
_hi32 = (intptr_t)a >> 32; // top 32 bits in 64 bit word
|
||||
_low32 = (intptr_t)a & ~0; // low 32 bits in 64 bit word
|
||||
#endif
|
||||
_hi = (intptr_t)a & ~0x3ff; // top 22 bits
|
||||
_disp = (intptr_t)a & 0x3ff; // bottom 10 bits
|
||||
}
|
||||
AddressLiteral(oop addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
Address(Register b, intptr_t h, intptr_t d, RelocationHolder const& rspec = RelocationHolder())
|
||||
: _rspec(rspec)
|
||||
{
|
||||
_base = b;
|
||||
#ifdef _LP64
|
||||
// [RGV] Put in Assert to force me to check usage of this constructor
|
||||
assert( h == 0, "Check usage of this constructor" );
|
||||
_hi32 = h;
|
||||
_low32 = d;
|
||||
_hi = h;
|
||||
_disp = d;
|
||||
#else
|
||||
_hi = h;
|
||||
_disp = d;
|
||||
#endif
|
||||
}
|
||||
AddressLiteral(float* addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
Address()
|
||||
: _rspec(RelocationHolder())
|
||||
{
|
||||
_base = G0;
|
||||
#ifdef _LP64
|
||||
_hi32 = 0;
|
||||
_low32 = 0;
|
||||
#endif
|
||||
_hi = 0;
|
||||
_disp = 0;
|
||||
}
|
||||
AddressLiteral(double* addr, relocInfo::relocType rtype = relocInfo::none)
|
||||
: _address((address) addr),
|
||||
_rspec(rspec_from_rtype(rtype, (address) addr)) {}
|
||||
|
||||
// fancier constructors
|
||||
intptr_t value() const { return (intptr_t) _address; }
|
||||
int low10() const;
|
||||
|
||||
enum addr_type {
|
||||
extra_in_argument, // in the In registers
|
||||
extra_out_argument // in the Outs
|
||||
};
|
||||
const relocInfo::relocType rtype() const { return _rspec.type(); }
|
||||
const RelocationHolder& rspec() const { return _rspec; }
|
||||
|
||||
Address( addr_type, int );
|
||||
|
||||
// accessors
|
||||
|
||||
Register base() const { return _base; }
|
||||
#ifdef _LP64
|
||||
int hi32() const { return _hi32; }
|
||||
int low32() const { return _low32; }
|
||||
#endif
|
||||
int hi() const { return _hi; }
|
||||
int disp() const { return _disp; }
|
||||
#ifdef _LP64
|
||||
intptr_t value() const { return ((intptr_t)_hi32 << 32) |
|
||||
(intptr_t)(uint32_t)_low32; }
|
||||
#else
|
||||
int value() const { return _hi | _disp; }
|
||||
#endif
|
||||
const relocInfo::relocType rtype() { return _rspec.type(); }
|
||||
const RelocationHolder& rspec() { return _rspec; }
|
||||
|
||||
RelocationHolder rspec(int offset) const {
|
||||
RelocationHolder rspec(int offset) const {
|
||||
return offset == 0 ? _rspec : _rspec.plus(offset);
|
||||
}
|
||||
|
||||
inline bool is_simm13(int offset = 0); // check disp+offset for overflow
|
||||
|
||||
Address plus_disp(int disp) const { // bump disp by a small amount
|
||||
Address a = (*this);
|
||||
a._disp += disp;
|
||||
return a;
|
||||
}
|
||||
|
||||
Address split_disp() const { // deal with disp overflow
|
||||
Address a = (*this);
|
||||
int hi_disp = _disp & ~0x3ff;
|
||||
if (hi_disp != 0) {
|
||||
a._disp -= hi_disp;
|
||||
a._hi += hi_disp;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
Address after_save() const {
|
||||
Address a = (*this);
|
||||
a._base = a._base->after_save();
|
||||
return a;
|
||||
}
|
||||
|
||||
Address after_restore() const {
|
||||
Address a = (*this);
|
||||
a._base = a._base->after_restore();
|
||||
return a;
|
||||
}
|
||||
|
||||
friend class Assembler;
|
||||
};
|
||||
|
||||
|
||||
inline Address RegisterImpl::address_in_saved_window() const {
|
||||
return (Address(SP, 0, (sp_offset_in_saved_window() * wordSize) + STACK_BIAS));
|
||||
return (Address(SP, (sp_offset_in_saved_window() * wordSize) + STACK_BIAS));
|
||||
}
|
||||
|
||||
|
||||
@@ -487,11 +523,7 @@ class Argument VALUE_OBJ_CLASS_SPEC {
|
||||
// When applied to a register-based argument, give the corresponding address
|
||||
// into the 6-word area "into which callee may store register arguments"
|
||||
// (This is a different place than the corresponding register-save area location.)
|
||||
Address address_in_frame() const {
|
||||
return Address( is_in() ? Address::extra_in_argument
|
||||
: Address::extra_out_argument,
|
||||
_number );
|
||||
}
|
||||
Address address_in_frame() const;
|
||||
|
||||
// debugging
|
||||
const char* name() const;
|
||||
@@ -513,6 +545,7 @@ class Assembler : public AbstractAssembler {
|
||||
|
||||
|
||||
friend class AbstractAssembler;
|
||||
friend class AddressLiteral;
|
||||
|
||||
// code patchers need various routines like inv_wdisp()
|
||||
friend class NativeInstruction;
|
||||
@@ -1085,11 +1118,11 @@ public:
|
||||
|
||||
// pp 135 (addc was addx in v8)
|
||||
|
||||
inline void add( Register s1, Register s2, Register d );
|
||||
inline void add( Register s1, int simm13a, Register d, relocInfo::relocType rtype = relocInfo::none);
|
||||
inline void add( Register s1, int simm13a, Register d, RelocationHolder const& rspec);
|
||||
inline void add( Register s1, RegisterConstant s2, Register d, int offset = 0);
|
||||
inline void add( const Address& a, Register d, int offset = 0);
|
||||
inline void add(Register s1, Register s2, Register d );
|
||||
inline void add(Register s1, int simm13a, Register d, relocInfo::relocType rtype = relocInfo::none);
|
||||
inline void add(Register s1, int simm13a, Register d, RelocationHolder const& rspec);
|
||||
inline void add(Register s1, RegisterOrConstant s2, Register d, int offset = 0);
|
||||
inline void add(const Address& a, Register d, int offset = 0) { add( a.base(), a.disp() + offset, d, a.rspec(offset)); }
|
||||
|
||||
void addcc( Register s1, Register s2, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3 | cc_bit_op3) | rs1(s1) | rs2(s2) ); }
|
||||
void addcc( Register s1, int simm13a, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); }
|
||||
@@ -1244,14 +1277,12 @@ public:
|
||||
void jmpl( Register s1, Register s2, Register d );
|
||||
void jmpl( Register s1, int simm13a, Register d, RelocationHolder const& rspec = RelocationHolder() );
|
||||
|
||||
inline void jmpl( Address& a, Register d, int offset = 0);
|
||||
|
||||
// 171
|
||||
|
||||
inline void ldf( FloatRegisterImpl::Width w, Register s1, Register s2, FloatRegister d );
|
||||
inline void ldf( FloatRegisterImpl::Width w, Register s1, int simm13a, FloatRegister d );
|
||||
inline void ldf(FloatRegisterImpl::Width w, Register s1, Register s2, FloatRegister d);
|
||||
inline void ldf(FloatRegisterImpl::Width w, Register s1, int simm13a, FloatRegister d, RelocationHolder const& rspec = RelocationHolder());
|
||||
|
||||
inline void ldf( FloatRegisterImpl::Width w, const Address& a, FloatRegister d, int offset = 0);
|
||||
inline void ldf(FloatRegisterImpl::Width w, const Address& a, FloatRegister d, int offset = 0);
|
||||
|
||||
|
||||
inline void ldfsr( Register s1, Register s2 );
|
||||
@@ -1295,25 +1326,30 @@ public:
|
||||
inline void ldd( Register s1, Register s2, Register d );
|
||||
inline void ldd( Register s1, int simm13a, Register d);
|
||||
|
||||
inline void ldsb( const Address& a, Register d, int offset = 0 );
|
||||
inline void ldsh( const Address& a, Register d, int offset = 0 );
|
||||
inline void ldsw( const Address& a, Register d, int offset = 0 );
|
||||
inline void ldub( const Address& a, Register d, int offset = 0 );
|
||||
inline void lduh( const Address& a, Register d, int offset = 0 );
|
||||
inline void lduw( const Address& a, Register d, int offset = 0 );
|
||||
inline void ldx( const Address& a, Register d, int offset = 0 );
|
||||
inline void ld( const Address& a, Register d, int offset = 0 );
|
||||
inline void ldd( const Address& a, Register d, int offset = 0 );
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void ld( Register s1, ByteSize simm13a, Register d);
|
||||
#endif
|
||||
|
||||
inline void ldub( Register s1, RegisterConstant s2, Register d );
|
||||
inline void ldsb( Register s1, RegisterConstant s2, Register d );
|
||||
inline void lduh( Register s1, RegisterConstant s2, Register d );
|
||||
inline void ldsh( Register s1, RegisterConstant s2, Register d );
|
||||
inline void lduw( Register s1, RegisterConstant s2, Register d );
|
||||
inline void ldsw( Register s1, RegisterConstant s2, Register d );
|
||||
inline void ldx( Register s1, RegisterConstant s2, Register d );
|
||||
inline void ld( Register s1, RegisterConstant s2, Register d );
|
||||
inline void ldd( Register s1, RegisterConstant s2, Register d );
|
||||
inline void ldsb(const Address& a, Register d, int offset = 0);
|
||||
inline void ldsh(const Address& a, Register d, int offset = 0);
|
||||
inline void ldsw(const Address& a, Register d, int offset = 0);
|
||||
inline void ldub(const Address& a, Register d, int offset = 0);
|
||||
inline void lduh(const Address& a, Register d, int offset = 0);
|
||||
inline void lduw(const Address& a, Register d, int offset = 0);
|
||||
inline void ldx( const Address& a, Register d, int offset = 0);
|
||||
inline void ld( const Address& a, Register d, int offset = 0);
|
||||
inline void ldd( const Address& a, Register d, int offset = 0);
|
||||
|
||||
inline void ldub( Register s1, RegisterOrConstant s2, Register d );
|
||||
inline void ldsb( Register s1, RegisterOrConstant s2, Register d );
|
||||
inline void lduh( Register s1, RegisterOrConstant s2, Register d );
|
||||
inline void ldsh( Register s1, RegisterOrConstant s2, Register d );
|
||||
inline void lduw( Register s1, RegisterOrConstant s2, Register d );
|
||||
inline void ldsw( Register s1, RegisterOrConstant s2, Register d );
|
||||
inline void ldx( Register s1, RegisterOrConstant s2, Register d );
|
||||
inline void ld( Register s1, RegisterOrConstant s2, Register d );
|
||||
inline void ldd( Register s1, RegisterOrConstant s2, Register d );
|
||||
|
||||
// pp 177
|
||||
|
||||
@@ -1528,6 +1564,11 @@ public:
|
||||
inline void std( Register d, Register s1, Register s2 );
|
||||
inline void std( Register d, Register s1, int simm13a);
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void st( Register d, Register s1, ByteSize simm13a);
|
||||
#endif
|
||||
|
||||
inline void stb( Register d, const Address& a, int offset = 0 );
|
||||
inline void sth( Register d, const Address& a, int offset = 0 );
|
||||
inline void stw( Register d, const Address& a, int offset = 0 );
|
||||
@@ -1535,12 +1576,12 @@ public:
|
||||
inline void st( Register d, const Address& a, int offset = 0 );
|
||||
inline void std( Register d, const Address& a, int offset = 0 );
|
||||
|
||||
inline void stb( Register d, Register s1, RegisterConstant s2 );
|
||||
inline void sth( Register d, Register s1, RegisterConstant s2 );
|
||||
inline void stw( Register d, Register s1, RegisterConstant s2 );
|
||||
inline void stx( Register d, Register s1, RegisterConstant s2 );
|
||||
inline void std( Register d, Register s1, RegisterConstant s2 );
|
||||
inline void st( Register d, Register s1, RegisterConstant s2 );
|
||||
inline void stb( Register d, Register s1, RegisterOrConstant s2 );
|
||||
inline void sth( Register d, Register s1, RegisterOrConstant s2 );
|
||||
inline void stw( Register d, Register s1, RegisterOrConstant s2 );
|
||||
inline void stx( Register d, Register s1, RegisterOrConstant s2 );
|
||||
inline void std( Register d, Register s1, RegisterOrConstant s2 );
|
||||
inline void st( Register d, Register s1, RegisterOrConstant s2 );
|
||||
|
||||
// pp 177
|
||||
|
||||
@@ -1676,8 +1717,8 @@ class RegistersForDebugging : public StackObj {
|
||||
|
||||
#define JMP2(r1, r2) jmp(r1, r2, __FILE__, __LINE__)
|
||||
#define JMP(r1, off) jmp(r1, off, __FILE__, __LINE__)
|
||||
#define JUMP(a, off) jump(a, off, __FILE__, __LINE__)
|
||||
#define JUMPL(a, d, off) jumpl(a, d, off, __FILE__, __LINE__)
|
||||
#define JUMP(a, temp, off) jump(a, temp, off, __FILE__, __LINE__)
|
||||
#define JUMPL(a, temp, d, off) jumpl(a, temp, d, off, __FILE__, __LINE__)
|
||||
|
||||
|
||||
class MacroAssembler: public Assembler {
|
||||
@@ -1822,17 +1863,26 @@ class MacroAssembler: public Assembler {
|
||||
#endif
|
||||
|
||||
// sethi Macro handles optimizations and relocations
|
||||
void sethi( Address& a, bool ForceRelocatable = false );
|
||||
void sethi( intptr_t imm22a, Register d, bool ForceRelocatable = false, RelocationHolder const& rspec = RelocationHolder());
|
||||
private:
|
||||
void internal_sethi(const AddressLiteral& addrlit, Register d, bool ForceRelocatable);
|
||||
public:
|
||||
void sethi(const AddressLiteral& addrlit, Register d);
|
||||
void patchable_sethi(const AddressLiteral& addrlit, Register d);
|
||||
|
||||
// compute the size of a sethi/set
|
||||
static int size_of_sethi( address a, bool worst_case = false );
|
||||
static int worst_case_size_of_set();
|
||||
|
||||
// set may be either setsw or setuw (high 32 bits may be zero or sign)
|
||||
void set( intptr_t value, Register d, RelocationHolder const& rspec = RelocationHolder() );
|
||||
void setsw( int value, Register d, RelocationHolder const& rspec = RelocationHolder() );
|
||||
void set64( jlong value, Register d, Register tmp);
|
||||
private:
|
||||
void internal_set(const AddressLiteral& al, Register d, bool ForceRelocatable);
|
||||
public:
|
||||
void set(const AddressLiteral& addrlit, Register d);
|
||||
void set(intptr_t value, Register d);
|
||||
void set(address addr, Register d, RelocationHolder const& rspec);
|
||||
void patchable_set(const AddressLiteral& addrlit, Register d);
|
||||
void patchable_set(intptr_t value, Register d);
|
||||
void set64(jlong value, Register d, Register tmp);
|
||||
|
||||
// sign-extend 32 to 64
|
||||
inline void signx( Register s, Register d ) { sra( s, G0, d); }
|
||||
@@ -1859,7 +1909,7 @@ class MacroAssembler: public Assembler {
|
||||
// Functions for isolating 64 bit shifts for LP64
|
||||
inline void sll_ptr( Register s1, Register s2, Register d );
|
||||
inline void sll_ptr( Register s1, int imm6a, Register d );
|
||||
inline void sll_ptr( Register s1, RegisterConstant s2, Register d );
|
||||
inline void sll_ptr( Register s1, RegisterOrConstant s2, Register d );
|
||||
inline void srl_ptr( Register s1, Register s2, Register d );
|
||||
inline void srl_ptr( Register s1, int imm6a, Register d );
|
||||
|
||||
@@ -1922,23 +1972,22 @@ class MacroAssembler: public Assembler {
|
||||
inline void mov( int simm13a, Register d) { or3( G0, simm13a, d); }
|
||||
|
||||
// address pseudos: make these names unlike instruction names to avoid confusion
|
||||
inline void split_disp( Address& a, Register temp );
|
||||
inline intptr_t load_pc_address( Register reg, int bytes_to_skip );
|
||||
inline void load_address( Address& a, int offset = 0 );
|
||||
inline void load_contents( Address& a, Register d, int offset = 0 );
|
||||
inline void load_ptr_contents( Address& a, Register d, int offset = 0 );
|
||||
inline void store_contents( Register s, Address& a, int offset = 0 );
|
||||
inline void store_ptr_contents( Register s, Address& a, int offset = 0 );
|
||||
inline void jumpl_to( Address& a, Register d, int offset = 0 );
|
||||
inline void jump_to( Address& a, int offset = 0 );
|
||||
inline void load_contents(AddressLiteral& addrlit, Register d, int offset = 0);
|
||||
inline void load_ptr_contents(AddressLiteral& addrlit, Register d, int offset = 0);
|
||||
inline void store_contents(Register s, AddressLiteral& addrlit, Register temp, int offset = 0);
|
||||
inline void store_ptr_contents(Register s, AddressLiteral& addrlit, Register temp, int offset = 0);
|
||||
inline void jumpl_to(AddressLiteral& addrlit, Register temp, Register d, int offset = 0);
|
||||
inline void jump_to(AddressLiteral& addrlit, Register temp, int offset = 0);
|
||||
inline void jump_indirect_to(Address& a, Register temp, int ld_offset = 0, int jmp_offset = 0);
|
||||
|
||||
// ring buffer traceable jumps
|
||||
|
||||
void jmp2( Register r1, Register r2, const char* file, int line );
|
||||
void jmp ( Register r1, int offset, const char* file, int line );
|
||||
|
||||
void jumpl( Address& a, Register d, int offset, const char* file, int line );
|
||||
void jump ( Address& a, int offset, const char* file, int line );
|
||||
void jumpl(AddressLiteral& addrlit, Register temp, Register d, int offset, const char* file, int line);
|
||||
void jump (AddressLiteral& addrlit, Register temp, int offset, const char* file, int line);
|
||||
|
||||
|
||||
// argument pseudos:
|
||||
@@ -1963,29 +2012,31 @@ class MacroAssembler: public Assembler {
|
||||
// Functions for isolating 64 bit loads for LP64
|
||||
// ld_ptr will perform ld for 32 bit VM's and ldx for 64 bit VM's
|
||||
// st_ptr will perform st for 32 bit VM's and stx for 64 bit VM's
|
||||
inline void ld_ptr( Register s1, Register s2, Register d );
|
||||
inline void ld_ptr( Register s1, int simm13a, Register d);
|
||||
inline void ld_ptr( Register s1, RegisterConstant s2, Register d );
|
||||
inline void ld_ptr( const Address& a, Register d, int offset = 0 );
|
||||
inline void st_ptr( Register d, Register s1, Register s2 );
|
||||
inline void st_ptr( Register d, Register s1, int simm13a);
|
||||
inline void st_ptr( Register d, Register s1, RegisterConstant s2 );
|
||||
inline void st_ptr( Register d, const Address& a, int offset = 0 );
|
||||
inline void ld_ptr(Register s1, Register s2, Register d);
|
||||
inline void ld_ptr(Register s1, int simm13a, Register d);
|
||||
inline void ld_ptr(Register s1, RegisterOrConstant s2, Register d);
|
||||
inline void ld_ptr(const Address& a, Register d, int offset = 0);
|
||||
inline void st_ptr(Register d, Register s1, Register s2);
|
||||
inline void st_ptr(Register d, Register s1, int simm13a);
|
||||
inline void st_ptr(Register d, Register s1, RegisterOrConstant s2);
|
||||
inline void st_ptr(Register d, const Address& a, int offset = 0);
|
||||
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void ld_ptr(Register s1, ByteSize simm13a, Register d);
|
||||
inline void st_ptr(Register d, Register s1, ByteSize simm13a);
|
||||
#endif
|
||||
|
||||
// ld_long will perform ld for 32 bit VM's and ldx for 64 bit VM's
|
||||
// st_long will perform st for 32 bit VM's and stx for 64 bit VM's
|
||||
inline void ld_long( Register s1, Register s2, Register d );
|
||||
inline void ld_long( Register s1, int simm13a, Register d );
|
||||
inline void ld_long( Register s1, RegisterConstant s2, Register d );
|
||||
inline void ld_long( const Address& a, Register d, int offset = 0 );
|
||||
inline void st_long( Register d, Register s1, Register s2 );
|
||||
inline void st_long( Register d, Register s1, int simm13a );
|
||||
inline void st_long( Register d, Register s1, RegisterConstant s2 );
|
||||
inline void st_long( Register d, const Address& a, int offset = 0 );
|
||||
|
||||
// Loading values by size and signed-ness
|
||||
void load_sized_value(Register s1, RegisterConstant s2, Register d,
|
||||
int size_in_bytes, bool is_signed);
|
||||
inline void ld_long(Register s1, Register s2, Register d);
|
||||
inline void ld_long(Register s1, int simm13a, Register d);
|
||||
inline void ld_long(Register s1, RegisterOrConstant s2, Register d);
|
||||
inline void ld_long(const Address& a, Register d, int offset = 0);
|
||||
inline void st_long(Register d, Register s1, Register s2);
|
||||
inline void st_long(Register d, Register s1, int simm13a);
|
||||
inline void st_long(Register d, Register s1, RegisterOrConstant s2);
|
||||
inline void st_long(Register d, const Address& a, int offset = 0);
|
||||
|
||||
// Helpers for address formation.
|
||||
// They update the dest in place, whether it is a register or constant.
|
||||
@@ -1994,11 +2045,11 @@ class MacroAssembler: public Assembler {
|
||||
// is required, and becomes the result.
|
||||
// If dest is a register and src is a non-simm13 constant,
|
||||
// the temp argument is required, and is used to materialize the constant.
|
||||
void regcon_inc_ptr( RegisterConstant& dest, RegisterConstant src,
|
||||
void regcon_inc_ptr( RegisterOrConstant& dest, RegisterOrConstant src,
|
||||
Register temp = noreg );
|
||||
void regcon_sll_ptr( RegisterConstant& dest, RegisterConstant src,
|
||||
void regcon_sll_ptr( RegisterOrConstant& dest, RegisterOrConstant src,
|
||||
Register temp = noreg );
|
||||
RegisterConstant ensure_rs2(RegisterConstant rs2, Register sethi_temp) {
|
||||
RegisterOrConstant ensure_rs2(RegisterOrConstant rs2, Register sethi_temp) {
|
||||
guarantee(sethi_temp != noreg, "constant offset overflow");
|
||||
if (is_simm13(rs2.constant_or_zero()))
|
||||
return rs2; // register or short constant
|
||||
@@ -2040,8 +2091,8 @@ class MacroAssembler: public Assembler {
|
||||
// These are idioms to flag the need for care with accessing bools but on
|
||||
// this platform we assume byte size
|
||||
|
||||
inline void stbool( Register d, const Address& a, int offset = 0 ) { stb(d, a, offset); }
|
||||
inline void ldbool( const Address& a, Register d, int offset = 0 ) { ldsb( a, d, offset ); }
|
||||
inline void stbool(Register d, const Address& a) { stb(d, a); }
|
||||
inline void ldbool(const Address& a, Register d) { ldsb(a, d); }
|
||||
inline void tstbool( Register s ) { tst(s); }
|
||||
inline void movbool( bool boolconst, Register d) { mov( (int) boolconst, d); }
|
||||
|
||||
@@ -2051,7 +2102,7 @@ class MacroAssembler: public Assembler {
|
||||
void store_klass_gap(Register s, Register dst_oop);
|
||||
|
||||
// oop manipulations
|
||||
void load_heap_oop(const Address& s, Register d, int offset = 0);
|
||||
void load_heap_oop(const Address& s, Register d);
|
||||
void load_heap_oop(Register s1, Register s2, Register d);
|
||||
void load_heap_oop(Register s1, int simm13a, Register d);
|
||||
void store_heap_oop(Register d, Register s1, Register s2);
|
||||
@@ -2181,11 +2232,11 @@ class MacroAssembler: public Assembler {
|
||||
void print_CPU_state();
|
||||
|
||||
// oops in code
|
||||
Address allocate_oop_address( jobject obj, Register d ); // allocate_index
|
||||
Address constant_oop_address( jobject obj, Register d ); // find_index
|
||||
inline void set_oop ( jobject obj, Register d ); // uses allocate_oop_address
|
||||
inline void set_oop_constant( jobject obj, Register d ); // uses constant_oop_address
|
||||
inline void set_oop ( Address obj_addr ); // same as load_address
|
||||
AddressLiteral allocate_oop_address(jobject obj); // allocate_index
|
||||
AddressLiteral constant_oop_address(jobject obj); // find_index
|
||||
inline void set_oop (jobject obj, Register d); // uses allocate_oop_address
|
||||
inline void set_oop_constant (jobject obj, Register d); // uses constant_oop_address
|
||||
inline void set_oop (AddressLiteral& obj_addr, Register d); // same as load_address
|
||||
|
||||
void set_narrow_oop( jobject obj, Register d );
|
||||
|
||||
@@ -2322,11 +2373,61 @@ class MacroAssembler: public Assembler {
|
||||
// interface method calling
|
||||
void lookup_interface_method(Register recv_klass,
|
||||
Register intf_klass,
|
||||
RegisterConstant itable_index,
|
||||
RegisterOrConstant itable_index,
|
||||
Register method_result,
|
||||
Register temp_reg, Register temp2_reg,
|
||||
Label& no_such_interface);
|
||||
|
||||
// Test sub_klass against super_klass, with fast and slow paths.
|
||||
|
||||
// The fast path produces a tri-state answer: yes / no / maybe-slow.
|
||||
// One of the three labels can be NULL, meaning take the fall-through.
|
||||
// If super_check_offset is -1, the value is loaded up from super_klass.
|
||||
// No registers are killed, except temp_reg and temp2_reg.
|
||||
// If super_check_offset is not -1, temp2_reg is not used and can be noreg.
|
||||
void check_klass_subtype_fast_path(Register sub_klass,
|
||||
Register super_klass,
|
||||
Register temp_reg,
|
||||
Register temp2_reg,
|
||||
Label* L_success,
|
||||
Label* L_failure,
|
||||
Label* L_slow_path,
|
||||
RegisterOrConstant super_check_offset = RegisterOrConstant(-1),
|
||||
Register instanceof_hack = noreg);
|
||||
|
||||
// The rest of the type check; must be wired to a corresponding fast path.
|
||||
// It does not repeat the fast path logic, so don't use it standalone.
|
||||
// The temp_reg can be noreg, if no temps are available.
|
||||
// It can also be sub_klass or super_klass, meaning it's OK to kill that one.
|
||||
// Updates the sub's secondary super cache as necessary.
|
||||
void check_klass_subtype_slow_path(Register sub_klass,
|
||||
Register super_klass,
|
||||
Register temp_reg,
|
||||
Register temp2_reg,
|
||||
Register temp3_reg,
|
||||
Register temp4_reg,
|
||||
Label* L_success,
|
||||
Label* L_failure);
|
||||
|
||||
// Simplified, combined version, good for typical uses.
|
||||
// Falls through on failure.
|
||||
void check_klass_subtype(Register sub_klass,
|
||||
Register super_klass,
|
||||
Register temp_reg,
|
||||
Register temp2_reg,
|
||||
Label& L_success);
|
||||
|
||||
// method handles (JSR 292)
|
||||
void check_method_handle_type(Register mtype_reg, Register mh_reg,
|
||||
Register temp_reg,
|
||||
Label& wrong_method_type);
|
||||
void jump_to_method_handle_entry(Register mh_reg, Register temp_reg);
|
||||
// offset relative to Gargs of argument at tos[arg_slot].
|
||||
// (arg_slot == 0 means the last argument, not the first).
|
||||
RegisterOrConstant argument_offset(RegisterOrConstant arg_slot,
|
||||
int extra_slot_offset = 0);
|
||||
|
||||
|
||||
// Stack overflow checking
|
||||
|
||||
// Note: this clobbers G3_scratch
|
||||
@@ -2341,7 +2442,7 @@ class MacroAssembler: public Assembler {
|
||||
// stack overflow + shadow pages. Clobbers tsp and scratch registers.
|
||||
void bang_stack_size(Register Rsize, Register Rtsp, Register Rscratch);
|
||||
|
||||
virtual RegisterConstant delayed_value(intptr_t* delayed_value_addr, Register tmp, int offset);
|
||||
virtual RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr, Register tmp, int offset);
|
||||
|
||||
void verify_tlab();
|
||||
|
||||
@@ -2351,7 +2452,8 @@ class MacroAssembler: public Assembler {
|
||||
// Conditionally (non-atomically) increments passed counter address, preserving condition codes.
|
||||
void cond_inc(Condition cond, address counter_addr, Register Rtemp1, Register Rtemp2);
|
||||
// Unconditional increment.
|
||||
void inc_counter(address counter_addr, Register Rtemp1, Register Rtemp2);
|
||||
void inc_counter(address counter_addr, Register Rtmp1, Register Rtmp2);
|
||||
void inc_counter(int* counter_addr, Register Rtmp1, Register Rtmp2);
|
||||
|
||||
#undef VIRTUAL
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -38,6 +38,11 @@ inline void MacroAssembler::pd_print_patched_instruction(address branch) {
|
||||
inline bool Address::is_simm13(int offset) { return Assembler::is_simm13(disp() + offset); }
|
||||
|
||||
|
||||
inline int AddressLiteral::low10() const {
|
||||
return Assembler::low10(value());
|
||||
}
|
||||
|
||||
|
||||
// inlines for SPARC assembler -- dmu 5/97
|
||||
|
||||
inline void Assembler::check_delay() {
|
||||
@@ -63,10 +68,9 @@ inline void Assembler::emit_data(int x, RelocationHolder const& rspec) {
|
||||
}
|
||||
|
||||
|
||||
inline void Assembler::add( Register s1, Register s2, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::add( Register s1, int simm13a, Register d, relocInfo::relocType rtype ) { emit_data( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rtype ); }
|
||||
inline void Assembler::add( Register s1, int simm13a, Register d, RelocationHolder const& rspec ) { emit_data( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec ); }
|
||||
inline void Assembler::add( const Address& a, Register d, int offset) { add( a.base(), a.disp() + offset, d, a.rspec(offset)); }
|
||||
inline void Assembler::add(Register s1, Register s2, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::add(Register s1, int simm13a, Register d, relocInfo::relocType rtype ) { emit_data( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rtype ); }
|
||||
inline void Assembler::add(Register s1, int simm13a, Register d, RelocationHolder const& rspec ) { emit_data( op(arith_op) | rd(d) | op3(add_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec ); }
|
||||
|
||||
inline void Assembler::bpr( RCondition c, bool a, Predict p, Register s1, address d, relocInfo::relocType rt ) { v9_only(); emit_data( op(branch_op) | annul(a) | cond(c) | op2(bpr_op2) | wdisp16(intptr_t(d), intptr_t(pc())) | predict(p) | rs1(s1), rt); has_delay_slot(); }
|
||||
inline void Assembler::bpr( RCondition c, bool a, Predict p, Register s1, Label& L) { bpr( c, a, p, s1, target(L)); }
|
||||
@@ -95,13 +99,10 @@ inline void Assembler::flush( Register s1, int simm13a) { emit_data( op(arith_op
|
||||
inline void Assembler::jmpl( Register s1, Register s2, Register d ) { emit_long( op(arith_op) | rd(d) | op3(jmpl_op3) | rs1(s1) | rs2(s2)); has_delay_slot(); }
|
||||
inline void Assembler::jmpl( Register s1, int simm13a, Register d, RelocationHolder const& rspec ) { emit_data( op(arith_op) | rd(d) | op3(jmpl_op3) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec); has_delay_slot(); }
|
||||
|
||||
inline void Assembler::jmpl( Address& a, Register d, int offset) { jmpl( a.base(), a.disp() + offset, d, a.rspec(offset)); }
|
||||
inline void Assembler::ldf(FloatRegisterImpl::Width w, Register s1, Register s2, FloatRegister d) { emit_long( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3, w) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::ldf(FloatRegisterImpl::Width w, Register s1, int simm13a, FloatRegister d, RelocationHolder const& rspec) { emit_data( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3, w) | rs1(s1) | immed(true) | simm(simm13a, 13), rspec); }
|
||||
|
||||
|
||||
inline void Assembler::ldf( FloatRegisterImpl::Width w, Register s1, Register s2, FloatRegister d) { emit_long( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3, w) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::ldf( FloatRegisterImpl::Width w, Register s1, int simm13a, FloatRegister d) { emit_data( op(ldst_op) | fd(d, w) | alt_op3(ldf_op3, w) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
inline void Assembler::ldf( FloatRegisterImpl::Width w, const Address& a, FloatRegister d, int offset) { relocate(a.rspec(offset)); ldf( w, a.base(), a.disp() + offset, d); }
|
||||
inline void Assembler::ldf(FloatRegisterImpl::Width w, const Address& a, FloatRegister d, int offset) { relocate(a.rspec(offset)); ldf( w, a.base(), a.disp() + offset, d); }
|
||||
|
||||
inline void Assembler::ldfsr( Register s1, Register s2) { v9_dep(); emit_long( op(ldst_op) | op3(ldfsr_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::ldfsr( Register s1, int simm13a) { v9_dep(); emit_data( op(ldst_op) | op3(ldfsr_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
@@ -136,68 +137,76 @@ inline void Assembler::ldd( Register s1, int simm13a, Register d) { v9_dep();
|
||||
|
||||
#ifdef _LP64
|
||||
// Make all 32 bit loads signed so 64 bit registers maintain proper sign
|
||||
inline void Assembler::ld( Register s1, Register s2, Register d) { ldsw( s1, s2, d); }
|
||||
inline void Assembler::ld( Register s1, int simm13a, Register d) { ldsw( s1, simm13a, d); }
|
||||
inline void Assembler::ld( Register s1, Register s2, Register d) { ldsw( s1, s2, d); }
|
||||
inline void Assembler::ld( Register s1, int simm13a, Register d) { ldsw( s1, simm13a, d); }
|
||||
#else
|
||||
inline void Assembler::ld( Register s1, Register s2, Register d) { lduw( s1, s2, d); }
|
||||
inline void Assembler::ld( Register s1, int simm13a, Register d) { lduw( s1, simm13a, d); }
|
||||
inline void Assembler::ld( Register s1, Register s2, Register d) { lduw( s1, s2, d); }
|
||||
inline void Assembler::ld( Register s1, int simm13a, Register d) { lduw( s1, simm13a, d); }
|
||||
#endif
|
||||
|
||||
inline void Assembler::ldub( Register s1, RegisterConstant s2, Register d) {
|
||||
if (s2.is_register()) ldsb(s1, s2.as_register(), d);
|
||||
else ldsb(s1, s2.as_constant(), d);
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
# ifdef _LP64
|
||||
inline void Assembler::ld( Register s1, ByteSize simm13a, Register d) { ldsw( s1, in_bytes(simm13a), d); }
|
||||
# else
|
||||
inline void Assembler::ld( Register s1, ByteSize simm13a, Register d) { lduw( s1, in_bytes(simm13a), d); }
|
||||
# endif
|
||||
#endif
|
||||
|
||||
inline void Assembler::ld( const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ld( a.base(), a.index(), d); }
|
||||
else { ld( a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldsb( Register s1, RegisterConstant s2, Register d) {
|
||||
if (s2.is_register()) ldsb(s1, s2.as_register(), d);
|
||||
else ldsb(s1, s2.as_constant(), d);
|
||||
inline void Assembler::ldsb(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldsb(a.base(), a.index(), d); }
|
||||
else { ldsb(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::lduh( Register s1, RegisterConstant s2, Register d) {
|
||||
if (s2.is_register()) ldsh(s1, s2.as_register(), d);
|
||||
else ldsh(s1, s2.as_constant(), d);
|
||||
inline void Assembler::ldsh(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldsh(a.base(), a.index(), d); }
|
||||
else { ldsh(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldsh( Register s1, RegisterConstant s2, Register d) {
|
||||
if (s2.is_register()) ldsh(s1, s2.as_register(), d);
|
||||
else ldsh(s1, s2.as_constant(), d);
|
||||
inline void Assembler::ldsw(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldsw(a.base(), a.index(), d); }
|
||||
else { ldsw(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::lduw( Register s1, RegisterConstant s2, Register d) {
|
||||
if (s2.is_register()) ldsw(s1, s2.as_register(), d);
|
||||
else ldsw(s1, s2.as_constant(), d);
|
||||
inline void Assembler::ldub(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldub(a.base(), a.index(), d); }
|
||||
else { ldub(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldsw( Register s1, RegisterConstant s2, Register d) {
|
||||
if (s2.is_register()) ldsw(s1, s2.as_register(), d);
|
||||
else ldsw(s1, s2.as_constant(), d);
|
||||
inline void Assembler::lduh(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); lduh(a.base(), a.index(), d); }
|
||||
else { lduh(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldx( Register s1, RegisterConstant s2, Register d) {
|
||||
if (s2.is_register()) ldx(s1, s2.as_register(), d);
|
||||
else ldx(s1, s2.as_constant(), d);
|
||||
inline void Assembler::lduw(const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); lduw(a.base(), a.index(), d); }
|
||||
else { lduw(a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ld( Register s1, RegisterConstant s2, Register d) {
|
||||
if (s2.is_register()) ld(s1, s2.as_register(), d);
|
||||
else ld(s1, s2.as_constant(), d);
|
||||
inline void Assembler::ldd( const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldd( a.base(), a.index(), d); }
|
||||
else { ldd( a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
inline void Assembler::ldd( Register s1, RegisterConstant s2, Register d) {
|
||||
if (s2.is_register()) ldd(s1, s2.as_register(), d);
|
||||
else ldd(s1, s2.as_constant(), d);
|
||||
inline void Assembler::ldx( const Address& a, Register d, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); ldx( a.base(), a.index(), d); }
|
||||
else { ldx( a.base(), a.disp() + offset, d); }
|
||||
}
|
||||
|
||||
inline void Assembler::ldub(Register s1, RegisterOrConstant s2, Register d) { ldub(Address(s1, s2), d); }
|
||||
inline void Assembler::ldsb(Register s1, RegisterOrConstant s2, Register d) { ldsb(Address(s1, s2), d); }
|
||||
inline void Assembler::lduh(Register s1, RegisterOrConstant s2, Register d) { lduh(Address(s1, s2), d); }
|
||||
inline void Assembler::ldsh(Register s1, RegisterOrConstant s2, Register d) { ldsh(Address(s1, s2), d); }
|
||||
inline void Assembler::lduw(Register s1, RegisterOrConstant s2, Register d) { lduw(Address(s1, s2), d); }
|
||||
inline void Assembler::ldsw(Register s1, RegisterOrConstant s2, Register d) { ldsw(Address(s1, s2), d); }
|
||||
inline void Assembler::ldx( Register s1, RegisterOrConstant s2, Register d) { ldx( Address(s1, s2), d); }
|
||||
inline void Assembler::ld( Register s1, RegisterOrConstant s2, Register d) { ld( Address(s1, s2), d); }
|
||||
inline void Assembler::ldd( Register s1, RegisterOrConstant s2, Register d) { ldd( Address(s1, s2), d); }
|
||||
|
||||
// form effective addresses this way:
|
||||
inline void Assembler::add( Register s1, RegisterConstant s2, Register d, int offset) {
|
||||
inline void Assembler::add( Register s1, RegisterOrConstant s2, Register d, int offset) {
|
||||
if (s2.is_register()) add(s1, s2.as_register(), d);
|
||||
else { add(s1, s2.as_constant() + offset, d); offset = 0; }
|
||||
if (offset != 0) add(d, offset, d);
|
||||
}
|
||||
|
||||
inline void Assembler::ld( const Address& a, Register d, int offset ) { relocate(a.rspec(offset)); ld( a.base(), a.disp() + offset, d ); }
|
||||
inline void Assembler::ldsb( const Address& a, Register d, int offset ) { relocate(a.rspec(offset)); ldsb( a.base(), a.disp() + offset, d ); }
|
||||
inline void Assembler::ldsh( const Address& a, Register d, int offset ) { relocate(a.rspec(offset)); ldsh( a.base(), a.disp() + offset, d ); }
|
||||
inline void Assembler::ldsw( const Address& a, Register d, int offset ) { relocate(a.rspec(offset)); ldsw( a.base(), a.disp() + offset, d ); }
|
||||
inline void Assembler::ldub( const Address& a, Register d, int offset ) { relocate(a.rspec(offset)); ldub( a.base(), a.disp() + offset, d ); }
|
||||
inline void Assembler::lduh( const Address& a, Register d, int offset ) { relocate(a.rspec(offset)); lduh( a.base(), a.disp() + offset, d ); }
|
||||
inline void Assembler::lduw( const Address& a, Register d, int offset ) { relocate(a.rspec(offset)); lduw( a.base(), a.disp() + offset, d ); }
|
||||
inline void Assembler::ldd( const Address& a, Register d, int offset ) { relocate(a.rspec(offset)); ldd( a.base(), a.disp() + offset, d ); }
|
||||
inline void Assembler::ldx( const Address& a, Register d, int offset ) { relocate(a.rspec(offset)); ldx( a.base(), a.disp() + offset, d ); }
|
||||
|
||||
|
||||
inline void Assembler::ldstub( Register s1, Register s2, Register d) { emit_long( op(ldst_op) | rd(d) | op3(ldstub_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::ldstub( Register s1, int simm13a, Register d) { emit_data( op(ldst_op) | rd(d) | op3(ldstub_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
@@ -240,36 +249,44 @@ inline void Assembler::stx( Register d, Register s1, int simm13a) { v9_only();
|
||||
inline void Assembler::std( Register d, Register s1, Register s2) { v9_dep(); assert(d->is_even(), "not even"); emit_long( op(ldst_op) | rd(d) | op3(std_op3) | rs1(s1) | rs2(s2) ); }
|
||||
inline void Assembler::std( Register d, Register s1, int simm13a) { v9_dep(); assert(d->is_even(), "not even"); emit_data( op(ldst_op) | rd(d) | op3(std_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
|
||||
|
||||
inline void Assembler::st( Register d, Register s1, Register s2) { stw(d, s1, s2); }
|
||||
inline void Assembler::st( Register d, Register s1, int simm13a) { stw(d, s1, simm13a); }
|
||||
inline void Assembler::st( Register d, Register s1, Register s2) { stw(d, s1, s2); }
|
||||
inline void Assembler::st( Register d, Register s1, int simm13a) { stw(d, s1, simm13a); }
|
||||
|
||||
inline void Assembler::stb( Register d, Register s1, RegisterConstant s2) {
|
||||
if (s2.is_register()) stb(d, s1, s2.as_register());
|
||||
else stb(d, s1, s2.as_constant());
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void Assembler::st( Register d, Register s1, ByteSize simm13a) { stw(d, s1, in_bytes(simm13a)); }
|
||||
#endif
|
||||
|
||||
inline void Assembler::stb(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); stb(d, a.base(), a.index() ); }
|
||||
else { stb(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::sth( Register d, Register s1, RegisterConstant s2) {
|
||||
if (s2.is_register()) sth(d, s1, s2.as_register());
|
||||
else sth(d, s1, s2.as_constant());
|
||||
inline void Assembler::sth(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); sth(d, a.base(), a.index() ); }
|
||||
else { sth(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::stx( Register d, Register s1, RegisterConstant s2) {
|
||||
if (s2.is_register()) stx(d, s1, s2.as_register());
|
||||
else stx(d, s1, s2.as_constant());
|
||||
inline void Assembler::stw(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); stw(d, a.base(), a.index() ); }
|
||||
else { stw(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::std( Register d, Register s1, RegisterConstant s2) {
|
||||
if (s2.is_register()) std(d, s1, s2.as_register());
|
||||
else std(d, s1, s2.as_constant());
|
||||
inline void Assembler::st( Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); st( d, a.base(), a.index() ); }
|
||||
else { st( d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::st( Register d, Register s1, RegisterConstant s2) {
|
||||
if (s2.is_register()) st(d, s1, s2.as_register());
|
||||
else st(d, s1, s2.as_constant());
|
||||
inline void Assembler::std(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); std(d, a.base(), a.index() ); }
|
||||
else { std(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
inline void Assembler::stx(Register d, const Address& a, int offset) {
|
||||
if (a.has_index()) { assert(offset == 0, ""); stx(d, a.base(), a.index() ); }
|
||||
else { stx(d, a.base(), a.disp() + offset); }
|
||||
}
|
||||
|
||||
inline void Assembler::stb( Register d, const Address& a, int offset) { relocate(a.rspec(offset)); stb( d, a.base(), a.disp() + offset); }
|
||||
inline void Assembler::sth( Register d, const Address& a, int offset) { relocate(a.rspec(offset)); sth( d, a.base(), a.disp() + offset); }
|
||||
inline void Assembler::stw( Register d, const Address& a, int offset) { relocate(a.rspec(offset)); stw( d, a.base(), a.disp() + offset); }
|
||||
inline void Assembler::st( Register d, const Address& a, int offset) { relocate(a.rspec(offset)); st( d, a.base(), a.disp() + offset); }
|
||||
inline void Assembler::std( Register d, const Address& a, int offset) { relocate(a.rspec(offset)); std( d, a.base(), a.disp() + offset); }
|
||||
inline void Assembler::stx( Register d, const Address& a, int offset) { relocate(a.rspec(offset)); stx( d, a.base(), a.disp() + offset); }
|
||||
inline void Assembler::stb(Register d, Register s1, RegisterOrConstant s2) { stb(d, Address(s1, s2)); }
|
||||
inline void Assembler::sth(Register d, Register s1, RegisterOrConstant s2) { sth(d, Address(s1, s2)); }
|
||||
inline void Assembler::stx(Register d, Register s1, RegisterOrConstant s2) { stx(d, Address(s1, s2)); }
|
||||
inline void Assembler::std(Register d, Register s1, RegisterOrConstant s2) { std(d, Address(s1, s2)); }
|
||||
inline void Assembler::st( Register d, Register s1, RegisterOrConstant s2) { st( d, Address(s1, s2)); }
|
||||
|
||||
// v8 p 99
|
||||
|
||||
@@ -294,39 +311,46 @@ inline void Assembler::swap( Address& a, Register d, int offset ) { relocate(
|
||||
// Use the right loads/stores for the platform
|
||||
inline void MacroAssembler::ld_ptr( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx( s1, s2, d);
|
||||
Assembler::ldx(s1, s2, d);
|
||||
#else
|
||||
Assembler::ld( s1, s2, d);
|
||||
Assembler::ld( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_ptr( Register s1, int simm13a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx( s1, simm13a, d);
|
||||
Assembler::ldx(s1, simm13a, d);
|
||||
#else
|
||||
Assembler::ld( s1, simm13a, d);
|
||||
Assembler::ld( s1, simm13a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_ptr( Register s1, RegisterConstant s2, Register d ) {
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void MacroAssembler::ld_ptr( Register s1, ByteSize simm13a, Register d ) {
|
||||
ld_ptr(s1, in_bytes(simm13a), d);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::ld_ptr( Register s1, RegisterOrConstant s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx( s1, s2, d);
|
||||
Assembler::ldx(s1, s2, d);
|
||||
#else
|
||||
Assembler::ld( s1, s2, d);
|
||||
Assembler::ld( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_ptr( const Address& a, Register d, int offset ) {
|
||||
inline void MacroAssembler::ld_ptr(const Address& a, Register d, int offset) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx( a, d, offset );
|
||||
Assembler::ldx(a, d, offset);
|
||||
#else
|
||||
Assembler::ld( a, d, offset );
|
||||
Assembler::ld( a, d, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, Register s2 ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx( d, s1, s2);
|
||||
Assembler::stx(d, s1, s2);
|
||||
#else
|
||||
Assembler::st( d, s1, s2);
|
||||
#endif
|
||||
@@ -334,25 +358,32 @@ inline void MacroAssembler::st_ptr( Register d, Register s1, Register s2 ) {
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, int simm13a ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx( d, s1, simm13a);
|
||||
Assembler::stx(d, s1, simm13a);
|
||||
#else
|
||||
Assembler::st( d, s1, simm13a);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, RegisterConstant s2 ) {
|
||||
#ifdef ASSERT
|
||||
// ByteSize is only a class when ASSERT is defined, otherwise it's an int.
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, ByteSize simm13a ) {
|
||||
st_ptr(d, s1, in_bytes(simm13a));
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, Register s1, RegisterOrConstant s2 ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx( d, s1, s2);
|
||||
Assembler::stx(d, s1, s2);
|
||||
#else
|
||||
Assembler::st( d, s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_ptr( Register d, const Address& a, int offset) {
|
||||
inline void MacroAssembler::st_ptr(Register d, const Address& a, int offset) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx( d, a, offset);
|
||||
Assembler::stx(d, a, offset);
|
||||
#else
|
||||
Assembler::st( d, a, offset);
|
||||
Assembler::st( d, a, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -373,7 +404,7 @@ inline void MacroAssembler::ld_long( Register s1, int simm13a, Register d ) {
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_long( Register s1, RegisterConstant s2, Register d ) {
|
||||
inline void MacroAssembler::ld_long( Register s1, RegisterOrConstant s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(s1, s2, d);
|
||||
#else
|
||||
@@ -381,11 +412,11 @@ inline void MacroAssembler::ld_long( Register s1, RegisterConstant s2, Register
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::ld_long( const Address& a, Register d, int offset ) {
|
||||
inline void MacroAssembler::ld_long(const Address& a, Register d, int offset) {
|
||||
#ifdef _LP64
|
||||
Assembler::ldx(a, d, offset );
|
||||
Assembler::ldx(a, d, offset);
|
||||
#else
|
||||
Assembler::ldd(a, d, offset );
|
||||
Assembler::ldd(a, d, offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -405,7 +436,7 @@ inline void MacroAssembler::st_long( Register d, Register s1, int simm13a ) {
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::st_long( Register d, Register s1, RegisterConstant s2 ) {
|
||||
inline void MacroAssembler::st_long( Register d, Register s1, RegisterOrConstant s2 ) {
|
||||
#ifdef _LP64
|
||||
Assembler::stx(d, s1, s2);
|
||||
#else
|
||||
@@ -427,7 +458,7 @@ inline void MacroAssembler::sll_ptr( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::sllx(s1, s2, d);
|
||||
#else
|
||||
Assembler::sll(s1, s2, d);
|
||||
Assembler::sll( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -435,7 +466,7 @@ inline void MacroAssembler::sll_ptr( Register s1, int imm6a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::sllx(s1, imm6a, d);
|
||||
#else
|
||||
Assembler::sll(s1, imm6a, d);
|
||||
Assembler::sll( s1, imm6a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -443,7 +474,7 @@ inline void MacroAssembler::srl_ptr( Register s1, Register s2, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::srlx(s1, s2, d);
|
||||
#else
|
||||
Assembler::srl(s1, s2, d);
|
||||
Assembler::srl( s1, s2, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -451,11 +482,11 @@ inline void MacroAssembler::srl_ptr( Register s1, int imm6a, Register d ) {
|
||||
#ifdef _LP64
|
||||
Assembler::srlx(s1, imm6a, d);
|
||||
#else
|
||||
Assembler::srl(s1, imm6a, d);
|
||||
Assembler::srl( s1, imm6a, d);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void MacroAssembler::sll_ptr( Register s1, RegisterConstant s2, Register d ) {
|
||||
inline void MacroAssembler::sll_ptr( Register s1, RegisterOrConstant s2, Register d ) {
|
||||
if (s2.is_register()) sll_ptr(s1, s2.as_register(), d);
|
||||
else sll_ptr(s1, s2.as_constant(), d);
|
||||
}
|
||||
@@ -541,9 +572,8 @@ inline void MacroAssembler::call( address d, relocInfo::relocType rt ) {
|
||||
disp = (intptr_t)d - (intptr_t)pc();
|
||||
if ( disp != (intptr_t)(int32_t)disp ) {
|
||||
relocate(rt);
|
||||
Address dest(O7, (address)d);
|
||||
sethi(dest, /*ForceRelocatable=*/ true);
|
||||
jmpl(dest, O7);
|
||||
AddressLiteral dest(d);
|
||||
jumpl_to(dest, O7, O7);
|
||||
}
|
||||
else {
|
||||
Assembler::call( d, rt );
|
||||
@@ -603,87 +633,72 @@ inline intptr_t MacroAssembler::load_pc_address( Register reg, int bytes_to_skip
|
||||
return thepc;
|
||||
}
|
||||
|
||||
inline void MacroAssembler::load_address( Address& a, int offset ) {
|
||||
|
||||
inline void MacroAssembler::load_contents(AddressLiteral& addrlit, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
#ifdef _LP64
|
||||
sethi(a);
|
||||
add(a, a.base(), offset);
|
||||
#else
|
||||
if (a.hi() == 0 && a.rtype() == relocInfo::none) {
|
||||
set(a.disp() + offset, a.base());
|
||||
}
|
||||
else {
|
||||
sethi(a);
|
||||
add(a, a.base(), offset);
|
||||
}
|
||||
#endif
|
||||
sethi(addrlit, d);
|
||||
ld(d, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::split_disp( Address& a, Register temp ) {
|
||||
inline void MacroAssembler::load_ptr_contents(AddressLiteral& addrlit, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
a = a.split_disp();
|
||||
Assembler::sethi(a.hi(), temp, a.rspec());
|
||||
add(a.base(), temp, a.base());
|
||||
sethi(addrlit, d);
|
||||
ld_ptr(d, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_contents( Address& a, Register d, int offset ) {
|
||||
inline void MacroAssembler::store_contents(Register s, AddressLiteral& addrlit, Register temp, int offset) {
|
||||
assert_not_delayed();
|
||||
sethi(a);
|
||||
ld(a, d, offset);
|
||||
sethi(addrlit, temp);
|
||||
st(s, temp, addrlit.low10() + offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::load_ptr_contents( Address& a, Register d, int offset ) {
|
||||
inline void MacroAssembler::store_ptr_contents(Register s, AddressLiteral& addrlit, Register temp, int offset) {
|
||||
assert_not_delayed();
|
||||
sethi(a);
|
||||
ld_ptr(a, d, offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::store_contents( Register s, Address& a, int offset ) {
|
||||
assert_not_delayed();
|
||||
sethi(a);
|
||||
st(s, a, offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::store_ptr_contents( Register s, Address& a, int offset ) {
|
||||
assert_not_delayed();
|
||||
sethi(a);
|
||||
st_ptr(s, a, offset);
|
||||
sethi(addrlit, temp);
|
||||
st_ptr(s, temp, addrlit.low10() + offset);
|
||||
}
|
||||
|
||||
|
||||
// This code sequence is relocatable to any address, even on LP64.
|
||||
inline void MacroAssembler::jumpl_to( Address& a, Register d, int offset ) {
|
||||
inline void MacroAssembler::jumpl_to(AddressLiteral& addrlit, Register temp, Register d, int offset) {
|
||||
assert_not_delayed();
|
||||
// Force fixed length sethi because NativeJump and NativeFarCall don't handle
|
||||
// variable length instruction streams.
|
||||
sethi(a, /*ForceRelocatable=*/ true);
|
||||
jmpl(a, d, offset);
|
||||
patchable_sethi(addrlit, temp);
|
||||
jmpl(temp, addrlit.low10() + offset, d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::jump_to( Address& a, int offset ) {
|
||||
jumpl_to( a, G0, offset );
|
||||
inline void MacroAssembler::jump_to(AddressLiteral& addrlit, Register temp, int offset) {
|
||||
jumpl_to(addrlit, temp, G0, offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_oop( jobject obj, Register d ) {
|
||||
set_oop(allocate_oop_address(obj, d));
|
||||
inline void MacroAssembler::jump_indirect_to(Address& a, Register temp,
|
||||
int ld_offset, int jmp_offset) {
|
||||
assert_not_delayed();
|
||||
//sethi(al); // sethi is caller responsibility for this one
|
||||
ld_ptr(a, temp, ld_offset);
|
||||
jmp(temp, jmp_offset);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_oop_constant( jobject obj, Register d ) {
|
||||
set_oop(constant_oop_address(obj, d));
|
||||
inline void MacroAssembler::set_oop(jobject obj, Register d) {
|
||||
set_oop(allocate_oop_address(obj), d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_oop( Address obj_addr ) {
|
||||
assert(obj_addr.rspec().type()==relocInfo::oop_type, "must be an oop reloc");
|
||||
load_address(obj_addr);
|
||||
inline void MacroAssembler::set_oop_constant(jobject obj, Register d) {
|
||||
set_oop(constant_oop_address(obj), d);
|
||||
}
|
||||
|
||||
|
||||
inline void MacroAssembler::set_oop(AddressLiteral& obj_addr, Register d) {
|
||||
assert(obj_addr.rspec().type() == relocInfo::oop_type, "must be an oop reloc");
|
||||
set(obj_addr, d);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -277,10 +277,11 @@ void PatchingStub::emit_code(LIR_Assembler* ce) {
|
||||
|
||||
if (_id == load_klass_id) {
|
||||
// produce a copy of the load klass instruction for use by the being initialized case
|
||||
#ifdef ASSERT
|
||||
address start = __ pc();
|
||||
Address addr = Address(_obj, address(NULL), oop_Relocation::spec(_oop_index));
|
||||
__ sethi(addr, true);
|
||||
__ add(addr, _obj, 0);
|
||||
#endif
|
||||
AddressLiteral addrlit(NULL, oop_Relocation::spec(_oop_index));
|
||||
__ patchable_set(addrlit, _obj);
|
||||
|
||||
#ifdef ASSERT
|
||||
for (int i = 0; i < _bytes_to_copy; i++) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -327,7 +327,7 @@ void FrameMap::init () {
|
||||
|
||||
|
||||
Address FrameMap::make_new_address(ByteSize sp_offset) const {
|
||||
return Address(SP, 0, STACK_BIAS + in_bytes(sp_offset));
|
||||
return Address(SP, STACK_BIAS + in_bytes(sp_offset));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -196,7 +196,7 @@ void LIR_Assembler::osr_entry() {
|
||||
// verify the interpreter's monitor has a non-null object
|
||||
{
|
||||
Label L;
|
||||
__ ld_ptr(Address(OSR_buf, 0, slot_offset + BasicObjectLock::obj_offset_in_bytes()), O7);
|
||||
__ ld_ptr(OSR_buf, slot_offset + BasicObjectLock::obj_offset_in_bytes(), O7);
|
||||
__ cmp(G0, O7);
|
||||
__ br(Assembler::notEqual, false, Assembler::pt, L);
|
||||
__ delayed()->nop();
|
||||
@@ -205,9 +205,9 @@ void LIR_Assembler::osr_entry() {
|
||||
}
|
||||
#endif // ASSERT
|
||||
// Copy the lock field into the compiled activation.
|
||||
__ ld_ptr(Address(OSR_buf, 0, slot_offset + BasicObjectLock::lock_offset_in_bytes()), O7);
|
||||
__ ld_ptr(OSR_buf, slot_offset + BasicObjectLock::lock_offset_in_bytes(), O7);
|
||||
__ st_ptr(O7, frame_map()->address_for_monitor_lock(i));
|
||||
__ ld_ptr(Address(OSR_buf, 0, slot_offset + BasicObjectLock::obj_offset_in_bytes()), O7);
|
||||
__ ld_ptr(OSR_buf, slot_offset + BasicObjectLock::obj_offset_in_bytes(), O7);
|
||||
__ st_ptr(O7, frame_map()->address_for_monitor_object(i));
|
||||
}
|
||||
}
|
||||
@@ -238,21 +238,21 @@ void LIR_Assembler::emit_string_compare(LIR_Opr left, LIR_Opr right, LIR_Opr dst
|
||||
int offset_offset = java_lang_String::offset_offset_in_bytes(); // first character position
|
||||
int count_offset = java_lang_String:: count_offset_in_bytes();
|
||||
|
||||
__ ld_ptr(Address(str0, 0, value_offset), tmp0);
|
||||
__ ld(Address(str0, 0, offset_offset), tmp2);
|
||||
__ ld_ptr(str0, value_offset, tmp0);
|
||||
__ ld(str0, offset_offset, tmp2);
|
||||
__ add(tmp0, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp0);
|
||||
__ ld(Address(str0, 0, count_offset), str0);
|
||||
__ ld(str0, count_offset, str0);
|
||||
__ sll(tmp2, exact_log2(sizeof(jchar)), tmp2);
|
||||
|
||||
// str1 may be null
|
||||
add_debug_info_for_null_check_here(info);
|
||||
|
||||
__ ld_ptr(Address(str1, 0, value_offset), tmp1);
|
||||
__ ld_ptr(str1, value_offset, tmp1);
|
||||
__ add(tmp0, tmp2, tmp0);
|
||||
|
||||
__ ld(Address(str1, 0, offset_offset), tmp2);
|
||||
__ ld(str1, offset_offset, tmp2);
|
||||
__ add(tmp1, arrayOopDesc::base_offset_in_bytes(T_CHAR), tmp1);
|
||||
__ ld(Address(str1, 0, count_offset), str1);
|
||||
__ ld(str1, count_offset, str1);
|
||||
__ sll(tmp2, exact_log2(sizeof(jchar)), tmp2);
|
||||
__ subcc(str0, str1, O7);
|
||||
__ add(tmp1, tmp2, tmp1);
|
||||
@@ -412,9 +412,9 @@ void LIR_Assembler::emit_deopt_handler() {
|
||||
#endif // ASSERT
|
||||
compilation()->offsets()->set_value(CodeOffsets::Deopt, code_offset());
|
||||
|
||||
Address deopt_blob(G3_scratch, SharedRuntime::deopt_blob()->unpack());
|
||||
AddressLiteral deopt_blob(SharedRuntime::deopt_blob()->unpack());
|
||||
|
||||
__ JUMP(deopt_blob, 0); // sethi;jmp
|
||||
__ JUMP(deopt_blob, G3_scratch, 0); // sethi;jmp
|
||||
__ delayed()->nop();
|
||||
|
||||
assert(code_offset() - offset <= deopt_handler_size, "overflow");
|
||||
@@ -441,13 +441,12 @@ void LIR_Assembler::jobject2reg_with_patching(Register reg, CodeEmitInfo *info)
|
||||
int oop_index = __ oop_recorder()->allocate_index((jobject)NULL);
|
||||
PatchingStub* patch = new PatchingStub(_masm, PatchingStub::load_klass_id, oop_index);
|
||||
|
||||
Address addr = Address(reg, address(NULL), oop_Relocation::spec(oop_index));
|
||||
assert(addr.rspec().type() == relocInfo::oop_type, "must be an oop reloc");
|
||||
AddressLiteral addrlit(NULL, oop_Relocation::spec(oop_index));
|
||||
assert(addrlit.rspec().type() == relocInfo::oop_type, "must be an oop reloc");
|
||||
// It may not seem necessary to use a sethi/add pair to load a NULL into dest, but the
|
||||
// NULL will be dynamically patched later and the patched value may be large. We must
|
||||
// therefore generate the sethi/add as a placeholders
|
||||
__ sethi(addr, true);
|
||||
__ add(addr, reg, 0);
|
||||
__ patchable_set(addrlit, reg);
|
||||
|
||||
patching_epilog(patch, lir_patch_normal, reg, info);
|
||||
}
|
||||
@@ -706,7 +705,7 @@ void LIR_Assembler::ic_call(address entry, CodeEmitInfo* info) {
|
||||
|
||||
void LIR_Assembler::vtable_call(int vtable_offset, CodeEmitInfo* info) {
|
||||
add_debug_info_for_null_check_here(info);
|
||||
__ ld_ptr(Address(O0, 0, oopDesc::klass_offset_in_bytes()), G3_scratch);
|
||||
__ ld_ptr(O0, oopDesc::klass_offset_in_bytes(), G3_scratch);
|
||||
if (__ is_simm13(vtable_offset) ) {
|
||||
__ ld_ptr(G3_scratch, vtable_offset, G5_method);
|
||||
} else {
|
||||
@@ -715,7 +714,7 @@ void LIR_Assembler::vtable_call(int vtable_offset, CodeEmitInfo* info) {
|
||||
// ld_ptr, set_hi, set
|
||||
__ ld_ptr(G3_scratch, G5_method, G5_method);
|
||||
}
|
||||
__ ld_ptr(G5_method, in_bytes(methodOopDesc::from_compiled_offset()), G3_scratch);
|
||||
__ ld_ptr(G5_method, methodOopDesc::from_compiled_offset(), G3_scratch);
|
||||
__ callr(G3_scratch, G0);
|
||||
// the peephole pass fills the delay slot
|
||||
}
|
||||
@@ -738,8 +737,7 @@ int LIR_Assembler::load(Register s, int disp, Register d, BasicType ld_type, Cod
|
||||
default : ShouldNotReachHere();
|
||||
}
|
||||
} else {
|
||||
__ sethi(disp & ~0x3ff, O7, true);
|
||||
__ add(O7, disp & 0x3ff, O7);
|
||||
__ set(disp, O7);
|
||||
if (info != NULL) add_debug_info_for_null_check_here(info);
|
||||
load_offset = code_offset();
|
||||
switch(ld_type) {
|
||||
@@ -775,8 +773,7 @@ void LIR_Assembler::store(Register value, Register base, int offset, BasicType t
|
||||
default : ShouldNotReachHere();
|
||||
}
|
||||
} else {
|
||||
__ sethi(offset & ~0x3ff, O7, true);
|
||||
__ add(O7, offset & 0x3ff, O7);
|
||||
__ set(offset, O7);
|
||||
if (info != NULL) add_debug_info_for_null_check_here(info);
|
||||
switch (type) {
|
||||
case T_BOOLEAN: // fall through
|
||||
@@ -813,8 +810,7 @@ void LIR_Assembler::load(Register s, int disp, FloatRegister d, BasicType ld_typ
|
||||
__ ldf(w, s, disp, d);
|
||||
}
|
||||
} else {
|
||||
__ sethi(disp & ~0x3ff, O7, true);
|
||||
__ add(O7, disp & 0x3ff, O7);
|
||||
__ set(disp, O7);
|
||||
if (info != NULL) add_debug_info_for_null_check_here(info);
|
||||
__ ldf(w, s, O7, d);
|
||||
}
|
||||
@@ -839,8 +835,7 @@ void LIR_Assembler::store(FloatRegister value, Register base, int offset, BasicT
|
||||
__ stf(w, value, base, offset);
|
||||
}
|
||||
} else {
|
||||
__ sethi(offset & ~0x3ff, O7, true);
|
||||
__ add(O7, offset & 0x3ff, O7);
|
||||
__ set(offset, O7);
|
||||
if (info != NULL) add_debug_info_for_null_check_here(info);
|
||||
__ stf(w, value, O7, base);
|
||||
}
|
||||
@@ -852,8 +847,7 @@ int LIR_Assembler::store(LIR_Opr from_reg, Register base, int offset, BasicType
|
||||
if (!Assembler::is_simm13(offset + (type == T_LONG) ? wordSize : 0)) {
|
||||
assert(!unaligned, "can't handle this");
|
||||
// for offsets larger than a simm13 we setup the offset in O7
|
||||
__ sethi(offset & ~0x3ff, O7, true);
|
||||
__ add(O7, offset & 0x3ff, O7);
|
||||
__ set(offset, O7);
|
||||
store_offset = store(from_reg, base, O7, type);
|
||||
} else {
|
||||
if (type == T_ARRAY || type == T_OBJECT) __ verify_oop(from_reg->as_register());
|
||||
@@ -937,8 +931,7 @@ int LIR_Assembler::load(Register base, int offset, LIR_Opr to_reg, BasicType typ
|
||||
assert(base != O7, "destroying register");
|
||||
assert(!unaligned, "can't handle this");
|
||||
// for offsets larger than a simm13 we setup the offset in O7
|
||||
__ sethi(offset & ~0x3ff, O7, true);
|
||||
__ add(O7, offset & 0x3ff, O7);
|
||||
__ set(offset, O7);
|
||||
load_offset = load(base, O7, to_reg, type);
|
||||
} else {
|
||||
load_offset = code_offset();
|
||||
@@ -1213,7 +1206,7 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
|
||||
assert(to_reg->is_single_fpu(), "wrong register kind");
|
||||
|
||||
__ set(con, O7);
|
||||
Address temp_slot(SP, 0, (frame::register_save_words * wordSize) + STACK_BIAS);
|
||||
Address temp_slot(SP, (frame::register_save_words * wordSize) + STACK_BIAS);
|
||||
__ st(O7, temp_slot);
|
||||
__ ldf(FloatRegisterImpl::S, temp_slot, to_reg->as_float_reg());
|
||||
}
|
||||
@@ -1238,8 +1231,8 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
assert(to_reg->is_double_fpu(), "wrong register kind");
|
||||
Address temp_slot_lo(SP, 0, ((frame::register_save_words ) * wordSize) + STACK_BIAS);
|
||||
Address temp_slot_hi(SP, 0, ((frame::register_save_words) * wordSize) + (longSize/2) + STACK_BIAS);
|
||||
Address temp_slot_lo(SP, ((frame::register_save_words ) * wordSize) + STACK_BIAS);
|
||||
Address temp_slot_hi(SP, ((frame::register_save_words) * wordSize) + (longSize/2) + STACK_BIAS);
|
||||
__ set(low(con), O7);
|
||||
__ st(O7, temp_slot_lo);
|
||||
__ set(high(con), O7);
|
||||
@@ -1267,17 +1260,16 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
|
||||
break;
|
||||
}
|
||||
RelocationHolder rspec = internal_word_Relocation::spec(const_addr);
|
||||
AddressLiteral const_addrlit(const_addr, rspec);
|
||||
if (to_reg->is_single_fpu()) {
|
||||
__ sethi( (intx)const_addr & ~0x3ff, O7, true, rspec);
|
||||
__ patchable_sethi(const_addrlit, O7);
|
||||
__ relocate(rspec);
|
||||
|
||||
int offset = (intx)const_addr & 0x3ff;
|
||||
__ ldf (FloatRegisterImpl::S, O7, offset, to_reg->as_float_reg());
|
||||
__ ldf(FloatRegisterImpl::S, O7, const_addrlit.low10(), to_reg->as_float_reg());
|
||||
|
||||
} else {
|
||||
assert(to_reg->is_single_cpu(), "Must be a cpu register.");
|
||||
|
||||
__ set((intx)const_addr, O7, rspec);
|
||||
__ set(const_addrlit, O7);
|
||||
load(O7, 0, to_reg->as_register(), T_INT);
|
||||
}
|
||||
}
|
||||
@@ -1293,10 +1285,10 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
|
||||
RelocationHolder rspec = internal_word_Relocation::spec(const_addr);
|
||||
|
||||
if (to_reg->is_double_fpu()) {
|
||||
__ sethi( (intx)const_addr & ~0x3ff, O7, true, rspec);
|
||||
int offset = (intx)const_addr & 0x3ff;
|
||||
AddressLiteral const_addrlit(const_addr, rspec);
|
||||
__ patchable_sethi(const_addrlit, O7);
|
||||
__ relocate(rspec);
|
||||
__ ldf (FloatRegisterImpl::D, O7, offset, to_reg->as_double_reg());
|
||||
__ ldf (FloatRegisterImpl::D, O7, const_addrlit.low10(), to_reg->as_double_reg());
|
||||
} else {
|
||||
assert(to_reg->is_double_cpu(), "Must be a long register.");
|
||||
#ifdef _LP64
|
||||
@@ -1317,7 +1309,7 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
|
||||
|
||||
Address LIR_Assembler::as_Address(LIR_Address* addr) {
|
||||
Register reg = addr->base()->as_register();
|
||||
return Address(reg, 0, addr->disp());
|
||||
return Address(reg, addr->disp());
|
||||
}
|
||||
|
||||
|
||||
@@ -1360,13 +1352,13 @@ void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||
|
||||
Address LIR_Assembler::as_Address_hi(LIR_Address* addr) {
|
||||
Address base = as_Address(addr);
|
||||
return Address(base.base(), 0, base.disp() + hi_word_offset_in_bytes);
|
||||
return Address(base.base(), base.disp() + hi_word_offset_in_bytes);
|
||||
}
|
||||
|
||||
|
||||
Address LIR_Assembler::as_Address_lo(LIR_Address* addr) {
|
||||
Address base = as_Address(addr);
|
||||
return Address(base.base(), 0, base.disp() + lo_word_offset_in_bytes);
|
||||
return Address(base.base(), base.disp() + lo_word_offset_in_bytes);
|
||||
}
|
||||
|
||||
|
||||
@@ -1396,8 +1388,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src_opr, LIR_Opr dest, BasicType type,
|
||||
if (addr->index()->is_illegal()) {
|
||||
if (!Assembler::is_simm13(disp_value) && (!unaligned || Assembler::is_simm13(disp_value + 4))) {
|
||||
if (needs_patching) {
|
||||
__ sethi(0, O7, true);
|
||||
__ add(O7, 0, O7);
|
||||
__ patchable_set(0, O7);
|
||||
} else {
|
||||
__ set(disp_value, O7);
|
||||
}
|
||||
@@ -1544,8 +1535,7 @@ void LIR_Assembler::reg2mem(LIR_Opr from_reg, LIR_Opr dest, BasicType type,
|
||||
if (addr->index()->is_illegal()) {
|
||||
if (!Assembler::is_simm13(disp_value) && (!unaligned || Assembler::is_simm13(disp_value + 4))) {
|
||||
if (needs_patching) {
|
||||
__ sethi(0, O7, true);
|
||||
__ add(O7, 0, O7);
|
||||
__ patchable_set(0, O7);
|
||||
} else {
|
||||
__ set(disp_value, O7);
|
||||
}
|
||||
@@ -1627,8 +1617,8 @@ void LIR_Assembler::emit_static_call_stub() {
|
||||
|
||||
__ set_oop(NULL, G5);
|
||||
// must be set to -1 at code generation time
|
||||
Address a(G3, (address)-1);
|
||||
__ jump_to(a, 0);
|
||||
AddressLiteral addrlit(-1);
|
||||
__ jump_to(addrlit, G3);
|
||||
__ delayed()->nop();
|
||||
|
||||
assert(__ offset() - start <= call_stub_size, "stub too big");
|
||||
@@ -2063,7 +2053,7 @@ void LIR_Assembler::throw_op(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmit
|
||||
address pc_for_athrow = __ pc();
|
||||
int pc_for_athrow_offset = __ offset();
|
||||
RelocationHolder rspec = internal_word_Relocation::spec(pc_for_athrow);
|
||||
__ set((intptr_t)pc_for_athrow, Oissuing_pc, rspec);
|
||||
__ set(pc_for_athrow, Oissuing_pc, rspec);
|
||||
add_call_info(pc_for_athrow_offset, info); // for exception handler
|
||||
|
||||
__ call(Runtime1::entry_for(Runtime1::handle_exception_id), relocInfo::runtime_call_type);
|
||||
@@ -2393,23 +2383,11 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
|
||||
// get instance klass
|
||||
load(k_RInfo, objArrayKlass::element_klass_offset_in_bytes() + sizeof(oopDesc), k_RInfo, T_OBJECT, NULL);
|
||||
// get super_check_offset
|
||||
load(k_RInfo, sizeof(oopDesc) + Klass::super_check_offset_offset_in_bytes(), Rtmp1, T_INT, NULL);
|
||||
// See if we get an immediate positive hit
|
||||
__ ld_ptr(klass_RInfo, Rtmp1, FrameMap::O7_oop_opr->as_register());
|
||||
__ cmp(k_RInfo, O7);
|
||||
__ br(Assembler::equal, false, Assembler::pn, done);
|
||||
__ delayed()->nop();
|
||||
// check for immediate negative hit
|
||||
__ cmp(Rtmp1, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes());
|
||||
__ br(Assembler::notEqual, false, Assembler::pn, *stub->entry());
|
||||
__ delayed()->nop();
|
||||
// check for self
|
||||
__ cmp(klass_RInfo, k_RInfo);
|
||||
__ br(Assembler::equal, false, Assembler::pn, done);
|
||||
__ delayed()->nop();
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7, &done, stub->entry(), NULL);
|
||||
|
||||
// assert(sub.is_same(FrameMap::G3_RInfo) && super.is_same(FrameMap::G1_RInfo), "incorrect call setup");
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
assert(klass_RInfo == G3 && k_RInfo == G1, "incorrect call setup");
|
||||
__ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ cmp(G3, 0);
|
||||
@@ -2463,7 +2441,7 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
}
|
||||
|
||||
|
||||
Address flags_addr(mdo, 0, md->byte_offset_of_slot(data, DataLayout::flags_offset()) - mdo_offset_bias);
|
||||
Address flags_addr(mdo, md->byte_offset_of_slot(data, DataLayout::flags_offset()) - mdo_offset_bias);
|
||||
__ ldub(flags_addr, data_val);
|
||||
__ or3(data_val, BitData::null_seen_byte_constant(), data_val);
|
||||
__ stb(data_val, flags_addr);
|
||||
@@ -2493,58 +2471,30 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
__ delayed()->nop();
|
||||
__ bind(done);
|
||||
} else {
|
||||
bool need_slow_path = true;
|
||||
if (k->is_loaded()) {
|
||||
load(klass_RInfo, k->super_check_offset(), Rtmp1, T_OBJECT, NULL);
|
||||
|
||||
if (sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() != k->super_check_offset()) {
|
||||
// See if we get an immediate positive hit
|
||||
__ cmp(Rtmp1, k_RInfo );
|
||||
__ br(Assembler::notEqual, false, Assembler::pn, *stub->entry());
|
||||
__ delayed()->nop();
|
||||
} else {
|
||||
// See if we get an immediate positive hit
|
||||
assert_different_registers(Rtmp1, k_RInfo, klass_RInfo);
|
||||
__ cmp(Rtmp1, k_RInfo );
|
||||
__ br(Assembler::equal, false, Assembler::pn, done);
|
||||
// check for self
|
||||
__ delayed()->cmp(klass_RInfo, k_RInfo);
|
||||
__ br(Assembler::equal, false, Assembler::pn, done);
|
||||
__ delayed()->nop();
|
||||
|
||||
// assert(sub.is_same(FrameMap::G3_RInfo) && super.is_same(FrameMap::G1_RInfo), "incorrect call setup");
|
||||
__ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ cmp(G3, 0);
|
||||
__ br(Assembler::equal, false, Assembler::pn, *stub->entry());
|
||||
__ delayed()->nop();
|
||||
}
|
||||
__ bind(done);
|
||||
if (k->super_check_offset() != sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes())
|
||||
need_slow_path = false;
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, noreg,
|
||||
(need_slow_path ? &done : NULL),
|
||||
stub->entry(), NULL,
|
||||
RegisterOrConstant(k->super_check_offset()));
|
||||
} else {
|
||||
assert_different_registers(Rtmp1, klass_RInfo, k_RInfo);
|
||||
|
||||
load(k_RInfo, sizeof(oopDesc) + Klass::super_check_offset_offset_in_bytes(), Rtmp1, T_INT, NULL);
|
||||
// See if we get an immediate positive hit
|
||||
load(klass_RInfo, Rtmp1, FrameMap::O7_oop_opr, T_OBJECT);
|
||||
__ cmp(k_RInfo, O7);
|
||||
__ br(Assembler::equal, false, Assembler::pn, done);
|
||||
__ delayed()->nop();
|
||||
// check for immediate negative hit
|
||||
__ cmp(Rtmp1, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes());
|
||||
__ br(Assembler::notEqual, false, Assembler::pn, *stub->entry());
|
||||
// check for self
|
||||
__ delayed()->cmp(klass_RInfo, k_RInfo);
|
||||
__ br(Assembler::equal, false, Assembler::pn, done);
|
||||
__ delayed()->nop();
|
||||
|
||||
// assert(sub.is_same(FrameMap::G3_RInfo) && super.is_same(FrameMap::G1_RInfo), "incorrect call setup");
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7,
|
||||
&done, stub->entry(), NULL);
|
||||
}
|
||||
if (need_slow_path) {
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
assert(klass_RInfo == G3 && k_RInfo == G1, "incorrect call setup");
|
||||
__ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ cmp(G3, 0);
|
||||
__ br(Assembler::equal, false, Assembler::pn, *stub->entry());
|
||||
__ delayed()->nop();
|
||||
__ bind(done);
|
||||
}
|
||||
|
||||
__ bind(done);
|
||||
}
|
||||
__ mov(obj, dst);
|
||||
} else if (code == lir_instanceof) {
|
||||
@@ -2582,58 +2532,32 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
__ set(0, dst);
|
||||
__ bind(done);
|
||||
} else {
|
||||
bool need_slow_path = true;
|
||||
if (k->is_loaded()) {
|
||||
assert_different_registers(Rtmp1, klass_RInfo, k_RInfo);
|
||||
load(klass_RInfo, k->super_check_offset(), Rtmp1, T_OBJECT, NULL);
|
||||
|
||||
if (sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() != k->super_check_offset()) {
|
||||
// See if we get an immediate positive hit
|
||||
__ cmp(Rtmp1, k_RInfo );
|
||||
__ br(Assembler::equal, true, Assembler::pt, done);
|
||||
__ delayed()->set(1, dst);
|
||||
__ set(0, dst);
|
||||
__ bind(done);
|
||||
} else {
|
||||
// See if we get an immediate positive hit
|
||||
assert_different_registers(Rtmp1, k_RInfo, klass_RInfo);
|
||||
__ cmp(Rtmp1, k_RInfo );
|
||||
__ br(Assembler::equal, true, Assembler::pt, done);
|
||||
__ delayed()->set(1, dst);
|
||||
// check for self
|
||||
__ cmp(klass_RInfo, k_RInfo);
|
||||
__ br(Assembler::equal, true, Assembler::pt, done);
|
||||
__ delayed()->set(1, dst);
|
||||
|
||||
// assert(sub.is_same(FrameMap::G3_RInfo) && super.is_same(FrameMap::G1_RInfo), "incorrect call setup");
|
||||
__ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ mov(G3, dst);
|
||||
__ bind(done);
|
||||
}
|
||||
if (k->super_check_offset() != sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes())
|
||||
need_slow_path = false;
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, O7, noreg,
|
||||
(need_slow_path ? &done : NULL),
|
||||
(need_slow_path ? &done : NULL), NULL,
|
||||
RegisterOrConstant(k->super_check_offset()),
|
||||
dst);
|
||||
} else {
|
||||
assert(dst != klass_RInfo && dst != k_RInfo, "need 3 registers");
|
||||
|
||||
load(k_RInfo, sizeof(oopDesc) + Klass::super_check_offset_offset_in_bytes(), dst, T_INT, NULL);
|
||||
// See if we get an immediate positive hit
|
||||
load(klass_RInfo, dst, FrameMap::O7_oop_opr, T_OBJECT);
|
||||
__ cmp(k_RInfo, O7);
|
||||
__ br(Assembler::equal, true, Assembler::pt, done);
|
||||
__ delayed()->set(1, dst);
|
||||
// check for immediate negative hit
|
||||
__ cmp(dst, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes());
|
||||
__ br(Assembler::notEqual, true, Assembler::pt, done);
|
||||
__ delayed()->set(0, dst);
|
||||
// check for self
|
||||
__ cmp(klass_RInfo, k_RInfo);
|
||||
__ br(Assembler::equal, true, Assembler::pt, done);
|
||||
__ delayed()->set(1, dst);
|
||||
|
||||
// assert(sub.is_same(FrameMap::G3_RInfo) && super.is_same(FrameMap::G1_RInfo), "incorrect call setup");
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, O7, dst,
|
||||
&done, &done, NULL,
|
||||
RegisterOrConstant(-1),
|
||||
dst);
|
||||
}
|
||||
if (need_slow_path) {
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
assert(klass_RInfo == G3 && k_RInfo == G1, "incorrect call setup");
|
||||
__ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ mov(G3, dst);
|
||||
__ bind(done);
|
||||
}
|
||||
__ bind(done);
|
||||
}
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
@@ -2804,7 +2728,7 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
__ add(mdo, O7, mdo);
|
||||
}
|
||||
|
||||
Address counter_addr(mdo, 0, md->byte_offset_of_slot(data, CounterData::count_offset()) - mdo_offset_bias);
|
||||
Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()) - mdo_offset_bias);
|
||||
__ lduw(counter_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
__ stw(tmp1, counter_addr);
|
||||
@@ -2830,8 +2754,8 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
ciKlass* receiver = vc_data->receiver(i);
|
||||
if (known_klass->equals(receiver)) {
|
||||
Address data_addr(mdo, 0, md->byte_offset_of_slot(data,
|
||||
VirtualCallData::receiver_count_offset(i)) -
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data,
|
||||
VirtualCallData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ lduw(data_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
@@ -2848,11 +2772,11 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
ciKlass* receiver = vc_data->receiver(i);
|
||||
if (receiver == NULL) {
|
||||
Address recv_addr(mdo, 0, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)) -
|
||||
Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
jobject2reg(known_klass->encoding(), tmp1);
|
||||
__ st_ptr(tmp1, recv_addr);
|
||||
Address data_addr(mdo, 0, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ lduw(data_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
@@ -2861,20 +2785,20 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
load(Address(recv, 0, oopDesc::klass_offset_in_bytes()), recv, T_OBJECT);
|
||||
load(Address(recv, oopDesc::klass_offset_in_bytes()), recv, T_OBJECT);
|
||||
Label update_done;
|
||||
uint i;
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
// See if the receiver is receiver[n].
|
||||
Address receiver_addr(mdo, 0, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)) -
|
||||
Address receiver_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ ld_ptr(receiver_addr, tmp1);
|
||||
__ verify_oop(tmp1);
|
||||
__ cmp(recv, tmp1);
|
||||
__ brx(Assembler::notEqual, false, Assembler::pt, next_test);
|
||||
__ delayed()->nop();
|
||||
Address data_addr(mdo, 0, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ lduw(data_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
@@ -2887,7 +2811,7 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
// Didn't find receiver; find next empty slot and fill it in
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
Address recv_addr(mdo, 0, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)) -
|
||||
Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
load(recv_addr, tmp1, T_OBJECT);
|
||||
__ tst(tmp1);
|
||||
@@ -2895,8 +2819,8 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
__ delayed()->nop();
|
||||
__ st_ptr(recv, recv_addr);
|
||||
__ set(DataLayout::counter_increment, tmp1);
|
||||
__ st_ptr(tmp1, Address(mdo, 0, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias));
|
||||
__ st_ptr(tmp1, mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
if (i < (VirtualCallData::row_limit() - 1)) {
|
||||
__ br(Assembler::always, false, Assembler::pt, update_done);
|
||||
__ delayed()->nop();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -29,13 +29,13 @@ void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
|
||||
Label L;
|
||||
const Register temp_reg = G3_scratch;
|
||||
// Note: needs more testing of out-of-line vs. inline slow case
|
||||
Address ic_miss(temp_reg, SharedRuntime::get_ic_miss_stub());
|
||||
verify_oop(receiver);
|
||||
ld_ptr(receiver, oopDesc::klass_offset_in_bytes(), temp_reg);
|
||||
cmp(temp_reg, iCache);
|
||||
brx(Assembler::equal, true, Assembler::pt, L);
|
||||
delayed()->nop();
|
||||
jump_to(ic_miss, 0);
|
||||
AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub());
|
||||
jump_to(ic_miss, temp_reg);
|
||||
delayed()->nop();
|
||||
align(CodeEntryAlignment);
|
||||
bind(L);
|
||||
@@ -84,7 +84,7 @@ void C1_MacroAssembler::lock_object(Register Rmark, Register Roop, Register Rbox
|
||||
|
||||
Label done;
|
||||
|
||||
Address mark_addr(Roop, 0, oopDesc::mark_offset_in_bytes());
|
||||
Address mark_addr(Roop, oopDesc::mark_offset_in_bytes());
|
||||
|
||||
// The following move must be the first instruction of emitted since debug
|
||||
// information may be generated for it.
|
||||
@@ -132,7 +132,7 @@ void C1_MacroAssembler::unlock_object(Register Rmark, Register Roop, Register Rb
|
||||
|
||||
Label done;
|
||||
|
||||
Address mark_addr(Roop, 0, oopDesc::mark_offset_in_bytes());
|
||||
Address mark_addr(Roop, oopDesc::mark_offset_in_bytes());
|
||||
assert(mark_addr.disp() == 0, "cas must take a zero displacement");
|
||||
|
||||
if (UseBiasedLocking) {
|
||||
@@ -370,7 +370,7 @@ void C1_MacroAssembler::allocate_array(
|
||||
|
||||
void C1_MacroAssembler::verify_stack_oop(int stack_offset) {
|
||||
if (!VerifyOops) return;
|
||||
verify_oop_addr(Address(SP, 0, stack_offset + STACK_BIAS));
|
||||
verify_oop_addr(Address(SP, stack_offset + STACK_BIAS));
|
||||
}
|
||||
|
||||
void C1_MacroAssembler::verify_not_null_oop(Register r) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -57,13 +57,13 @@ int StubAssembler::call_RT(Register oop_result1, Register oop_result2, address e
|
||||
|
||||
// check for pending exceptions
|
||||
{ Label L;
|
||||
Address exception_addr(G2_thread, 0, in_bytes(Thread::pending_exception_offset()));
|
||||
Address exception_addr(G2_thread, Thread::pending_exception_offset());
|
||||
ld_ptr(exception_addr, Gtemp);
|
||||
br_null(Gtemp, false, pt, L);
|
||||
delayed()->nop();
|
||||
Address vm_result_addr(G2_thread, 0, in_bytes(JavaThread::vm_result_offset()));
|
||||
Address vm_result_addr(G2_thread, JavaThread::vm_result_offset());
|
||||
st_ptr(G0, vm_result_addr);
|
||||
Address vm_result_addr_2(G2_thread, 0, in_bytes(JavaThread::vm_result_2_offset()));
|
||||
Address vm_result_addr_2(G2_thread, JavaThread::vm_result_2_offset());
|
||||
st_ptr(G0, vm_result_addr_2);
|
||||
|
||||
if (frame_size() == no_frame_size) {
|
||||
@@ -73,8 +73,8 @@ int StubAssembler::call_RT(Register oop_result1, Register oop_result2, address e
|
||||
} else if (_stub_id == Runtime1::forward_exception_id) {
|
||||
should_not_reach_here();
|
||||
} else {
|
||||
Address exc(G4, Runtime1::entry_for(Runtime1::forward_exception_id));
|
||||
jump_to(exc, 0);
|
||||
AddressLiteral exc(Runtime1::entry_for(Runtime1::forward_exception_id));
|
||||
jump_to(exc, G4);
|
||||
delayed()->nop();
|
||||
}
|
||||
bind(L);
|
||||
@@ -85,7 +85,7 @@ int StubAssembler::call_RT(Register oop_result1, Register oop_result2, address e
|
||||
get_vm_result (oop_result1);
|
||||
} else {
|
||||
// be a little paranoid and clear the result
|
||||
Address vm_result_addr(G2_thread, 0, in_bytes(JavaThread::vm_result_offset()));
|
||||
Address vm_result_addr(G2_thread, JavaThread::vm_result_offset());
|
||||
st_ptr(G0, vm_result_addr);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ int StubAssembler::call_RT(Register oop_result1, Register oop_result2, address e
|
||||
get_vm_result_2(oop_result2);
|
||||
} else {
|
||||
// be a little paranoid and clear the result
|
||||
Address vm_result_addr_2(G2_thread, 0, in_bytes(JavaThread::vm_result_2_offset()));
|
||||
Address vm_result_addr_2(G2_thread, JavaThread::vm_result_2_offset());
|
||||
st_ptr(G0, vm_result_addr_2);
|
||||
}
|
||||
|
||||
@@ -479,8 +479,8 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
Register G4_length = G4; // Incoming
|
||||
Register O0_obj = O0; // Outgoing
|
||||
|
||||
Address klass_lh(G5_klass, 0, ((klassOopDesc::header_size() * HeapWordSize)
|
||||
+ Klass::layout_helper_offset_in_bytes()));
|
||||
Address klass_lh(G5_klass, ((klassOopDesc::header_size() * HeapWordSize)
|
||||
+ Klass::layout_helper_offset_in_bytes()));
|
||||
assert(Klass::_lh_header_size_shift % BitsPerByte == 0, "bytewise");
|
||||
assert(Klass::_lh_header_size_mask == 0xFF, "bytewise");
|
||||
// Use this offset to pick out an individual byte of the layout_helper:
|
||||
@@ -714,38 +714,19 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
// sub : G3, argument, destroyed
|
||||
// super: G1, argument, not changed
|
||||
// raddr: O7, blown by call
|
||||
Label loop, miss;
|
||||
Label miss;
|
||||
|
||||
__ save_frame(0); // Blow no registers!
|
||||
|
||||
__ ld_ptr( G3, sizeof(oopDesc) + Klass::secondary_supers_offset_in_bytes(), L3 );
|
||||
__ lduw(L3,arrayOopDesc::length_offset_in_bytes(),L0); // length in l0
|
||||
__ add(L3,arrayOopDesc::base_offset_in_bytes(T_OBJECT),L1); // ptr into array
|
||||
__ clr(L4); // Index
|
||||
// Load a little early; will load 1 off the end of the array.
|
||||
// Ok for now; revisit if we have other uses of this routine.
|
||||
__ ld_ptr(L1,0,L2); // Will load a little early
|
||||
|
||||
// The scan loop
|
||||
__ bind(loop);
|
||||
__ add(L1,wordSize,L1); // Bump by OOP size
|
||||
__ cmp(L4,L0);
|
||||
__ br(Assembler::equal,false,Assembler::pn,miss);
|
||||
__ delayed()->inc(L4); // Bump index
|
||||
__ subcc(L2,G1,L3); // Check for match; zero in L3 for a hit
|
||||
__ brx( Assembler::notEqual, false, Assembler::pt, loop );
|
||||
__ delayed()->ld_ptr(L1,0,L2); // Will load a little early
|
||||
|
||||
// Got a hit; report success; set cache
|
||||
__ st_ptr( G1, G3, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() );
|
||||
__ check_klass_subtype_slow_path(G3, G1, L0, L1, L2, L4, NULL, &miss);
|
||||
|
||||
__ mov(1, G3);
|
||||
__ ret(); // Result in G5 is ok; flags set
|
||||
__ ret(); // Result in G5 is 'true'
|
||||
__ delayed()->restore(); // free copy or add can go here
|
||||
|
||||
__ bind(miss);
|
||||
__ mov(0, G3);
|
||||
__ ret(); // Result in G5 is ok; flags set
|
||||
__ ret(); // Result in G5 is 'false'
|
||||
__ delayed()->restore(); // free copy or add can go here
|
||||
}
|
||||
|
||||
@@ -921,8 +902,8 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
__ srl(addr, CardTableModRefBS::card_shift, addr);
|
||||
#endif
|
||||
|
||||
Address rs(cardtable, (address)byte_map_base);
|
||||
__ load_address(rs); // cardtable := <card table base>
|
||||
AddressLiteral rs(byte_map_base);
|
||||
__ set(rs, cardtable); // cardtable := <card table base>
|
||||
__ ldub(addr, cardtable, tmp); // tmp := [addr + cardtable]
|
||||
|
||||
__ br_on_reg_cond(Assembler::rc_nz, /*annul*/false, Assembler::pt,
|
||||
@@ -1041,8 +1022,8 @@ void Runtime1::generate_handle_exception(StubAssembler* sasm, OopMapSet* oop_map
|
||||
|
||||
__ restore();
|
||||
|
||||
Address exc(G4, Runtime1::entry_for(Runtime1::unwind_exception_id));
|
||||
__ jump_to(exc, 0);
|
||||
AddressLiteral exc(Runtime1::entry_for(Runtime1::unwind_exception_id));
|
||||
__ jump_to(exc, G4);
|
||||
__ delayed()->nop();
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -1017,6 +1017,7 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
|
||||
const int slop_factor = 2*wordSize;
|
||||
|
||||
const int fixed_size = ((sizeof(BytecodeInterpreter) + slop_factor) >> LogBytesPerWord) + // what is the slop factor?
|
||||
//6815692//methodOopDesc::extra_stack_words() + // extra push slots for MH adapters
|
||||
frame::memory_parameter_word_sp_offset + // register save area + param window
|
||||
(native ? frame::interpreter_frame_extra_outgoing_argument_words : 0); // JNI, class
|
||||
|
||||
@@ -1163,6 +1164,9 @@ void CppInterpreterGenerator::generate_compute_interpreter_state(const Register
|
||||
__ st_ptr(O2, XXX_STATE(_stack)); // PREPUSH
|
||||
|
||||
__ lduh(max_stack, O3); // Full size expression stack
|
||||
guarantee(!EnableMethodHandles, "no support yet for java.dyn.MethodHandle"); //6815692
|
||||
//6815692//if (EnableMethodHandles)
|
||||
//6815692// __ inc(O3, methodOopDesc::extra_stack_entries());
|
||||
__ sll(O3, LogBytesPerWord, O3);
|
||||
__ sub(O2, O3, O3);
|
||||
// __ sub(O3, wordSize, O3); // so prepush doesn't look out of bounds
|
||||
@@ -2017,7 +2021,9 @@ static int size_activation_helper(int callee_extra_locals, int max_stack, int mo
|
||||
|
||||
const int fixed_size = sizeof(BytecodeInterpreter)/wordSize + // interpreter state object
|
||||
frame::memory_parameter_word_sp_offset; // register save area + param window
|
||||
const int extra_stack = 0; //6815692//methodOopDesc::extra_stack_entries();
|
||||
return (round_to(max_stack +
|
||||
extra_stack +
|
||||
slop_factor +
|
||||
fixed_size +
|
||||
monitor_size +
|
||||
@@ -2104,7 +2110,8 @@ void BytecodeInterpreter::layout_interpreterState(interpreterState to_fill,
|
||||
// Need +1 here because stack_base points to the word just above the first expr stack entry
|
||||
// and stack_limit is supposed to point to the word just below the last expr stack entry.
|
||||
// See generate_compute_interpreter_state.
|
||||
to_fill->_stack_limit = stack_base - (method->max_stack() + 1);
|
||||
int extra_stack = 0; //6815692//methodOopDesc::extra_stack_entries();
|
||||
to_fill->_stack_limit = stack_base - (method->max_stack() + 1 + extra_stack);
|
||||
to_fill->_monitor_base = (BasicObjectLock*) monitor_base;
|
||||
|
||||
// sparc specific
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2004-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -106,8 +106,7 @@ void CompactingPermGenGen::generate_vtable_methods(void** vtbl_list,
|
||||
__ and3(L0, 255, L4); // Isolate L3 = method offset;.
|
||||
__ sll(L4, LogBytesPerWord, L4);
|
||||
__ ld_ptr(L3, L4, L4); // Get address of correct virtual method
|
||||
Address method(L4, 0);
|
||||
__ jmpl(method, G0); // Jump to correct method.
|
||||
__ jmpl(L4, 0, G0); // Jump to correct method.
|
||||
__ delayed()->restore(); // Restore registers.
|
||||
|
||||
__ flush();
|
||||
|
||||
@@ -46,6 +46,7 @@ define_pd_global(uintx, TLABSize, 0);
|
||||
define_pd_global(uintx, NewSize, ScaleForWordSize((2048 * K) + (2 * (64 * K))));
|
||||
define_pd_global(intx, SurvivorRatio, 8);
|
||||
define_pd_global(intx, InlineFrequencyCount, 50); // we can use more inlining on the SPARC
|
||||
define_pd_global(intx, InlineSmallCode, 1500);
|
||||
#ifdef _LP64
|
||||
// Stack slots are 2X larger in LP64 than in the 32 bit VM.
|
||||
define_pd_global(intx, ThreadStackSize, 1024);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -46,14 +46,13 @@ void InlineCacheBuffer::assemble_ic_buffer_code(address code_begin, oop cached_o
|
||||
// (1) the oop is old (i.e., doesn't matter for scavenges)
|
||||
// (2) these ICStubs are removed *before* a GC happens, so the roots disappear
|
||||
assert(cached_oop == NULL || cached_oop->is_perm(), "must be old oop");
|
||||
Address cached_oop_addr(G5_inline_cache_reg, address(cached_oop));
|
||||
// Force the sethi to generate the fixed sequence so next_instruction_address works
|
||||
masm->sethi(cached_oop_addr, true /* ForceRelocatable */ );
|
||||
masm->add(cached_oop_addr, G5_inline_cache_reg);
|
||||
AddressLiteral cached_oop_addrlit(cached_oop, relocInfo::none);
|
||||
// Force the set to generate the fixed sequence so next_instruction_address works
|
||||
masm->patchable_set(cached_oop_addrlit, G5_inline_cache_reg);
|
||||
assert(G3_scratch != G5_method, "Do not clobber the method oop in the transition stub");
|
||||
assert(G3_scratch != G5_inline_cache_reg, "Do not clobber the inline cache register in the transition stub");
|
||||
Address entry(G3_scratch, entry_point);
|
||||
masm->JUMP(entry, 0);
|
||||
AddressLiteral entry(entry_point);
|
||||
masm->JUMP(entry, G3_scratch, 0);
|
||||
masm->delayed()->nop();
|
||||
masm->flush();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
// This file specializes the assember with interpreter-specific macros
|
||||
|
||||
const Address InterpreterMacroAssembler::l_tmp( FP, 0, (frame::interpreter_frame_l_scratch_fp_offset * wordSize ) + STACK_BIAS);
|
||||
const Address InterpreterMacroAssembler::d_tmp( FP, 0, (frame::interpreter_frame_d_scratch_fp_offset * wordSize) + STACK_BIAS);
|
||||
const Address InterpreterMacroAssembler::l_tmp(FP, (frame::interpreter_frame_l_scratch_fp_offset * wordSize) + STACK_BIAS);
|
||||
const Address InterpreterMacroAssembler::d_tmp(FP, (frame::interpreter_frame_d_scratch_fp_offset * wordSize) + STACK_BIAS);
|
||||
|
||||
#else // CC_INTERP
|
||||
#ifndef STATE
|
||||
@@ -78,14 +78,12 @@ void InterpreterMacroAssembler::dispatch_prolog(TosState state, int bcp_incr) {
|
||||
sll(Lbyte_code, LogBytesPerWord, Lbyte_code); // multiply by wordSize
|
||||
ld_ptr(IdispatchTables, Lbyte_code, IdispatchAddress);// get entry addr
|
||||
#else
|
||||
ldub( Lbcp, bcp_incr, Lbyte_code); // load next bytecode
|
||||
ldub( Lbcp, bcp_incr, Lbyte_code); // load next bytecode
|
||||
// dispatch table to use
|
||||
Address tbl(G3_scratch, (address)Interpreter::dispatch_table(state));
|
||||
|
||||
sethi(tbl);
|
||||
sll(Lbyte_code, LogBytesPerWord, Lbyte_code); // multiply by wordSize
|
||||
add(tbl, tbl.base(), 0);
|
||||
ld_ptr( G3_scratch, Lbyte_code, IdispatchAddress); // get entry addr
|
||||
AddressLiteral tbl(Interpreter::dispatch_table(state));
|
||||
sll(Lbyte_code, LogBytesPerWord, Lbyte_code); // multiply by wordSize
|
||||
set(tbl, G3_scratch); // compute addr of table
|
||||
ld_ptr(G3_scratch, Lbyte_code, IdispatchAddress); // get entry addr
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -165,8 +163,7 @@ void InterpreterMacroAssembler::check_and_handle_popframe(Register scratch_reg)
|
||||
Label L;
|
||||
|
||||
// Check the "pending popframe condition" flag in the current thread
|
||||
Address popframe_condition_addr(G2_thread, 0, in_bytes(JavaThread::popframe_condition_offset()));
|
||||
ld(popframe_condition_addr, scratch_reg);
|
||||
ld(G2_thread, JavaThread::popframe_condition_offset(), scratch_reg);
|
||||
|
||||
// Initiate popframe handling only if it is not already being processed. If the flag
|
||||
// has the popframe_processing bit set, it means that this code is called *during* popframe
|
||||
@@ -192,11 +189,10 @@ void InterpreterMacroAssembler::check_and_handle_popframe(Register scratch_reg)
|
||||
|
||||
void InterpreterMacroAssembler::load_earlyret_value(TosState state) {
|
||||
Register thr_state = G4_scratch;
|
||||
ld_ptr(Address(G2_thread, 0, in_bytes(JavaThread::jvmti_thread_state_offset())),
|
||||
thr_state);
|
||||
const Address tos_addr(thr_state, 0, in_bytes(JvmtiThreadState::earlyret_tos_offset()));
|
||||
const Address oop_addr(thr_state, 0, in_bytes(JvmtiThreadState::earlyret_oop_offset()));
|
||||
const Address val_addr(thr_state, 0, in_bytes(JvmtiThreadState::earlyret_value_offset()));
|
||||
ld_ptr(G2_thread, JavaThread::jvmti_thread_state_offset(), thr_state);
|
||||
const Address tos_addr(thr_state, JvmtiThreadState::earlyret_tos_offset());
|
||||
const Address oop_addr(thr_state, JvmtiThreadState::earlyret_oop_offset());
|
||||
const Address val_addr(thr_state, JvmtiThreadState::earlyret_value_offset());
|
||||
switch (state) {
|
||||
case ltos: ld_long(val_addr, Otos_l); break;
|
||||
case atos: ld_ptr(oop_addr, Otos_l);
|
||||
@@ -222,8 +218,7 @@ void InterpreterMacroAssembler::check_and_handle_earlyret(Register scratch_reg)
|
||||
if (JvmtiExport::can_force_early_return()) {
|
||||
Label L;
|
||||
Register thr_state = G3_scratch;
|
||||
ld_ptr(Address(G2_thread, 0, in_bytes(JavaThread::jvmti_thread_state_offset())),
|
||||
thr_state);
|
||||
ld_ptr(G2_thread, JavaThread::jvmti_thread_state_offset(), thr_state);
|
||||
tst(thr_state);
|
||||
br(zero, false, pt, L); // if (thread->jvmti_thread_state() == NULL) exit;
|
||||
delayed()->nop();
|
||||
@@ -231,16 +226,14 @@ void InterpreterMacroAssembler::check_and_handle_earlyret(Register scratch_reg)
|
||||
// Initiate earlyret handling only if it is not already being processed.
|
||||
// If the flag has the earlyret_processing bit set, it means that this code
|
||||
// is called *during* earlyret handling - we don't want to reenter.
|
||||
ld(Address(thr_state, 0, in_bytes(JvmtiThreadState::earlyret_state_offset())),
|
||||
G4_scratch);
|
||||
ld(thr_state, JvmtiThreadState::earlyret_state_offset(), G4_scratch);
|
||||
cmp(G4_scratch, JvmtiThreadState::earlyret_pending);
|
||||
br(Assembler::notEqual, false, pt, L);
|
||||
delayed()->nop();
|
||||
|
||||
// Call Interpreter::remove_activation_early_entry() to get the address of the
|
||||
// same-named entrypoint in the generated interpreter code
|
||||
Address tos_addr(thr_state, 0, in_bytes(JvmtiThreadState::earlyret_tos_offset()));
|
||||
ld(tos_addr, Otos_l1);
|
||||
ld(thr_state, JvmtiThreadState::earlyret_tos_offset(), Otos_l1);
|
||||
call_VM_leaf(noreg, CAST_FROM_FN_PTR(address, Interpreter::remove_activation_early_entry), Otos_l1);
|
||||
|
||||
// Jump to Interpreter::_remove_activation_early_entry
|
||||
@@ -294,10 +287,9 @@ void InterpreterMacroAssembler::dispatch_Lbyte_code(TosState state, address* tab
|
||||
} else {
|
||||
#endif
|
||||
// dispatch table to use
|
||||
Address tbl(G3_scratch, (address)table);
|
||||
|
||||
AddressLiteral tbl(table);
|
||||
sll(Lbyte_code, LogBytesPerWord, Lbyte_code); // multiply by wordSize
|
||||
load_address(tbl); // compute addr of table
|
||||
set(tbl, G3_scratch); // compute addr of table
|
||||
ld_ptr(G3_scratch, Lbyte_code, G3_scratch); // get entry addr
|
||||
#ifdef FAST_DISPATCH
|
||||
}
|
||||
@@ -601,26 +593,17 @@ void InterpreterMacroAssembler::empty_expression_stack() {
|
||||
|
||||
// Reset SP by subtracting more space from Lesp.
|
||||
Label done;
|
||||
|
||||
const Address max_stack (Lmethod, 0, in_bytes(methodOopDesc::max_stack_offset()));
|
||||
const Address access_flags(Lmethod, 0, in_bytes(methodOopDesc::access_flags_offset()));
|
||||
|
||||
verify_oop(Lmethod);
|
||||
|
||||
|
||||
assert( G4_scratch != Gframe_size,
|
||||
"Only you can prevent register aliasing!");
|
||||
assert(G4_scratch != Gframe_size, "Only you can prevent register aliasing!");
|
||||
|
||||
// A native does not need to do this, since its callee does not change SP.
|
||||
ld(access_flags, Gframe_size);
|
||||
ld(Lmethod, methodOopDesc::access_flags_offset(), Gframe_size); // Load access flags.
|
||||
btst(JVM_ACC_NATIVE, Gframe_size);
|
||||
br(Assembler::notZero, false, Assembler::pt, done);
|
||||
delayed()->nop();
|
||||
|
||||
//
|
||||
// Compute max expression stack+register save area
|
||||
//
|
||||
lduh( max_stack, Gframe_size );
|
||||
lduh(Lmethod, in_bytes(methodOopDesc::max_stack_offset()), Gframe_size); // Load max stack.
|
||||
if (TaggedStackInterpreter) sll ( Gframe_size, 1, Gframe_size); // max_stack * 2 for TAGS
|
||||
add( Gframe_size, frame::memory_parameter_word_sp_offset, Gframe_size );
|
||||
|
||||
@@ -721,8 +704,7 @@ void InterpreterMacroAssembler::call_from_interpreter(Register target, Register
|
||||
verify_thread();
|
||||
Label skip_compiled_code;
|
||||
|
||||
const Address interp_only (G2_thread, 0, in_bytes(JavaThread::interp_only_mode_offset()));
|
||||
|
||||
const Address interp_only(G2_thread, JavaThread::interp_only_mode_offset());
|
||||
ld(interp_only, scratch);
|
||||
tst(scratch);
|
||||
br(Assembler::notZero, true, Assembler::pn, skip_compiled_code);
|
||||
@@ -866,65 +848,18 @@ void InterpreterMacroAssembler::gen_subtype_check(Register Rsub_klass,
|
||||
Register Rtmp2,
|
||||
Register Rtmp3,
|
||||
Label &ok_is_subtype ) {
|
||||
Label not_subtype, loop;
|
||||
Label not_subtype;
|
||||
|
||||
// Profile the not-null value's klass.
|
||||
profile_typecheck(Rsub_klass, Rtmp1);
|
||||
|
||||
// Load the super-klass's check offset into Rtmp1
|
||||
ld( Rsuper_klass, sizeof(oopDesc) + Klass::super_check_offset_offset_in_bytes(), Rtmp1 );
|
||||
// Load from the sub-klass's super-class display list, or a 1-word cache of
|
||||
// the secondary superclass list, or a failing value with a sentinel offset
|
||||
// if the super-klass is an interface or exceptionally deep in the Java
|
||||
// hierarchy and we have to scan the secondary superclass list the hard way.
|
||||
ld_ptr( Rsub_klass, Rtmp1, Rtmp2 );
|
||||
// See if we get an immediate positive hit
|
||||
cmp( Rtmp2, Rsuper_klass );
|
||||
brx( Assembler::equal, false, Assembler::pt, ok_is_subtype );
|
||||
// In the delay slot, check for immediate negative hit
|
||||
delayed()->cmp( Rtmp1, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() );
|
||||
br( Assembler::notEqual, false, Assembler::pt, not_subtype );
|
||||
// In the delay slot, check for self
|
||||
delayed()->cmp( Rsub_klass, Rsuper_klass );
|
||||
brx( Assembler::equal, false, Assembler::pt, ok_is_subtype );
|
||||
check_klass_subtype_fast_path(Rsub_klass, Rsuper_klass,
|
||||
Rtmp1, Rtmp2,
|
||||
&ok_is_subtype, ¬_subtype, NULL);
|
||||
|
||||
// Now do a linear scan of the secondary super-klass chain.
|
||||
delayed()->ld_ptr( Rsub_klass, sizeof(oopDesc) + Klass::secondary_supers_offset_in_bytes(), Rtmp2 );
|
||||
|
||||
// compress superclass
|
||||
if (UseCompressedOops) encode_heap_oop(Rsuper_klass);
|
||||
|
||||
// Rtmp2 holds the objArrayOop of secondary supers.
|
||||
ld( Rtmp2, arrayOopDesc::length_offset_in_bytes(), Rtmp1 );// Load the array length
|
||||
// Check for empty secondary super list
|
||||
tst(Rtmp1);
|
||||
|
||||
// Top of search loop
|
||||
bind( loop );
|
||||
br( Assembler::equal, false, Assembler::pn, not_subtype );
|
||||
delayed()->nop();
|
||||
|
||||
// load next super to check
|
||||
if (UseCompressedOops) {
|
||||
lduw( Rtmp2, arrayOopDesc::base_offset_in_bytes(T_OBJECT), Rtmp3);
|
||||
// Bump array pointer forward one oop
|
||||
add( Rtmp2, 4, Rtmp2 );
|
||||
} else {
|
||||
ld_ptr( Rtmp2, arrayOopDesc::base_offset_in_bytes(T_OBJECT), Rtmp3);
|
||||
// Bump array pointer forward one oop
|
||||
add( Rtmp2, wordSize, Rtmp2);
|
||||
}
|
||||
// Look for Rsuper_klass on Rsub_klass's secondary super-class-overflow list
|
||||
cmp( Rtmp3, Rsuper_klass );
|
||||
// A miss means we are NOT a subtype and need to keep looping
|
||||
brx( Assembler::notEqual, false, Assembler::pt, loop );
|
||||
delayed()->deccc( Rtmp1 ); // dec trip counter in delay slot
|
||||
// Falling out the bottom means we found a hit; we ARE a subtype
|
||||
if (UseCompressedOops) decode_heap_oop(Rsuper_klass);
|
||||
br( Assembler::always, false, Assembler::pt, ok_is_subtype );
|
||||
// Update the cache
|
||||
delayed()->st_ptr( Rsuper_klass, Rsub_klass,
|
||||
sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() );
|
||||
check_klass_subtype_slow_path(Rsub_klass, Rsuper_klass,
|
||||
Rtmp1, Rtmp2, Rtmp3, /*hack:*/ noreg,
|
||||
&ok_is_subtype, NULL);
|
||||
|
||||
bind(not_subtype);
|
||||
profile_typecheck_failed(Rtmp1);
|
||||
@@ -963,8 +898,8 @@ void InterpreterMacroAssembler::throw_if_not_2( address throw_entry_point,
|
||||
Register Rscratch,
|
||||
Label& ok ) {
|
||||
assert(throw_entry_point != NULL, "entry point must be generated by now");
|
||||
Address dest(Rscratch, throw_entry_point);
|
||||
jump_to(dest);
|
||||
AddressLiteral dest(throw_entry_point);
|
||||
jump_to(dest, Rscratch);
|
||||
delayed()->nop();
|
||||
bind(ok);
|
||||
}
|
||||
@@ -1082,18 +1017,18 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
|
||||
Label unlocked, unlock, no_unlock;
|
||||
|
||||
// get the value of _do_not_unlock_if_synchronized into G1_scratch
|
||||
const Address do_not_unlock_if_synchronized(G2_thread, 0,
|
||||
in_bytes(JavaThread::do_not_unlock_if_synchronized_offset()));
|
||||
const Address do_not_unlock_if_synchronized(G2_thread,
|
||||
JavaThread::do_not_unlock_if_synchronized_offset());
|
||||
ldbool(do_not_unlock_if_synchronized, G1_scratch);
|
||||
stbool(G0, do_not_unlock_if_synchronized); // reset the flag
|
||||
|
||||
// check if synchronized method
|
||||
const Address access_flags(Lmethod, 0, in_bytes(methodOopDesc::access_flags_offset()));
|
||||
const Address access_flags(Lmethod, methodOopDesc::access_flags_offset());
|
||||
interp_verify_oop(Otos_i, state, __FILE__, __LINE__);
|
||||
push(state); // save tos
|
||||
ld(access_flags, G3_scratch);
|
||||
ld(access_flags, G3_scratch); // Load access flags.
|
||||
btst(JVM_ACC_SYNCHRONIZED, G3_scratch);
|
||||
br( zero, false, pt, unlocked);
|
||||
br(zero, false, pt, unlocked);
|
||||
delayed()->nop();
|
||||
|
||||
// Don't unlock anything if the _do_not_unlock_if_synchronized flag
|
||||
@@ -1283,8 +1218,8 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg, Register Object)
|
||||
Register obj_reg = Object;
|
||||
Register mark_reg = G4_scratch;
|
||||
Register temp_reg = G1_scratch;
|
||||
Address lock_addr = Address(lock_reg, 0, BasicObjectLock::lock_offset_in_bytes());
|
||||
Address mark_addr = Address(obj_reg, 0, oopDesc::mark_offset_in_bytes());
|
||||
Address lock_addr(lock_reg, BasicObjectLock::lock_offset_in_bytes());
|
||||
Address mark_addr(obj_reg, oopDesc::mark_offset_in_bytes());
|
||||
Label done;
|
||||
|
||||
Label slow_case;
|
||||
@@ -1362,9 +1297,8 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) {
|
||||
Register obj_reg = G3_scratch;
|
||||
Register mark_reg = G4_scratch;
|
||||
Register displaced_header_reg = G1_scratch;
|
||||
Address lock_addr = Address(lock_reg, 0, BasicObjectLock::lock_offset_in_bytes());
|
||||
Address lockobj_addr = Address(lock_reg, 0, BasicObjectLock::obj_offset_in_bytes());
|
||||
Address mark_addr = Address(obj_reg, 0, oopDesc::mark_offset_in_bytes());
|
||||
Address lockobj_addr(lock_reg, BasicObjectLock::obj_offset_in_bytes());
|
||||
Address mark_addr(obj_reg, oopDesc::mark_offset_in_bytes());
|
||||
Label done;
|
||||
|
||||
if (UseBiasedLocking) {
|
||||
@@ -1375,7 +1309,8 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) {
|
||||
}
|
||||
|
||||
// Test first if we are in the fast recursive case
|
||||
ld_ptr(lock_addr, displaced_header_reg, BasicLock::displaced_header_offset_in_bytes());
|
||||
Address lock_addr(lock_reg, BasicObjectLock::lock_offset_in_bytes() + BasicLock::displaced_header_offset_in_bytes());
|
||||
ld_ptr(lock_addr, displaced_header_reg);
|
||||
br_null(displaced_header_reg, true, Assembler::pn, done);
|
||||
delayed()->st_ptr(G0, lockobj_addr); // free entry
|
||||
|
||||
@@ -1431,7 +1366,7 @@ void InterpreterMacroAssembler::set_method_data_pointer_for_bcp() {
|
||||
Label zero_continue;
|
||||
|
||||
// Test MDO to avoid the call if it is NULL.
|
||||
ld_ptr(Lmethod, in_bytes(methodOopDesc::method_data_offset()), ImethodDataPtr);
|
||||
ld_ptr(Lmethod, methodOopDesc::method_data_offset(), ImethodDataPtr);
|
||||
test_method_data_pointer(zero_continue);
|
||||
call_VM_leaf(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::bcp_to_di), Lmethod, Lbcp);
|
||||
set_method_data_pointer_offset(O0);
|
||||
@@ -1460,7 +1395,7 @@ void InterpreterMacroAssembler::verify_method_data_pointer() {
|
||||
// If the mdp is valid, it will point to a DataLayout header which is
|
||||
// consistent with the bcp. The converse is highly probable also.
|
||||
lduh(ImethodDataPtr, in_bytes(DataLayout::bci_offset()), G3_scratch);
|
||||
ld_ptr(Address(Lmethod, 0, in_bytes(methodOopDesc::const_offset())), O5);
|
||||
ld_ptr(Lmethod, methodOopDesc::const_offset(), O5);
|
||||
add(G3_scratch, in_bytes(constMethodOopDesc::codes_offset()), G3_scratch);
|
||||
add(G3_scratch, O5, G3_scratch);
|
||||
cmp(Lbcp, G3_scratch);
|
||||
@@ -1471,7 +1406,7 @@ void InterpreterMacroAssembler::verify_method_data_pointer() {
|
||||
// %%% should use call_VM_leaf here?
|
||||
//call_VM_leaf(noreg, ..., Lmethod, Lbcp, ImethodDataPtr);
|
||||
save_frame_and_mov(sizeof(jdouble) / wordSize, Lmethod, O0, Lbcp, O1);
|
||||
Address d_save(FP, 0, -sizeof(jdouble) + STACK_BIAS);
|
||||
Address d_save(FP, -sizeof(jdouble) + STACK_BIAS);
|
||||
stf(FloatRegisterImpl::D, Ftos_d, d_save);
|
||||
mov(temp_reg->after_save(), O2);
|
||||
save_thread(L7_thread_cache);
|
||||
@@ -1503,14 +1438,14 @@ void InterpreterMacroAssembler::test_invocation_counter_for_mdp(Register invocat
|
||||
#endif
|
||||
|
||||
// Test to see if we should create a method data oop
|
||||
Address profile_limit(Rtmp, (address)&InvocationCounter::InterpreterProfileLimit);
|
||||
AddressLiteral profile_limit((address) &InvocationCounter::InterpreterProfileLimit);
|
||||
#ifdef _LP64
|
||||
delayed()->nop();
|
||||
sethi(profile_limit);
|
||||
sethi(profile_limit, Rtmp);
|
||||
#else
|
||||
delayed()->sethi(profile_limit);
|
||||
delayed()->sethi(profile_limit, Rtmp);
|
||||
#endif
|
||||
ld(profile_limit, Rtmp);
|
||||
ld(Rtmp, profile_limit.low10(), Rtmp);
|
||||
cmp(invocation_count, Rtmp);
|
||||
br(Assembler::lessUnsigned, false, Assembler::pn, profile_continue);
|
||||
delayed()->nop();
|
||||
@@ -1568,7 +1503,7 @@ void InterpreterMacroAssembler::increment_mdp_data_at(int constant,
|
||||
Register bumped_count,
|
||||
bool decrement) {
|
||||
// Locate the counter at a fixed offset from the mdp:
|
||||
Address counter(ImethodDataPtr, 0, constant);
|
||||
Address counter(ImethodDataPtr, constant);
|
||||
increment_mdp_data_at(counter, bumped_count, decrement);
|
||||
}
|
||||
|
||||
@@ -1582,7 +1517,7 @@ void InterpreterMacroAssembler::increment_mdp_data_at(Register reg,
|
||||
bool decrement) {
|
||||
// Add the constant to reg to get the offset.
|
||||
add(ImethodDataPtr, reg, scratch2);
|
||||
Address counter(scratch2, 0, constant);
|
||||
Address counter(scratch2, constant);
|
||||
increment_mdp_data_at(counter, bumped_count, decrement);
|
||||
}
|
||||
|
||||
@@ -2248,7 +2183,7 @@ int InterpreterMacroAssembler::top_most_monitor_byte_offset() {
|
||||
|
||||
|
||||
Address InterpreterMacroAssembler::top_most_monitor() {
|
||||
return Address(FP, 0, top_most_monitor_byte_offset());
|
||||
return Address(FP, top_most_monitor_byte_offset());
|
||||
}
|
||||
|
||||
|
||||
@@ -2261,15 +2196,15 @@ void InterpreterMacroAssembler::compute_stack_base( Register Rdest ) {
|
||||
void InterpreterMacroAssembler::increment_invocation_counter( Register Rtmp, Register Rtmp2 ) {
|
||||
assert(UseCompiler, "incrementing must be useful");
|
||||
#ifdef CC_INTERP
|
||||
Address inv_counter(G5_method, 0, in_bytes(methodOopDesc::invocation_counter_offset()
|
||||
+ InvocationCounter::counter_offset()));
|
||||
Address be_counter(G5_method, 0, in_bytes(methodOopDesc::backedge_counter_offset()
|
||||
+ InvocationCounter::counter_offset()));
|
||||
Address inv_counter(G5_method, methodOopDesc::invocation_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
Address be_counter (G5_method, methodOopDesc::backedge_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
#else
|
||||
Address inv_counter(Lmethod, 0, in_bytes(methodOopDesc::invocation_counter_offset()
|
||||
+ InvocationCounter::counter_offset()));
|
||||
Address be_counter(Lmethod, 0, in_bytes(methodOopDesc::backedge_counter_offset()
|
||||
+ InvocationCounter::counter_offset()));
|
||||
Address inv_counter(Lmethod, methodOopDesc::invocation_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
Address be_counter (Lmethod, methodOopDesc::backedge_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
#endif /* CC_INTERP */
|
||||
int delta = InvocationCounter::count_increment;
|
||||
|
||||
@@ -2297,15 +2232,15 @@ void InterpreterMacroAssembler::increment_invocation_counter( Register Rtmp, Reg
|
||||
void InterpreterMacroAssembler::increment_backedge_counter( Register Rtmp, Register Rtmp2 ) {
|
||||
assert(UseCompiler, "incrementing must be useful");
|
||||
#ifdef CC_INTERP
|
||||
Address be_counter(G5_method, 0, in_bytes(methodOopDesc::backedge_counter_offset()
|
||||
+ InvocationCounter::counter_offset()));
|
||||
Address inv_counter(G5_method, 0, in_bytes(methodOopDesc::invocation_counter_offset()
|
||||
+ InvocationCounter::counter_offset()));
|
||||
Address be_counter (G5_method, methodOopDesc::backedge_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
Address inv_counter(G5_method, methodOopDesc::invocation_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
#else
|
||||
Address be_counter(Lmethod, 0, in_bytes(methodOopDesc::backedge_counter_offset()
|
||||
+ InvocationCounter::counter_offset()));
|
||||
Address inv_counter(Lmethod, 0, in_bytes(methodOopDesc::invocation_counter_offset()
|
||||
+ InvocationCounter::counter_offset()));
|
||||
Address be_counter (Lmethod, methodOopDesc::backedge_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
Address inv_counter(Lmethod, methodOopDesc::invocation_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
#endif /* CC_INTERP */
|
||||
int delta = InvocationCounter::count_increment;
|
||||
// Load each counter in a register
|
||||
@@ -2336,7 +2271,7 @@ void InterpreterMacroAssembler::test_backedge_count_for_osr( Register backedge_c
|
||||
assert_different_registers(backedge_count, Rtmp, branch_bcp);
|
||||
assert(UseOnStackReplacement,"Must UseOnStackReplacement to test_backedge_count_for_osr");
|
||||
|
||||
Address limit(Rtmp, address(&InvocationCounter::InterpreterBackwardBranchLimit));
|
||||
AddressLiteral limit(&InvocationCounter::InterpreterBackwardBranchLimit);
|
||||
load_contents(limit, Rtmp);
|
||||
cmp(backedge_count, Rtmp);
|
||||
br(Assembler::lessUnsigned, false, Assembler::pt, did_not_overflow);
|
||||
@@ -2482,9 +2417,7 @@ void InterpreterMacroAssembler::notify_method_entry() {
|
||||
if (JvmtiExport::can_post_interpreter_events()) {
|
||||
Label L;
|
||||
Register temp_reg = O5;
|
||||
|
||||
const Address interp_only (G2_thread, 0, in_bytes(JavaThread::interp_only_mode_offset()));
|
||||
|
||||
const Address interp_only(G2_thread, JavaThread::interp_only_mode_offset());
|
||||
ld(interp_only, temp_reg);
|
||||
tst(temp_reg);
|
||||
br(zero, false, pt, L);
|
||||
@@ -2536,9 +2469,7 @@ void InterpreterMacroAssembler::notify_method_exit(bool is_native_method,
|
||||
if (mode == NotifyJVMTI && JvmtiExport::can_post_interpreter_events()) {
|
||||
Label L;
|
||||
Register temp_reg = O5;
|
||||
|
||||
const Address interp_only (G2_thread, 0, in_bytes(JavaThread::interp_only_mode_offset()));
|
||||
|
||||
const Address interp_only(G2_thread, JavaThread::interp_only_mode_offset());
|
||||
ld(interp_only, temp_reg);
|
||||
tst(temp_reg);
|
||||
br(zero, false, pt, L);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -29,6 +29,7 @@
|
||||
address generate_normal_entry(bool synchronized);
|
||||
address generate_native_entry(bool synchronized);
|
||||
address generate_abstract_entry(void);
|
||||
address generate_method_handle_entry(void);
|
||||
address generate_math_entry(AbstractInterpreter::MethodKind kind);
|
||||
address generate_empty_entry(void);
|
||||
address generate_accessor_entry(void);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -105,7 +105,7 @@ void InterpreterRuntime::SignatureHandlerGenerator::pass_object() {
|
||||
// the handle for a receiver will never be null
|
||||
bool do_NULL_check = offset() != 0 || is_static();
|
||||
|
||||
Address h_arg = Address(Llocals, 0, Interpreter::local_offset_in_bytes(offset()));
|
||||
Address h_arg = Address(Llocals, Interpreter::local_offset_in_bytes(offset()));
|
||||
__ ld_ptr(h_arg, Rtmp1);
|
||||
#ifdef ASSERT
|
||||
if (TaggedStackInterpreter) {
|
||||
@@ -120,14 +120,14 @@ void InterpreterRuntime::SignatureHandlerGenerator::pass_object() {
|
||||
}
|
||||
#endif // ASSERT
|
||||
if (!do_NULL_check) {
|
||||
__ add(h_arg, Rtmp2);
|
||||
__ add(h_arg.base(), h_arg.disp(), Rtmp2);
|
||||
} else {
|
||||
if (Rtmp1 == Rtmp2)
|
||||
__ tst(Rtmp1);
|
||||
else __ addcc(G0, Rtmp1, Rtmp2); // optimize mov/test pair
|
||||
Label L;
|
||||
__ brx(Assembler::notZero, true, Assembler::pt, L);
|
||||
__ delayed()->add(h_arg, Rtmp2);
|
||||
__ delayed()->add(h_arg.base(), h_arg.disp(), Rtmp2);
|
||||
__ bind(L);
|
||||
}
|
||||
__ store_ptr_argument(Rtmp2, jni_arg); // this is often a no-op
|
||||
@@ -140,10 +140,10 @@ void InterpreterRuntime::SignatureHandlerGenerator::generate(uint64_t fingerprin
|
||||
iterate(fingerprint);
|
||||
|
||||
// return result handler
|
||||
Address result_handler(Lscratch, Interpreter::result_handler(method()->result_type()));
|
||||
__ sethi(result_handler);
|
||||
AddressLiteral result_handler(Interpreter::result_handler(method()->result_type()));
|
||||
__ sethi(result_handler, Lscratch);
|
||||
__ retl();
|
||||
__ delayed()->add(result_handler, result_handler.base());
|
||||
__ delayed()->add(Lscratch, result_handler.low10(), Lscratch);
|
||||
|
||||
__ flush();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -235,6 +235,19 @@ address InterpreterGenerator::generate_abstract_entry(void) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Method handle invoker
|
||||
// Dispatch a method of the form java.dyn.MethodHandles::invoke(...)
|
||||
address InterpreterGenerator::generate_method_handle_entry(void) {
|
||||
if (!EnableMethodHandles) {
|
||||
return generate_abstract_entry();
|
||||
}
|
||||
return generate_abstract_entry(); //6815692//
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Entry points & stack frame layout
|
||||
//
|
||||
@@ -364,6 +377,7 @@ address AbstractInterpreterGenerator::generate_method_entry(AbstractInterpreter:
|
||||
case Interpreter::empty : entry_point = ((InterpreterGenerator*)this)->generate_empty_entry(); break;
|
||||
case Interpreter::accessor : entry_point = ((InterpreterGenerator*)this)->generate_accessor_entry(); break;
|
||||
case Interpreter::abstract : entry_point = ((InterpreterGenerator*)this)->generate_abstract_entry(); break;
|
||||
case Interpreter::method_handle : entry_point = ((InterpreterGenerator*)this)->generate_method_handle_entry(); break;
|
||||
case Interpreter::java_lang_math_sin : break;
|
||||
case Interpreter::java_lang_math_cos : break;
|
||||
case Interpreter::java_lang_math_tan : break;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2004-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -57,10 +57,10 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
|
||||
Label label1, label2;
|
||||
|
||||
address cnt_addr = SafepointSynchronize::safepoint_counter_addr();
|
||||
Address ca(O3, cnt_addr);
|
||||
__ sethi (ca);
|
||||
__ ld (ca, G4);
|
||||
AddressLiteral cnt_addrlit(SafepointSynchronize::safepoint_counter_addr());
|
||||
__ sethi (cnt_addrlit, O3);
|
||||
Address cnt_addr(O3, cnt_addrlit.low10());
|
||||
__ ld (cnt_addr, G4);
|
||||
__ andcc (G4, 1, G0);
|
||||
__ br (Assembler::notZero, false, Assembler::pn, label1);
|
||||
__ delayed()->srl (O2, 2, O4);
|
||||
@@ -77,7 +77,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
|
||||
__ ld (ca, O5);
|
||||
__ ld (cnt_addr, O5);
|
||||
__ cmp (O5, G4);
|
||||
__ br (Assembler::notEqual, false, Assembler::pn, label2);
|
||||
__ delayed()->mov (O7, G1);
|
||||
@@ -136,10 +136,10 @@ address JNI_FastGetField::generate_fast_get_long_field() {
|
||||
|
||||
Label label1, label2;
|
||||
|
||||
address cnt_addr = SafepointSynchronize::safepoint_counter_addr();
|
||||
Address ca(G3, cnt_addr);
|
||||
__ sethi (ca);
|
||||
__ ld (ca, G4);
|
||||
AddressLiteral cnt_addrlit(SafepointSynchronize::safepoint_counter_addr());
|
||||
__ sethi (cnt_addrlit, G3);
|
||||
Address cnt_addr(G3, cnt_addrlit.low10());
|
||||
__ ld (cnt_addr, G4);
|
||||
__ andcc (G4, 1, G0);
|
||||
__ br (Assembler::notZero, false, Assembler::pn, label1);
|
||||
__ delayed()->srl (O2, 2, O4);
|
||||
@@ -159,7 +159,7 @@ address JNI_FastGetField::generate_fast_get_long_field() {
|
||||
__ ldx (O5, 0, O3);
|
||||
#endif
|
||||
|
||||
__ ld (ca, G1);
|
||||
__ ld (cnt_addr, G1);
|
||||
__ cmp (G1, G4);
|
||||
__ br (Assembler::notEqual, false, Assembler::pn, label2);
|
||||
__ delayed()->mov (O7, G1);
|
||||
@@ -208,10 +208,10 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
|
||||
Label label1, label2;
|
||||
|
||||
address cnt_addr = SafepointSynchronize::safepoint_counter_addr();
|
||||
Address ca(O3, cnt_addr);
|
||||
__ sethi (ca);
|
||||
__ ld (ca, G4);
|
||||
AddressLiteral cnt_addrlit(SafepointSynchronize::safepoint_counter_addr());
|
||||
__ sethi (cnt_addrlit, O3);
|
||||
Address cnt_addr(O3, cnt_addrlit.low10());
|
||||
__ ld (cnt_addr, G4);
|
||||
__ andcc (G4, 1, G0);
|
||||
__ br (Assembler::notZero, false, Assembler::pn, label1);
|
||||
__ delayed()->srl (O2, 2, O4);
|
||||
@@ -225,7 +225,7 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
|
||||
__ ld (ca, O5);
|
||||
__ ld (cnt_addr, O5);
|
||||
__ cmp (O5, G4);
|
||||
__ br (Assembler::notEqual, false, Assembler::pn, label2);
|
||||
__ delayed()->mov (O7, G1);
|
||||
|
||||
70
hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp
Normal file
70
hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "incls/_precompiled.incl"
|
||||
#include "incls/_methodHandles_sparc.cpp.incl"
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
address MethodHandleEntry::start_compiled_entry(MacroAssembler* _masm,
|
||||
address interpreted_entry) {
|
||||
__ align(wordSize);
|
||||
address target = __ pc() + sizeof(Data);
|
||||
while (__ pc() < target) {
|
||||
__ nop();
|
||||
__ align(wordSize);
|
||||
}
|
||||
|
||||
MethodHandleEntry* me = (MethodHandleEntry*) __ pc();
|
||||
me->set_end_address(__ pc()); // set a temporary end_address
|
||||
me->set_from_interpreted_entry(interpreted_entry);
|
||||
me->set_type_checking_entry(NULL);
|
||||
|
||||
return (address) me;
|
||||
}
|
||||
|
||||
MethodHandleEntry* MethodHandleEntry::finish_compiled_entry(MacroAssembler* _masm,
|
||||
address start_addr) {
|
||||
MethodHandleEntry* me = (MethodHandleEntry*) start_addr;
|
||||
assert(me->end_address() == start_addr, "valid ME");
|
||||
|
||||
// Fill in the real end_address:
|
||||
__ align(wordSize);
|
||||
me->set_end_address(__ pc());
|
||||
|
||||
return me;
|
||||
}
|
||||
|
||||
|
||||
// Code generation
|
||||
address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler* _masm) {
|
||||
ShouldNotReachHere(); //NYI, 6815692
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Generate an "entry" field for a method handle.
|
||||
// This determines how the method handle will respond to calls.
|
||||
void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHandles::EntryKind ek) {
|
||||
ShouldNotReachHere(); //NYI, 6815692
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -38,8 +38,7 @@ void NativeInstruction::set_data64_sethi(address instaddr, intptr_t x) {
|
||||
|
||||
destreg = inv_rd(*(unsigned int *)instaddr);
|
||||
// Generate a the new sequence
|
||||
Address dest( destreg, (address)x );
|
||||
_masm->sethi( dest, true );
|
||||
_masm->patchable_sethi(x, destreg);
|
||||
ICache::invalidate_range(instaddr, 7 * BytesPerInstWord);
|
||||
}
|
||||
|
||||
@@ -227,8 +226,8 @@ void NativeFarCall::set_destination(address dest) {
|
||||
CodeBuffer buf(addr_at(0), instruction_size + 1);
|
||||
MacroAssembler* _masm = new MacroAssembler(&buf);
|
||||
// Generate the new sequence
|
||||
Address(O7, dest);
|
||||
_masm->jumpl_to(dest, O7);
|
||||
AddressLiteral(dest);
|
||||
_masm->jumpl_to(dest, O7, O7);
|
||||
ICache::invalidate_range(addr_at(0), instruction_size );
|
||||
#endif
|
||||
}
|
||||
@@ -361,10 +360,12 @@ void NativeMovConstReg::test() {
|
||||
|
||||
VM_Version::allow_all();
|
||||
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none);
|
||||
a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->sethi(0xccccdddd, O2, true, RelocationHolder::none);
|
||||
a->add(O2, low10(0xccccdddd), O2);
|
||||
AddressLiteral al1(0xaaaabbbb, relocInfo::external_word_type);
|
||||
a->sethi(al1, I3);
|
||||
a->add(I3, al1.low10(), I3);
|
||||
AddressLiteral al2(0xccccdddd, relocInfo::external_word_type);
|
||||
a->sethi(al2, O2);
|
||||
a->add(O2, al2.low10(), O2);
|
||||
|
||||
nm = nativeMovConstReg_at( cb.code_begin() );
|
||||
nm->print();
|
||||
@@ -468,12 +469,14 @@ void NativeMovConstRegPatching::test() {
|
||||
|
||||
VM_Version::allow_all();
|
||||
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none);
|
||||
AddressLiteral al1(0xaaaabbbb, relocInfo::external_word_type);
|
||||
a->sethi(al1, I3);
|
||||
a->nop();
|
||||
a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->sethi(0xccccdddd, O2, true, RelocationHolder::none);
|
||||
a->add(I3, al1.low10(), I3);
|
||||
AddressLiteral al2(0xccccdddd, relocInfo::external_word_type);
|
||||
a->sethi(al2, O2);
|
||||
a->nop();
|
||||
a->add(O2, low10(0xccccdddd), O2);
|
||||
a->add(O2, al2.low10(), O2);
|
||||
|
||||
nm = nativeMovConstRegPatching_at( cb.code_begin() );
|
||||
nm->print();
|
||||
@@ -562,51 +565,53 @@ void NativeMovRegMem::test() {
|
||||
|
||||
VM_Version::allow_all();
|
||||
|
||||
a->ldsw( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
AddressLiteral al1(0xffffffff, relocInfo::external_word_type);
|
||||
AddressLiteral al2(0xaaaabbbb, relocInfo::external_word_type);
|
||||
a->ldsw( G5, al1.low10(), G4 ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->ldsw( G5, I3, G4 ); idx++;
|
||||
a->ldsb( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldsb( G5, al1.low10(), G4 ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->ldsb( G5, I3, G4 ); idx++;
|
||||
a->ldsh( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldsh( G5, al1.low10(), G4 ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->ldsh( G5, I3, G4 ); idx++;
|
||||
a->lduw( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->lduw( G5, al1.low10(), G4 ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->lduw( G5, I3, G4 ); idx++;
|
||||
a->ldub( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldub( G5, al1.low10(), G4 ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->ldub( G5, I3, G4 ); idx++;
|
||||
a->lduh( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->lduh( G5, al1.low10(), G4 ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->lduh( G5, I3, G4 ); idx++;
|
||||
a->ldx( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldx( G5, al1.low10(), G4 ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->ldx( G5, I3, G4 ); idx++;
|
||||
a->ldd( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldd( G5, al1.low10(), G4 ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->ldd( G5, I3, G4 ); idx++;
|
||||
a->ldf( FloatRegisterImpl::D, O2, -1, F14 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->ldf( FloatRegisterImpl::S, O0, I3, F15 ); idx++;
|
||||
|
||||
a->stw( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->stw( G5, G4, al1.low10() ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->stw( G5, G4, I3 ); idx++;
|
||||
a->stb( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->stb( G5, G4, al1.low10() ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->stb( G5, G4, I3 ); idx++;
|
||||
a->sth( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->sth( G5, G4, al1.low10() ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->sth( G5, G4, I3 ); idx++;
|
||||
a->stx( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->stx( G5, G4, al1.low10() ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->stx( G5, G4, I3 ); idx++;
|
||||
a->std( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->std( G5, G4, al1.low10() ); idx++;
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->std( G5, G4, I3 ); idx++;
|
||||
a->stf( FloatRegisterImpl::S, F18, O2, -1 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->stf( FloatRegisterImpl::S, F15, O0, I3 ); idx++;
|
||||
|
||||
nm = nativeMovRegMem_at( cb.code_begin() );
|
||||
@@ -705,51 +710,52 @@ void NativeMovRegMemPatching::test() {
|
||||
|
||||
VM_Version::allow_all();
|
||||
|
||||
a->ldsw( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
AddressLiteral al(0xffffffff, relocInfo::external_word_type);
|
||||
a->ldsw( G5, al.low10(), G4); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->ldsw( G5, I3, G4 ); idx++;
|
||||
a->ldsb( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldsb( G5, al.low10(), G4); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->ldsb( G5, I3, G4 ); idx++;
|
||||
a->ldsh( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldsh( G5, al.low10(), G4); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->ldsh( G5, I3, G4 ); idx++;
|
||||
a->lduw( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->lduw( G5, al.low10(), G4); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->lduw( G5, I3, G4 ); idx++;
|
||||
a->ldub( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldub( G5, al.low10(), G4); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->ldub( G5, I3, G4 ); idx++;
|
||||
a->lduh( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->lduh( G5, al.low10(), G4); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->lduh( G5, I3, G4 ); idx++;
|
||||
a->ldx( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldx( G5, I3, G4 ); idx++;
|
||||
a->ldd( G5, low10(0xffffffff), G4 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldd( G5, I3, G4 ); idx++;
|
||||
a->ldf( FloatRegisterImpl::D, O2, -1, F14 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->ldf( FloatRegisterImpl::S, O0, I3, F15 ); idx++;
|
||||
a->ldx( G5, al.low10(), G4); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->ldx( G5, I3, G4 ); idx++;
|
||||
a->ldd( G5, al.low10(), G4); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->ldd( G5, I3, G4 ); idx++;
|
||||
a->ldf( FloatRegisterImpl::D, O2, -1, F14 ); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->ldf( FloatRegisterImpl::S, O0, I3, F15 ); idx++;
|
||||
|
||||
a->stw( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->stw( G5, G4, al.low10()); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->stw( G5, G4, I3 ); idx++;
|
||||
a->stb( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->stb( G5, G4, al.low10()); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->stb( G5, G4, I3 ); idx++;
|
||||
a->sth( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->sth( G5, G4, al.low10()); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->sth( G5, G4, I3 ); idx++;
|
||||
a->stx( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->stx( G5, G4, al.low10()); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->stx( G5, G4, I3 ); idx++;
|
||||
a->std( G5, G4, low10(0xffffffff) ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->std( G5, G4, al.low10()); idx++;
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->std( G5, G4, I3 ); idx++;
|
||||
a->stf( FloatRegisterImpl::S, F18, O2, -1 ); idx++;
|
||||
a->sethi(0xaaaabbbb, I3, true, RelocationHolder::none); a->nop(); a->add(I3, low10(0xaaaabbbb), I3);
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->stf( FloatRegisterImpl::S, F15, O0, I3 ); idx++;
|
||||
|
||||
nm = nativeMovRegMemPatching_at( cb.code_begin() );
|
||||
@@ -833,11 +839,12 @@ void NativeJump::test() {
|
||||
|
||||
VM_Version::allow_all();
|
||||
|
||||
a->sethi(0x7fffbbbb, I3, true, RelocationHolder::none);
|
||||
a->jmpl(I3, low10(0x7fffbbbb), G0, RelocationHolder::none);
|
||||
AddressLiteral al(0x7fffbbbb, relocInfo::external_word_type);
|
||||
a->sethi(al, I3);
|
||||
a->jmpl(I3, al.low10(), G0, RelocationHolder::none);
|
||||
a->delayed()->nop();
|
||||
a->sethi(0x7fffbbbb, I3, true, RelocationHolder::none);
|
||||
a->jmpl(I3, low10(0x7fffbbbb), L3, RelocationHolder::none);
|
||||
a->sethi(al, I3);
|
||||
a->jmpl(I3, al.low10(), L3, RelocationHolder::none);
|
||||
a->delayed()->nop();
|
||||
|
||||
nj = nativeJump_at( cb.code_begin() );
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -142,6 +142,8 @@ REGISTER_DEFINITION(Register, G1_scratch);
|
||||
REGISTER_DEFINITION(Register, G3_scratch);
|
||||
REGISTER_DEFINITION(Register, G4_scratch);
|
||||
REGISTER_DEFINITION(Register, Gtemp);
|
||||
REGISTER_DEFINITION(Register, G5_method_type);
|
||||
REGISTER_DEFINITION(Register, G3_method_handle);
|
||||
REGISTER_DEFINITION(Register, Lentry_args);
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -99,13 +99,6 @@ void Relocation::pd_set_data_value(address x, intptr_t o) {
|
||||
break;
|
||||
}
|
||||
ip->set_data64_sethi( ip->addr_at(0), (intptr_t)x );
|
||||
#ifdef COMPILER2
|
||||
// [RGV] Someone must have missed putting in a reloc entry for the
|
||||
// add in compiler2.
|
||||
inst2 = ip->long_at( NativeMovConstReg::add_offset );
|
||||
guarantee(Assembler::inv_op(inst2)==Assembler::arith_op, "arith op");
|
||||
ip->set_long_at(NativeMovConstReg::add_offset,ip->set_data32_simm13( inst2, (intptr_t)x+o));
|
||||
#endif
|
||||
#else
|
||||
guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi");
|
||||
inst &= ~Assembler::hi22( -1);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user