Compare commits

...

593 Commits

Author SHA1 Message Date
J. Duke
a21b1cb078 Merge 2017-07-05 19:09:29 +02:00
J. Duke
072eaeffde Merge 2017-07-05 19:09:26 +02:00
J. Duke
f46969a88a Merge 2017-07-05 19:09:18 +02:00
J. Duke
3a7a4a49dd Merge 2017-07-05 19:09:14 +02:00
J. Duke
5f133e9976 Merge 2017-07-05 19:09:09 +02:00
J. Duke
24449c88f0 Merge 2017-07-05 19:09:00 +02:00
J. Duke
645bb04df4 Merge 2017-07-05 19:08:56 +02:00
J. Duke
a2f95c84ad Merge 2017-07-05 19:08:38 +02:00
J. Duke
177cf42321 Added tag jdk8-b104 for changeset b5ed503c26ad 2017-07-05 19:08:15 +02:00
J. Duke
1962df5a7e Merge 2017-07-05 19:08:14 +02:00
J. Duke
2ac80d572a Merge 2017-07-05 19:08:09 +02:00
J. Duke
964f8d0838 Merge 2017-07-05 19:08:05 +02:00
J. Duke
16905c3130 Merge 2017-07-05 19:08:02 +02:00
J. Duke
8c6857c011 Merge 2017-07-05 19:07:59 +02:00
J. Duke
5acb6f53b7 Merge 2017-07-05 19:07:56 +02:00
J. Duke
4a3224e3f8 Merge 2017-07-05 19:07:53 +02:00
J. Duke
2cf8d97660 Merge 2017-07-05 19:07:49 +02:00
J. Duke
e391edefea Added tag jdk8-b103 for changeset 30a1d677a20c 2017-07-05 19:07:32 +02:00
J. Duke
41525a23dc Merge 2017-07-05 19:07:31 +02:00
J. Duke
2fb0c88cd1 Merge 2017-07-05 19:07:28 +02:00
J. Duke
939f870704 Merge 2017-07-05 19:07:23 +02:00
J. Duke
39c8daacb9 Merge 2017-07-05 19:07:19 +02:00
J. Duke
3ccba1b06c Merge 2017-07-05 19:07:16 +02:00
J. Duke
ba0baca2b7 Merge 2017-07-05 19:07:11 +02:00
J. Duke
407e69737f Merge 2017-07-05 19:07:07 +02:00
J. Duke
6a3c52740c Merge 2017-07-05 19:06:52 +02:00
J. Duke
9a9c31a690 Added tag jdk8-b102 for changeset bbe43d712fe0 2017-07-05 19:06:36 +02:00
J. Duke
e9a2e84e45 Merge 2017-07-05 19:06:36 +02:00
J. Duke
acb6bd09b5 Merge 2017-07-05 19:06:33 +02:00
J. Duke
4a8e810dc9 Merge 2017-07-05 19:06:28 +02:00
J. Duke
6d881af71f Merge 2017-07-05 19:06:24 +02:00
J. Duke
a5f503e2fc Merge 2017-07-05 19:06:20 +02:00
J. Duke
59e29eb062 Merge 2017-07-05 19:06:11 +02:00
J. Duke
5cf821cd18 Merge 2017-07-05 19:06:08 +02:00
J. Duke
2856601ce5 Merge 2017-07-05 19:05:51 +02:00
J. Duke
30a5f497ce Added tag jdk8-b101 for changeset edb01c460d4c 2017-07-05 19:05:35 +02:00
J. Duke
6412341d45 Merge 2017-07-05 19:05:35 +02:00
J. Duke
126fad314d Merge 2017-07-05 19:05:32 +02:00
J. Duke
90c2b0e3f3 Merge 2017-07-05 19:05:29 +02:00
J. Duke
30adf07dd2 Merge 2017-07-05 19:05:26 +02:00
J. Duke
ef0a162ad4 Merge 2017-07-05 19:05:24 +02:00
J. Duke
52bd6a643a Merge 2017-07-05 19:05:21 +02:00
J. Duke
e0e14796ee Merge 2017-07-05 19:05:18 +02:00
J. Duke
519b98ab23 Merge 2017-07-05 19:05:15 +02:00
J. Duke
eef5f7b088 Added tag jdk8-b100 for changeset 3d34036aae4e 2017-07-05 19:04:57 +02:00
David Katleman
4635118ccb Merge 2013-08-26 17:36:10 -07:00
David Katleman
28b7cdfb12 Merge 2013-08-26 17:34:43 -07:00
Erik Joelsson
f771ef4ea2 8023216: Feedback on README-builds.html
Reviewed-by: anthony, robilad, tbell
2013-08-26 13:43:27 +02:00
Lana Steuck
76dbd59f19 Merge 2013-08-23 14:18:06 -07:00
Lana Steuck
83b39d45ac Merge 2013-08-23 14:17:49 -07:00
Lana Steuck
03e8d7b04d Merge 2013-08-23 14:14:05 -07:00
Lana Steuck
49d683bd93 Merge 2013-08-23 14:09:04 -07:00
Lana Steuck
decf403bf3 Merge 2013-08-23 14:09:00 -07:00
Alejandro Murillo
d35ecfaa15 Added tag hs25-b47 for changeset 5ca7390c9649 2013-08-23 03:01:16 -07:00
Alejandro Murillo
f00f98f2cb Merge 2013-08-23 03:01:16 -07:00
Jon Masamitsu
2ef7b2abe3 Merge 2013-08-22 14:03:47 -07:00
Omair Majid
4a2acff75d 8023480: Create a jvm.cfg for zero on 32 bit architectures
Reviewed-by: dholmes, erikj
2013-08-22 16:00:13 -04:00
Jon Masamitsu
892e74a87e Merge 2013-08-22 11:13:17 -07:00
Rickard Bäckman
4cb52fc49d Merge 2013-08-22 18:37:14 +02:00
Christine Lu
a758468eee Added tag jdk8-b104 for changeset 9b5ad625745e 2013-08-22 09:10:25 -07:00
Christine Lu
f06b171fe2 Added tag jdk8-b104 for changeset c45de6831abc 2013-08-22 09:10:22 -07:00
Christine Lu
4bbc8e3230 Added tag jdk8-b104 for changeset 805046a40f61 2013-08-22 09:10:13 -07:00
Christine Lu
86b719e366 Added tag jdk8-b104 for changeset 94ae8ce0f0fa 2013-08-22 09:10:09 -07:00
Christine Lu
bcda5085af Added tag jdk8-b104 for changeset 1fc167004a38 2013-08-22 09:10:08 -07:00
Christine Lu
9276e491e8 Added tag jdk8-b104 for changeset 78f23ea4586e 2013-08-22 09:10:01 -07:00
Christine Lu
080d427e34 Added tag jdk8-b104 for changeset 2b0842168ce5 2013-08-22 09:09:57 -07:00
Christine Lu
2c440a8078 Added tag jdk8-b104 for changeset 35bf25e3bb38 2013-08-22 09:09:55 -07:00
Lana Steuck
dd6c7270b6 Merge 2013-08-20 17:46:45 -07:00
Lana Steuck
2bf2c26103 Merge 2013-08-20 17:46:21 -07:00
Lana Steuck
403562720b Merge 2013-08-20 17:44:18 -07:00
Lana Steuck
262e9cab6c Merge 2013-08-20 17:41:16 -07:00
Lana Steuck
b2bcb29646 Merge 2013-08-20 17:40:15 -07:00
Lana Steuck
317c27e0d6 Merge 2013-08-20 17:38:56 -07:00
Lana Steuck
aa8a574989 Merge 2013-08-20 17:35:15 -07:00
David Katleman
17e815e5b8 Merge 2013-08-20 15:42:14 -07:00
Jonathan Gibbons
c7b90c0ca4 8013887: In class use, some tables are randomly unsorted
Reviewed-by: bpatel
2013-08-20 15:12:16 -07:00
Jonathan Gibbons
f8295608fb 8022080: javadoc generates invalid HTML in Turkish locale
Reviewed-by: bpatel
2013-08-20 14:55:20 -07:00
Jonathan Gibbons
de59aa8b3f 8020663: Restructure some properties to facilitate better translation
Reviewed-by: darcy
2013-08-20 14:46:54 -07:00
Kumar Srinivasan
c9f3cedbfa 7179455: tools/javac/processing/model/testgetallmembers/Main.java fails against JDK 7 and JDK 8
Reviewed-by: jjg
2013-08-20 14:15:45 -07:00
Daniel D. Daugherty
e951505eab 8023287: HOTSPOT_BUILD_COMPILER needs to support "Sun Studio 12u3"
Recognize 0x5120 as "Sun Studio 12u3".

Reviewed-by: dholmes, coleenp
2013-08-20 13:47:40 -07:00
Joe Darcy
557cb9c6b1 8011043: Warn about use of 1.5 and earlier source and target values
Reviewed-by: jjg
2013-08-20 12:15:19 -07:00
Joel Borggrén-Franck
07d44a6520 8019243: AnnotationTypeMismatchException instead of MirroredTypeException
Reviewed-by: jjg
2013-08-20 17:21:47 +02:00
Alexander Zuev
7947e49ae3 7182350: Regression in wording of unchecked warning message
Reviewed-by: mcimadamore, jjg
2013-08-20 17:34:06 +04:00
Attila Szegedi
ab53c30753 8023250: Update JavaScript code in JDK for changes in iteration over Java arrays
Reviewed-by: sundar, sla
2013-08-20 11:15:08 +02:00
Paul Sandoz
906bb894db 8023367: Collections.emptyList().sort((Comparator)null) throws NPE
Reviewed-by: alanb, mduigou
2013-08-20 17:36:15 +02:00
Staffan Larsen
e838e31768 8016727: test/com/sun/jdi/sde/TemperatureTableTest.java failing intermittently
Reviewed-by: alanb
2013-08-20 16:53:27 +02:00
Jiangli Zhou
9fab0cfa1b Merge 2013-08-20 00:48:55 -07:00
David Holmes
0c815d1360 8023311: Clean up profile-includes.txt
Reviewed-by: alanb
2013-08-20 03:18:56 -04:00
Staffan Larsen
073cd1d632 8022071: Some vm/jvmti tests fail because cannot attach to the Java virtual machine
Reviewed-by: erikj, sspitsyn
2013-08-20 08:59:15 +02:00
Kevin Walls
6d662d543e Merge 2013-08-19 22:28:52 -07:00
Xue-Lei Andrew Fan
92f9b54cd3 8023230: The impl of KerberosClientKeyExchange maybe not exist
Reviewed-by: weijun
2013-08-19 18:49:36 -07:00
Xue-Lei Andrew Fan
2e2313ef87 8020842: IDN do not throw IAE when hostname ends with a trailing dot
Reviewed-by: weijun, michaelm
2013-08-19 17:42:39 -07:00
Erik Helin
259a710013 Merge 2013-08-19 17:29:41 -07:00
Sean Mullan
d2f2e6fd41 8016850: JCK javax.security.auth.Policy tests fail when run in Profiles mode
Move default javax.security.auth.Policy implementation to compact1 profile

Reviewed-by: vinnie
2013-08-19 17:17:17 -04:00
Dan Xu
aa90f3b312 8023203: Wrap RandomAccessFile.seek native method into a Java helper method
Reviewed-by: alanb, chegar
2013-08-19 12:38:56 -07:00
Jiangli Zhou
553b498f51 8021948: Change InstanceKlass::_source_file_name and _generic_signature from Symbol* to constant pool indexes
Change InstanceKlass::_source_file_name and _generic_signature to u2 fields.

Reviewed-by: coleenp, iklam
2013-08-19 14:59:54 -04:00
Jennifer Godinez
c2aba135c2 8022241: [macosx] [PIT] lookupPrintServices() returns one too long array
Reviewed-by: prr, jchen
2013-08-19 11:21:19 -07:00
Yumin Qi
056fb53c83 8023188: Unsafe volatile double store on bsd is broken
Reviewed-by: dcubed, dholmes
2013-08-19 09:16:35 -07:00
Kumar Srinivasan
7870f1a6dc 7071377: Exception when javac -processor is given a class name with invalid postfix
Reviewed-by: jjg, vromero
2013-08-19 07:47:10 -07:00
Athijegannathan Sundararajan
23c1598214 Merge 2013-08-19 19:37:29 +05:30
Kevin Walls
a40e2a9236 8022655: ClassDump ignored jarStream setting
Reviewed-by: minqi, sla
2013-08-19 14:28:58 +01:00
Athijegannathan Sundararajan
67ca223959 8023210: jjs tools should support a mode where it will load few command line scripts and then entering into interactive shell
Reviewed-by: hannesw, attila, lagergren, jlaskey
2013-08-19 17:16:54 +05:30
Phil Race
1dd31aff63 8017580: Crash in font loading code on Linux (due to use of reflection)
Reviewed-by: bae, vadim
2013-08-19 03:58:47 -07:00
Erik Joelsson
30a0d25953 8021430: 64 bit JDK build fails on windows 7 due to missing corba source files
Reviewed-by: tbell, katleman
2013-08-19 10:31:42 +02:00
Anthony Scarpino
a29db3a5b8 8022896: test/com/sun/crypto/provider/Cipher/RSA/TestOAEPPadding.java fails
Reviewed-by: mullan
2013-08-16 12:31:57 -07:00
Sergey Bylokhov
88cb86076a 8005980: [findbugs] More com.sun.media.sound.* warnings
Reviewed-by: art, prr
2013-08-16 21:18:21 +04:00
Daniel D. Daugherty
2c28ff340a Merge 2013-08-16 10:06:58 -07:00
Sergey Bylokhov
0b736d6f91 8006085: [findbugs] a warning on javax.sound.sampled.DataLine$Info constructor
Reviewed-by: art, prr
2013-08-16 20:56:46 +04:00
Marcus Lagergren
9de0661d63 8023017: SUB missing for widest op == number for BinaryNode
Reviewed-by: sundar, jlaskey
2013-08-16 18:51:53 +02:00
Aleksei Efimov
8a03379c45 8021820: Number of opened files used in select() is limited to 1024 [macosx]
Reviewed-by: alanb, chegar, tbell, smarks
2013-08-16 18:40:43 +04:00
Erik Joelsson
99a38df3ab 8023146: Sjavac test failes in langtools nightly
Reviewed-by: mcimadamore, jfranck
2013-08-16 16:00:12 +02:00
Sergey Bylokhov
79a458c3d4 8020051: [TEST_BUG] Testcase for 8004859 has a typo
Reviewed-by: anthony
2013-08-16 16:52:53 +04:00
Ivan Gerasimov
90882f83e0 8023156: make dist-clean should remove javacservers directory
Reviewed-by: erikj
2013-08-16 14:43:38 +02:00
Vadim Pakhnushev
f09520a064 8013446: [parfait] Memory leak in jdk/src/windows/native/sun/java2d/opengl/WGLSurfaceData.c
Reviewed-by: bae, prr
2013-08-16 15:57:28 +04:00
Hannes Wallnöfer
c5193485ad 8019985: Date.parse("2000-01-01T00:00:00.Z") should return NaN
Reviewed-by: sundar, jlaskey
2013-08-16 13:42:44 +02:00
Alejandro Murillo
92e079eae1 8023152: new hotspot build - hs25-b47
Reviewed-by: jcoomes
2013-08-16 04:24:07 -07:00
Alejandro Murillo
c70766c84b Added tag hs25-b46 for changeset 33c42f8baa1d 2013-08-16 04:14:13 -07:00
Alejandro Murillo
5485bef44e Merge 2013-08-16 04:14:12 -07:00
Athijegannathan Sundararajan
2f90b28014 8020355: bind on built-in constructors don't use bound argument values
Reviewed-by: lagergren, hannesw
2013-08-16 15:04:36 +05:30
Bengt Rutisson
5075c7e128 Merge 2013-08-16 09:02:36 +02:00
Harold Seigel
4d91f4e69d 8003424: Enable Class Data Sharing for CompressedOops
8016729: ObjectAlignmentInBytes=16 now forces the use of heap based compressed oops
8005933: The -Xshare:auto option is ignored for -server

Move klass metaspace above the heap and support CDS with compressed klass ptrs.

Reviewed-by: coleenp, kvn, mgerdin, tschatzl, stefank
2013-08-15 20:04:10 -04:00
Jan Lahoda
d992a67102 8022508: javac crashes if the generics arity of a base class is wrong
Reviewed-by: mcimadamore, vromero
2013-08-15 22:36:08 +02:00
Jan Lahoda
59e0637339 8015809: More user friendly compile-time errors for uncaught exceptions in lambda expression
Producing individual errors for uncaught undeclared exceptions inside lambda expressions, rather than one error for the whole lambda

Reviewed-by: mcimadamore
2013-08-15 22:33:43 +02:00
Vicente Romero
746be81338 8022053: javac generates unverifiable initializer for nested subclass of local class
Reviewed-by: jjg, mcimadamore
2013-08-16 10:32:42 +01:00
Jennifer Godinez
bce847b2be 8023045: [MacOSX] PrinterIOException when printing a JComponent
Reviewed-by: bae, jchen
2013-08-15 11:56:33 -07:00
Christine Lu
db0ec61ffd Added tag jdk8-b103 for changeset 1f4e22f16147 2013-08-15 09:26:02 -07:00
Christine Lu
4d93dffa7b Added tag jdk8-b103 for changeset 30c8df7a1168 2013-08-15 09:26:00 -07:00
Christine Lu
b6b9364384 Added tag jdk8-b103 for changeset 49d8688ac040 2013-08-15 09:25:49 -07:00
Christine Lu
9e1b038ef2 Added tag jdk8-b103 for changeset bf2d11458125 2013-08-15 09:25:44 -07:00
Christine Lu
34c5c0e638 Added tag jdk8-b103 for changeset 1317035e27c5 2013-08-15 09:25:42 -07:00
Christine Lu
e50bff5642 Added tag jdk8-b103 for changeset 31869efc272a 2013-08-15 09:25:33 -07:00
Christine Lu
d48217e612 Added tag jdk8-b103 for changeset 28e832b479d2 2013-08-15 09:25:27 -07:00
Christine Lu
034d08cfbd Added tag jdk8-b103 for changeset 5e42d75f3223 2013-08-15 09:25:23 -07:00
Erik Joelsson
fd4983b254 8015145: Smartjavac needs more flexibility with linking to sources
Reviewed-by: jjg, ohrstrom
2013-08-15 17:24:35 +02:00
Erik Joelsson
c1b34fdc2c 8020411: lin32 - JDK 8 build for Linux-i586 on Oracle Linux 6.4 64-bit machines does not generate the bundles directory in the build directory
Reviewed-by: tbell
2013-08-15 17:14:53 +02:00
Rickard Bäckman
8db7a08b50 Merge 2013-08-15 15:26:16 +02:00
Erik Helin
8250719f92 Merge 2013-08-15 06:20:48 -07:00
Anton Litvinov
78ee0b6ff2 7191018: Manual test closed/java/awt/JAWT causes JVM to crash starting from JDK 5
Reviewed-by: anthony, serb
2013-08-15 14:20:09 +04:00
Bengt Rutisson
c144b8c30f 8023021: Unnecessary clearing of the card table introduced by the fix for JDK-8023013
Reviewed-by: stefank, ehelin
2013-08-15 10:05:50 +02:00
Bhavesh Patel
0c6e63367d 8016921: Change the profiles table on overview-summary.html page to a list
Reviewed-by: jjg
2013-08-14 21:44:51 -07:00
Jon Masamitsu
9354b09906 8021809: Partitioning based on eden sampling during allocation not reset correctly
Reviewed-by: ysr, hiroshi
2013-08-14 19:52:16 -07:00
Thomas Schatzl
ae7845053f 8022784: TaskQueue misses minimal documentation and references for analysis
Add appropriate documentation and references to publication to allow easier analysis of the TaskQueue implementation.

Reviewed-by: dholmes, ehelin
2013-08-21 10:32:02 +02:00
Jon Masamitsu
4fe3c66318 Merge 2013-08-20 10:02:38 -07:00
Erik Helin
e5f563bfef 8023219: NPG: MetaspaceMemoryPool should report statistics for all of metaspace
Reviewed-by: stefank, sjohanss
2013-08-19 18:17:58 +02:00
Jon Masamitsu
b7f31f0375 Merge 2013-08-19 08:58:56 -07:00
Stefan Karlsson
8fc3bf8715 8023227: Enhance layout_helper_log2_element_size assert
Reviewed-by: mgerdin, jmasa
2013-08-19 13:44:13 +02:00
Bengt Rutisson
5e41090120 8023145: G1: G1CollectedHeap::mark_strong_code_roots() needs to handle ParallelGCThreads=0
Reviewed-by: stefank, mgerdin
2013-08-16 11:26:09 +02:00
Bengt Rutisson
befd51708b Merge 2013-08-15 13:02:42 -07:00
John Cuthbertson
f63547bf71 7145569: G1: optimize nmethods scanning
Add a list of nmethods to the RSet for a region that contain references into the region. Skip scanning the code cache during root scanning and scan the nmethod lists during RSet scanning instead.

Reviewed-by: tschatzl, brutisso, mgerdin, twisti, kvn
2013-08-15 10:52:18 +02:00
Kumar Srinivasan
d91b6547d3 6840442: JavaCompiler.getTask() has incomplete specification for IllegalArgumentException
Reviewed-by: jjg
2013-08-14 18:58:39 -07:00
Jonathan Gibbons
43991d588a 8017191: Javadoc is confused by @link to imported classes outside of the set of generated packages
Reviewed-by: bpatel
2013-08-14 16:41:01 -07:00
Ron Durbin
9d372e7801 8005073: [TESTBUG] remove crufty '_g' support from HS tests
Remove crufty '_g' support from HS tests

Reviewed-by: dcubed, sla
2013-08-14 15:12:00 -07:00
Leonid Romanov
1aa32ce1d0 8022997: [macosx] Remaining duplicated key events
Reviewed-by: anthony, serb
2013-08-15 01:17:30 +04:00
Anthony Scarpino
6b3b53caa1 8022669: OAEPParameterSpec does not work if MGF1ParameterSpec is set to SHA2 algorithms
Reviewed-by: mullan
2013-08-14 10:50:52 -07:00
Vladimir Kozlov
20f7d1a82a 8022993: Convert MAX_UNROLL constant to LoopMaxUnroll C2 flag
Replace MAX_UNROLL constant with new C2 LoopMaxUnroll flag.

Reviewed-by: roland
2013-08-14 10:21:26 -07:00
Athijegannathan Sundararajan
a28b8a61dc 8023026: Array.prototype iterator functions like forEach, reduce should work for Java arrays, lists
Reviewed-by: jlaskey, lagergren
2013-08-14 20:51:53 +05:30
Kumar Srinivasan
ce4eb93249 8007517: DefaultMethodRegressionTests.java fail in TL
Reviewed-by: jjg, vromero
2013-08-14 07:07:55 -07:00
Petr Pchelko
f996af2115 7173464: Clipboard.getAvailableDataFlavors: Comparison method violates contract
Reviewed-by: anthony, art, serb
2013-08-14 17:20:09 +04:00
Petr Pchelko
6a28f9e6fb 8013454: [parfait] Memory leak in jdk/src/windows/native/sun/windows/awt_Cursor.cpp
8012079: [parfait] possible null pointer dereference in jdk/src/windows/native/sun/windows/awt_Font.cpp

Reviewed-by: art, serb
2013-08-14 16:17:28 +04:00
Erik Helin
dab6bdc071 8022899: SunStudio compiler can not handle EXCEPTION_MARK and inlining
Reviewed-by: coleenp, mgerdin
2013-08-14 13:49:36 +02:00
Vicente Romero
d36ef0edd0 8013394: compile of iterator use fails with error \"defined in an inaccessible class or interface\"
Reviewed-by: mcimadamore
2013-08-14 10:53:37 +01:00
Bengt Rutisson
253681b976 Merge 2013-08-14 10:55:45 +02:00
Bengt Rutisson
19ba466575 8022800: Use specific generations rather than generation iteration
Reviewed-by: jmasa, ehelin
2013-08-14 09:02:32 +02:00
Lana Steuck
48a4d23548 Merge 2013-08-13 18:34:12 -07:00
Lana Steuck
b93ce53426 Merge 2013-08-13 18:34:06 -07:00
Lana Steuck
c24f5af8ad Merge 2013-08-13 18:28:49 -07:00
Lana Steuck
d2e96c4350 Merge 2013-08-13 15:49:37 -07:00
Lana Steuck
ffc0068a0c Merge 2013-08-13 10:42:37 -07:00
Lana Steuck
1e69f7c4c9 Merge 2013-08-13 10:35:35 -07:00
Lana Steuck
0081af7ad7 Merge 2013-08-13 10:34:41 -07:00
Lana Steuck
960cf1f362 Merge 2013-08-13 10:34:38 -07:00
Erik Helin
b42a7171ab 8020598: ObjectCountEventSender::send needs INCLUDE_TRACE guards when building OpenJDK with INCLUDE_TRACE=0
Reviewed-by: stefank, brutisso, sjohanss
2013-08-13 18:16:19 +02:00
Konstantin Perikov
36197b96c2 7027045: (doc) java/awt/Window.java has several typos in javadoc
Reviewed-by: art, serb
2013-08-13 15:41:55 +04:00
Coleen Phillimore
a25f924de6 8009728: nsk/jvmti/AttachOnDemand/attach030 crashes on Win32
ActiveMethodOopsCache was used to keep track of old versions of some methods that are cached in Universe but is buggy with permgen removal and not needed anymore

Reviewed-by: sspitsyn, dcubed, mseledtsov
2013-08-12 17:24:54 -04:00
Michael Horowitz
bf29c2ec49 8022676: Confusing error message checking instanceof non-class
Reviewed-by: jlaskey, sundar
2013-08-12 18:00:17 -03:00
Maurizio Cimadamore
58d92c516a 8021567: Javac doesn't report \"java: reference to method is ambiguous\" any more
Javac incorrectly forgets about constant folding results within lambdas

Reviewed-by: jjg, vromero
2013-08-12 17:28:31 +01:00
Maurizio Cimadamore
4e85a5ae43 6537020: JCK tests: a compile-time error should be given in case of ambiguously imported fields (types, methods)
Hiding check does not support interface multiple inheritance

Reviewed-by: jjg
2013-08-12 17:25:07 +01:00
Athijegannathan Sundararajan
084c96bb71 Merge 2013-08-12 20:37:09 +05:30
Athijegannathan Sundararajan
7e85e9c196 8022598: Object.getPrototypeOf should return null for host objects rather than throwing TypeError
Reviewed-by: lagergren, jlaskey, attila, hannesw
2013-08-12 18:16:28 +05:30
Athijegannathan Sundararajan
cb2ec81051 8022615: [nightly] Two nashorn print tests fail in nightly builds on Windows
Reviewed-by: lagergren, jlaskey
2013-08-12 17:08:01 +05:30
Hannes Wallnöfer
76e9329e16 8022731: NativeArguments has wrong implementation of isMapped()
Reviewed-by: lagergren, jlaskey
2013-08-12 13:31:43 +02:00
Athijegannathan Sundararajan
42d8f28181 8022614: Please exclude test test/script/trusted/JDK-8020809.js from Nashorn code coverage run
Reviewed-by: jlaskey, lagergren
2013-08-12 16:52:32 +05:30
Attila Szegedi
71bd48d8e7 8022789: Revisit doPrivileged blocks in Dynalink
Reviewed-by: lagergren, sundar
2013-08-12 12:46:01 +02:00
Athijegannathan Sundararajan
ec9506c0fe 8022782: publicLookup access failures in ScriptObject, ScriptFunction and ScriptFunction
Reviewed-by: lagergren, attila, hannesw
2013-08-12 14:43:53 +05:30
Ioi Lam
5189d350c9 8022740: Visual 2008 IDE build is broken
Fixed project generation code, and added warning to upgrade to VS 2008 SP1.

Reviewed-by: dcubed, ccheung
2013-08-10 10:56:27 -07:00
Vicente Romero
190f9337b1 6983297: methods missing from NewArrayTree
Reviewed-by: jjg
2013-08-10 16:29:26 +01:00
Vicente Romero
22652f5354 8022622: javac, two tests are failing with compile time error after class Collector was modified
Reviewed-by: mcimadamore
2013-08-10 16:26:50 +01:00
Vicente Romero
cee3c2853b 8009640: -profile <compact> does not work when -bootclasspath specified
Reviewed-by: jjg
2013-08-10 13:27:38 +01:00
Igor Ignatyev
ed4b026105 8019915: whitebox testClearMethodStateTest fails with tiered on sparc
'compileonly' directive has beens added to each 'compiler/whitebox' test

Reviewed-by: kvn
2013-08-10 10:01:12 +04:00
Daniel D. Daugherty
4d2ab5385c Merge 2013-08-09 15:36:09 -07:00
Kumar Srinivasan
35e27fd594 8022161: javac Null Pointer Exception in Enter.visitTopLevel
Reviewed-by: jjg, vromero, jlahoda
2013-08-09 15:01:33 -07:00
Daniel D. Daugherty
15aa5e3a57 Merge 2013-08-09 13:19:00 -07:00
Joe Wang
86ec979f23 8022548: SPECJVM2008 has errors introduced in 7u40-b34
Reviewed-by: chegar, lancea
2013-08-09 12:10:41 -07:00
Mikael Vidstedt
5fab892391 8022452: Hotspot needs to know about Windows 8.1 and Windows Server 2012 R2
Add support for recognizing Windows 8.1 and Server 2012 R2 and minor cleanup

Reviewed-by: coleenp, dsamersoff
2013-08-09 09:51:21 -07:00
Rickard Bäckman
cd450988cc Merge 2013-08-09 18:05:00 +02:00
Athijegannathan Sundararajan
8ee7468a8c 8022707: Revisit all doPrivileged blocks
Reviewed-by: jlaskey, hannesw
2013-08-09 20:48:44 +05:30
Alexander Scherbatiy
ad02c635e3 7121409: Two conformance tests for AccessibleText.getCharacterBounds(int i) fail
Reviewed-by: serb
2013-08-09 14:16:24 +04:00
Alejandro Murillo
7cea3820af 8022688: new hotspot build - hs25-b46
Reviewed-by: jcoomes
2013-08-09 01:39:11 -07:00
Alejandro Murillo
c27859fdda Added tag hs25-b45 for changeset 30045f9d9eb2 2013-08-09 01:32:48 -07:00
Alejandro Murillo
247f25e3d1 Merge 2013-08-09 01:32:47 -07:00
Yumin Qi
bf788959b7 Merge 2013-08-08 20:13:45 -07:00
Anton Tarasov
66bb3b1c47 8013611: Modal dialog fails to obtain keyboard focus
Reviewed-by: leonidr
2013-08-09 05:20:27 +04:00
Yumin Qi
418cc392cc 8019583: [TESTBUG] runtime/7107135 always passes
If java test return none zero, the value will be override by 'if' statement, the exit value will always '0' and pass. Fix by recording the result in a variable.

Reviewed-by: coleenp, dholmes, iklam
2013-08-08 15:19:12 -07:00
Rickard Bäckman
3a7c3cc018 Merge 2013-08-08 23:49:04 +02:00
Ioi Lam
617a84061c 8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
Added extra help message in make/solaris/makefiles/dtrace.make

Reviewed-by: dholmes, sspitsyn
2013-08-08 14:45:56 -07:00
Christine Lu
a4ad7e3be8 Added tag jdk8-b102 for changeset c6f119e1fb1f 2013-08-08 10:10:54 -07:00
Christine Lu
18489ee44f Added tag jdk8-b102 for changeset 8de709d0c375 2013-08-08 10:10:52 -07:00
Christine Lu
66b349c32a Added tag jdk8-b102 for changeset 0821944c348a 2013-08-08 10:10:42 -07:00
Christine Lu
12edd63408 Added tag jdk8-b102 for changeset a4d982aa5380 2013-08-08 10:10:38 -07:00
Christine Lu
06729a6505 Added tag jdk8-b102 for changeset 558ea2ab19f7 2013-08-08 10:10:37 -07:00
Christine Lu
9ac23677b2 Added tag jdk8-b102 for changeset d807cf45a710 2013-08-08 10:10:31 -07:00
Christine Lu
5e33f2e6b4 Added tag jdk8-b102 for changeset c7cc39696829 2013-08-08 10:10:26 -07:00
Christine Lu
f18216cb96 Added tag jdk8-b102 for changeset 9543adaf5371 2013-08-08 10:10:24 -07:00
Daniel D. Daugherty
ae5b50414a 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
ProjectCreator tool is modified to support two new options: '-relativeAltSrcInclude' and '-altRelativeInclude' which prevents IDE linker errors. Also fixed some cmd line build linker warnings. Misc cleanups.

Reviewed-by: rdurbin, coleenp
2013-08-08 09:21:30 -07:00
Jim Laskey
8662010454 Merge 2013-08-08 11:20:14 -03:00
Athijegannathan Sundararajan
23ec0c1cc7 Merge 2013-08-08 18:19:29 +05:30
David Holmes
65115fab95 Merge 2013-08-08 08:29:28 -04:00
Athijegannathan Sundararajan
77e477eaea 8022524: Memory leaks in nashorn sources and tests found by jhat analysis
Reviewed-by: attila, hannesw
2013-08-08 16:38:32 +05:30
Vicente Romero
cecb5cc0ea 8019486: javac, generates erroneous LVT for a test case with lambda code
Reviewed-by: mcimadamore
2013-08-08 11:49:16 +01:00
Lana Steuck
1fa1e6d2ca Merge 2013-08-07 19:56:20 -07:00
Lana Steuck
db9bc87b0d Merge 2013-08-07 19:52:47 -07:00
Phil Race
fcca48f761 8014883: java.awt.container.add(component comp object constraints) doesn't work as expected on some linux platforms
Reviewed-by: jgodinez
2013-08-07 18:24:17 -07:00
Rickard Bäckman
a231c31f38 8022675: Redundant class init check
Reviewed-by: kvn, twisti
2013-08-08 03:16:56 +02:00
Christian Thalinger
9e056eedc4 8022956: Clang: enable return type warnings on BSD
Reviewed-by: coleenp, sla
2013-08-20 10:57:50 -07:00
Rickard Bäckman
9c2ac55d23 Merge 2013-08-19 09:33:29 +02:00
Vladimir Kozlov
4ee53ef4e3 8021898: Broken JIT compiler optimization for loop unswitching
Fix method clone_projs() to clone all related MachProj nodes.

Reviewed-by: roland, adlertz
2013-08-16 14:11:40 -07:00
Igor Ignatyev
5ab8312aa5 Merge 2013-08-16 13:39:26 -04:00
Niclas Adlertz
a235ecb344 8023003: Cleanup the public interface to PhaseCFG
Public methods that don't need to be public should be private.

Reviewed-by: kvn, twisti
2013-08-16 10:23:55 +02:00
David Chase
5467bc74f8 8022441: Bad code generated for certain interpreted CRC intrinsics, 2 cases
Corrected details

Reviewed-by: kvn, twisti, rbackman
2013-08-15 11:59:19 -07:00
Igor Ignatyev
caa3d02130 8022832: Add WB APIs for OSR compilation
Reviewed-by: kvn
2013-08-14 23:50:23 +04:00
Igor Ignatyev
f9cf9e88b8 8016456: ciReplay test assumes TIERED compilation is available
Reviewed-by: vlivanov, kvn, dholmes
2013-08-16 17:34:37 +04:00
Stuart Marks
0982c856e5 8022479: clean up warnings from sun.tools.asm
Reviewed-by: lancea, darcy
2013-08-07 16:29:36 -07:00
Bhavesh Patel
a8090b5024 4749567: stddoclet: Add CSS style for setting header/footer to be italic
Reviewed-by: jjg
2013-08-07 16:09:31 -07:00
Bhavesh Patel
69a3c42db7 7198274: RFE : Javadoc Accessibility : Use CSS styles rather than <strong> or <i> tags
Reviewed-by: jjg
2013-08-07 15:00:24 -07:00
Dan Xu
f4de445e6a 8022554: Fix Warnings in sun.invoke.anon Package
Reviewed-by: darcy, mduigou, lancea
2013-08-07 12:13:34 -07:00
Lana Steuck
e395ecfccb Merge 2013-08-07 12:03:37 -07:00
Artem Ananiev
d98a8a162f 6551589: ContainerListener Documentation may be incorrect
Reviewed-by: serb
2013-08-07 21:31:42 +04:00
Niclas Adlertz
fc44cdf0ec 8022475: Remove unneeded ad-files
Remove .ad files that are not used

Reviewed-by: kvn
2013-08-07 18:04:42 +02:00
Sergey Bylokhov
5fe59d132c 7124339: [macosx] setIconImage is not endlessly tolerant to the broken image-arguments
Reviewed-by: alexsch, leonidr
2013-08-07 19:57:18 +04:00
Niclas Adlertz
bfe8385fa9 8022284: Hide internal data structure in PhaseCFG
Hide private node to block mapping using public interface

Reviewed-by: kvn, roland
2013-08-07 17:56:19 +02:00
Marcus Lagergren
5409730fde 8022454: Fixed various serializations and deprecation warnings in java.util, java.net and sun.tools
Reviewed-by: darcy
2013-08-07 08:08:57 -07:00
Krystal Mok
27f8eea2ea 8021771: warning stat64 is deprecated - when building on OSX 10.7.5
Stat64 have to be replaced with stat

Reviewed-by: dholmes, kmo
2013-08-07 19:02:06 +04:00
Alexander Scherbatiy
eede95c5cf 8013849: Awt assert on Hashtable.cpp:124
Reviewed-by: serb
2013-08-07 18:58:28 +04:00
Erik Helin
3ea9481c2f 8014659: NPG: performance counters for compressed klass space
Reviewed-by: mgerdin, coleenp, hseigel, jmasa, ctornqvi
2013-08-07 16:47:32 +02:00
Attila Szegedi
65cc3fdc8a 8022509: Various Dynalink security enhancements
Reviewed-by: jlaskey, hannesw
2013-08-07 16:38:44 +02:00
Alexander Scherbatiy
5c82273ab3 8022532: [parfait] Potential memory leak in gtk2_interface.c
Reviewed-by: art, serb
2013-08-07 18:32:03 +04:00
Xue-Lei Andrew Fan
4cb22654f8 8013809: deadlock in SSLSocketImpl between between write and close
Reviewed-by: wetmore
2013-08-07 06:42:06 -07:00
Athijegannathan Sundararajan
35fe257db9 8022483: Nashorn compatibility issues in jhat's OQL feature
Reviewed-by: lagergren, attila, hannesw
2013-08-07 18:16:25 +05:30
Weijun Wang
7d97d75349 7151062: [macosx] SCDynamicStore prints error messages to stderr
Reviewed-by: xuelei
2013-08-07 19:06:29 +08:00
Vicente Romero
3103641be3 8008274: javac should not reference/use sample code
Reviewed-by: jjg
2013-08-07 11:04:07 +01:00
Vicente Romero
0fb4cd9d38 8020997: TreeMaker.AnnotationBuilder creates broken element literals with repeating annotations
Reviewed-by: jjg, jfranck
2013-08-07 10:41:20 +01:00
Lana Steuck
2093cb052d Merge 2013-08-06 22:47:14 -07:00
David Holmes
598af92521 Merge 2013-08-06 21:06:19 -07:00
Mike Duigou
67517a374c 8022476: cleanup some raw types and unchecked warnings in java.util.stream
Co-authored-by: Henry Jen <henry.jen@oracle.com>
Reviewed-by: darcy
2013-08-06 18:18:12 -07:00
Dan Xu
f387416fed 8022478: Fix Warnings In sun.net.www.protocol.http Package
Reviewed-by: darcy
2013-08-06 18:16:02 -07:00
Henry Jen
b2cc9db8d8 8022446: Fix serial warnings in java.util.stream
Reviewed-by: darcy
2013-08-06 17:42:47 -07:00
Lana Steuck
8eb2082cfa Merge 2013-08-06 17:13:07 -07:00
Lana Steuck
7e65ce7648 Merge 2013-08-06 17:12:42 -07:00
Phil Race
753a6e3b0c 8022447: Fix doclint warnings in java.awt.image
Reviewed-by: darcy
2013-08-06 17:12:37 -07:00
Phil Race
f211cb81b9 8022455: Fix doclint warnings in javax.imageio
Reviewed-by: darcy
2013-08-06 17:11:29 -07:00
Lana Steuck
630afb40c1 Merge 2013-08-06 17:01:56 -07:00
Lana Steuck
1d38cac0b6 Merge 2013-08-06 17:01:50 -07:00
Vladimir Danushevsky
ddf5fcb7c2 8012144: multiple SIGSEGVs fails on staxf
Forward port of 7u change to add additional fence() on RMO platforms, with a load_acquire on all platforms

Reviewed-by: dholmes, kvn
2013-08-06 20:01:40 -04:00
Lana Steuck
37487a9e38 Merge 2013-08-06 17:01:05 -07:00
Lana Steuck
0f4dfb63ae Merge 2013-08-06 16:54:56 -07:00
Joe Darcy
6fede334f9 8022453: Fix doclint issues in javax.accessibility
Reviewed-by: prr
2013-08-06 16:45:43 -07:00
Serguei Spitsyn
4974d1aef2 7187554: JSR 292: JVMTI PopFrame needs to handle appendix arguments
Restore the appendix argument after PopFrame() call

Reviewed-by: twisti, coleenp
2013-08-06 16:33:59 -07:00
Joel Borggrén-Franck
70ac5c3a48 8009367: Wrong kind of name used in comparison in javax.lang.model code for repeatable annotations
Reviewed-by: jjg, darcy
2013-08-07 01:32:39 +02:00
Jennifer Godinez
d75477b147 8021583: test/javax/print/autosense/PrintAutoSenseData.java throwing NPE
Reviewed-by: jchen, prr
2013-08-06 14:22:48 -07:00
Phil Race
2ce2cb1e0d 8022175: Fix doclint warnings in javax.print
Reviewed-by: darcy
2013-08-06 13:38:27 -07:00
Lana Steuck
3b0bb47cdc Merge 2013-08-06 10:10:39 -07:00
Lana Steuck
9bc34baa1a Merge 2013-08-06 10:03:25 -07:00
Lana Steuck
996e25a950 Merge 2013-08-06 10:02:36 -07:00
Lana Steuck
30f9a71516 Merge 2013-08-06 10:02:35 -07:00
Omair Majid
6e609cbc64 8022188: Make zero compile after 8016131 and 8016697
Reviewed-by: dholmes, twisti
2013-08-06 12:28:46 -04:00
Vicente Romero
5f5b303d7e 8022186: javac generates dead code if a try with an empty body has a finalizer
Reviewed-by: jjg
2013-08-06 15:08:49 +01:00
Anton Nashatyrev
a932c3bf6b 8016833: Underlines and strikethrough not rendering correctly
Reviewed-by: alexsch, serb
2013-08-06 17:29:54 +04:00
Paul Sandoz
7647c6e6a1 8014824: Document Spliterator characteristics and binding policy of java util collection impls
Reviewed-by: chegar
2013-08-06 14:26:34 +01:00
Alan Bateman
5d38b44a3e 8023215: test/java/util/Comparator/TypeTest.java not running (failing but reported as passing)
Reviewed-by: psandoz
2013-08-19 11:04:21 +01:00
Aleksei Efimov
3eae3a200c 8021820: Number of opened files used in select() is limited to 1024 [macosx]
Reviewed-by: alanb, chegar, tbell, smarks
2013-08-16 18:41:35 +04:00
Erik Gahlin
90a9913da7 6696970: Jconsole becomes unusable if a plugin throws an exception
Reviewed-by: mchung, jbachorik
2013-08-16 18:58:36 +02:00
Erik Gahlin
6b503b6a09 7015157: String "Tabular Navigation" should be rephrased for avoiding mistranslation
Reviewed-by: alanb, jbachorik, sjiang
2013-08-16 16:53:46 +02:00
Erik Gahlin
2fb1ac860c 6721425: jconsole Makefile clean rule is missing rm of generated Version.java
Reviewed-by: alanb, jbachorik
2013-08-16 17:11:25 +02:00
Erik Gahlin
06e0c4e161 6417702: Graph in Memory tab is not redrawn immediately if changed via 'Chart' combo box
Reviewed-by: alanb, jbachorik, sjiang
2013-08-16 17:02:12 +02:00
Paul Sandoz
b42c6fb241 8022318: Document Spliterator characteristics and binding policy of java util concurrent collection impls
Co-authored-by: Martin Buchholz <martinrb@google.com>
Reviewed-by: chegar
2013-08-06 14:26:34 +01:00
Roger Riggs
63de7b9fd0 8019185: Inconsistency between JapaneseEra start dates and java.util.JapaneseImperialDate
Align Meiji start date with lib/calendar.properties to avoid any confusion

Reviewed-by: sherman
2013-08-16 13:58:43 -04:00
Roger Riggs
b23fa14820 8022193: java/time/test/java/util/TestFormatter.java failed in th locale
Tests corrected to use fixed locale and not dependent on the environment

Reviewed-by: sherman
2013-08-16 11:11:00 -04:00
Roger Riggs
a7ac24961a 8022770: java/time/tck/java/time/chrono/TCKChronology.java start failing
8022766: java/time/test/java/time/chrono/TestUmmAlQuraChronology.java failed

TCKChronology: corrected display name to match update from JDK-8015986

Reviewed-by: alanb
2013-08-16 11:28:15 -04:00
Paul Sandoz
e77f64d8dd 8022797: Clarify spliterator characteristics for collections containing no elements
Reviewed-by: alanb, mduigou
2013-08-13 11:16:37 +02:00
Paul Sandoz
ea67b80891 8022898: java/util/Spliterator/SpliteratorCollisions.java fails in HashableIntSpliteratorWithNull data provider
Reviewed-by: henryjen, alanb, rriggs
2013-08-16 12:46:39 +02:00
Paul Sandoz
772a828f73 8012940: More than 50 tests failed in Serialization/DeSerialization testing (test-mangled)
Reviewed-by: ksrini
2013-08-16 12:46:30 +02:00
Paul Sandoz
3c90e54214 8023150: java/util/stream tests no longer compiling following JDK-8019401
Reviewed-by: alanb
2013-08-16 12:29:58 +02:00
Brian Goetz
4030ed819b 8019401: Collectors.collectingAndThen
Reviewed-by: mduigou
2013-08-12 12:06:50 -04:00
Dan Xu
d2956c2e8d 8017109: Cleanup overrides warning in src/solaris/classes/sun/print/AttributeClass.java
Reviewed-by: jgodinez
2013-08-15 14:11:16 -07:00
Dan Xu
bcc5da3b77 4858457: File.getCanonicalPath() throws IOException when invoked with "nul" (win)
Reviewed-by: alanb
2013-08-15 12:36:50 -07:00
Vinnie Ryan
05ecc7021a Merge 2013-08-15 19:56:53 +01:00
Vinnie Ryan
f8f33c852c 8023108: Remove ShortRSAKey1024.sh from ProblemList.txt
Reviewed-by: mullan
2013-08-15 19:49:08 +01:00
Xueming Shen
bb69156c80 7154662: {CRC32, Adler32}.update(byte[] b, int off, int len): undocumented ArrayIndexOutOfBoundsException
To add the throws clause

Reviewed-by: alanb, chegar
2013-08-15 10:41:59 -07:00
Chris Hegarty
126c55f2cb 8022126: Remove throws SocketException from DatagramPacket constructors accepting SocketAddress
Reviewed-by: smarks, alanb, michaelm, darcy
2013-08-15 15:16:31 +01:00
Doug Lea
fc8b2309b8 8023104: ConcurrentHashMap typo
Reviewed-by: chegar, mduigou
2013-08-15 15:04:59 +01:00
Doug Lea
ad2505a669 8023103: FJ parallelism zero
8020537: java/util/concurrent/forkjoin/ThrowingRunnable.java

Reviewed-by: chegar, mduigou, alanb
2013-08-15 15:01:37 +01:00
Ivan Gerasimov
d72491e426 8022584: Memory leak in some NetworkInterface methods
Reviewed-by: alanb, dholmes, chegar, michaelm
2013-08-13 13:04:21 +04:00
Yiming Wang
ab37de55bf 8015765: TEST_BUG: java/nio/channels/ServerSocketChannel/AdaptServerSocket.java failing intermittently
Reviewed-by: chegar, dholmes, alanb
2013-08-15 13:42:45 +01:00
Alan Bateman
9aceb41d6d 8022921: Remove experimental Profile attribute
Reviewed-by: mchung, chegar
2013-08-15 11:54:05 +01:00
Yong Jeffrey Huang
e87a2bddaf 8021121: ISO 4217 Amendment Number 156
Reviewed-by: naoto
2013-08-14 22:49:54 -07:00
Bradford Wetmore
0ffa9efb22 8023075: JDK-5049299 has broken old make in jdk8
Reviewed-by: katleman
2013-08-14 19:19:43 -07:00
Brian Burkhalter
10673cfe8c 8022109: Evaluate adding incrementExact, decrementExact, negateExact to java.lang.Math
Add the methods for parameter types int and long.

Reviewed-by: mduigou
2013-08-12 10:35:44 -07:00
Xueming Shen
bc17f4b068 8022178: System.console() throws IOE on some Windows
To remove the IOE throwing code

Reviewed-by: alanb
2013-08-14 11:42:59 -07:00
Joe Darcy
57b04c9183 8022990: Fix dep_ann lint warnings in swing code
Reviewed-by: alexsch
2013-08-14 11:26:32 -07:00
Kumar Srinivasan
ec7c598299 8022547: [verifier] move DefaultMethodRegressionTests.java to jdk
Reviewed-by: acorn
2013-08-14 08:12:36 -07:00
Coleen Phillimore
8609d34dbe Merge 2013-08-14 10:14:06 -04:00
Lana Steuck
d4db347ba0 Merge 2013-08-13 18:33:25 -07:00
Rob McKenna
c6247493d0 5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
Reviewed-by: alanb, dholmes, martin, erikj, coffeys
2013-08-13 19:10:54 +01:00
Joe Darcy
42953c89cf 8022959: Fix new doclint issues in java.util.zip
Reviewed-by: chegar
2013-08-13 10:12:03 -07:00
Harold Seigel
1130c56f81 8022259: MakeClasslist is buggy and its README is out of date
Fixed bug in FOR loop and updated comments and README

Reviewed-by: dholmes, alanb
2013-08-13 10:56:13 -04:00
Sean Mullan
24bf261e1c Merge 2013-08-13 10:07:56 -04:00
Sean Mullan
58783bd353 8022897: Add test/com/sun/crypto/provider/Cipher/RSA/TestOAEPPadding.java to ProblemList
Reviewed-by: vinnie, chegar
2013-08-13 10:06:48 -04:00
Daniel Fuchs
91e6f28796 8019948: java/util/logging/bundlesearch/ResourceBundleSearchTest.java is failing intermittently
Reviewed-by: mchung, dholmes
2013-08-13 16:00:44 +02:00
Amy Lu
10ba495eaf 8022779: ProblemList.txt updates (8/2013)
Update ProblemList and remove AggressiveOpts MOAT test run

Reviewed-by: chegar, alanb
2013-08-13 14:57:12 +01:00
Timothy Buktu
e3b61c033b 8022180: BigInteger Burnikel-Ziegler quotient and remainder calculation assumes quotient parameter is zero
Clear the quotient in divideAndRemainderBurnikelZiegler() if the divisor is larger than the dividend.

Reviewed-by: alanb, bpb
2013-08-12 16:21:10 -07:00
Vinnie Ryan
f0836f6924 Merge 2013-08-13 14:18:57 +01:00
Vinnie Ryan
f537c82bab 8013170: Spec for PBEParameterSpec does not specify behavior when paramSpec is null
Reviewed-by: mullan
2013-08-13 14:15:03 +01:00
Lance Andersen
d12a32baab 8022753: SQLXML javadoc example typo
Reviewed-by: alanb, mchung
2013-08-12 16:09:24 -04:00
Mani Sarkar
4f76f09719 8022749: Convert junit tests to testng in test/java/lang/invoke
Reviewed-by: mduigou, alanb
2013-08-12 12:11:04 -07:00
Anthony Scarpino
7adae55d1d 8020081: Cipher with OAEPPadding and OAEPParameterSpec can't be created
Reviewed-by: mullan
2013-08-12 11:25:42 -07:00
Vicente Romero
d0479145f3 8015780: java/lang/reflect/Method/GenericStringTest.java failing
Reviewed-by: darcy, jfranck
2013-08-12 17:40:14 +01:00
Sean Mullan
4478af167f Merge 2013-08-12 09:29:06 -04:00
Sean Mullan
bb0b967894 8016848: javax_security/auth/login tests fail in compact 1 and 2 profiles
Change the default value of the "login.configuration.provider" security property to sun.security.provider.ConfigFile

Reviewed-by: xuelei
2013-08-12 09:03:51 -04:00
Xue-Lei Andrew Fan
01059bf88b 8022487: DEREncodedKeyValue.supportedKeyTypes should be private
Reviewed-by: mullan
2013-08-11 18:21:13 -07:00
Joe Wang
1848c820d0 8022548: SPECJVM2008 has errors introduced in 7u40-b34
Reviewed-by: chegar, lancea
2013-08-09 12:53:30 -07:00
Xueming Shen
9db3bb4e9c 8020054: (tz) Support tzdata2013d
Update the jdk8 tz data to version 2013d

Reviewed-by: coffeys, peytoia
2013-08-09 12:40:11 -07:00
Dan Xu
8893824d47 8021977: Opening a file using java.io can throw IOException on Windows
Remove IOException related error-handling code for backward compatibility

Reviewed-by: alanb, lancea, mr
2013-08-09 10:55:52 -07:00
Doug Lea
b377e796f7 8022724: lint warnings in j.u.concurrent packages
Reviewed-by: chegar, lancea, darcy
2013-08-09 17:56:38 +01:00
Chris Hegarty
a446ab4d6b 8022661: InetAddress.writeObject() performs flush() on object output stream
Reviewed-by: michaelm, alanb
2013-08-09 13:50:13 +01:00
Paul Sandoz
87efa706f1 8022326: Spliterator for values of j.u.c.ConcurrentSkipListMap does not report ORDERED
Reviewed-by: martin, chegar
2013-08-09 11:44:38 +02:00
Xueming Shen
22a9c24dcd 6614237: missing codepage Cp290 at java runtime
To add charset Cp290 and Cp300

Reviewed-by: okutsu
2013-08-08 23:40:46 -07:00
Weijun Wang
0f81426896 8021788: JarInputStream doesn't provide certificates for some file under META-INF
Reviewed-by: chegar, sherman
2013-08-09 11:41:17 +08:00
Jason Uh
ea03f7c91f 8022461: Fix lint warnings in sun.security.{provider,rsa,x509}
Reviewed-by: darcy, weijun, xuelei, mullan
2013-08-08 17:06:40 -07:00
Xueming Shen
dca36c08f3 8015666: test/tools/pack200/TimeStamp.java failing
To keep the default behavior of ZOS unchanged, if ze extra time not explicitly set

Reviewed-by: alanb, ksrini
2013-08-08 12:03:04 -07:00
Weijun Wang
dc14220ea6 8016594: Native Windows ccache still reads DES tickets
Reviewed-by: dsamersoff, xuelei
2013-08-08 21:13:01 +08:00
Alexey Utkin
ae9638f154 7147084: (process) appA hangs when read output stream of appB which starts appC that runs forever
Reviewed-by: alanb, robm, martin
2013-08-08 09:16:16 +04:00
Stephen Colebourne
15c6717dac 8015986: Incorrect Localization of HijrahChronology
Co-authored-by: Roger Riggs <roger.riggs@oracle.com>
Reviewed-by: naoto
2013-08-08 13:51:55 +09:00
Leonid Romanov
a1c16bf976 8022247: java/awt/EventDispatchThread/LoopRobustness/LoopRobustness throws NPE
Reviewed-by: art
2013-08-06 17:07:49 +04:00
Dmitry Samersoff
68198af05c 8019396: SA-JDI OSThread class initialization throws an exception
Method sun.jvm.hotspot.runtime.OSThread.initialize throws a sun.jvm.hotspot.types.WrongTypeException

Reviewed-by: dholmes, mgerdin
2013-08-06 14:28:48 +04:00
Athijegannathan Sundararajan
2efc2b56a0 Merge 2013-08-06 13:10:40 +05:30
Christian Thalinger
7107241178 8022029: GetUnsafeObjectG1PreBarrier fails on 32-bit with: Unrecognized VM option 'ObjectAlignmentInBytes=32'
Reviewed-by: kvn
2013-08-05 15:03:40 -07:00
Harold Seigel
82c3d36026 Merge 2013-08-05 08:55:06 -07:00
Rickard Bäckman
ae3b577a0e Merge 2013-08-05 17:15:35 +02:00
Kevin Walls
655fbf4cb1 8021444: SA: ClassDump.run() should not ignore existing ClassFilter
Reviewed-by: minqi, poonam
2013-08-05 10:27:31 +01:00
Harold Seigel
1d5b67ee67 7073961: [TESTBUG] closed/runtime/4845371/DBB.java failed on solaris 10 X65
Added a x86 64-bit Solaris shared library and rewrote test in Java

Reviewed-by: dholmes, ctornqvi
2013-08-04 16:30:53 -04:00
Christian Tornqvist
d31cb702e1 Merge 2013-08-02 22:34:43 +02:00
Albert Noll
fb2554e3f3 8021301: better event messages
Made event messages better readable

Reviewed-by: kvn, rbackman
2013-08-02 10:20:34 -07:00
Christian Tornqvist
5e4a34c49f Merge 2013-08-02 18:26:24 +02:00
Christian Tornqvist
cab1b96d23 8009585: test/runtime/7196045 times out
Test/runtime/7196045 times out

Reviewed-by: dholmes, mseledtsov
2013-08-02 18:12:10 +02:00
Daniel D. Daugherty
8119c54cae Merge 2013-08-02 08:32:05 -07:00
Leonid Romanov
a7ee7996cf 8021381: JavaFX scene included in Swing JDialog not starting from Web Start
Reviewed-by: art, dcherepanov
2013-08-02 15:42:04 +04:00
Kevin Walls
af0b21a0ad 8020943: Memory leak when GCNotifier uses create_from_platform_dependent_str()
Reviewed-by: mgerdin, fparain, dcubed
2013-08-02 12:26:46 +01:00
Alejandro Murillo
0c24c1a1fc 8022124: new hotspot build - hs25-b45
Reviewed-by: jcoomes
2013-08-02 03:06:19 -07:00
Alejandro Murillo
ac5648d33a Added tag hs25-b44 for changeset 7bf800505a10 2013-08-02 02:54:48 -07:00
Alejandro Murillo
820cd68d3f Merge 2013-08-02 02:54:47 -07:00
Tao Mao
6f445df42a Merge 2013-08-01 17:17:52 -07:00
Albert Noll
4ca00ef5a6 8020531: Test compiler/codecache/CheckUpperLimit.java fails when memory limited
Removed part of the test that required the VM to start up with -XX:ReservedCodeCacheSize=2048m

Reviewed-by: kvn, rbackman
2013-08-01 16:01:32 -07:00
Christian Tornqvist
6596ca7512 8009407: runtime/8000968/Test8000968.sh has incorrect check for proper config
Runtime/8000968/Test8000968.sh has incorrect check for proper config

Reviewed-by: coleenp, mseledtsov, sspitsyn, hseigel
2013-08-01 22:25:11 +02:00
Christian Tornqvist
00b23c2eb8 8014294: Assert in ThreadTimesClosure::do_thread() due to use of naked oop instead of handle
Assert in ThreadTimesClosure::do_thread() due to use of naked oop instead of handle

Reviewed-by: coleenp, sspitsyn
2013-08-01 22:20:00 +02:00
Mikhailo Seledtsov
fd111e0d53 8020614: OutputAnalyzer.shouldHaveExitValue() should print stdout/stderr output
OutputAnalyzer.shouldHaveExitValue() should print stdout/stderr output

Reviewed-by: kvn, ctornqvi, dholmes
2013-08-01 22:15:40 +02:00
Bengt Rutisson
fbf4750c28 8022051: G1: Remove some unused G1 flags
Reviewed-by: tschatzl, jmasa
2013-08-01 17:29:49 +02:00
Alexander Scherbatiy
6fd08e08fc 7161568: [macosx] api/javax_swing/JTabbedPane/index2.html#varios fails
Reviewed-by: malenkov, serb
2013-08-01 17:09:59 +04:00
Christine Lu
d7f1d887ba Added tag jdk8-b101 for changeset 55745edff2b0 2013-08-01 04:56:29 -07:00
Christine Lu
761794aa7c Added tag jdk8-b101 for changeset f27df16b814f 2013-08-01 04:56:28 -07:00
Christine Lu
4b24961eb6 Added tag jdk8-b101 for changeset b4b491c041c9 2013-08-01 04:56:21 -07:00
Christine Lu
4c542c9b00 Added tag jdk8-b101 for changeset 38bb43faf812 2013-08-01 04:56:17 -07:00
Christine Lu
fb7619310c Added tag jdk8-b101 for changeset 68d2718ced89 2013-08-01 04:56:16 -07:00
Christine Lu
bba02437ae Added tag jdk8-b101 for changeset 612246822cf0 2013-08-01 04:56:11 -07:00
Christine Lu
3ef55b6dcd Added tag jdk8-b101 for changeset de18c7eb70e2 2013-08-01 04:56:07 -07:00
Christine Lu
a3886ccb30 Added tag jdk8-b101 for changeset 7af02a20e411 2013-08-01 04:56:06 -07:00
Aleksei Efimov
530a91a3af 8015987: The corba repo contains unneeded .sjava files
Reviewed-by: alanb, chegar, coffeys
2013-08-01 14:59:05 +04:00
Hannes Wallnöfer
24adb234a8 8020132: Big object literal with numerical keys exceeds method size
Reviewed-by: lagergren, sundar
2013-08-01 12:23:38 +02:00
Bengt Rutisson
a1e1caf8ba 8021879: G1: G1HeapRegionSize flag value not updated correctly
Reviewed-by: tschatzl, jmasa
2013-08-01 09:35:04 +02:00
Bengt Rutisson
5a10114616 8021967: Deprecate -XX:DefaultMaxRAMFraction
Reviewed-by: tschatzl, jmasa, kvn, tamao
2013-08-01 07:03:07 +02:00
David Holmes
e6a94c002a Merge 2013-07-31 19:05:03 -04:00
Leonid Romanov
bc37e5f4ad 8021815: Add regression test for JDK-8007267
Reviewed-by: serb
2013-08-01 01:26:57 +04:00
Lana Steuck
10ffeaaadd Merge 2013-07-31 13:02:53 -07:00
Lana Steuck
0b0d97c2c0 Merge 2013-07-31 12:56:26 -07:00
Kumar Srinivasan
da7f38703d 8014826: c.s.t.javac.tree.Pretty.visitNewArray() prints duplicate dimension markers
Reviewed-by: jjg, vromero
2013-07-31 08:37:34 -07:00
Frederic Parain
c5c13b6ad7 Merge 2013-07-31 08:28:18 -07:00
Vicente Romero
5540c7cbe1 8013179: assertion failure in javac when compiling with -source 1.6 -target 1.6
Reviewed-by: jjg
2013-07-31 10:52:01 +01:00
Andrew Brygin
52112c7c19 8020983: OutOfMemoryError caused by non garbage collected JPEGImageWriter Instances
Reviewed-by: prr, flar
2013-07-31 13:11:31 +04:00
Calvin Cheung
7e63c7bb0f 8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
Added checking for gcc and simplified the sig_handler() in the test case

Reviewed-by: dcubed, coleenp, minqi, dlong
2013-07-30 14:14:25 -07:00
Jennifer Godinez
95d9a2533a 8021835: Fix for 8016343 will not compile on Windows
Reviewed-by: jchen, prr
2013-07-30 13:01:44 -07:00
Sergey Malenkov
07e26447a0 8015300: JComboBox text sometimes become selected, sometimes not (Windows LAF)
Reviewed-by: alexsch, serb
2013-07-30 17:46:01 +04:00
Anton Tarasov
5807947c50 8020927: JLightweightFrame API should export layout properties change notifications
Reviewed-by: anthony
2013-07-30 16:15:31 +04:00
Xue-Lei Andrew Fan
1cf74954ed 8021841: Remove SSLEngineDeadlock.java from problem list
Reviewed-by: wetmore
2013-07-29 19:36:54 -07:00
Christian Thalinger
5555a381fb 8016474: Crash in sun.reflect.UnsafeObjectFieldAccessorImpl.get
C1's GetUnsafeObject G1 pre-barrier uses the wrong type to read the klass pointer.

Reviewed-by: iveresov, kvn
2013-07-29 16:32:38 -07:00
Anthony Scarpino
eae349e914 8020424: The NSS version should be detected before running crypto tests
Reviewed-by: valeriep
2013-07-29 13:43:24 -07:00
Athijegannathan Sundararajan
820cebb6aa Merge 2013-07-29 21:56:40 +05:30
Sergey Malenkov
512135758b 8010782: clean up source files containing carriage return characters
Reviewed-by: alexsch, art
2013-07-29 18:48:54 +04:00
Sergey Bylokhov
a854dc1181 6230360: Spelling mistake in documentation for AWT: 1.4, 1.5, 1.6, 1.7
Reviewed-by: malenkov, art
2013-07-29 16:57:46 +04:00
Athijegannathan Sundararajan
c9efbba43f 8012792: print function defined in engine.js does not handle multiple arguments
Reviewed-by: hannesw
2013-07-29 18:07:20 +05:30
Igor Ignatyev
16b4f55129 8021120: TieredCompilation can be enabled even if TIERED is undefined
Reviewed-by: kvn, dholmes
2013-07-29 11:54:18 +04:00
Athijegannathan Sundararajan
95f14173b8 Merge 2013-07-29 10:28:03 +05:30
Jan Lahoda
0847cbc403 8021338: Diamond finder may mark a required type argument as unnecessary
Reviewed-by: mcimadamore
2013-07-28 10:17:45 +02:00
Jan Lahoda
21ab6d5558 8020689: Missing LineNumberTable entries in compiled class files
Reviewed-by: ksrini, mcimadamore
2013-07-28 10:17:45 +02:00
Carlos Lucasius
eab4ed5adb Merge 2013-07-27 17:23:11 -04:00
Lana Steuck
dd364409e2 Merge 2013-07-26 17:12:05 -07:00
Lana Steuck
6a0da744f9 Merge 2013-07-26 15:46:18 -07:00
Jennifer Godinez
82abf9473e 8016343: [macosx] Print job goes to default printer regardless of chosen printer
Reviewed-by: jchen, prr
2013-07-26 15:25:12 -07:00
Lana Steuck
1619b516b6 Merge 2013-07-26 15:19:30 -07:00
Jennifer Godinez
288fefed14 8020208: NullPointerException at sun.print.Win32PrintService.getMediaPrintables
Reviewed-by: jchen, prr
2013-07-26 15:08:49 -07:00
Lana Steuck
219047ad65 Merge 2013-07-26 14:08:51 -07:00
Lana Steuck
f5da332e66 Merge 2013-07-26 14:08:37 -07:00
Lana Steuck
6c3d986602 Merge 2013-07-26 14:01:00 -07:00
Tao Mao
5ce100bbd1 Merge 2013-07-26 13:34:22 -07:00
Vladimir Kozlov
8e2181cb13 8008938: TieredCompilation should be default
Switch on TieredCompilation by default

Reviewed-by: twisti
2013-07-26 12:37:39 -07:00
Sergey Bylokhov
4a42ba3816 7190349: [macosx] Text (Label) is incorrectly drawn with a rotated g2d
8013569: [macosx] JLabel preferred size incorrect on retina displays with non-default font size

Reviewed-by: prr
2013-07-26 21:18:42 +04:00
Frederic Parain
b4094e9fa8 8019845: Memory leak during class redefinition
Reviewed-by: acorn, jmasa, coleenp, dcubed, mgerdin
2013-07-26 15:24:32 +00:00
Athijegannathan Sundararajan
010a7705a4 8021571: @fork tests should use VM options passed from project.properties
Reviewed-by: lagergren, hannesw, jlaskey
2013-07-26 20:10:47 +05:30
Frederic Parain
6ede7eb0ed Merge 2013-07-26 05:54:01 -07:00
Leonid Romanov
b146ea38dd 8007267: [macosx] com.apple.eawt.Application.setDefaultMenuBar is not working
Reviewed-by: anthony, serb
2013-07-26 16:22:29 +04:00
Michael Horowitz
716045c405 8021321: Two runsunspider tests fail after updating sunspider to 1.0
Reviewed-by: jlaskey, sundar
2013-07-26 09:17:54 -03:00
Hannes Wallnöfer
77a2559593 8020719: Run tests with reduced splitter threshold
Reviewed-by: lagergren, sundar, jlaskey
2013-07-26 13:50:52 +02:00
Alejandro Murillo
31b3d4939e 8021566: new hotspot build - hs25-b44
Reviewed-by: jcoomes
2013-07-26 04:01:41 -07:00
Alejandro Murillo
4180daed71 Added tag hs25-b43 for changeset b29dcea3e5a4 2013-07-26 03:48:16 -07:00
Alejandro Murillo
d92f0f1dc3 Merge 2013-07-26 03:48:15 -07:00
David Holmes
b3c95408b2 8021314: minimal1.make needs to force off components not supported by the minimal VM
Reviewed-by: coleenp, bpittore
2013-07-25 21:05:29 -04:00
Jiangli Zhou
eac2213397 Merge 2013-07-25 18:12:02 -04:00
Joe Wang
5bf75c1ff9 8021148: Regression in SAXParserImpl in 7u40 b34 (NPE)
Reviewed-by: chegar, lancea, dfuchs
2013-07-25 13:02:37 -07:00
Hiroshi Yamauchi
6060a2999c 6412968: CMS Long initial mark pauses
Reviewed-by: rasbold, tschatzl, jmasa
2013-07-25 11:07:23 -07:00
Athijegannathan Sundararajan
fdb4922746 8021361: ClassCastException:.ScriptObjectMirror -> ScriptObject when getInterface called on object from different ScriptContext
Reviewed-by: jlaskey, attila
2013-07-25 20:10:48 +05:30
Jon Masamitsu
7d582a33d1 Merge 2013-07-25 07:02:45 -07:00
Maurizio Cimadamore
da6bbaf42b 8020843: javac crashes on accessibility check with method reference with typevar receiver
Method reference overload check doesn't walk through type-variable receivers

Reviewed-by: jjg
2013-07-25 14:51:40 +01:00
Maurizio Cimadamore
663170c654 8016081: field initialized with lambda in annotation types doesn't compile
Check for annotation attributes should skip over synthetic methods

Reviewed-by: jjg
2013-07-25 14:49:16 +01:00
Maurizio Cimadamore
67362236e8 8020804: javac crashes when speculative attribution infers intersection type with array component
Assertion is causing javac to crash because of lack of support for arrays in intersection types

Reviewed-by: jjg
2013-07-25 14:47:43 +01:00
Andrew Brygin
969c84555e 8019201: Regression: java.awt.image.ConvolveOp throws java.awt.image.ImagingOpException
Reviewed-by: prr
2013-07-25 17:14:39 +04:00
Christine Lu
fb82e775a7 Added tag jdk8-b100 for changeset 12baff1ad7a0 2013-07-25 03:19:44 -07:00
Christine Lu
a2fc898bfc Added tag jdk8-b100 for changeset 7a1ff44c7732 2013-07-25 03:19:39 -07:00
Christine Lu
b56fd2a459 Added tag jdk8-b100 for changeset d7b96032a966 2013-07-25 03:19:11 -07:00
Christine Lu
0b8e11509d Added tag jdk8-b100 for changeset 92cd364d2282 2013-07-25 03:19:02 -07:00
Christine Lu
236ff41145 Added tag jdk8-b100 for changeset 80bb0bd17234 2013-07-25 03:18:56 -07:00
Christine Lu
c8e70c6dcc Added tag jdk8-b100 for changeset 9493b1a85536 2013-07-25 03:18:31 -07:00
Christine Lu
be44477bb5 Added tag jdk8-b100 for changeset e7387def0ed3 2013-07-25 03:18:14 -07:00
Christine Lu
4821301ca1 Added tag jdk8-b100 for changeset 2c6e85d3bb72 2013-07-25 03:18:11 -07:00
Hannes Wallnöfer
55483aa548 8021244: Inconsistent stackmap with splitter threshold set very low
Reviewed-by: sundar, lagergren
2013-07-25 11:56:12 +02:00
Joel Borggrén-Franck
2030148ec2 8007961: javax.lang.model tests for repeating annotations fail in getAnnotationsByType
Reviewed-by: jjg
2013-07-25 11:02:27 +02:00
Athijegannathan Sundararajan
90fc477ac3 8021252: invokeMethod throws NoSuchMethodException when script object is from different script context
Reviewed-by: lagergren, hannesw
2013-07-25 14:05:03 +05:30
Jonathan Gibbons
0c5c756933 8020556: doclint does not check type variables for @throws
Reviewed-by: mcimadamore
2013-07-24 17:35:42 -07:00
David Holmes
6ade50a062 8020799: Allow customization of hotspot source directories and files
Reviewed-by: kvn, dlong
2013-07-24 19:23:26 -04:00
Morris Meyer
80b04bb48e Merge 2013-07-24 13:54:03 -07:00
Johnny Chen
a79be71e3a 8005126: [parfait] #418 - #428 XRBackendNative.c Integer overflow
Reviewed-by: prr, vadim
2013-07-24 13:05:03 -07:00
Johnny Chen
ae6e0e250d 8011709: [parfait] False positive: memory leak in jdk/src/share/native/sun/font/layout/CanonShaping.cpp
Reviewed-by: jgodinez, prr
2013-07-24 12:40:26 -07:00
Athijegannathan Sundararajan
97f5b61172 8021294: --verify-code option results in AnalyzerException
Reviewed-by: hannesw, jlaskey
2013-07-24 21:01:22 +05:30
Athijegannathan Sundararajan
67126cb8fb 8021262: Make nashorn access checks consistent with underlying dynalink
Reviewed-by: jlaskey, lagergren, attila
2013-07-24 20:28:03 +05:30
Sergey Bylokhov
48c46af177 8017189: [macosx] AWT program menu disabled on Mac
Reviewed-by: leonidr, anthony
2013-07-24 17:14:45 +04:00
Jim Laskey
27a09545ef Merge 2013-07-24 08:25:04 -03:00
Hannes Wallnöfer
cf28b19245 8020718: RETURN symbol has wrong type in split functions
Reviewed-by: lagergren, attila
2013-07-24 13:16:34 +02:00
Attila Szegedi
85d68499be 8021246: Fix regression for 8021189
Reviewed-by: lagergren, sundar
2013-07-24 12:48:09 +02:00
Vadim Pakhnushev
beb3d4af9f 8008782: NPE in TrueTypeGlyphMapper
Reviewed-by: bae, prr
2013-07-24 13:38:17 +04:00
Attila Szegedi
91e5fbd2e0 8021189: Prevent access to constructors of restricted classes
Reviewed-by: lagergren, sundar
2013-07-24 11:13:24 +02:00
Rickard Bäckman
763f24fbb9 8006324: [TEST_BUG] sun/invoke/util/ValueConversionsTest.java should be modified
Reviewed-by: kvn, twisti
2013-07-24 10:57:02 +02:00
Brian Burkhalter
0aa76a2c72 8020539: Clean up doclint problems in java.util package, part 2
Clean up doclint errors and warnings in classes in java.util

Reviewed-by: darcy, chegar
2013-07-30 10:35:06 -07:00
Paul Sandoz
ee1343b38a 8021883: j.u.Random/RandomStream.java test needs more robust timeout duration
Reviewed-by: chegar
2013-07-30 14:03:25 +01:00
Paul Sandoz
980e8cff6f 8021863: Stream.concat incorrectly calculates unsized state
Reviewed-by: chegar
2013-07-30 11:32:26 +01:00
Henry Jen
e8e95eec3a 8020977: StringJoiner merges with itself not as expected
Reviewed-by: psandoz, chegar, mduigou, smarks
2013-07-30 15:47:35 -07:00
Roger Riggs
b7c322c198 8021767: test/java/time/tck/java/time/format/TCKFormatStyle.java failing
Correct to use fixed locale, not locale of test environment

Reviewed-by: alanb, okutsu
2013-07-30 14:43:19 -07:00
Jason Uh
3e4d534e16 8021833: javadoc cleanup in java.net
<code> and <tt> converted to {@code }; package.html to package-info.java

Reviewed-by: darcy, chegar
2013-07-30 11:04:19 -07:00
Thomas Schatzl
93e5db7033 8020123: Test gc/g1/TestPrintRegionRememberedSetInfo.java fails with "test result: Error. No action after @build"
Remove the @build tag and replace it by a @run tag so that the test gets executed

Reviewed-by: brutisso, mgerdin
2013-07-24 10:07:37 +02:00
Yumin Qi
7f14f4a628 Merge 2013-07-24 08:04:15 +02:00
Eric McCorkle
be2ea6f949 8016880: 42 tests in annot102* fail with compile-time errors
Fixes error in type equality when bounds of type variables have annotations.

Reviewed-by: jjg, mcimadamore
2013-07-23 20:42:54 -04:00
Jonathan Gibbons
2a95b6ac74 8021215: javac gives incorrect doclint warnings on normal package statements
Reviewed-by: darcy
2013-07-23 16:06:11 -07:00
Yumin Qi
0840008f85 Merge 2013-07-23 12:50:15 -07:00
Hiroshi Yamauchi
5c9dbad612 6990419: CMS Remaining work for 6572569: consistently skewed work distribution in (long) re-mark pauses
Reviewed-by: rasbold, tschatzl, jmasa
2013-07-23 09:49:11 -07:00
Attila Szegedi
947610257d 8021129: Use public lookup again
Reviewed-by: lagergren, sundar
2013-07-23 18:28:58 +02:00
Athijegannathan Sundararajan
bb55b5cb23 Merge 2013-07-23 21:51:23 +05:30
Athijegannathan Sundararajan
34d2bae0b0 8021164: REGRESSION: test262 failures after JDK-8021122
Reviewed-by: jlaskey, hannesw
2013-07-23 21:45:27 +05:30
James Laskey
6983b4e9e3 8021130: Comments need to be tokens
Reviewed-by: lagergren, attila
2013-07-23 12:00:29 -03:00
Athijegannathan Sundararajan
e2975f94c6 8021122: Not all callables are handled for toString and other function valued properties
Reviewed-by: attila, hannesw, jlaskey
2013-07-23 18:17:25 +05:30
Petr Pchelko
a98d595162 7184951: [macosx] Exception at java.awt.datatransfer on headless mode (only in GUI session)
Reviewed-by: art, anthony
2013-07-23 13:09:44 +04:00
Yumin Qi
aebaf1978d Merge 2013-07-22 22:21:57 -07:00
Eric McCorkle
dd70c34130 8019632: Method parameters are not copied in clone_with_new_data
Add code to copy method parameters data in clone_with_new_data

Reviewed-by: coleenp, sspitsyn
2013-07-22 17:57:42 -04:00
Phil Race
19aa94ea70 7196866: CTW fails on all Solaris platforms
Reviewed-by: prr, jrose, twisti, kvn
2013-07-22 12:52:15 -07:00
Sergey Malenkov
54198bc15e 8015926: NPE when using SynthTreeUI's expandPath()
Reviewed-by: alexsch
2013-07-22 20:33:35 +04:00
Sergey Malenkov
bbd8917a4f 8019975: closed/javax/swing/JFileChooser/4966171/bug4966171.java throws java.io.NotSerializableException: javax.swing.plaf.basic.BasicFileChooserUI$AcceptAllFileFilter
Reviewed-by: alexsch
2013-07-22 15:36:30 +04:00
Calvin Cheung
3102612ca2 8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
Added -DLINUX to the gcc command and improved the .sh script

Reviewed-by: dcubed, dholmes, minqi
2013-07-19 14:54:54 -07:00
Yumin Qi
2bee4db29d 8012263: ciReplay: gracefully exit & report meaningful error when replay data parsing fails
Find_method could return NULL so need explicitly check if there is error after parse_method, exit on error to avoid crash.

Reviewed-by: kvn, twisti
2013-07-19 14:43:45 -07:00
Morris Meyer
30902b737d Merge 2013-07-19 13:59:25 -07:00
Anthony Scarpino
a7dbbbddcd 8012971: PKCS11Test hiding exception failures
Reviewed-by: vinnie, valeriep
2013-07-19 11:34:33 -07:00
Paul Sandoz
ea8bc25763 8020156: TreeMap.values().spliterator() does not report ORDERED
8020009: TreeMap.entrySet().spliterator() reports SORTED + null comparator but the elements are not Comparable

Reviewed-by: mduigou
2013-07-29 19:41:02 +01:00
Athijegannathan Sundararajan
9bfff4cae3 8021773: print function as defined by jrunscript's init.js script is incompatible with nashorn's definition
Reviewed-by: hannesw, lagergren
2013-07-29 21:39:21 +05:30
Mike Duigou
164f41212a 8021588: Remove explicit othervm execution from jdk/test/Makefile
Reviewed-by: alanb
2013-07-27 12:26:01 -07:00
Joe Darcy
7e692e2b86 8021609: Fix doclint issues in java.nio.charset
Reviewed-by: alanb
2013-07-27 10:27:04 -07:00
Brian Burkhalter
4fe69c432f 8020641: Clean up some code style in recent BigInteger contributions
Some minor cleanup to adhere better to Java coding conventions.

Reviewed-by: darcy
2013-07-26 17:09:30 -07:00
Tim Buktu
d59c1fac00 8014319: Faster division of large integers
Implement Burnickel-Ziegler division algorithm in BigInteger

Reviewed-by: bpb, martin
2013-07-26 17:03:19 -07:00
Mike Duigou
b9742daca7 8021601: Add unit test for PriorityQueue(Comparator) constructor
Reviewed-by: darcy, alanb
2013-07-26 17:23:20 -07:00
Lana Steuck
ac26dd6009 Merge 2013-07-26 15:16:53 -07:00
Rajan Halade
26d9259db7 8019544: Need to run ProviderTest.java in othervm mode
Reviewed-by: wetmore, xuelei, vinnie
2013-07-26 14:16:53 -07:00
Lana Steuck
29041e2c4a Merge 2013-07-26 14:07:32 -07:00
Jaroslav Bachorik
76c5530392 8020875: java/lang/management/ThreadMXBean/ResetPeakThreadCount.java fails intermittently
Reviewed-by: dfuchs, chegar
2013-07-26 10:12:14 +02:00
Yuka Kamiya
7678cb95bc 8021108: Clean up doclint warnings and errors in java.text package
Reviewed-by: darcy, okutsu
2013-07-26 17:22:08 +09:00
Joe Darcy
050d7f177b 8021429: Fix lint warnings in java.lang.ref
Reviewed-by: lancea, mduigou, alanb
2013-07-25 20:03:20 -07:00
Sean Mullan
642a01253c Merge 2013-07-25 20:30:58 -04:00
Sean Mullan
04378414a1 8012288: XML DSig API allows wrong tag names and extra elements in SignedInfo
Reviewed-by: xuelei
2013-07-25 20:12:14 -04:00
Joe Wang
59d8b774a8 8021148: Regression in SAXParserImpl in 7u40 b34 (NPE)
Reviewed-by: chegar, lancea, dfuchs
2013-07-25 13:20:19 -07:00
Chris Hegarty
60b519aaeb 8021421: More doclint fixes in java.net
Reviewed-by: lancea, darcy
2013-07-25 19:45:36 +01:00
Doug Lea
b1d650a6f8 8021417: Fix doclint issues in java.util.concurrent
Reviewed-by: chegar, lancea
2013-07-25 19:37:37 +01:00
Joe Darcy
f75ac88269 8021408: Fix misc doclint issues in java.util and java.io
Reviewed-by: dholmes, chegar, psandoz
2013-07-25 09:59:55 -07:00
Sean Mullan
5c30826657 Merge 2013-07-25 11:09:28 -04:00
Sean Mullan
74a0cc9f37 8010748: Add PKIXRevocationChecker NO_FALLBACK option and improve SOFT_FAIL option
Reviewed-by: vinnie
2013-07-25 10:58:00 -04:00
Chris Hegarty
4adcc57838 8021261: ProblemList.txt updates (7/2013)
Reviewed-by: alanb, mcimadamore
2013-07-24 22:52:01 +01:00
Jason Uh
e01b8f673e 8016916: UnstructuredName should support DirectoryString
Reviewed-by: mullan
2013-07-24 12:48:10 -07:00
Shanliang Jiang
28502e7c19 8016221: A unit test should not use a fix port to run a jmx connector
Reviewed-by: jbachorik, dfuchs
2013-07-24 15:47:10 +02:00
Mike Duigou
2f1e08ffec Merge 2013-07-23 13:21:07 -07:00
Brian Goetz
19ac28e61d 8019840: Spec updates for java.util.function
Reviewed-by: mduigou, chegar
2013-07-23 13:20:11 -07:00
Ivan Gerasimov
5db8580b26 8016838: improvement of RedefineBigClass and RetransformBigClass tests
Reviewed-by: dcubed
2013-07-23 18:57:57 +04:00
Joe Darcy
3392a6aecc 8021109: Add serialVersionUID to LambdaConversionException.java
Reviewed-by: jrose
2013-07-22 22:11:44 -07:00
Mike Duigou
e27ee62c84 6799426: Adds constructor PriorityQueue(Comparator)
Reviewed-by: lancea
2013-07-22 12:59:09 -07:00
Doug Lea
38008f1a21 8020976: Ensure consistent insertion for ConcurrentHashMap
Reviewed-by: chegar
2013-07-22 15:26:11 +01:00
Kurchi Subhra Hazra
027e8fa7c9 8020498: Crash when both libnet.so and libmawt.so are loaded
Reviewed-by: chegar, dsamersoff
2013-07-22 15:24:26 +01:00
Joe Darcy
da356310f4 8020971: Fix doclint issues in java.nio.*
Reviewed-by: lancea
2013-07-20 11:39:39 -07:00
Yumin Qi
e7cb3dfa22 Merge 2013-07-19 11:17:19 -07:00
Joe Darcy
44bf260d2d 8020948: Fix doclint issues in misc package-info.java files
Reviewed-by: dholmes, chegar
2013-07-19 09:42:58 -07:00
Markus Grönlund
c6cbd09027 8020547: Event based tracing needs a UNICODE string type
Reviewed-by: egahlin, rbackman, dcubed, brutisso, acorn
2013-07-19 17:56:27 +02:00
David Holmes
aa91e0674a 8016538: volatile double access via Unsafe.cpp is not atomic
Volatile jdouble load/store is not atomic, fix by using of existing volatile jlong operations which are atomic for jdouble.

Reviewed-by: kvn, vladidan, jrose
2013-07-19 08:34:48 -07:00
Kumar Srinivasan
c6c6fe7b5e 8017216: javac doesn't fill in end position for some errors of type not found
8019421: Javac doesn't fill in end position for some annotation related errors
8019422: Javac doesn't fill in end position for uninitialized variable errors

Reviewed-by: jjg, mcimadamore
2013-07-19 07:22:53 -07:00
Alexey Utkin
7267320515 8016579: (process) IOException thrown by ProcessBuilder.start() method is incorrectly encoded
Reviewed-by: martin, dxu
2013-07-19 12:53:36 +04:00
Joe Darcy
5cae1dc78f 8020810: Typo in javadoc for Class.toGenericString()
Reviewed-by: dholmes
2013-07-18 23:16:52 -07:00
Yumin Qi
a58e25d0b4 Merge 2013-07-18 18:00:39 -07:00
Calvin Cheung
1a1e83be6a 8004872: Early loading of HashMap and StringValue under -XX:+AggressiveOpts can be removed
This fix also removes the -XX:+UseStringCache option

Reviewed-by: dholmes, acorn, iklam
2013-07-18 14:57:51 -07:00
Daniel D. Daugherty
c2c0ba529a Merge 2013-07-18 12:35:55 -07:00
Daniel D. Daugherty
c421e7a0d3 Merge 2013-07-18 12:05:32 -07:00
Stephen Colebourne
711f7a37e0 8016025: JSR 310 DateTime API Updates IV
8020418: Cleanup of -Xlint warnings in java.time
8016623: test/java/time/format/TestDateTimeTextProvider.java failing

Integration of JSR310 Date/Time API update IV

Co-authored-by: Roger Riggs <roger.riggs@oracle.com>
Co-authored-by: Masayoshi Okutsu <masayoshi.okutsu@oracle.com>
Co-authored-by: Patrick Zhang <patrick.zhang@oracle.com>
Co-authored-by: Chand Basha <chand.basha@oracle.com>
Reviewed-by: sherman
2013-07-18 11:02:02 -07:00
Jason Uh
3c5d7e26d1 8020426: Fix doclint accessibility issues in java.io
Reviewed-by: mduigou, darcy, chegar
2013-07-18 10:49:08 -07:00
Alejandro Murillo
0c344951cc 8020797: new hotspot build - hs25-b43
Reviewed-by: jcoomes
2013-07-18 09:35:02 -07:00
Attila Szegedi
566991e98e 8020820: Limit access to static members of reflective classes
Reviewed-by: jlaskey, sundar
2013-07-18 16:47:45 +02:00
Attila Szegedi
3a0f1e0653 8020809: Java adapter should not allow overriding of caller sensitive methods
Reviewed-by: jlaskey, sundar
2013-07-18 16:22:25 +02:00
Athijegannathan Sundararajan
21be9aded6 8020731: Revisit checkPermission calls in Context class
Reviewed-by: attila, hannesw
2013-07-18 18:08:26 +05:30
David Simms
71ca890b66 8020697: jniCheck.cpp:check_is_obj_array asserts on TypeArrayKlass::cast(aOop->klass())
Reviewed-by: dcubed, fparain, dholmes
2013-07-18 06:47:15 -04:00
Jonathan Gibbons
c42bcf4526 8020664: doclint gives incorrect warnings on normal package statements
Reviewed-by: mcimadamore
2013-07-17 19:16:12 -07:00
Jonathan Gibbons
772640d4e8 8020313: doclint doesn't reset HTML anchors correctly
Reviewed-by: mcimadamore
2013-07-17 19:12:03 -07:00
Jonathan Gibbons
89197f0946 8014636: TestLiteralCodeInPre fails on windows
Reviewed-by: ksrini
2013-07-17 18:18:45 -07:00
Jiangli Zhou
3c7f50e9f2 Merge 2013-07-17 17:14:50 -07:00
Jiangli Zhou
3dfcb4125e 8020309: Eliminate InstanceKlass::_cached_class_file_len
Use JvmtiCachedClassFileData.

Reviewed-by: iklam, sspitsyn, dcubed
2013-07-17 18:06:29 -04:00
Calvin Cheung
ef70244a9a 8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
Added (sig < MAXSIGNUM) check in jsig.c

Reviewed-by: dholmes, acorn
2013-07-17 12:22:57 -07:00
Hannes Wallnöfer
c4bea48ac1 8020356: ClassCastException Undefined->Scope on spiltter class generated for a large switch statement
Reviewed-by: jlaskey, attila
2013-07-17 18:20:40 +02:00
James Laskey
2c90f36ca0 8020596: Initialization of white space strings in scanner should be done with \u strings
Reviewed-by: attila, hannesw
2013-07-17 11:53:09 -03:00
Rickard Bäckman
2d77390705 8020701: Avoid crashes in WatcherThread
Reviewed-by: acorn, dcubed, dsimms
2013-07-17 13:48:15 +02:00
Konstantin Shefov
3485b7bc5c 8017585: Exclude two failing tests from Nashorn CC run
Reviewed-by: jlaskey, sundar, attila
2013-07-16 17:40:15 -03:00
Vladimir Kozlov
665bf36b6f 8020433: Crash when using -XX:+RestoreMXCSROnJNICalls
Remove StubRoutines::x86::_mxcsr_std and use StubRoutines::_mxcsr_std

Reviewed-by: jrose
2013-07-15 10:28:32 -07:00
Morris Meyer
bb62cf25ed Merge 2013-07-15 06:27:46 -07:00
Vladimir Kozlov
1338c067aa 8007898: Incorrect optimization of Memory Barriers in Matcher::post_store_load_barrier()
Generate one "fat" membar instead of set of barriers for volitile store

Reviewed-by: roland
2013-07-12 14:03:10 -07:00
Vladimir Kozlov
2d3b117249 8020215: Different execution plan when using JIT vs interpreter
Fix bytecode analyzer

Reviewed-by: twisti
2013-07-12 14:01:37 -07:00
Brian Goetz
e11ec149ce 8015318: Extend Collector with 'finish' operation
Reviewed-by: mduigou
2013-06-28 16:26:54 -04:00
Joe Darcy
10f964a324 8022406: Fix doclint issues in java.beans
Reviewed-by: prr
2013-08-06 16:01:39 -07:00
Dan Xu
bcf263eb10 8022410: Fix Javac Warnings in com.sun.security.auth Package
Reviewed-by: darcy
2013-08-06 14:33:56 -07:00
Stuart Marks
6c4cb95171 8022440: suppress deprecation warnings in sun.rmi
Reviewed-by: mduigou
2013-08-06 14:24:05 -07:00
Jason Uh
6ecdd925d1 8022443: Fix lint warnings in sun.security.pkcs12
Reviewed-by: darcy
2013-08-06 14:10:06 -07:00
Jason Uh
ebb9d2fb06 8022439: Fix lint warnings in sun.security.ec
Reviewed-by: darcy
2013-08-06 13:46:15 -07:00
Marcus Lagergren
cd162a777d 8022412: Fixed warnings in java.util root, except for HashMap
Reviewed-by: mduigou, darcy
2013-08-06 12:56:18 -07:00
Joe Darcy
ae54a3c965 8022174: Fix doclint warnings in javax.sound
8022404: Fix doclint issues in java.applet

Reviewed-by: prr
2013-08-06 13:25:04 -07:00
Amy Lu
0f4a06a92a 7184826: (reflect) Add support for Project Lambda concepts in core reflection
Reviewed-by: darcy, jfranck
2013-08-06 18:54:02 +02:00
Sean Mullan
a3b4abc14b Merge 2013-08-06 08:34:28 -07:00
Sean Mullan
78255f5c55 8022120: JCK test api/javax_xml/crypto/dsig/TransformService/index_ParamMethods fails
TransformService.init and marshalParams must throw NullPointerException when parent parameter is null

Reviewed-by: xuelei
2013-08-06 08:31:24 -07:00
Chris Hegarty
04449cd1a9 8022344: Additional debug info for test/java/net/NetworkInterface/IndexTest.java
Reviewed-by: michaelm, alanb
2013-08-06 15:35:20 +01:00
Dmitry Samersoff
b65847a206 8011038: sourceObj validation during desereliazation of RelationNotification should be relaxed
SourceObj could be set to null by setSource() relax a validation of deserialized object.

Reviewed-by: sjiang, skoivu, dfuchs
2013-08-06 14:04:49 +04:00
Stuart Marks
c05c2330cf 8020854: change RMI javadocs to specify that remote objects are exported to the wildcard address
Reviewed-by: rgallard, alanb
2013-08-05 19:12:33 -07:00
Andreas Rieber
bdc36d78a1 8016531: jconsole-plugin script demo does not work with nashorn
Reviewed-by: lagergren, hannesw
2013-08-05 21:31:40 +05:30
Joe Darcy
2be7768ab0 8022190: Fix varargs lint warnings in the JDK
Reviewed-by: alanb, lancea, alexsch
2013-08-05 07:50:16 -07:00
Brian Burkhalter
aafacb6fa6 8022094: BigDecimal/CompareToTests and BigInteger/CompareToTests are incorrect
Fail test if errors; fix test values; port BigDecimal version to BigInteger

Reviewed-by: smarks, alanb
2013-08-02 11:10:41 -07:00
Brent Christian
b661fb4e1a 8011194: Apps launched via double-clicked .jars have file.encoding value of US-ASCII on Mac OS X
On Mac, default to UTF-8 if no environmental hints are available

Reviewed-by: naoto, ddehaven
2013-08-02 15:30:11 -07:00
Brian Burkhalter
2c31d993a4 6476168: (fmt) Inconsistency formatting subnormal doubles with hexadecimal conversion
Update specification to match implementation.

Reviewed-by: darcy
2013-07-31 10:53:33 -07:00
Sean Mullan
575679c789 Merge 2013-08-02 09:38:13 -04:00
Doug Lea
b1a10b8ed7 8020291: j.u.c.CompletionStage
8020435: CompletableFuture/Basic.java fails on single core machine

Reviewed-by: chegar, psandoz
2013-08-02 14:29:31 +01:00
Sean Mullan
7474815db8 Merge 2013-08-02 08:37:25 -04:00
Sean Mullan
0844d3e77b 8001319: Add SecurityPermission "insertProvider" target name
Reviewed-by: vinnie
2013-08-02 08:30:46 -04:00
Chris Hegarty
49fe3afa18 8022121: Remove superfluous @test tag from SpliteratorTraversingAndSplittingTest
Reviewed-by: psandoz
2013-08-02 11:25:00 +01:00
Alexey Utkin
b456dfe629 8020191: System.getProperty("os.name") returns "Windows NT (unknown)" on Windows 8.1
Reviewed-by: alanb, khazra, chegar
2013-08-02 13:16:43 +04:00
Weijun Wang
9688bbb771 8021789: jarsigner parses alias as command line option (depending on locale)
Reviewed-by: vinnie
2013-08-02 08:59:37 +08:00
Paul Sandoz
3e78508945 8020016: Numerous splitereator impls do not throw NPE for null Consumers
Reviewed-by: mduigou, alanb, henryjen
2013-08-01 15:28:57 +01:00
Doug Lea
98fb15899e 8022087: Fix doclint issues in j.u.Deque & Queue
Reviewed-by: chegar, darcy
2013-08-01 16:53:40 +01:00
Xue-Lei Andrew Fan
b431c6929d 7127524: P11TlsPrfGenerator has anonymous inner class with serialVersionUID
Reviewed-by: vinnie
2013-08-01 07:34:30 -07:00
Ivan Gerasimov
ebe38d6cdc 8020669: (fs) Files.readAllBytes() does not read any data when Files.size() is 0
Reviewed-by: alanb, chegar, martin, rriggs
2013-07-29 12:35:42 +04:00
Ivan Gerasimov
e1b3c5b5ba 7192942: (coll) Inefficient calculation of power of two in HashMap
Reviewed-by: mduigou
2013-07-30 21:11:08 +04:00
Chris Hegarty
8a710dcc7e 8022061: More ProblemList.txt updates (7/2013)
Reviewed-by: alanb, psandoz
2013-08-01 12:38:07 +01:00
Rickard Bäckman
9a67229e2f 8016131: nsk/sysdict/vm/stress/chain tests crash the VM in 'entry_frame_is_first()'
Reviewed-by: jrose, kvn, mgronlun
2013-06-12 11:17:39 +02:00
David Simms
1859ec2556 6671508: JNI GetPrimitiveArrayCritical should not be callable on object arrays
Checked JNI now reports error for Get/ReleasePrimitiveArrayCritical on object arrays

Reviewed-by: dholmes, acorn
2013-07-16 07:33:29 +02:00
Tim Bell
a47de580e7 8015759: hotspot changes needed to compile with Visual Studio 2012
Reviewed-by: anthony, dholmes, dcubed
2013-07-15 23:23:15 -04:00
Rickard Bäckman
63912d82f0 Merge 2013-07-15 12:06:50 +02:00
David Simms
2d5af88356 8019324: assert(_f2 == 0 || _f2 == f2) failed: illegal field change
Reviewed-by: dholmes, rbackman
2013-07-15 11:35:10 +02:00
Frederic Parain
0f4447e6dd Merge 2013-07-15 00:23:48 -07:00
Christian Tornqvist
e67d425245 Merge 2013-07-12 20:47:23 +02:00
Peter Allwin
221308625d 7162400: Intermittent java.io.IOException: Bad file number during HotSpotVirtualMachine.executeCommand
Intermittent java.io.IOException: Bad file number during HotSpotVirtualMachine.executeCommand

Reviewed-by: dcubed, dholmes, sspitsyn, mgerdin, ctornqvi, dsamersoff
2013-07-12 18:43:27 +02:00
Zhengyu Gu
859de70b8a Merge 2013-07-12 04:35:52 -07:00
Zhengyu Gu
9ff3405151 8012241: NMT huge memory footprint, it usually leads to OOME
Enforce memory limitation on NMT to prevent JVM OOM

Reviewed-by: acorn, dcubed, minqi
2013-07-11 13:15:12 -04:00
Frederic Parain
c716fa083c 7143807: ResourceMark nesting problem in stringStream
Reviewed-by: kvn, dcubed
2013-07-10 15:49:15 +00:00
Stefan Karlsson
70f22c649b 8022880: False sharing between PSPromotionManager instances
Pad the PSPromotionManager instances in the manager array.

Reviewed-by: brutisso, jmasa
2013-05-31 14:32:44 +02:00
1519 changed files with 91518 additions and 26193 deletions

View File

@@ -221,3 +221,8 @@ ea73f01b9053e7165e7ba80f242bafecbc6af712 jdk8-b96
0a85476a0b9cb876d5666d45097dac68bef3fce1 jdk8-b97
711eb4aa87de68de78250e0549980936bab53d54 jdk8-b98
2d3875b0d18b3ad1c2bebf385a697e309e4005a4 jdk8-b99
3d34036aae4ea90b2ca59712d5a69db3221f0875 jdk8-b100
edb01c460d4cab21ff0ff13512df7b746efaa0e7 jdk8-b101
bbe43d712fe08e650808d774861b256ccb34e500 jdk8-b102
30a1d677a20c6a95f98043d8f20ce570304e3818 jdk8-b103
b5ed503c26ad38869c247c5e32debec217fd056b jdk8-b104

View File

@@ -221,3 +221,8 @@ c156084add486f941c12d886a0b1b2854795d557 jdk8-b96
a1c1e8bf71f354f3aec0214cf13d6668811e021d jdk8-b97
0d0c983a817bbe8518a5ff201306334a8de267f2 jdk8-b98
59dc9da813794c924a0383c2a6241af94defdfed jdk8-b99
d2dcb110e9dbaf9903c05b211df800e78e4b394e jdk8-b100
9f74a220677dc265a724515d8e2617548cef62f1 jdk8-b101
5eb3c1dc348f72a7f84f7d9d07834e8bbe09a799 jdk8-b102
b7e64be81c8a7690703df5711f4fc2375da8a9cb jdk8-b103
96c1b9b7524b52c3fcefc90ffad4c767396727c8 jdk8-b104

View File

@@ -154,7 +154,7 @@
</code>
</blockquote>
Once you have all the repositories, keep in mind that each
repository is it's own independent repository.
repository is its own independent repository.
You can also re-run <code>./get_source.sh</code> anytime to
pull over all the latest changesets in all the repositories.
This set of nested repositories has been given the term
@@ -241,6 +241,14 @@
source code for the OpenJDK Corba functionality
</td>
</tr>
<tr>
<td>
nashorn
</td>
<td>
source code for the OpenJDK JavaScript implementation
</td>
</tr>
</tbody>
</table>
</blockquote>
@@ -386,7 +394,7 @@
<code>--with-boot-jdk</code>.
</li>
<li>
Insure that GNU make, the Bootstrap JDK,
Ensure that GNU make, the Bootstrap JDK,
and the compilers are all
in your PATH environment variable
</li>
@@ -1307,9 +1315,9 @@
you will need to modify the makefiles. But for normal file
additions or removals, no changes are needed. There are certan
exceptions for some native libraries where the source files are spread
over many directories which also contain courses for other
over many directories which also contain sources for other
libraries. In these cases it was simply easier to create include lists
rather thane excludes.
rather than excludes.
</p>
<p>
@@ -1327,14 +1335,14 @@
<p>
<b>Q:</b>
<code>configure</code> provides OpenJDK-specific features such as
<code>--enable-jigsaw</code> or <code>--with-builddeps-server</code>
that are not described in this document. What about those?
<code>--with-builddeps-server</code> that are not
described in this document. What about those?
<br>
<b>A:</b>
Try them out if you like! But be aware that most of these are
experimental features.
Many of them don't do anything at all at the moment; the option
is just a placeholder. Other depends on
is just a placeholder. Others depend on
pieces of code or infrastructure that is currently
not ready for prime time.
</p>
@@ -1385,24 +1393,6 @@
system and some will need to wait until after.
</p>
<p>
<b>Q:</b> What is @GenerateNativeHeaders?
<br>
<b>A:</b>
To speed up compilation, we added a flag to javac which makes it
do the job of javah as well, as a by-product; that is, generating
native .h header files. These files are only generated
if a class contains native methods. However, sometimes
a class contains no native method,
but still contains constants that native code needs to use.
The new GenerateNativeHeaders annotation tells javac to
force generation of a
header file in these cases. (We don't want to generate
native headers for all classes that contains constants
but no native methods, since
that would slow down the compilation process needlessly.)
</p>
<p>
<b>Q:</b>
Is anything able to use the results of the new build's default make target?
@@ -1429,10 +1419,9 @@
What should I do?
<br>
<b>A:</b>
It might very well be that we have missed to add support for
It might very well be that we have neglected to add support for
an option that was actually used from outside the build system.
Email us and we will
add support for it!
Email us and we will add support for it!
</p>
</blockquote>

File diff suppressed because it is too large Load Diff

View File

@@ -412,17 +412,16 @@ AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
[
# keep track of c/cxx flags that we added outselves...
# to prevent emitting warning...
ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
AC_SUBST(TARGET_BITS_FLAG)
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],

View File

@@ -304,6 +304,7 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
COMPILER_TYPE:=@COMPILER_TYPE@
COMPILER_NAME:=@COMPILER_NAME@
TARGET_BITS_FLAG=@TARGET_BITS_FLAG@
COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@
CC_OUT_OPTION:=@CC_OUT_OPTION@

View File

@@ -905,7 +905,7 @@ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
# Setting these parameters makes it an error to link to macosx APIs that are
# newer than the given OS version and makes the linked binaries compatible even
# if built on a newer version of the OS.

View File

@@ -83,9 +83,6 @@ $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NE
$(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
$(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
# Remove any relative addressing in the paths.
$1_SRC := $$(abspath $$($1_SRC))
$1_BIN := $$(abspath $$($1_BIN))
# Find all existing java files and existing class files.
$$(eval $$(call MakeDir,$$($1_BIN)))
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")

View File

@@ -204,7 +204,7 @@ clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jd
# If the output directory was created by configure and now becomes empty, remove it as well.
# FIXME: tmp should not be here, fix ResetTimers instead. And remove spec.sh!
dist-clean: clean
@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp)
@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers)
@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\

View File

@@ -221,3 +221,8 @@ c8286839d0df04aba819ec4bef12b86babccf30e jdk8-b90
469995a8e97424f450c880606d689bf345277b19 jdk8-b97
3370fb6146e47a6cc05a213fc213e12fc0a38d07 jdk8-b98
3f67804ab61303782df57e54989ef5e0e4629beb jdk8-b99
8d492f1dfd1b131a4c7886ee6b59528609f7e4fe jdk8-b100
a013024b07475782f1fa8e196e950b34b4077663 jdk8-b101
528c7e76eaeee022817ee085668459bc97cf5665 jdk8-b102
49c4a777fdfd648d4c3fffc940fdb97a23108ca8 jdk8-b103
d411c60a8c2fe8fdc572af907775e90f7eefd513 jdk8-b104

View File

@@ -1,528 +0,0 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.encoding;
import java.io.IOException;
import java.io.Serializable;
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.Principal;
import org.omg.CORBA.Any;
import com.sun.org.omg.SendingContext.CodeBase;
import com.sun.corba.se.pept.protocol.MessageMediator;
import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
import com.sun.corba.se.spi.protocol.CorbaMessageMediator;
import com.sun.corba.se.impl.logging.ORBUtilSystemException;
import com.sun.corba.se.impl.encoding.CodeSetConversion;
import com.sun.corba.se.impl.encoding.OSFCodeSetRegistry;
/**
* This is delegates to the real implementation.
*
* NOTE:
*
* Before using the stream for valuetype unmarshaling, one must call
* performORBVersionSpecificInit().
*/
public abstract class CDRInputStream
extends org.omg.CORBA_2_3.portable.InputStream
implements com.sun.corba.se.impl.encoding.MarshalInputStream,
org.omg.CORBA.DataInputStream, org.omg.CORBA.portable.ValueInputStream
{
protected CorbaMessageMediator messageMediator;
private CDRInputStreamBase impl;
// We can move this out somewhere later. For now, it serves its purpose
// to create a concrete CDR delegate based on the GIOP version.
private static class InputStreamFactory {
public static CDRInputStreamBase newInputStream(ORB orb, GIOPVersion version)
{
switch(version.intValue()) {
case GIOPVersion.VERSION_1_0:
return new CDRInputStream_1_0();
case GIOPVersion.VERSION_1_1:
return new CDRInputStream_1_1();
case GIOPVersion.VERSION_1_2:
return new CDRInputStream_1_2();
default:
ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_ENCODING ) ;
throw wrapper.unsupportedGiopVersion( version ) ;
}
}
}
// Required for the case when a ClientResponseImpl is
// created with a SystemException due to a dead server/closed
// connection with no warning. Note that the stream will
// not be initialized in this case.
//
// Probably also required by ServerRequestImpl.
//
// REVISIT.
public CDRInputStream() {
}
public CDRInputStream(CDRInputStream is) {
impl = is.impl.dup();
impl.setParent(this);
}
public CDRInputStream(org.omg.CORBA.ORB orb,
ByteBuffer byteBuffer,
int size,
boolean littleEndian,
GIOPVersion version,
BufferManagerRead bufMgr)
{
impl = InputStreamFactory.newInputStream( (ORB)orb, version);
impl.init(orb, byteBuffer, size, littleEndian, bufMgr);
impl.setParent(this);
}
// org.omg.CORBA.portable.InputStream
public final boolean read_boolean() {
return impl.read_boolean();
}
public final char read_char() {
return impl.read_char();
}
public final char read_wchar() {
return impl.read_wchar();
}
public final byte read_octet() {
return impl.read_octet();
}
public final short read_short() {
return impl.read_short();
}
public final short read_ushort() {
return impl.read_ushort();
}
public final int read_long() {
return impl.read_long();
}
public final int read_ulong() {
return impl.read_ulong();
}
public final long read_longlong() {
return impl.read_longlong();
}
public final long read_ulonglong() {
return impl.read_ulonglong();
}
public final float read_float() {
return impl.read_float();
}
public final double read_double() {
return impl.read_double();
}
public final String read_string() {
return impl.read_string();
}
public final String read_wstring() {
return impl.read_wstring();
}
public final void read_boolean_array(boolean[] value, int offset, int length) {
impl.read_boolean_array(value, offset, length);
}
public final void read_char_array(char[] value, int offset, int length) {
impl.read_char_array(value, offset, length);
}
public final void read_wchar_array(char[] value, int offset, int length) {
impl.read_wchar_array(value, offset, length);
}
public final void read_octet_array(byte[] value, int offset, int length) {
impl.read_octet_array(value, offset, length);
}
public final void read_short_array(short[] value, int offset, int length) {
impl.read_short_array(value, offset, length);
}
public final void read_ushort_array(short[] value, int offset, int length) {
impl.read_ushort_array(value, offset, length);
}
public final void read_long_array(int[] value, int offset, int length) {
impl.read_long_array(value, offset, length);
}
public final void read_ulong_array(int[] value, int offset, int length) {
impl.read_ulong_array(value, offset, length);
}
public final void read_longlong_array(long[] value, int offset, int length) {
impl.read_longlong_array(value, offset, length);
}
public final void read_ulonglong_array(long[] value, int offset, int length) {
impl.read_ulonglong_array(value, offset, length);
}
public final void read_float_array(float[] value, int offset, int length) {
impl.read_float_array(value, offset, length);
}
public final void read_double_array(double[] value, int offset, int length) {
impl.read_double_array(value, offset, length);
}
public final org.omg.CORBA.Object read_Object() {
return impl.read_Object();
}
public final TypeCode read_TypeCode() {
return impl.read_TypeCode();
}
public final Any read_any() {
return impl.read_any();
}
public final Principal read_Principal() {
return impl.read_Principal();
}
public final int read() throws java.io.IOException {
return impl.read();
}
public final java.math.BigDecimal read_fixed() {
return impl.read_fixed();
}
public final org.omg.CORBA.Context read_Context() {
return impl.read_Context();
}
public final org.omg.CORBA.Object read_Object(java.lang.Class clz) {
return impl.read_Object(clz);
}
public final org.omg.CORBA.ORB orb() {
return impl.orb();
}
// org.omg.CORBA_2_3.portable.InputStream
public final java.io.Serializable read_value() {
return impl.read_value();
}
public final java.io.Serializable read_value(java.lang.Class clz) {
return impl.read_value(clz);
}
public final java.io.Serializable read_value(org.omg.CORBA.portable.BoxedValueHelper factory) {
return impl.read_value(factory);
}
public final java.io.Serializable read_value(java.lang.String rep_id) {
return impl.read_value(rep_id);
}
public final java.io.Serializable read_value(java.io.Serializable value) {
return impl.read_value(value);
}
public final java.lang.Object read_abstract_interface() {
return impl.read_abstract_interface();
}
public final java.lang.Object read_abstract_interface(java.lang.Class clz) {
return impl.read_abstract_interface(clz);
}
// com.sun.corba.se.impl.encoding.MarshalInputStream
public final void consumeEndian() {
impl.consumeEndian();
}
public final int getPosition() {
return impl.getPosition();
}
// org.omg.CORBA.DataInputStream
public final java.lang.Object read_Abstract () {
return impl.read_Abstract();
}
public final java.io.Serializable read_Value () {
return impl.read_Value();
}
public final void read_any_array (org.omg.CORBA.AnySeqHolder seq, int offset, int length) {
impl.read_any_array(seq, offset, length);
}
public final void read_boolean_array (org.omg.CORBA.BooleanSeqHolder seq, int offset, int length) {
impl.read_boolean_array(seq, offset, length);
}
public final void read_char_array (org.omg.CORBA.CharSeqHolder seq, int offset, int length) {
impl.read_char_array(seq, offset, length);
}
public final void read_wchar_array (org.omg.CORBA.WCharSeqHolder seq, int offset, int length) {
impl.read_wchar_array(seq, offset, length);
}
public final void read_octet_array (org.omg.CORBA.OctetSeqHolder seq, int offset, int length) {
impl.read_octet_array(seq, offset, length);
}
public final void read_short_array (org.omg.CORBA.ShortSeqHolder seq, int offset, int length) {
impl.read_short_array(seq, offset, length);
}
public final void read_ushort_array (org.omg.CORBA.UShortSeqHolder seq, int offset, int length) {
impl.read_ushort_array(seq, offset, length);
}
public final void read_long_array (org.omg.CORBA.LongSeqHolder seq, int offset, int length) {
impl.read_long_array(seq, offset, length);
}
public final void read_ulong_array (org.omg.CORBA.ULongSeqHolder seq, int offset, int length) {
impl.read_ulong_array(seq, offset, length);
}
public final void read_ulonglong_array (org.omg.CORBA.ULongLongSeqHolder seq, int offset, int length) {
impl.read_ulonglong_array(seq, offset, length);
}
public final void read_longlong_array (org.omg.CORBA.LongLongSeqHolder seq, int offset, int length) {
impl.read_longlong_array(seq, offset, length);
}
public final void read_float_array (org.omg.CORBA.FloatSeqHolder seq, int offset, int length) {
impl.read_float_array(seq, offset, length);
}
public final void read_double_array (org.omg.CORBA.DoubleSeqHolder seq, int offset, int length) {
impl.read_double_array(seq, offset, length);
}
// org.omg.CORBA.portable.ValueBase
public final String[] _truncatable_ids() {
return impl._truncatable_ids();
}
// java.io.InputStream
public final int read(byte b[]) throws IOException {
return impl.read(b);
}
public final int read(byte b[], int off, int len) throws IOException {
return impl.read(b, off, len);
}
public final long skip(long n) throws IOException {
return impl.skip(n);
}
public final int available() throws IOException {
return impl.available();
}
public final void close() throws IOException {
impl.close();
}
public final void mark(int readlimit) {
impl.mark(readlimit);
}
public final void reset() {
impl.reset();
}
public final boolean markSupported() {
return impl.markSupported();
}
public abstract CDRInputStream dup();
// Needed by TCUtility
public final java.math.BigDecimal read_fixed(short digits, short scale) {
return impl.read_fixed(digits, scale);
}
public final boolean isLittleEndian() {
return impl.isLittleEndian();
}
protected final ByteBuffer getByteBuffer() {
return impl.getByteBuffer();
}
protected final void setByteBuffer(ByteBuffer byteBuffer) {
impl.setByteBuffer(byteBuffer);
}
protected final void setByteBufferWithInfo(ByteBufferWithInfo bbwi) {
impl.setByteBufferWithInfo(bbwi);
}
public final int getBufferLength() {
return impl.getBufferLength();
}
protected final void setBufferLength(int value) {
impl.setBufferLength(value);
}
protected final int getIndex() {
return impl.getIndex();
}
protected final void setIndex(int value) {
impl.setIndex(value);
}
public final void orb(org.omg.CORBA.ORB orb) {
impl.orb(orb);
}
public final GIOPVersion getGIOPVersion() {
return impl.getGIOPVersion();
}
public final BufferManagerRead getBufferManager() {
return impl.getBufferManager();
}
// This should be overridden by any stream (ex: IIOPInputStream)
// which wants to read values. Thus, TypeCodeInputStream doesn't
// have to do this.
public CodeBase getCodeBase() {
return null;
}
// Use Latin-1 for GIOP 1.0 or when code set negotiation was not
// performed.
protected CodeSetConversion.BTCConverter createCharBTCConverter() {
return CodeSetConversion.impl().getBTCConverter(OSFCodeSetRegistry.ISO_8859_1,
impl.isLittleEndian());
}
// Subclasses must decide what to do here. It's inconvenient to
// make the class and this method abstract because of dup().
protected abstract CodeSetConversion.BTCConverter createWCharBTCConverter();
// Prints the current buffer in a human readable form
void printBuffer() {
impl.printBuffer();
}
/**
* Aligns the current position on the given octet boundary
* if there are enough bytes available to do so. Otherwise,
* it just returns. This is used for some (but not all)
* GIOP 1.2 message headers.
*/
public void alignOnBoundary(int octetBoundary) {
impl.alignOnBoundary(octetBoundary);
}
// Needed by request and reply messages for GIOP versions >= 1.2 only.
public void setHeaderPadding(boolean headerPadding) {
impl.setHeaderPadding(headerPadding);
}
/**
* This must be called after determining the proper ORB version,
* and setting it on the stream's ORB instance. It can be called
* after reading the service contexts, since that is the only place
* we can get the ORB version info.
*
* Trying to unmarshal things requiring repository IDs before calling
* this will result in NullPtrExceptions.
*/
public void performORBVersionSpecificInit() {
// In the case of SystemExceptions, a stream is created
// with its default constructor (and thus no impl is set).
if (impl != null)
impl.performORBVersionSpecificInit();
}
/**
* Resets any internal references to code set converters.
* This is useful for forcing the CDR stream to reacquire
* converters (probably from its subclasses) when state
* has changed.
*/
public void resetCodeSetConverters() {
impl.resetCodeSetConverters();
}
public void setMessageMediator(MessageMediator messageMediator)
{
this.messageMediator = (CorbaMessageMediator) messageMediator;
}
public MessageMediator getMessageMediator()
{
return messageMediator;
}
// ValueInputStream -----------------------------
public void start_value() {
impl.start_value();
}
public void end_value() {
impl.end_value();
}
}

View File

@@ -1,435 +0,0 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.encoding;
import java.io.IOException;
import java.io.Serializable;
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.Principal;
import org.omg.CORBA.Any;
import com.sun.corba.se.pept.protocol.MessageMediator;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
import com.sun.corba.se.spi.protocol.CorbaMessageMediator;
import com.sun.corba.se.impl.encoding.CodeSetConversion;
import com.sun.corba.se.impl.encoding.OSFCodeSetRegistry;
import com.sun.corba.se.impl.orbutil.ORBConstants;
import com.sun.corba.se.impl.logging.ORBUtilSystemException;
/**
* This is delegates to the real implementation.
*/
public abstract class CDROutputStream
extends org.omg.CORBA_2_3.portable.OutputStream
implements com.sun.corba.se.impl.encoding.MarshalOutputStream,
org.omg.CORBA.DataOutputStream, org.omg.CORBA.portable.ValueOutputStream
{
/*
private CDROutputStreamBase impl;
protected ORB orb ;
protected ORBUtilSystemException wrapper ;
protected CorbaMessageMediator corbaMessageMediator;
// We can move this out somewhere later. For now, it serves its purpose
// to create a concrete CDR delegate based on the GIOP version.
private static class OutputStreamFactory {
public static CDROutputStreamBase newOutputStream(ORB orb, GIOPVersion version)
{
switch(version.intValue()) {
case GIOPVersion.VERSION_1_0:
return new CDROutputStream_1_0();
case GIOPVersion.VERSION_1_1:
return new CDROutputStream_1_1();
case GIOPVersion.VERSION_1_2:
return new CDROutputStream_1_2();
default:
ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_ENCODING ) ;
// REVISIT - what is appropriate? INTERNAL exceptions
// are really hard to track later.
throw wrapper.unsupportedGiopVersion( version ) ;
}
}
}
// REVISIT - These two constructors should be re-factored to better hide
// the fact that someone extending this class 'can' construct a CDROutputStream
// that does not use pooled ByteBuffers. Right now, only EncapsOutputStream
// does _not_ use pooled ByteBuffers, see EncapsOutputStream.
// NOTE: When a stream is constructed for non-channel-backed sockets
// it notifies the constructor not to use pooled (i.e, direct)
// ByteBuffers.
public CDROutputStream(ORB orb,
GIOPVersion version,
boolean littleEndian,
BufferManagerWrite bufferManager,
byte streamFormatVersion,
boolean usePooledByteBuffers)
{
impl = OutputStreamFactory.newOutputStream(orb, version);
impl.init(orb, littleEndian, bufferManager, streamFormatVersion, usePooledByteBuffers);
impl.setParent(this);
this.orb = orb ;
this.wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_ENCODING ) ;
}
public CDROutputStream(ORB orb,
GIOPVersion version,
boolean littleEndian,
BufferManagerWrite bufferManager,
byte streamFormatVersion)
{
this(orb, version, littleEndian, bufferManager, streamFormatVersion, true);
}
*/
private ByteArrayOutputStream bos ;
private ObjectOutputStream oos ;
public JavaOutputStream()
{
bos = new ByteArrayOutputStream() ;
oos = new ObjectOutputStream( bos ) ;
}
// Provided by IIOPOutputStream and EncapsOutputStream
public org.omg.CORBA.portable.InputStream create_input_stream()
{
ObjectInputStream ois = new ByteArrayInputStream( bos.toByteArray() ) ;
return new JavaInputStream( ois ) ;
}
public final void write_boolean(boolean value) {
impl.write_boolean(value);
}
public final void write_char(char value) {
impl.write_char(value);
}
public final void write_wchar(char value) {
impl.write_wchar(value);
}
public final void write_octet(byte value) {
impl.write_octet(value);
}
public final void write_short(short value) {
impl.write_short(value);
}
public final void write_ushort(short value) {
impl.write_ushort(value);
}
public final void write_long(int value) {
impl.write_long(value);
}
public final void write_ulong(int value) {
impl.write_ulong(value);
}
public final void write_longlong(long value) {
impl.write_longlong(value);
}
public final void write_ulonglong(long value) {
impl.write_ulonglong(value);
}
public final void write_float(float value) {
impl.write_float(value);
}
public final void write_double(double value) {
impl.write_double(value);
}
public final void write_string(String value) {
impl.write_string(value);
}
public final void write_wstring(String value) {
impl.write_wstring(value);
}
public final void write_boolean_array(boolean[] value, int offset, int length) {
impl.write_boolean_array(value, offset, length);
}
public final void write_char_array(char[] value, int offset, int length) {
impl.write_char_array(value, offset, length);
}
public final void write_wchar_array(char[] value, int offset, int length) {
impl.write_wchar_array(value, offset, length);
}
public final void write_octet_array(byte[] value, int offset, int length) {
impl.write_octet_array(value, offset, length);
}
public final void write_short_array(short[] value, int offset, int length) {
impl.write_short_array(value, offset, length);
}
public final void write_ushort_array(short[] value, int offset, int length){
impl.write_ushort_array(value, offset, length);
}
public final void write_long_array(int[] value, int offset, int length) {
impl.write_long_array(value, offset, length);
}
public final void write_ulong_array(int[] value, int offset, int length) {
impl.write_ulong_array(value, offset, length);
}
public final void write_longlong_array(long[] value, int offset, int length) {
impl.write_longlong_array(value, offset, length);
}
public final void write_ulonglong_array(long[] value, int offset,int length) {
impl.write_ulonglong_array(value, offset, length);
}
public final void write_float_array(float[] value, int offset, int length) {
impl.write_float_array(value, offset, length);
}
public final void write_double_array(double[] value, int offset, int length) {
impl.write_double_array(value, offset, length);
}
public final void write_Object(org.omg.CORBA.Object value) {
impl.write_Object(value);
}
public final void write_TypeCode(TypeCode value) {
impl.write_TypeCode(value);
}
public final void write_any(Any value) {
impl.write_any(value);
}
public final void write_Principal(Principal value) {
impl.write_Principal(value);
}
public final void write(int b) throws java.io.IOException {
impl.write(b);
}
public final void write_fixed(java.math.BigDecimal value) {
impl.write_fixed(value);
}
public final void write_Context(org.omg.CORBA.Context ctx,
org.omg.CORBA.ContextList contexts) {
impl.write_Context(ctx, contexts);
}
public final org.omg.CORBA.ORB orb() {
return impl.orb();
}
// org.omg.CORBA_2_3.portable.OutputStream
public final void write_value(java.io.Serializable value) {
impl.write_value(value);
}
public final void write_value(java.io.Serializable value, java.lang.Class clz) {
impl.write_value(value, clz);
}
public final void write_value(java.io.Serializable value, String repository_id) {
impl.write_value(value, repository_id);
}
public final void write_value(java.io.Serializable value,
org.omg.CORBA.portable.BoxedValueHelper factory) {
impl.write_value(value, factory);
}
public final void write_abstract_interface(java.lang.Object obj) {
impl.write_abstract_interface(obj);
}
// java.io.OutputStream
public final void write(byte b[]) throws IOException {
impl.write(b);
}
public final void write(byte b[], int off, int len) throws IOException {
impl.write(b, off, len);
}
public final void flush() throws IOException {
impl.flush();
}
public final void close() throws IOException {
impl.close();
}
// com.sun.corba.se.impl.encoding.MarshalOutputStream
public final void start_block() {
impl.start_block();
}
public final void end_block() {
impl.end_block();
}
public final void putEndian() {
impl.putEndian();
}
public void writeTo(java.io.OutputStream s)
throws IOException
{
impl.writeTo(s);
}
public final byte[] toByteArray() {
return impl.toByteArray();
}
// org.omg.CORBA.DataOutputStream
public final void write_Abstract (java.lang.Object value) {
impl.write_Abstract(value);
}
public final void write_Value (java.io.Serializable value) {
impl.write_Value(value);
}
public final void write_any_array(org.omg.CORBA.Any[] seq, int offset, int length) {
impl.write_any_array(seq, offset, length);
}
public void setMessageMediator(MessageMediator messageMediator)
{
this.corbaMessageMediator = (CorbaMessageMediator) messageMediator;
}
public MessageMediator getMessageMediator()
{
return corbaMessageMediator;
}
// org.omg.CORBA.portable.ValueBase
public final String[] _truncatable_ids() {
return impl._truncatable_ids();
}
// Other
protected final int getSize() {
return impl.getSize();
}
protected final int getIndex() {
return impl.getIndex();
}
protected int getRealIndex(int index) {
// Used in indirections. Overridden by TypeCodeOutputStream.
return index;
}
protected final void setIndex(int value) {
impl.setIndex(value);
}
protected final ByteBuffer getByteBuffer() {
return impl.getByteBuffer();
}
protected final void setByteBuffer(ByteBuffer byteBuffer) {
impl.setByteBuffer(byteBuffer);
}
public final boolean isLittleEndian() {
return impl.isLittleEndian();
}
// XREVISIT - return to final if possible
// REVISIT - was protected - need access from msgtypes test.
public ByteBufferWithInfo getByteBufferWithInfo() {
return impl.getByteBufferWithInfo();
}
protected void setByteBufferWithInfo(ByteBufferWithInfo bbwi) {
impl.setByteBufferWithInfo(bbwi);
}
// REVISIT: was protected - but need to access from xgiop.
public final BufferManagerWrite getBufferManager() {
return impl.getBufferManager();
}
public final void write_fixed(java.math.BigDecimal bigDecimal, short digits, short scale) {
impl.write_fixed(bigDecimal, digits, scale);
}
public final void writeOctetSequenceTo(org.omg.CORBA.portable.OutputStream s) {
impl.writeOctetSequenceTo(s);
}
public final GIOPVersion getGIOPVersion() {
return impl.getGIOPVersion();
}
public final void writeIndirection(int tag, int posIndirectedTo) {
impl.writeIndirection(tag, posIndirectedTo);
}
// Use Latin-1 for GIOP 1.0 or when code set negotiation was not
// performed.
protected CodeSetConversion.CTBConverter createCharCTBConverter() {
return CodeSetConversion.impl().getCTBConverter(OSFCodeSetRegistry.ISO_8859_1);
}
// Subclasses must decide what to do here. It's inconvenient to
// make the class and this method abstract because of dup().
protected abstract CodeSetConversion.CTBConverter createWCharCTBConverter();
protected final void freeInternalCaches() {
impl.freeInternalCaches();
}
void printBuffer() {
impl.printBuffer();
}
public void alignOnBoundary(int octetBoundary) {
impl.alignOnBoundary(octetBoundary);
}
// Needed by request and reply messages for GIOP versions >= 1.2 only.
public void setHeaderPadding(boolean headerPadding) {
impl.setHeaderPadding(headerPadding);
}
// ValueOutputStream -----------------------------
public void start_value(String rep_id) {
impl.start_value(rep_id);
}
public void end_value() {
impl.end_value();
}
}

View File

@@ -1,164 +0,0 @@
/*
* Copyright (c) 2000, 2002, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.interceptors;
import com.sun.corba.se.impl.corba.AnyImpl;
import org.omg.PortableInterceptor.Current;
import org.omg.PortableInterceptor.InvalidSlot;
import com.sun.corba.se.impl.util.MinorCodes;
import com.sun.corba.se.impl.core.ORB;
/**
* ThreadCurrentStack is the container of PICurrent instances for each thread
*/
public class ThreadCurrentStack
{
// PICurrentPool is the container for reusable PICurrents
private class PICurrentPool {
// Contains a list of reusable PICurrents
private java.util.ArrayList pool;
// High water mark for the pool
// If the pool size reaches this limit then putPICurrent will
// not put PICurrent to the pool.
private static final int HIGH_WATER_MARK = 5;
// currentIndex points to the last PICurrent in the list
private int currentIndex;
PICurrentPool( ) {
pool = new java.util.ArrayList( HIGH_WATER_MARK );
currentIndex = 0;
}
/**
* Puts PICurrent to the re-usable pool.
*/
void putPICurrent( PICurrent current ) {
// If there are enough PICurrents in the pool, then don't add
// this current to the pool.
if( currentIndex >= HIGH_WATER_MARK ) {
return;
}
pool.add(currentIndex , current);
currentIndex++;
}
/**
* Gets PICurrent from the re-usable pool.
*/
PICurrent getPICurrent( ) {
// If there are no entries in the pool then return null
if( currentIndex == 0 ) {
return null;
}
// Works like a stack, Gets the last one added first
currentIndex--;
return (PICurrent) pool.get(currentIndex);
}
}
// Contains all the active PICurrents for each thread.
// The ArrayList is made to behave like a stack.
private java.util.ArrayList currentContainer;
// Keeps track of number of PICurrents in the stack.
private int currentIndex;
// For Every Thread there will be a pool of re-usable ThreadCurrent's
// stored in PICurrentPool
private PICurrentPool currentPool;
// The orb associated with this ThreadCurrentStack
private ORB piOrb;
/**
* Constructs the stack and and PICurrentPool
*/
ThreadCurrentStack( ORB piOrb, PICurrent current ) {
this.piOrb = piOrb;
currentIndex = 0;
currentContainer = new java.util.ArrayList( );
currentPool = new PICurrentPool( );
currentContainer.add( currentIndex, current );
currentIndex++;
}
/**
* pushPICurrent goes through the following steps
* 1: Checks to see if there is any PICurrent in PICurrentPool
* If present then use that instance to push into the ThreadCurrentStack
*
* 2:If there is no PICurrent in the pool, then creates a new one and pushes
* that into the ThreadCurrentStack
*/
void pushPICurrent( ) {
PICurrent current = currentPool.getPICurrent( );
if( current == null ) {
// get an existing PICurrent to get the slotSize
PICurrent currentTemp = peekPICurrent();
current = new PICurrent( piOrb, currentTemp.getSlotSize( ));
}
currentContainer.add( currentIndex, current );
currentIndex++;
}
/**
* popPICurrent does the following
* 1: pops the top PICurrent in the ThreadCurrentStack
*
* 2: resets the slots in the PICurrent which resets the slotvalues to
* null if there are any previous sets.
*
* 3: pushes the reset PICurrent into the PICurrentPool to reuse
*/
void popPICurrent( ) {
// Do not pop the PICurrent, If there is only one.
// This should not happen, But an extra check for safety.
if( currentIndex <= 1 ) {
throw new org.omg.CORBA.INTERNAL(
"Cannot pop the only PICurrent in the stack",
MinorCodes.CANT_POP_ONLY_CURRENT_2,
CompletionStatus.COMPLETED_NO );
}
currentIndex--;
PICurrent current = (PICurrent)currentContainer.get( currentIndex );
current.resetSlots( );
currentPool.putPICurrent( current );
}
/**
* peekPICurrent gets the top PICurrent in the ThreadCurrentStack without
* popping.
*/
PICurrent peekPICurrent( ) {
return (PICurrent) currentContainer.get( currentIndex - 1);
}
}

View File

@@ -1,145 +0,0 @@
/*
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.orbutil ;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
/** This class provides just a main method. Its purpose is to allow -D arguments to
* set up the system properties when starting programs with tools like OptimizeIt that
* make this difficult or impossible.
*
* Invocation: {java launcher of some kind} DefineClass -Dxxx=yyy -Dxxx=yyy ... {class name} arg0, arg1, ...
* Result: updates system properties with -D args, then uses reflection to invoke {class name}.main with the args
*/
class DefineWrapper {
public static void main( String[] args )
{
int numberDefines = args.length ;
String className = null ;
for (int ctr=0; ctr<args.length; ctr++ ) {
String arg = args[ctr] ;
if ((arg.charAt(0) == '-') && (arg.charAt(1) == 'D')) {
int eqIndex = arg.indexOf( '=' ) ;
if (eqIndex < 0)
throw new Exception( arg + " is not a valid property assignment" ) ;
final String key = arg.subString( 2, eqIndex ) ;
final String value = arg.subStrung( eqIndex + 1 ) ;
AccessController.doPrivileged( new PrivilegedAction() {
public Object run() {
System.setProperty( key, value ) ;
return null ;
}
} ) ;
} else {
numberDefines = ctr ;
className = arg ;
break ;
}
}
if (numberDefines < args.length) {
Class cls = getMainClass( className ) ;
Method mainMethod = getMainMethod( cls ) ;
String[] newArgs = new String[ args.length - numberDefines ] ;
for (int ctr = numberDefines+1; ctr<args.length; ctr++ ) {
newArgs[ ctr-numberDefines-1 ] = args[ ctr ] ;
}
// build args to the main and call it
Object params [] = new Object [1];
params[0] = newArgs;
mainMethod.invoke(null, params);
} else {
throw new Exception( "No class name given" ) ;
}
}
private static Class getMainClass( String name )
{
// determine the class loader to be used for loading the class
// since ServerMain is going to be in JDK and we need to have this
// class to load application classes, this is required here.
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null)
cl = ClassLoader.getSystemClassLoader();
try {
// determine the main class, try loading with current class loader
cls = Class.forName( className ) ;
} catch (ClassNotFoundException ex) {
// eat the exception and try to load using SystemClassLoader
cls = Class.forName( className, true, cl);
}
}
private static Method getMainMethod( Class serverClass )
{
Class argTypes[] = new Class[] { String[].class } ;
Method method = null ;
try {
method = serverClass.getDeclaredMethod( "main", argTypes ) ;
} catch (Exception exc) {
throw new Exception( "Could not get main() method: " + exc ) ;
}
if (!isPublicStaticVoid( method ))
throw new Exception( "Main method is not public static void" ) ;
return method ;
}
private static boolean isPublicStaticVoid( Method method )
{
// check modifiers: public static
int modifiers = method.getModifiers ();
if (!Modifier.isPublic (modifiers) || !Modifier.isStatic (modifiers)) {
logError( method.getName() + " is not public static" ) ;
return false ;
}
// check return type and exceptions
if (method.getExceptionTypes ().length != 0) {
logError( method.getName() + " declares exceptions" ) ;
return false ;
}
if (!method.getReturnType().equals (Void.TYPE)) {
logError( method.getName() + " does not have a void return type" ) ;
return false ;
}
return true ;
}
}

View File

@@ -1,909 +0,0 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.presentation.rmi ;
import java.lang.reflect.Method;
import java.math.BigInteger;
import java.util.Map;
import java.util.Set;
import java.util.HashSet;
import java.util.Iterator;
import java.util.HashMap;
import java.util.StringTokenizer;
import com.sun.corba.se.spi.presentation.rmi.IDLNameTranslator ;
import com.sun.corba.se.impl.presentation.rmi.IDLType ;
import com.sun.corba.se.impl.presentation.rmi.IDLTypeException ;
import com.sun.corba.se.impl.presentation.rmi.IDLTypesUtil ;
import com.sun.corba.se.impl.orbutil.ObjectUtility ;
/**
* Bidirectional translator between RMI-IIOP interface methods and
* and IDL Names.
*/
public class IDLNameTranslatorImpl implements IDLNameTranslator {
// From CORBA Spec, Table 6 Keywords.
// Note that since all IDL identifiers are case
// insensitive, java identifier comparisons to these
// will be case insensitive also.
private static String[] IDL_KEYWORDS = {
"abstract", "any", "attribute", "boolean", "case", "char",
"const", "context", "custom", "default", "double", "enum",
"exception", "factory", "FALSE", "fixed", "float", "in", "inout",
"interface", "long", "module", "native", "Object", "octet",
"oneway", "out", "private", "public", "raises", "readonly", "sequence",
"short", "string", "struct", "supports", "switch", "TRUE", "truncatable",
"typedef", "unsigned", "union", "ValueBase", "valuetype", "void",
"wchar", "wstring"
};
private static char[] HEX_DIGITS = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
};
private static final String UNDERSCORE = "_";
// used to mangle java inner class names
private static final String INNER_CLASS_SEPARATOR =
UNDERSCORE + UNDERSCORE;
// used to form IDL array type names
private static final String[] BASE_IDL_ARRAY_MODULE_TYPE=
new String[] { "org", "omg", "boxedRMI" } ;
private static final String BASE_IDL_ARRAY_ELEMENT_TYPE = "seq";
// used to mangling java identifiers that have a leading underscore
private static final String LEADING_UNDERSCORE_CHAR = "J";
private static final String ID_CONTAINER_CLASH_CHAR = UNDERSCORE;
// separator used between types in a mangled overloaded method name
private static final String OVERLOADED_TYPE_SEPARATOR =
UNDERSCORE + UNDERSCORE;
// string appended to attribute if it clashes with a method name
private static final String ATTRIBUTE_METHOD_CLASH_MANGLE_CHARS =
UNDERSCORE + UNDERSCORE;
private static Set idlKeywords_;
static {
idlKeywords_ = new HashSet();
for(int i = 0; i < IDL_KEYWORDS.length; i++) {
String next = (String) IDL_KEYWORDS[i];
// Convert keyword to all caps to ease equality
// check.
String keywordAllCaps = next.toUpperCase();
idlKeywords_.add(keywordAllCaps);
}
}
//
// Instance state
//
// Remote interface for name translation.
private Class[] interf_;
// Maps used to hold name translations. These do not need to be
// synchronized since the translation is never modified after
// initialization.
private Map methodToIDLNameMap_;
private Map IDLNameToMethodMap_;
private Method[] methods_;
/**
* Return an IDLNameTranslator for the given interface.
*
* @throws IllegalStateException if given class is not a valid
* RMI/IIOP Remote Interface
*/
public static IDLNameTranslator get( Class interf )
{
return new IDLNameTranslatorImpl(new Class[] { interf } );
}
/**
* Return an IDLNameTranslator for the given interfacex.
*
* @throws IllegalStateException if given classes are not valid
* RMI/IIOP Remote Interfaces
*/
public static IDLNameTranslator get( Class[] interfaces )
{
return new IDLNameTranslatorImpl(interfaces );
}
public static String getExceptionId( Class cls )
{
// Requirements for this method:
// 1. cls must be an exception but not a RemoteException.
// 2. If cls has an IDL keyword name, an underscore is prepended (1.3.2.2).
// 3. If cls jas a leading underscore, J is prepended (1.3.2.3).
// 4. If cls has an illegal IDL ident char, it is mapped to UXXXX where
// XXXX is the unicode value in hex of the char (1.3.2.4).
// 5. double underscore for inner class (1.3.2.5).
// 6. The ID is "IDL:" + name with / separators + ":1.0".
IDLType itype = classToIDLType( cls ) ;
return itype.getExceptionName() ;
}
public Class[] getInterfaces()
{
return interf_;
}
public Method[] getMethods()
{
return methods_ ;
}
public Method getMethod( String idlName )
{
return (Method) IDLNameToMethodMap_.get(idlName);
}
public String getIDLName( Method method )
{
return (String) methodToIDLNameMap_.get(method);
}
/**
* Initialize an IDLNameTranslator for the given interface.
*
* @throws IllegalStateException if given class is not a valid
* RMI/IIOP Remote Interface
*/
private IDLNameTranslatorImpl(Class[] interfaces)
{
try {
IDLTypesUtil idlTypesUtil = new IDLTypesUtil();
for (int ctr=0; ctr<interfaces.length; ctr++)
idlTypesUtil.validateRemoteInterface(interfaces[ctr]);
interf_ = interfaces;
buildNameTranslation();
} catch( IDLTypeException ite) {
String msg = ite.getMessage();
IllegalStateException ise = new IllegalStateException(msg);
ise.initCause(ite);
throw ise;
}
}
private void buildNameTranslation()
{
// holds method info, keyed by method
Map allMethodInfo = new HashMap() ;
for (int ctr=0; ctr<interf_.length; ctr++) {
Class interf = interf_[ctr] ;
IDLTypesUtil idlTypesUtil = new IDLTypesUtil();
Method[] methods = interf.getMethods();
// Take an initial pass through all the methods and create some
// information that will be used to track the IDL name
// transformation.
for(int i = 0; i < methods.length; i++) {
Method nextMethod = methods[i];
IDLMethodInfo methodInfo = new IDLMethodInfo();
methodInfo.method = nextMethod;
methodInfo.propertyType =
idlTypesUtil.propertyAccessorMethodType(
nextMethod, interf ) ;
if (methodInfo.propertyType != null) {
String attributeName = idlTypesUtil.
getAttributeNameForProperty(nextMethod.getName());
methodInfo.originalName = attributeName;
methodInfo.mangledName = attributeName;
} else {
methodInfo.originalName = nextMethod.getName();
methodInfo.mangledName = nextMethod.getName();
}
allMethodInfo.put(nextMethod, methodInfo);
}
}
// Check for having both is<NAME> and get<NAME> methods.
//
// Perform case sensitivity test first. This applies to all
// method names AND attributes. Compare each method name and
// attribute to all other method names and attributes. If names
// differ only in case, apply mangling as defined in section 1.3.2.7
// of Java2IDL spec. Note that we compare using the original names.
//
for(Iterator outerIter=allMethodInfo.values().iterator();
outerIter.hasNext();) {
IDLMethodInfo outer = (IDLMethodInfo) outerIter.next();
for(Iterator innerIter = allMethodInfo.values().iterator();
innerIter.hasNext();) {
IDLMethodInfo inner = (IDLMethodInfo) innerIter.next();
if( (outer != inner) &&
(!outer.originalName.equals(inner.originalName)) &&
outer.originalName.equalsIgnoreCase(inner.originalName) ) {
outer.mangledName =
mangleCaseSensitiveCollision(outer.originalName);
break;
}
}
}
for(Iterator iter = allMethodInfo.values().iterator();
iter.hasNext();) {
IDLMethodInfo next = (IDLMethodcurrentInfo) iter.next();
next.mangledName =
mangleIdentifier(next.mangledName,
next.propertyType != null);
}
//
// Now check for overloaded method names and apply 1.3.2.6.
//
for(Iterator outerIter=allMethodInfo.values().iterator();
outerIter.hasNext();) {
IDLMethodInfo outer = (IDLMethodInfo) outerIter.next();
if (outer.propertyType != null) {
continue;
}
for(Iterator innerIter = allMethodInfo.values().iterator();
innerIter.hasNext();) {
IDLMethodInfo inner = (IDLMethodInfo) innerIter.next();
if( (outer != inner) &&
(inner.propertyType == null) &&
outer.originalName.equals(inner.originalName) ) {
outer.mangledName = mangleOverloadedMethod
(outer.mangledName, outer.method);
break;
}
}
}
//
// Now mangle any properties that clash with method names.
//
for(Iterator outerIter=allMethodInfo.values().iterator();
outerIter.hasNext();) {
IDLMethodInfo outer = (IDLMethodInfo) outerIter.next();
if(outer.propertyType == null) {
continue;
}
for(Iterator innerIter = allMethodInfo.values().iterator();
innerIter.hasNext();) {
IDLMethodInfo inner = (IDLMethodInfo) innerIter.next();
if( (outer != inner) &&
(inner.propertyType == null) &&
outer.mangledName.equals(inner.mangledName) ) {
outer.mangledName = outer.mangledName +
ATTRIBUTE_METHOD_CLASH_MANGLE_CHARS;
break;
}
}
}
//
// Ensure that no mapped method names clash with mapped name
// of container(1.3.2.9). This is a case insensitive comparison.
//
for (int ctr=0; ctr<interf_.length; ctr++ ) {
Class interf = interf_[ctr] ;
String mappedContainerName = getMappedContainerName(interf);
for(Iterator iter = allMethodInfo.values().iterator();
iter.hasNext();) {
IDLMethodInfo next = (IDLMethodInfo) iter.next();
if( (next.propertyType == null) &&
identifierClashesWithContainer(mappedContainerName,
next.mangledName)) {
next.mangledName = mangleContainerClash(next.mangledName);
}
}
}
//
// Populate name translation maps.
//
methodToIDLNameMap_ = new HashMap();
IDLNameToMethodMap_ = new HashMap();
methods_ = (Method[])allMethodInfo.keySet().toArray(
new Method[0] ) ;
for(Iterator iter = allMethodInfo.values().iterator();
iter.hasNext();) {
IDLMethodInfo next = (IDLMethodInfo) iter.next();
String idlName = next.mangledName;
if (next.propertyType != null) {
idlName = javaPropertyPrefixToIDL( next.propertyType ) +
next.mangledName ;
}
methodToIDLNameMap_.put(next.method, idlName);
// Final check to see if there are any clashes after all the
// manglings have been applied. If so, this is treated as an
// invalid interface. Currently, we do a CASE-SENSITIVE
// comparison since that matches the rmic behavior.
// @@@ Shouldn't this be a case-insensitive check?
// If there is a collision between is<TYPE> and get<TYPE>,
// map only is<TYPE> to an attribute, and leave the
// get<TYPE> method alone.
if( IDLNameToMethodMap_.containsKey(idlName) ) {
// @@@ I18N
Method clash = (Method) IDLNameToMethodMap_.get(idlName);
MethodInfo clashMethodInfo =
(MethodInfo)allMethodInfo.get( clash ) ;
if (clashMethodInfo.isBooleanProperty() &&
next.isReadProperty()) {
// fix idlName
} else if (clashMethodInfo.isReadProperty() &&
next.isBooleanProperty()) {
// Remove entry under idlName
// put entry into table under correct name
} else {
throw new IllegalStateException("Error : methods " +
clash + " and " + next.method +
" both result in IDL name '" + idlName + "'");
}
}
IDLNameToMethodMap_.put(idlName, next.method);
}
return;
}
/**
* Perform all necessary stand-alone identifier mangling operations
* on a java identifier that is being transformed into an IDL name.
* That is, mangling operations that don't require looking at anything
* else but the identifier itself. This covers sections 1.3.2.2, 1.3.2.3,
* and 1.3.2.4 of the Java2IDL spec. Method overloading and
* case-sensitivity checks are handled elsewhere.
*/
private static String mangleIdentifier(String identifier) {
return mangleIdentifier(identifier, false);
}
private static String mangleIdentifier(String identifier, boolean attribute) {
String mangledName = identifier;
//
// Apply leading underscore test (1.3.2.3)
// This should be done before IDL Keyword clash test, since clashing
// IDL keywords are mangled by adding a leading underscore.
//
if( hasLeadingUnderscore(mangledName) ) {
mangledName = mangleLeadingUnderscore(mangledName);
}
//
// Apply IDL keyword clash test (1.3.2.2).
// This is not needed for attributes since when the full property
// name is composed it cannot clash with an IDL keyword.
// (Also, rmic doesn't do it.)
//
if( !attribute && isIDLKeyword(mangledName) ) {
mangledName = mangleIDLKeywordClash(mangledName);
}
//
// Replace illegal IDL identifier characters (1.3.2.4)
// for all method names and attributes.
//
if( !isIDLIdentifier(mangledName) ) {
mangledName = mangleUnicodeChars(mangledName);
}
return mangledName;
}
/**
* Checks whether a java identifier clashes with an
* IDL keyword. Note that this is a case-insensitive
* comparison.
*
* Used to implement section 1.3.2.2 of Java2IDL spec.
*/
private static boolean isIDLKeyword(String identifier) {
String identifierAllCaps = identifier.toUpperCase();
return idlKeywords_.contains(identifierAllCaps);
}
private static String mangleIDLKeywordClash(String identifier) {
return UNDERSCORE + identifier;
}
private static String mangleLeadingUnderscore(String identifier) {
return LEADING_UNDERSCORE_CHAR + identifier;
}
/**
* Checks whether a java identifier starts with an underscore.
* Used to implement section 1.3.2.3 of Java2IDL spec.
*/
private static boolean hasLeadingUnderscore(String identifier) {
return identifier.startsWith(UNDERSCORE);
}
/**
* Implements Section 1.3.2.4 of Java2IDL Mapping.
* All non-IDL identifier characters must be replaced
* with their Unicode representation.
*/
static String mangleUnicodeChars(String identifier) {
StringBuffer mangledIdentifier = new StringBuffer();
for(int i = 0; i < identifier.length(); i++) {
char nextChar = identifier.charAt(i);
if( isIDLIdentifierChar(nextChar) ) {
mangledIdentifier.append(nextChar);
} else {
String unicode = charToUnicodeRepresentation(nextChar);
mangledIdentifier.append(unicode);
}
}
return mangledIdentifier.toString();
}
/**
* Implements mangling portion of Section 1.3.2.7 of Java2IDL spec.
* This method only deals with the actual mangling. Decision about
* whether case-sensitive collision mangling is required is made
* elsewhere.
*
*
* "...a mangled name is generated consisting of the original name
* followed by an underscore separated list of decimal indices
* into the string, where the indices identify all the upper case
* characters in the original string. Indices are zero based."
*
*/
String mangleCaseSensitiveCollision(String identifier) {
StringBuffer mangledIdentifier = new StringBuffer(identifier);
// There is always at least one trailing underscore, whether or
// not the identifier has uppercase letters.
mangledIdentifier.append(UNDERSCORE);
boolean needUnderscore = false;
for(int i = 0; i < identifier.length(); i++) {
char next = identifier.charAt(i);
if( Character.isUpperCase(next) ) {
// This bit of logic is needed to ensure that we have
// an underscore separated list of indices but no
// trailing underscores. Basically, after we have at least
// one uppercase letter, we always put an undercore before
// printing the next one.
if( needUnderscore ) {
mangledIdentifier.append(UNDERSCORE);
}
mangledIdentifier.append(i);
needUnderscore = true;
}
}
return mangledIdentifier.toString();
}
private static String mangleContainerClash(String identifier) {
return identifier + ID_CONTAINER_CLASH_CHAR;
}
/**
* Implements Section 1.3.2.9 of Java2IDL Mapping. Container in this
* context means the name of the java Class(excluding package) in which
* the identifier is defined. Comparison is case-insensitive.
*/
private static boolean identifierClashesWithContainer
(String mappedContainerName, String identifier) {
return identifier.equalsIgnoreCase(mappedContainerName);
}
/**
* Returns Unicode mangling as defined in Section 1.3.2.4 of
* Java2IDL spec.
*
* "For Java identifiers that contain illegal OMG IDL identifier
* characters such as '$' or Unicode characters outside of ISO Latin 1,
* any such illegal characters are replaced by "U" followed by the
* 4 hexadecimal characters(in upper case) representing the Unicode
* value. So, the Java name a$b is mapped to aU0024b and
* x\u03bCy is mapped to xU03BCy."
*/
public static String charToUnicodeRepresentation(char c) {
int orig = (int) c;
StringBuffer hexString = new StringBuffer();
int value = orig;
while( value > 0 ) {
int div = value / 16;
int mod = value % 16;
hexString.insert(0, HEX_DIGITS[mod]);
value = div;
}
int numZerosToAdd = 4 - hexString.length();
for(int i = 0; i < numZerosToAdd; i++) {
hexString.insert(0, "0");
}
hexString.insert(0, "U");
return hexString.toString();
}
private static boolean isIDLIdentifier(String identifier) {
boolean isIdentifier = true;
for(int i = 0; i < identifier.length(); i++) {
char nextChar = identifier.charAt(i);
// 1st char must be alphbetic.
isIdentifier = (i == 0) ?
isIDLAlphabeticChar(nextChar) :
isIDLIdentifierChar(nextChar);
if( !isIdentifier ) {
break;
}
}
return isIdentifier;
}
private static boolean isIDLIdentifierChar(char c) {
return (isIDLAlphabeticChar(c) ||
isIDLDecimalDigit(c) ||
isUnderscore(c));
}
/**
* True if character is one of 114 Alphabetic characters as
* specified in Table 2 of Chapter 3 in CORBA spec.
*/
private static boolean isIDLAlphabeticChar(char c) {
// NOTE that we can't use the java.lang.Character
// isUpperCase, isLowerCase, etc. methods since they
// include many characters other than the Alphabetic list in
// the CORBA spec. Instead, we test for inclusion in the
// Unicode value ranges for the corresponding legal characters.
boolean alphaChar =
(
// A - Z
((c >= 0x0041) && (c <= 0x005A))
||
// a - z
((c >= 0x0061) && (c <= 0x007A))
||
// other letter uppercase, other letter lowercase, which is
// the entire upper half of C1 Controls except X and /
((c >= 0x00C0) && (c <= 0x00FF)
&& (c != 0x00D7) && (c != 0x00F7)));
return alphaChar;
}
/**
* True if character is one of 10 Decimal Digits
* specified in Table 3 of Chapter 3 in CORBA spec.
*/
private static boolean isIDLDecimalDigit(char c) {
return ( (c >= 0x0030) && (c <= 0x0039) );
}
private static boolean isUnderscore(char c) {
return ( c == 0x005F );
}
/**
* Mangle an overloaded method name as defined in Section 1.3.2.6 of
* Java2IDL spec. Current value of method name is passed in as argument.
* We can't start from original method name since the name might have
* been partially mangled as a result of the other rules.
*/
private static String mangleOverloadedMethod(String mangledName, Method m) {
IDLTypesUtil idlTypesUtil = new IDLTypesUtil();
// Start by appending the separator string
String newMangledName = mangledName + OVERLOADED_TYPE_SEPARATOR;
Class[] parameterTypes = m.getParameterTypes();
for(int i = 0; i < parameterTypes.length; i++) {
Class nextParamType = parameterTypes[i];
if( i > 0 ) {
newMangledName = newMangledName + OVERLOADED_TYPE_SEPARATOR;
}
IDLType idlType = classToIDLType(nextParamType);
String moduleName = idlType.getModuleName();
String memberName = idlType.getMemberName();
String typeName = (moduleName.length() > 0) ?
moduleName + UNDERSCORE + memberName : memberName;
if( !idlTypesUtil.isPrimitive(nextParamType) &&
(idlTypesUtil.getSpecialCaseIDLTypeMapping(nextParamType)
== null) &&
isIDLKeyword(typeName) ) {
typeName = mangleIDLKeywordClash(typeName);
}
typeName = mangleUnicodeChars(typeName);
newMangledName = newMangledName + typeName;
}
return newMangledName;
}
private static IDLType classToIDLType(Class c) {
IDLType idlType = null;
IDLTypesUtil idlTypesUtil = new IDLTypesUtil();
if( idlTypesUtil.isPrimitive(c) ) {
idlType = idlTypesUtil.getPrimitiveIDLTypeMapping(c);
} else if( c.isArray() ) {
// Calculate array depth, as well as base element type.
Class componentType = c.getComponentType();
int numArrayDimensions = 1;
while(componentType.isArray()) {
componentType = componentType.getComponentType();
numArrayDimensions++;
}
IDLType componentIdlType = classToIDLType(componentType);
String[] modules = BASE_IDL_ARRAY_MODULE_TYPE;
if( componentIdlType.hasModule() ) {
modules = (String[])ObjectUtility.concatenateArrays( modules,
componentIdlType.getModules() ) ;
}
String memberName = BASE_IDL_ARRAY_ELEMENT_TYPE +
numArrayDimensions + UNDERSCORE +
componentIdlType.getMemberName();
idlType = new IDLType(c, modules, memberName);
} else {
idlType = idlTypesUtil.getSpecialCaseIDLTypeMapping(c);
if (idlType == null) {
// Section 1.3.2.5 of Java2IDL spec defines mangling rules for
// inner classes.
String memberName = getUnmappedContainerName(c);
// replace inner class separator with double underscore
memberName = memberName.replaceAll("\\$",
INNER_CLASS_SEPARATOR);
if( hasLeadingUnderscore(memberName) ) {
memberName = mangleLeadingUnderscore(memberName);
}
// Get raw package name. If there is a package, it
// will still have the "." separators and none of the
// mangling rules will have been applied.
String packageName = getPackageName(c);
if (packageName == null) {
idlType = new IDLType( c, memberName ) ;
} else {
// If this is a generated IDL Entity Type we need to
// prepend org_omg_boxedIDL per sections 1.3.5 and 1.3.9
if (idlTypesUtil.isEntity(c)) {
packageName = "org.omg.boxedIDL." + packageName ;
}
// Section 1.3.2.1 and 1.3.2.6 of Java2IDL spec defines
// rules for mapping java packages to IDL modules and for
// mangling module name portion of type name. NOTE that
// of the individual identifier mangling rules,
// only the leading underscore test is done here.
// The other two(IDL Keyword, Illegal Unicode chars) are
// done in mangleOverloadedMethodName.
StringTokenizer tokenizer =
new StringTokenizer(packageName, ".");
String[] modules = new String[ tokenizer.countTokens() ] ;
int index = 0 ;
while (tokenizer.hasMoreElements()) {
String next = tokenizer.nextToken();
String nextMangled = hasLeadingUnderscore(next) ?
mangleLeadingUnderscore(next) : next;
modules[index++] = nextMangled ;
}
idlType = new IDLType(c, modules, memberName);
}
}
}
return idlType;
}
/**
* Return Class' package name or null if there is no package.
*/
private static String getPackageName(Class c) {
Package thePackage = c.getPackage();
String packageName = null;
// Try to get package name by introspection. Some classloaders might
// not provide this information, so check for null.
if( thePackage != null ) {
packageName = thePackage.getName();
} else {
// brute force method
String fullyQualifiedClassName = c.getName();
int lastDot = fullyQualifiedClassName.indexOf('.');
packageName = (lastDot == -1) ? null :
fullyQualifiedClassName.substring(0, lastDot);
}
return packageName;
}
private static String getMappedContainerName(Class c) {
String unmappedName = getUnmappedContainerName(c);
return mangleIdentifier(unmappedName);
}
/**
* Return portion of class name excluding package name.
*/
private static String getUnmappedContainerName(Class c) {
String memberName = null;
String packageName = getPackageName(c);
String fullyQualifiedClassName = c.getName();
if( packageName != null ) {
int packageLength = packageName.length();
memberName = fullyQualifiedClassName.substring(packageLength + 1);
} else {
memberName = fullyQualifiedClassName;
}
return memberName;
}
/**
* Internal helper class for tracking information related to each
* interface method while we're building the name translation table.
*/
private static class IDLMethodInfo
{
public Method method;
public String propertyType;
// If this is a property, originalName holds the original
// attribute name. Otherwise, it holds the original method name.
public String originalName;
// If this is a property, mangledName holds the mangled attribute
// name. Otherwise, it holds the mangled method name.
public String mangledName;
}
public String toString() {
StringBuffer contents = new StringBuffer();
contents.append("IDLNameTranslator[" );
for( int ctr=0; ctr<interf_.length; ctr++) {
if (ctr != 0)
contents.append( " " ) ;
contents.append( interf_[ctr].getName() ) ;
}
contents.append("]\n");
for(Iterator iter = methodToIDLNameMap_.keySet().iterator();
iter.hasNext();) {
Method method = (Method) iter.next();
String idlName = (String) methodToIDLNameMap_.get(method);
contents.append(idlName + ":" + method + "\n");
}
return contents.toString();
}
public static void main(String[] args) {
Class remoteInterface = java.rmi.Remote.class;
if( args.length > 0 ) {
String className = args[0];
try {
remoteInterface = Class.forName(className);
} catch(Exception e) {
e.printStackTrace();
System.exit(-1);
}
}
System.out.println("Building name translation for " + remoteInterface);
try {
IDLNameTranslator nameTranslator =
IDLNameTranslatorImpl.get(remoteInterface);
System.out.println(nameTranslator);
} catch(IllegalStateException ise) {
ise.printStackTrace();
}
}
}

View File

@@ -1,544 +0,0 @@
/*
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.presentation.rmi ;
import java.lang.reflect.Method;
import java.lang.reflect.Field;
import java.util.Set;
import java.util.HashSet;
import java.util.Iterator;
/**
* Utility class for testing RMI/IDL Types as defined in
* Section 1.2 of The Java Language to IDL Mapping. Note that
* these are static checks only. Runtime checks, such as those
* described in Section 1.2.3, #3, are not covered.
*/
public class IDLTypesUtil {
public static final String JAVA_GET_PROPERTY_PREFIX = "get";
public static final String JAVA_SET_PROPERTY_PREFIX = "set";
public static final String JAVA_IS_PROPERTY_PREFIX = "is";
public static final int VALID_TYPE = 0;
public static final int INVALID_TYPE = 1;
/**
* Validate a class to ensure it conforms to the rules for a
* Java RMI/IIOP interface.
*
* @throws IDLTypeException if not a valid RMI/IIOP interface.
*/
public void validateRemoteInterface(Class c) throws IDLTypeException
{
if( c == null ) {
throw new IllegalArgumentException();
}
if( !c.isInterface() ) {
String msg = "Class " + c + " must be a java interface.";
throw new IDLTypeException(msg);
}
if( !java.rmi.Remote.class.isAssignableFrom(c) ) {
String msg = "Class " + c + " must extend java.rmi.Remote, " +
"either directly or indirectly.";
throw new IDLTypeException(msg);
}
// Get all methods, including super-interface methods.
Method[] methods = c.getMethods();
for(int i = 0; i < methods.length; i++) {
Method next = methods[i];
validateExceptions(next);
}
// Removed because of bug 4989053
// validateDirectInterfaces(c);
validateConstants(c);
return;
}
public boolean isRemoteInterface(Class c)
{
boolean remoteInterface = true;
try {
validateRemoteInterface(c);
} catch(IDLTypeException ite) {
remoteInterface = false;
}
return remoteInterface;
}
/**
* Section 1.2.2 Primitive Types
*/
public boolean isPrimitive(Class c)
{
if( c == null ) {
throw new IllegalArgumentException();
}
return c.isPrimitive();
}
/**
* Section 1.2.4
*/
public boolean isValue(Class c)
{
if( c == null ) {
throw new IllegalArgumentException();
}
return
(!c.isInterface() &&
java.io.Serializable.class.isAssignableFrom(c) &&
!java.rmi.Remote.class.isAssignableFrom(c));
}
/**
* Section 1.2.5
*/
public boolean isArray(Class c)
{
boolean arrayType = false;
if( c == null ) {
throw new IllegalArgumentException();
}
if( c.isArray() ) {
Class componentType = c.getComponentType();
arrayType =
(isPrimitive(componentType) || isRemoteInterface(componentType) ||
isEntity(componentType) || isException(componentType) ||
isValue(componentType) || isObjectReference(componentType) );
}
return arrayType;
}
/**
* Section 1.2.6
*/
public boolean isException(Class c)
{
if( c == null ) {
throw new IllegalArgumentException();
}
// Must be a checked exception, not including RemoteException or
// its subclasses.
return isCheckedException(c) && !isRemoteException(c) && isValue(c);
}
public boolean isRemoteException(Class c)
{
if( c == null ) {
throw new IllegalArgumentException();
}
return java.rmi.RemoteException.class.isAssignableFrom(c) ;
}
public boolean isCheckedException(Class c)
{
if( c == null ) {
throw new IllegalArgumentException();
}
return Throwable.class.isAssignableFrom(c) &&
!RuntimeException.class.isAssignableFrom(c) &&
!Error.class.isAssignableFrom(c) ;
}
/**
* Section 1.2.7
*/
public boolean isObjectReference(Class c)
{
if( c == null ) {
throw new IllegalArgumentException();
}
return (c.isInterface() &&
org.omg.CORBA.Object.class.isAssignableFrom(c));
}
/**
* Section 1.2.8
*/
public boolean isEntity(Class c)
{
if( c == null ) {
throw new IllegalArgumentException();
}
Class superClass = c.getSuperclass();
return (!c.isInterface() &&
(superClass != null) &&
(org.omg.CORBA.portable.IDLEntity.class.isAssignableFrom(c)));
}
public String javaPropertyPrefixToIDL( String javaPrefix )
{
return "_" + javaPrefix + "_" ;
}
/**
* Return the property type if given method is legal property accessor as defined in
* Section 1.3.4.3 of Java2IDL spec. Result is one of: JAVA_GET_PROPERTY_PREFIX,
* JAVA_SET_PROPERTY_PREFIX, JAVA_IS_PROPERTY_PREFIX.
*/
public String propertyAccessorMethodType(Method m, Class c) {
String methodName = m.getName();
Class returnType = m.getReturnType();
Class[] parameters = m.getParameterTypes();
Class[] exceptionTypes = m.getExceptionTypes();
String propertyType = null;
if( methodName.startsWith(JAVA_GET_PROPERTY_PREFIX) ) {
if((parameters.length == 0) && (returnType != Void.TYPE) &&
!hasCorrespondingReadProperty(m, c, JAVA_IS_PROPERTY_PREFIX) {
propertyType = JAVA_GET_PROPERTY_PREFIX;
}
} else if( methodName.startsWith(JAVA_SET_PROPERTY_PREFIX) ) {
if((returnType == Void.TYPE) && (parameters.length == 1)) {
if (hasCorrespondingReadProperty(m, c, JAVA_GET_PROPERTY_PREFIX) ||
hasCorrespondingReadProperty(m, c, JAVA_IS_PROPERTY_PREFIX)) {
propertyType = JAVA_SET_PROPERTY_PREFIX;
}
}
} else if( methodName.startsWith(JAVA_IS_PROPERTY_PREFIX) ) {
if((parameters.length == 0) && (returnType == Boolean.TYPE)) {
propertyType = JAVA_IS_PROPERTY_PREFIX;
}
}
// Some final checks that apply to all properties.
if( propertyType != null ) {
if(!validPropertyExceptions(m) ||
(methodName.length() <= propertyType.length())) {
propertyType = null;
}
}
return propertyType ;
}
private boolean hasCorrespondingReadProperty
(Method writeProperty, Class c, String readPropertyPrefix) {
String writePropertyMethodName = writeProperty.getName();
Class[] writePropertyParameters = writeProperty.getParameterTypes();
boolean foundReadProperty = false;
try {
// Look for a valid corresponding Read property
String readPropertyMethodName =
writePropertyMethodName.replaceFirst
(JAVA_SET_PROPERTY_PREFIX, readPropertyPrefix);
Method readPropertyMethod = c.getMethod(readPropertyMethodName,
new Class[] {});
foundReadProperty =
((propertyAccessorMethodType(readPropertyMethod, c) != null) &&
(readPropertyMethod.getReturnType() ==
writePropertyParameters[0]));
} catch(Exception e) {
// ignore. this means we didn't find a corresponding get property.
}
return foundReadProperty;
}
public String getAttributeNameForProperty(String propertyName) {
String attributeName = null;
String prefix = null;
if( propertyName.startsWith(JAVA_GET_PROPERTY_PREFIX) ) {
prefix = JAVA_GET_PROPERTY_PREFIX;
} else if( propertyName.startsWith(JAVA_SET_PROPERTY_PREFIX) ) {
prefix = JAVA_SET_PROPERTY_PREFIX;
} else if( propertyName.startsWith(JAVA_IS_PROPERTY_PREFIX) ) {
prefix = JAVA_IS_PROPERTY_PREFIX;
}
if( (prefix != null) && (prefix.length() < propertyName.length()) ) {
String remainder = propertyName.substring(prefix.length());
if( (remainder.length() >= 2) &&
Character.isUpperCase(remainder.charAt(0)) &&
Character.isUpperCase(remainder.charAt(1)) ) {
// don't set the first letter to lower-case if the
// first two are upper-case
attributeName = remainder;
} else {
attributeName = Character.toLowerCase(remainder.charAt(0)) +
remainder.substring(1);
}
}
return attributeName;
}
/**
* Return IDL Type name for primitive types as defined in
* Section 1.3.3 of Java2IDL spec or null if not a primitive type.
*/
public IDLType getPrimitiveIDLTypeMapping(Class c) {
if( c == null ) {
throw new IllegalArgumentException();
}
if( c.isPrimitive() ) {
if( c == Void.TYPE ) {
return new IDLType( c, "void" ) ;
} else if( c == Boolean.TYPE ) {
return new IDLType( c, "boolean" ) ;
} else if( c == Character.TYPE ) {
return new IDLType( c, "wchar" ) ;
} else if( c == Byte.TYPE ) {
return new IDLType( c, "octet" ) ;
} else if( c == Short.TYPE ) {
return new IDLType( c, "short" ) ;
} else if( c == Integer.TYPE ) {
return new IDLType( c, "long" ) ;
} else if( c == Long.TYPE ) {
return new IDLType( c, "long_long" ) ;
} else if( c == Float.TYPE ) {
return new IDLType( c, "float" ) ;
} else if( c == Double.TYPE ) {
return new IDLType( c, "double" ) ;
}
}
return null;
}
/**
* Return IDL Type name for special case type mappings as defined in
* Table 1-1 of Java2IDL spec or null if given class is not a special
* type.
*/
public IDLType getSpecialCaseIDLTypeMapping(Class c) {
if( c == null ) {
throw new IllegalArgumentException();
}
if( c == java.lang.Object.class ) {
return new IDLType( c, new String[] { "java", "lang" },
"Object" ) ;
} else if( c == java.lang.String.class ) {
return new IDLType( c, new String[] { "CORBA" },
"WStringValue" ) ;
} else if( c == java.lang.Class.class ) {
return new IDLType( c, new String[] { "javax", "rmi", "CORBA" },
"ClassDesc" ) ;
} else if( c == java.io.Serializable.class ) {
return new IDLType( c, new String[] { "java", "io" },
"Serializable" ) ;
} else if( c == java.io.Externalizable.class ) {
return new IDLType( c, new String[] { "java", "io" },
"Externalizable" ) ;
} else if( c == java.rmi.Remote.class ) {
return new IDLType( c, new String[] { "java", "rmi" },
"Remote" ) ;
} else if( c == org.omg.CORBA.Object.class ) {
return new IDLType( c, "Object" ) ;
} else {
return null;
}
}
/**
* Implements 1.2.3 #2 and #4
*/
private void validateExceptions(Method method) throws IDLTypeException {
Class[] exceptions = method.getExceptionTypes();
boolean declaresRemoteExceptionOrSuperClass = false;
// Section 1.2.3, #2
for(int eIndex = 0; eIndex < exceptions.length; eIndex++) {
Class exception = exceptions[eIndex];
if( isRemoteExceptionOrSuperClass(exception) ) {
declaresRemoteExceptionOrSuperClass = true;
break;
}
}
if( !declaresRemoteExceptionOrSuperClass ) {
String msg = "Method '" + method + "' must throw at least one " +
"exception of type java.rmi.RemoteException or one of its " +
"super-classes";
throw new IDLTypeException(msg);
}
// Section 1.2.3, #4
// See also bug 4972402
// For all exceptions E in exceptions,
// (isCheckedException(E) => (isValue(E) || RemoteException.isAssignableFrom( E ) )
for(int eIndex = 0; eIndex < exceptions.length; eIndex++) {
Class exception = exceptions[eIndex];
if (isCheckedException(exception) && !isValue(exception) &&
!isRemoteException(exception))
{
String msg = "Exception '" + exception + "' on method '" +
method + "' is not a allowed RMI/IIOP exception type";
throw new IDLTypeException(msg);
}
}
return;
}
/**
* Returns true if the method's throw clause conforms to the exception
* restrictions for properties as defined in Section 1.3.4.3 of
* Java2IDL spec. This means that for all exceptions E declared on the
* method, E isChecked => RemoteException.isAssignableFrom( E ).
*/
private boolean validPropertyExceptions(Method method)
{
Class[] exceptions = method.getExceptionTypes();
for(int eIndex = 0; eIndex < exceptions.length; eIndex++) {
Class exception = exceptions[eIndex];
if (isCheckedException(exception) && !isRemoteException(exception))
return false ;
}
return true;
}
/**
* Implements Section 1.2.3, #2.
*/
private boolean isRemoteExceptionOrSuperClass(Class c) {
return
((c == java.rmi.RemoteException.class) ||
(c == java.io.IOException.class) ||
(c == java.lang.Exception.class) ||
(c == java.lang.Throwable.class));
}
/**
* Implements Section 1.2.3, #5.
*/
private void validateDirectInterfaces(Class c) throws IDLTypeException {
Class[] directInterfaces = c.getInterfaces();
if( directInterfaces.length < 2 ) {
return;
}
Set allMethodNames = new HashSet();
Set currentMethodNames = new HashSet();
for(int i = 0; i < directInterfaces.length; i++) {
Class next = directInterfaces[i];
Method[] methods = next.getMethods();
// Comparison is based on method names only. First collect
// all methods from current interface, eliminating duplicate
// names.
currentMethodNames.clear();
for(int m = 0; m < methods.length; m++) {
currentMethodNames.add(methods[m].getName());
}
// Now check each method against list of all unique method
// names processed so far.
for(Iterator iter=currentMethodNames.iterator(); iter.hasNext();) {
String methodName = (String) iter.next();
if( allMethodNames.contains(methodName) ) {
String msg = "Class " + c + " inherits method " +
methodName + " from multiple direct interfaces.";
throw new IDLTypeException(msg);
} else {
allMethodNames.add(methodName);
}
}
}
return;
}
/**
* Implements 1.2.3 #6
*/
private void validateConstants(final Class c)
throws IDLTypeException {
Field[] fields = null;
try {
fields = (Field[])
java.security.AccessController.doPrivileged
(new java.security.PrivilegedExceptionAction() {
public java.lang.Object run() throws Exception {
return c.getFields();
}
});
} catch(java.security.PrivilegedActionException pae) {
IDLTypeException ite = new IDLTypeException();
ite.initCause(pae);
throw ite;
}
for(int i = 0; i < fields.length; i++) {
Field next = fields[i];
Class fieldType = next.getType();
if( (fieldType != java.lang.String.class) &&
!isPrimitive(fieldType) ) {
String msg = "Constant field '" + next.getName() +
"' in class '" + next.getDeclaringClass().getName() +
"' has invalid type' " + next.getType() + "'. Constants" +
" in RMI/IIOP interfaces can only have primitive" +
" types and java.lang.String types.";
throw new IDLTypeException(msg);
}
}
return;
}
}

View File

@@ -1,138 +0,0 @@
/*
* Copyright (c) 1999, 2003, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.iiop;
import com.sun.corba.se.impl.protocol.Request;
import com.sun.corba.se.impl.core.ClientRequest;
import com.sun.corba.se.impl.core.ServiceContext;
import com.sun.corba.se.impl.core.ServiceContexts;
import com.sun.corba.se.impl.core.ClientResponse;
import com.sun.corba.se.impl.core.ServerRequest;
import com.sun.corba.se.impl.core.ServerResponse;
import com.sun.corba.se.impl.corba.IOR;
import com.sun.corba.se.impl.corba.GIOPVersion;
import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase;
import com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage;
import com.sun.corba.se.impl.orbutil.ORBConstants;
import com.sun.corba.se.impl.core.ORBVersion;
import com.sun.corba.se.impl.core.ORB;
import com.sun.corba.se.impl.orbutil.ORBUtility;
import com.sun.corba.se.impl.ior.ObjectKeyFactory ;
import com.sun.corba.se.impl.ior.ObjectKey ;
import com.sun.corba.se.impl.ior.ObjectKeyTemplate ;
import com.sun.corba.se.impl.ior.IIOPProfile;
public class LocalClientRequestImpl extends IIOPOutputStream
implements ClientRequest
{
public LocalClientRequestImpl( GIOPVersion gv,
ORB orb, IOR ior, short addrDisposition,
String operationName, boolean oneway, ServiceContexts svc,
int requestId, byte streamFormatVersion)
{
super(gv,
orb,
null,
BufferManagerFactory.newBufferManagerWrite(BufferManagerFactory.GROW),
streamFormatVersion);
this.isOneway = oneway;
boolean responseExpected = !isOneway;
IIOPProfile iop = ior.getProfile();
ObjectKey okey = iop.getObjectKey();
ObjectKeyTemplate oktemp = okey.getTemplate() ;
ORBVersion version = oktemp.getORBVersion() ;
orb.setORBVersion( version ) ;
this.request = MessageBase.createRequest(orb, gv, requestId,
responseExpected, ior, addrDisposition, operationName, svc, null);
setMessage(request);
request.write(this);
// mark beginning of msg body for possible later use
bodyBegin = getSize();
}
public int getRequestId() {
return request.getRequestId();
}
public boolean isOneWay() {
return isOneway;
}
public ServiceContexts getServiceContexts() {
return request.getServiceContexts();
}
public String getOperationName() {
return request.getOperation();
}
public ObjectKey getObjectKey() {
return request.getObjectKey();
}
public ServerRequest getServerRequest()
{
// Set the size of the marshalled data in the message header.
getMessage().setSize( getByteBuffer(), getSize() ) ;
// Construct a new ServerRequest out of the buffer in this ClientRequest
LocalServerRequestImpl serverRequest = new LocalServerRequestImpl(
(ORB)orb(), toByteArray(), request ) ;
// Skip over all of the GIOP header information. This positions
// the offset in the buffer so that the skeleton can correctly read
// the marshalled arguments.
serverRequest.setIndex( bodyBegin ) ;
return serverRequest ;
}
public ClientResponse invoke()
{
ORB myORB = (ORB)orb() ;
ServerResponse serverResponse = myORB.process( getServerRequest() ) ;
LocalServerResponseImpl lsr = (LocalServerResponseImpl)serverResponse ;
return lsr.getClientResponse() ;
}
/**
* Check to see if the request is local.
*/
public boolean isLocal(){
return true;
}
private RequestMessage request;
private int bodyBegin;
private boolean isOneway;
}

View File

@@ -1,162 +0,0 @@
/*
* Copyright (c) 1999, 2003, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.iiop;
import java.io.IOException;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.CompletionStatus;
import com.sun.corba.se.impl.core.Response;
import com.sun.corba.se.impl.core.ClientResponse;
import com.sun.corba.se.impl.corba.IOR;
import com.sun.corba.se.impl.core.ORB;
import com.sun.corba.se.impl.core.ServiceContext;
import com.sun.corba.se.impl.core.ServiceContexts;
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage;
import com.sun.corba.se.impl.orbutil.MinorCodes;
class LocalClientResponseImpl extends IIOPInputStream implements ClientResponse
{
LocalClientResponseImpl(ORB orb, byte[] buf, ReplyMessage header)
{
super(orb, buf, header.getSize(), header.isLittleEndian(), header, null);
this.reply = header;
// NOTE (Ram J) (06/02/2000) if we set result.setIndex(bodyBegin)
// in LocalServerResponse.getClientResponse(), then we do not need
// to read the headers (done below) anymore.
// This will be an optimisation which is can be done to speed up the
// local invocation by avoiding reading the headers in the local cases.
// BUGFIX(Ram Jeyaraman) This has been moved from
// LocalServerResponse.getClientResponse()
// Skip over all of the GIOP header information. This positions
// the offset in the buffer so that the skeleton can correctly read
// the marshalled arguments.
this.setIndex(Message.GIOPMessageHeaderLength);
// BUGFIX(Ram Jeyaraman) For local invocations, the reply mesg fields
// needs to be set, by reading the response buffer contents
// to correctly set the exception type and other info.
this.reply.read(this);
}
LocalClientResponseImpl(SystemException ex)
{
this.systemException = ex;
}
public boolean isSystemException() {
if ( reply != null )
return reply.getReplyStatus() == ReplyMessage.SYSTEM_EXCEPTION;
else
return (systemException != null);
}
public boolean isUserException() {
if ( reply != null )
return reply.getReplyStatus() == ReplyMessage.USER_EXCEPTION;
else
return false;
}
public boolean isLocationForward() {
if ( reply != null ) {
return ( (reply.getReplyStatus() == ReplyMessage.LOCATION_FORWARD) ||
(reply.getReplyStatus() == ReplyMessage.LOCATION_FORWARD_PERM) );
//return reply.getReplyStatus() == ReplyMessage.LOCATION_FORWARD;
} else {
return false;
}
}
public boolean isDifferentAddrDispositionRequested() {
if (reply != null) {
return reply.getReplyStatus() == ReplyMessage.NEEDS_ADDRESSING_MODE;
}
return false;
}
public short getAddrDisposition() {
if (reply != null) {
return reply.getAddrDisposition();
}
throw new org.omg.CORBA.INTERNAL(
"Null reply in getAddrDisposition",
MinorCodes.NULL_REPLY_IN_GET_ADDR_DISPOSITION,
CompletionStatus.COMPLETED_MAYBE);
}
public IOR getForwardedIOR() {
if ( reply != null )
return reply.getIOR();
else
return null;
}
public int getRequestId() {
if ( reply != null )
return reply.getRequestId();
else
throw new org.omg.CORBA.INTERNAL("Error in getRequestId");
}
public ServiceContexts getServiceContexts() {
if ( reply != null )
return reply.getServiceContexts();
else
return null;
}
public SystemException getSystemException() {
if ( reply != null )
return reply.getSystemException();
else
return systemException;
}
public java.lang.String peekUserExceptionId() {
mark(Integer.MAX_VALUE);
String result = read_string();
reset();
return result;
}
/**
* Check to see if the response is local.
*/
public boolean isLocal(){
return true;
}
private ReplyMessage reply;
private SystemException systemException;
}

View File

@@ -1,208 +0,0 @@
/*
* Copyright (c) 1999, 2003, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.iiop;
import org.omg.CORBA.SystemException;
import com.sun.corba.se.impl.core.ServerRequest;
import com.sun.corba.se.impl.core.ServiceContext;
import com.sun.corba.se.impl.core.DuplicateServiceContext;
import com.sun.corba.se.impl.core.UEInfoServiceContext;
import com.sun.corba.se.impl.core.ServiceContexts;
import com.sun.corba.se.impl.core.ServerResponse;
import com.sun.corba.se.impl.corba.IOR;
import com.sun.corba.se.impl.core.ORB;
import com.sun.corba.se.impl.orbutil.ORBUtility; //d11638
import org.omg.CORBA.portable.UnknownException;
import org.omg.CORBA.UNKNOWN;
import org.omg.CORBA.CompletionStatus;
import com.sun.corba.se.impl.ior.ObjectKey;
import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase;
import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage;
import com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage;
class LocalServerRequestImpl extends IIOPInputStream implements ServerRequest {
org.omg.CORBA.portable.OutputStream replyStream;
org.omg.CORBA.portable.OutputStream exceptionReplyStream;
LocalServerRequestImpl(ORB orb, byte[] buf, RequestMessage header)
{
super(orb, buf, header.getSize(), header.isLittleEndian(), header, null );
this.request = header;
}
public int getRequestId() {
return request.getRequestId();
}
public boolean isOneWay() {
return !request.isResponseExpected();
}
public ServiceContexts getServiceContexts() {
return request.getServiceContexts();
}
public String getOperationName() {
return request.getOperation();
}
public ObjectKey getObjectKey() {
return request.getObjectKey();
}
public ServerResponse createResponse(ServiceContexts svc)
{
return new LocalServerResponseImpl(this, svc);
}
public org.omg.CORBA.portable.OutputStream createReply() {
if (replyStream == null) {
replyStream = (org.omg.CORBA.portable.OutputStream)
createResponse(null);
}
return replyStream;
}
public org.omg.CORBA.portable.OutputStream createExceptionReply() {
if (exceptionReplyStream == null) {
exceptionReplyStream = (org.omg.CORBA.portable.OutputStream)
createUserExceptionResponse(null);
}
return exceptionReplyStream;
}
public ServerResponse createUserExceptionResponse(
ServiceContexts svc)
{
return new LocalServerResponseImpl(this, svc, true);
}
public ServerResponse createUnknownExceptionResponse(
UnknownException ex) {
ServiceContexts contexts = null;
SystemException sys = new UNKNOWN( 0,
CompletionStatus.COMPLETED_MAYBE);
try {
contexts = new ServiceContexts( (ORB)orb() );
UEInfoServiceContext uei = new UEInfoServiceContext(sys);
contexts.put(uei) ;
} catch (DuplicateServiceContext d) {
// can't happen
}
return createSystemExceptionResponse(sys,contexts);
}
public ServerResponse createSystemExceptionResponse(
SystemException ex, ServiceContexts svc) {
// Only do this if interceptors have been initialized on this request
// and have not completed their lifecycle (otherwise the info stack
// may be empty or have a different request's entry on top).
if (executePIInResponseConstructor()) {
// Inform Portable Interceptors of the SystemException. This is
// required to be done here because the ending interception point
// is called in the ServerResponseImpl constructor called below
// but we do not currently write the SystemException into the
// response until after the ending point is called.
ORB orb = (ORB)orb();
orb.getPIHandler().setServerPIInfo( ex );
}
if (orb() != null && ((ORB)orb()).subcontractDebugFlag && ex != null)
ORBUtility.dprint(this, "Sending SystemException:", ex);
LocalServerResponseImpl response =
new LocalServerResponseImpl(this, svc, false);
ORBUtility.writeSystemException(ex, response);
return response;
}
public ServerResponse createLocationForward(
IOR ior, ServiceContexts svc) {
ReplyMessage reply = MessageBase.createReply( (ORB)orb(),
request.getGIOPVersion(), request.getRequestId(),
ReplyMessage.LOCATION_FORWARD, svc, ior);
LocalServerResponseImpl response =
new LocalServerResponseImpl(this, reply, ior);
return response;
}
private RequestMessage request;
/**
* Check to see if the request is local.
*/
public boolean isLocal(){
return true;
}
private boolean _executeReturnServantInResponseConstructor = false;
public boolean executeReturnServantInResponseConstructor()
{
return _executeReturnServantInResponseConstructor;
}
public void setExecuteReturnServantInResponseConstructor(boolean b)
{
_executeReturnServantInResponseConstructor = b;
}
private boolean _executeRemoveThreadInfoInResponseConstructor = false;
public boolean executeRemoveThreadInfoInResponseConstructor()
{
return _executeRemoveThreadInfoInResponseConstructor;
}
public void setExecuteRemoveThreadInfoInResponseConstructor(boolean b)
{
_executeRemoveThreadInfoInResponseConstructor = b;
}
private boolean _executePIInResponseConstructor = false;
public boolean executePIInResponseConstructor() {
return _executePIInResponseConstructor;
}
public void setExecutePIInResponseConstructor( boolean b ) {
_executePIInResponseConstructor = b;
}
// We know that we're talking to the same ValueHandler, so
// use the maximum version it supports.
public byte getStreamFormatVersionForReply() {
return ORBUtility.getMaxStreamFormatVersion();
}
}

View File

@@ -1,192 +0,0 @@
/*
* Copyright (c) 1999, 2003, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.iiop;
import org.omg.CORBA.SystemException;
import com.sun.corba.se.impl.core.ServerResponse;
import com.sun.corba.se.impl.core.ORB;
import com.sun.corba.se.impl.corba.IOR;
import com.sun.corba.se.impl.core.ServiceContext;
import com.sun.corba.se.impl.core.ServiceContexts;
import com.sun.corba.se.impl.core.ClientResponse;
import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase;
import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage;
class LocalServerResponseImpl
extends IIOPOutputStream
implements ServerResponse
{
LocalServerResponseImpl(LocalServerRequestImpl request, ServiceContexts svc)
{
this(request,
MessageBase.createReply(
(ORB)request.orb(),
request.getGIOPVersion(),
request.getRequestId(), ReplyMessage.NO_EXCEPTION,
svc, null),
null);
}
LocalServerResponseImpl(LocalServerRequestImpl request, ServiceContexts svc,
boolean user)
{
this(request,
MessageBase.createReply(
(ORB)request.orb(),
request.getGIOPVersion(), request.getRequestId(),
user ? ReplyMessage.USER_EXCEPTION :
ReplyMessage.SYSTEM_EXCEPTION,
svc, null),
null);
}
LocalServerResponseImpl( LocalServerRequestImpl request, ReplyMessage reply,
IOR ior)
{
super(request.getGIOPVersion(),
(ORB)request.orb(),
null,
BufferManagerFactory.newBufferManagerWrite(BufferManagerFactory.GROW),
request.getStreamFormatVersionForReply());
setMessage(reply);
ORB orb = (ORB)request.orb();
ServerResponseImpl.runServantPostInvoke(orb, request);
if( request.executePIInResponseConstructor() ) {
// Invoke server request ending interception points (send_*):
// Note: this may end up with a SystemException or an internal
// Runtime ForwardRequest.
orb.getPIHandler().invokeServerPIEndingPoint( reply );
// Note this will be executed even if a ForwardRequest or
// SystemException is thrown by a Portable Interceptors ending
// point since we end up in this constructor again anyway.
orb.getPIHandler().cleanupServerPIRequest();
// See (Local)ServerRequestImpl.createSystemExceptionResponse
// for why this is necesary.
request.setExecutePIInResponseConstructor(false);
}
// Once you get here then the final reply is available (i.e.,
// postinvoke and interceptors have completed.
if (request.executeRemoveThreadInfoInResponseConstructor()) {
ServerResponseImpl.removeThreadInfo(orb, request);
}
reply.write(this);
if (reply.getIOR() != null)
reply.getIOR().write(this);
this.reply = reply;
this.ior = reply.getIOR();
}
public boolean isSystemException() {
if (reply != null)
return reply.getReplyStatus() == ReplyMessage.SYSTEM_EXCEPTION;
return false;
}
public boolean isUserException() {
if (reply != null)
return reply.getReplyStatus() == ReplyMessage.USER_EXCEPTION;
return false;
}
public boolean isLocationForward() {
if (ior != null)
return true;
return false;
}
public IOR getForwardedIOR() {
return ior;
}
public int getRequestId() {
if (reply != null)
return reply.getRequestId();
return -1;
}
public ServiceContexts getServiceContexts() {
if (reply != null)
return reply.getServiceContexts();
return null;
}
public SystemException getSystemException() {
if (reply != null)
return reply.getSystemException();
return null;
}
public ReplyMessage getReply()
{
return reply ;
}
public ClientResponse getClientResponse()
{
// set the size of the marshalled data in the message header
getMessage().setSize(getByteBuffer(), getSize());
// Construct a new ClientResponse out of the buffer in this ClientRequest
LocalClientResponseImpl result =
new LocalClientResponseImpl( (ORB)orb(), toByteArray(), reply);
// NOTE (Ram J) (06/02/2000) if we set result.setIndex(bodyBegin) here
// then the LocalClientResponse does not need to read the headers anymore.
// This will be an optimisation which is can be done to speed up the
// local invocation by avoiding reading the headers in the local cases.
// BUGFIX(Ram Jeyaraman) result.setOffset is now done in
// LocalClientResponseImpl constructor.
/*
// Skip over all of the GIOP header information. This positions
// the offset in the buffer so that the skeleton can correctly read
// the marshalled arguments.
result.setOffset( bodyBegin ) ;
*/
return result ;
}
/**
* Check to see if the response is local.
*/
public boolean isLocal(){
return true;
}
private ReplyMessage reply;
private IOR ior; // forwarded IOR
}

View File

@@ -1,710 +0,0 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.corba.se.impl.transport;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.ByteBuffer;
import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Collections;
import java.util.Hashtable;
import java.util.HashMap;
import java.util.Map;
import org.omg.CORBA.COMM_FAILURE;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.DATA_CONVERSION;
import org.omg.CORBA.INTERNAL;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.OBJECT_NOT_EXIST;
import org.omg.CORBA.SystemException;
import com.sun.org.omg.SendingContext.CodeBase;
import com.sun.corba.se.pept.broker.Broker;
import com.sun.corba.se.pept.encoding.InputObject;
import com.sun.corba.se.pept.encoding.OutputObject;
import com.sun.corba.se.pept.protocol.MessageMediator;
import com.sun.corba.se.pept.transport.Acceptor;
import com.sun.corba.se.pept.transport.Connection;
import com.sun.corba.se.pept.transport.ConnectionCache;
import com.sun.corba.se.pept.transport.ContactInfo;
import com.sun.corba.se.pept.transport.EventHandler;
import com.sun.corba.se.pept.transport.InboundConnectionCache;
import com.sun.corba.se.pept.transport.OutboundConnectionCache;
import com.sun.corba.se.pept.transport.ResponseWaitingRoom;
import com.sun.corba.se.pept.transport.Selector;
import com.sun.corba.se.spi.ior.IOR;
import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.spi.orb.ORB ;
import com.sun.corba.se.spi.orbutil.threadpool.Work;
import com.sun.corba.se.spi.protocol.CorbaMessageMediator;
import com.sun.corba.se.spi.transport.CorbaContactInfo;
import com.sun.corba.se.spi.transport.CorbaConnection;
import com.sun.corba.se.spi.transport.CorbaResponseWaitingRoom;
import com.sun.corba.se.impl.encoding.CachedCodeBase;
import com.sun.corba.se.impl.encoding.CDRInputStream_1_0;
import com.sun.corba.se.impl.encoding.CDROutputObject;
import com.sun.corba.se.impl.encoding.CDROutputStream_1_0;
import com.sun.corba.se.impl.encoding.CodeSetComponentInfo;
import com.sun.corba.se.impl.encoding.OSFCodeSetRegistry;
import com.sun.corba.se.impl.logging.ORBUtilSystemException;
import com.sun.corba.se.impl.orbutil.ORBConstants;
import com.sun.corba.se.impl.orbutil.ORBUtility;
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase;
import com.sun.corba.se.impl.transport.CorbaResponseWaitingRoomImpl;
/**
* @author Ken Cavanaugh
*/
public class BufferConnectionImpl
extends
EventHandlerBase
implements
CorbaConnection,
Work
{
//
// New transport.
//
protected long enqueueTime;
public SocketChannel getSocketChannel()
{
return null;
}
// REVISIT:
// protected for test: genericRPCMSGFramework.IIOPConnection constructor.
//
// From iiop.Connection.java
//
protected long timeStamp = 0;
protected boolean isServer = false;
// Start at some value other than zero since this is a magic
// value in some protocols.
protected int requestId = 5;
protected CorbaResponseWaitingRoom responseWaitingRoom;
protected int state;
protected java.lang.Object stateEvent = new java.lang.Object();
protected java.lang.Object writeEvent = new java.lang.Object();
protected boolean writeLocked;
protected int serverRequestCount = 0;
// Server request map: used on the server side of Connection
// Maps request ID to IIOPInputStream.
Map serverRequestMap = new HashMap() ;
// This is a flag associated per connection telling us if the
// initial set of sending contexts were sent to the receiver
// already...
protected boolean postInitialContexts = false;
// Remote reference to CodeBase server (supplies
// FullValueDescription, among other things)
protected IOR codeBaseServerIOR;
// CodeBase cache for this connection. This will cache remote operations,
// handle connecting, and ensure we don't do any remote operations until
// necessary.
protected CachedCodeBase cachedCodeBase = new CachedCodeBase(this);
protected ORBUtilSystemException wrapper ;
List buffers ;
public BufferConnectionImpl(ORB orb, byte[][] data )
{
this.orb = orb;
wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_TRANSPORT ) ;
buffers = new ArrayList() ;
}
////////////////////////////////////////////////////
//
// framework.transport.Connection
//
public boolean shouldRegisterReadEvent()
{
return false;
}
public boolean shouldRegisterServerReadEvent()
{
return false;
}
public boolean read()
{
return true ;
}
protected CorbaMessageMediator readBits()
{
return null ;
}
protected boolean dispatch(CorbaMessageMediator messageMediator)
{
}
public boolean shouldUseDirectByteBuffers()
{
return false ;
}
// Only called from readGIOPMessage with (12, 0, 12) as arguments
// size is size of buffer to create
// offset is offset from start of message in buffer
// length is length to read
public ByteBuffer read(int size, int offset, int length)
throws IOException
{
byte[] buf = new byte[size];
readFully( buf, offset, length);
ByteBuffer byteBuffer = ByteBuffer.wrap(buf);
byteBuffer.limit(size);
return byteBuffer;
}
// Only called as read( buf, 12, msgsize-12 ) in readGIOPMessage
// We can ignore the byteBuffer parameter
// offset is the starting position to place data in the result
// length is the length of the data to read
public ByteBuffer read(ByteBuffer byteBuffer, int offset, int length)
throws IOException
{
int size = offset + length;
byte[] buf = new byte[size];
readFully(buf, offset, length);
return ByteBuffer.wrap(buf);
}
// Read size bytes from buffer list and place the data
// starting at offset in buf.
public void readFully(byte[] buf, int offset, int size)
throws IOException
{
int remaining = size ;
int position = offset ;
while (remaining > 0) {
ByteBuffer buff = (ByteBuffer)buffers.get(0) ;
int dataSize = buff.remaining() ;
int xferSize = dataSize ;
if (dataSize >= remaining) :
xferSize = remaining ;
buffers.remove(0) ;
}
buff.get( buf, offset, xferSize ) ;
offset += xferSize ;
remaining -= xferSize ;
}
}
public void write(ByteBuffer byteBuffer)
throws IOException
{
buffers.add( byteBuffer ) ;
}
/**
* Note:it is possible for this to be called more than once
*/
public synchronized void close()
{
}
public Acceptor getAcceptor()
{
return null;
}
public ContactInfo getContactInfo()
{
return null;
}
public EventHandler getEventHandler()
{
return this;
}
public OutputObject createOutputObject(MessageMediator messageMediator)
{
// REVISIT - remove this method from Connection and all it subclasses.
throw new RuntimeException("*****SocketOrChannelConnectionImpl.createOutputObject - should not be called.");
}
// This is used by the GIOPOutputObject in order to
// throw the correct error when handling code sets.
// Can we determine if we are on the server side by
// other means? XREVISIT
public boolean isServer()
{
return isServer;
}
public boolean isBusy()
{
return false ;
}
public long getTimeStamp()
{
return timeStamp;
}
public void setTimeStamp(long time)
{
timeStamp = time;
}
public void setState(String stateString)
{
synchronized (stateEvent) {
if (stateString.equals("ESTABLISHED")) {
state = ESTABLISHED;
stateEvent.notifyAll();
} else {
// REVISIT: ASSERT
}
}
}
public void writeLock()
{
}
public void writeUnlock()
{
}
public void sendWithoutLock(OutputObject outputObject)
{
}
public void registerWaiter(MessageMediator messageMediator)
{
}
public void unregisterWaiter(MessageMediator messageMediator)
{
}
public InputObject waitForResponse(MessageMediator messageMediator)
{
return null ;
}
public void setConnectionCache(ConnectionCache connectionCache)
{
}
public ConnectionCache getConnectionCache()
{
return null;
}
////////////////////////////////////////////////////
//
// EventHandler methods
//
public SelectableChannel getChannel()
{
return null;
}
public int getInterestOps()
{
return null;
}
// public Acceptor getAcceptor() - already defined above.
public Connection getConnection()
{
return this;
}
////////////////////////////////////////////////////
//
// Work methods.
//
public String getName()
{
return this.toString();
}
public void doWork()
{
}
public void setEnqueueTime(long timeInMillis)
{
enqueueTime = timeInMillis;
}
public long getEnqueueTime()
{
return enqueueTime;
}
////////////////////////////////////////////////////
//
// spi.transport.CorbaConnection.
//
public ResponseWaitingRoom getResponseWaitingRoom()
{
return null ;
}
// REVISIT - inteface defines isServer but already defined in
// higher interface.
public void serverRequestMapPut(int requestId,
CorbaMessageMediator messageMediator)
{
serverRequestMap.put(new Integer(requestId), messageMediator);
}
public CorbaMessageMediator serverRequestMapGet(int requestId)
{
return (CorbaMessageMediator)
serverRequestMap.get(new Integer(requestId));
}
public void serverRequestMapRemove(int requestId)
{
serverRequestMap.remove(new Integer(requestId));
}
// REVISIT: this is also defined in:
// com.sun.corba.se.spi.legacy.connection.Connection
public java.net.Socket getSocket()
{
return null;
}
/** It is possible for a Close Connection to have been
** sent here, but we will not check for this. A "lazy"
** Exception will be thrown in the Worker thread after the
** incoming request has been processed even though the connection
** is closed before the request is processed. This is o.k because
** it is a boundary condition. To prevent it we would have to add
** more locks which would reduce performance in the normal case.
**/
public synchronized void serverRequestProcessingBegins()
{
serverRequestCount++;
}
public synchronized void serverRequestProcessingEnds()
{
serverRequestCount--;
}
//
//
//
public synchronized int getNextRequestId()
{
return requestId++;
}
// Negotiated code sets for char and wchar data
protected CodeSetComponentInfo.CodeSetContext codeSetContext = null;
public ORB getBroker()
{
return orb;
}
public CodeSetComponentInfo.CodeSetContext getCodeSetContext()
{
// Needs to be synchronized for the following case when the client
// doesn't send the code set context twice, and we have two threads
// in ServerRequestDispatcher processCodeSetContext.
//
// Thread A checks to see if there is a context, there is none, so
// it calls setCodeSetContext, getting the synch lock.
// Thread B checks to see if there is a context. If we didn't synch,
// it might decide to outlaw wchar/wstring.
if (codeSetContext == null) {
synchronized(this) {
return codeSetContext;
}
}
return codeSetContext;
}
public synchronized void setCodeSetContext(CodeSetComponentInfo.CodeSetContext csc) {
// Double check whether or not we need to do this
if (codeSetContext == null) {
if (OSFCodeSetRegistry.lookupEntry(csc.getCharCodeSet()) == null ||
OSFCodeSetRegistry.lookupEntry(csc.getWCharCodeSet()) == null) {
// If the client says it's negotiated a code set that
// isn't a fallback and we never said we support, then
// it has a bug.
throw wrapper.badCodesetsFromClient() ;
}
codeSetContext = csc;
}
}
//
// from iiop.IIOPConnection.java
//
// Map request ID to an InputObject.
// This is so the client thread can start unmarshaling
// the reply and remove it from the out_calls map while the
// ReaderThread can still obtain the input stream to give
// new fragments. Only the ReaderThread touches the clientReplyMap,
// so it doesn't incur synchronization overhead.
public MessageMediator clientRequestMapGet(int requestId)
{
return null ;
}
protected MessageMediator clientReply_1_1;
public void clientReply_1_1_Put(MessageMediator x)
{
clientReply_1_1 = x;
}
public MessageMediator clientReply_1_1_Get()
{
return clientReply_1_1;
}
public void clientReply_1_1_Remove()
{
clientReply_1_1 = null;
}
protected MessageMediator serverRequest_1_1;
public void serverRequest_1_1_Put(MessageMediator x)
{
serverRequest_1_1 = x;
}
public MessageMediator serverRequest_1_1_Get()
{
return serverRequest_1_1;
}
public void serverRequest_1_1_Remove()
{
serverRequest_1_1 = null;
}
protected String getStateString( int state )
{
synchronized ( stateEvent ){
switch (state) {
case OPENING : return "OPENING" ;
case ESTABLISHED : return "ESTABLISHED" ;
case CLOSE_SENT : return "CLOSE_SENT" ;
case CLOSE_RECVD : return "CLOSE_RECVD" ;
case ABORT : return "ABORT" ;
default : return "???" ;
}
}
}
public synchronized boolean isPostInitialContexts() {
return postInitialContexts;
}
// Can never be unset...
public synchronized void setPostInitialContexts(){
postInitialContexts = true;
}
/**
* Wake up the outstanding requests on the connection, and hand them
* COMM_FAILURE exception with a given minor code.
*
* Also, delete connection from connection table and
* stop the reader thread.
* Note that this should only ever be called by the Reader thread for
* this connection.
*
* @param minor_code The minor code for the COMM_FAILURE major code.
* @param die Kill the reader thread (this thread) before exiting.
*/
public void purgeCalls(SystemException systemException,
boolean die, boolean lockHeld)
{
}
/*************************************************************************
* The following methods are for dealing with Connection cleaning for
* better scalability of servers in high network load conditions.
**************************************************************************/
public void sendCloseConnection(GIOPVersion giopVersion)
throws IOException
{
Message msg = MessageBase.createCloseConnection(giopVersion);
sendHelper(giopVersion, msg);
}
public void sendMessageError(GIOPVersion giopVersion)
throws IOException
{
Message msg = MessageBase.createMessageError(giopVersion);
sendHelper(giopVersion, msg);
}
/**
* Send a CancelRequest message. This does not lock the connection, so the
* caller needs to ensure this method is called appropriately.
* @exception IOException - could be due to abortive connection closure.
*/
public void sendCancelRequest(GIOPVersion giopVersion, int requestId)
throws IOException
{
Message msg = MessageBase.createCancelRequest(giopVersion, requestId);
sendHelper(giopVersion, msg);
}
protected void sendHelper(GIOPVersion giopVersion, Message msg)
throws IOException
{
// REVISIT: See comments in CDROutputObject constructor.
CDROutputObject outputObject =
new CDROutputObject((ORB)orb, null, giopVersion, this, msg,
ORBConstants.STREAM_FORMAT_VERSION_1);
msg.write(outputObject);
outputObject.writeTo(this);
}
public void sendCancelRequestWithLock(GIOPVersion giopVersion,
int requestId)
throws IOException
{
writeLock();
try {
sendCancelRequest(giopVersion, requestId);
} finally {
writeUnlock();
}
}
// Begin Code Base methods ---------------------------------------
//
// Set this connection's code base IOR. The IOR comes from the
// SendingContext. This is an optional service context, but all
// JavaSoft ORBs send it.
//
// The set and get methods don't need to be synchronized since the
// first possible get would occur during reading a valuetype, and
// that would be after the set.
// Sets this connection's code base IOR. This is done after
// getting the IOR out of the SendingContext service context.
// Our ORBs always send this, but it's optional in CORBA.
public final void setCodeBaseIOR(IOR ior) {
codeBaseServerIOR = ior;
}
public final IOR getCodeBaseIOR() {
return codeBaseServerIOR;
}
// Get a CodeBase stub to use in unmarshaling. The CachedCodeBase
// won't connect to the remote codebase unless it's necessary.
public final CodeBase getCodeBase() {
return cachedCodeBase;
}
// End Code Base methods -----------------------------------------
// Can be overridden in subclass for different options.
protected void setSocketOptions(Socket socket)
{
}
public String toString()
{
synchronized ( stateEvent ){
return
"BufferConnectionImpl[" + " "
+ getStateString( state ) + " "
+ shouldUseSelectThreadToWait() + " "
+ shouldUseWorkerThreadForEvent()
+ "]" ;
}
}
// Must be public - used in encoding.
public void dprint(String msg)
{
ORBUtility.dprint("SocketOrChannelConnectionImpl", msg);
}
protected void dprint(String msg, Throwable t)
{
dprint(msg);
t.printStackTrace(System.out);
}
}
// End of file.

View File

@@ -361,3 +361,13 @@ c9dd82da51ed34a28f7c6b3245163ee962e94572 hs25-b40
2b9946e10587f74ef75ae8145bea484df4a2738b hs25-b41
81b6cb70717c66375846b78bb174594ec3aa998e jdk8-b99
9f71e36a471ae4a668e08827d33035963ed10c08 hs25-b42
5787fac72e760c6a5fd9efa113b0c75caf554136 jdk8-b100
46487ba40ff225654d0c51787ed3839bafcbd9f3 hs25-b43
f6921c876db192bba389cec062855a66372da01c jdk8-b101
530fe88b3b2c710f42810b3580d86a0d83ad6c1c hs25-b44
c4697c1c448416108743b59118b4a2498b339d0c jdk8-b102
7f55137d6aa81efc6eb0035813709f2cb6a26b8b hs25-b45
6f9be7f87b9653e94fd8fb3070891a0cc91b15bf jdk8-b103
580430d131ccd475e2f2ad4006531b8c4813d102 hs25-b46
104743074675359cfbf7f4dcd9ab2a5974a16627 jdk8-b104
c1604d5885a6f2adc0bcea2fa142a8f6bafad2f0 hs25-b47

View File

@@ -29,11 +29,10 @@ public interface JVMTIThreadState {
public static final int JVMTI_THREAD_STATE_ALIVE = 0x0001;
public static final int JVMTI_THREAD_STATE_TERMINATED = 0x0002;
public static final int JVMTI_THREAD_STATE_RUNNABLE = 0x0004;
public static final int JVMTI_THREAD_STATE_WAITING = 0x0008;
public static final int JVMTI_THREAD_STATE_WAITING = 0x0080;
public static final int JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010;
public static final int JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020;
public static final int JVMTI_THREAD_STATE_SLEEPING = 0x0040;
public static final int JVMTI_THREAD_STATE_WAITING_FOR_NOTIFICATION = 0x0080;
public static final int JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100;
public static final int JVMTI_THREAD_STATE_PARKED = 0x0200;
public static final int JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400;

View File

@@ -75,19 +75,19 @@ public class InstanceKlass extends Klass {
javaFieldsCount = new CIntField(type.getCIntegerField("_java_fields_count"), 0);
constants = new MetadataField(type.getAddressField("_constants"), 0);
classLoaderData = type.getAddressField("_class_loader_data");
sourceFileName = type.getAddressField("_source_file_name");
sourceDebugExtension = type.getAddressField("_source_debug_extension");
innerClasses = type.getAddressField("_inner_classes");
sourceFileNameIndex = new CIntField(type.getCIntegerField("_source_file_name_index"), 0);
nonstaticFieldSize = new CIntField(type.getCIntegerField("_nonstatic_field_size"), 0);
staticFieldSize = new CIntField(type.getCIntegerField("_static_field_size"), 0);
staticOopFieldCount = new CIntField(type.getCIntegerField("_static_oop_field_count"), 0);
staticOopFieldCount = new CIntField(type.getCIntegerField("_static_oop_field_count"), 0);
nonstaticOopMapSize = new CIntField(type.getCIntegerField("_nonstatic_oop_map_size"), 0);
isMarkedDependent = new CIntField(type.getCIntegerField("_is_marked_dependent"), 0);
initState = new CIntField(type.getCIntegerField("_init_state"), 0);
vtableLen = new CIntField(type.getCIntegerField("_vtable_len"), 0);
itableLen = new CIntField(type.getCIntegerField("_itable_len"), 0);
breakpoints = type.getAddressField("_breakpoints");
genericSignature = type.getAddressField("_generic_signature");
genericSignatureIndex = new CIntField(type.getCIntegerField("_generic_signature_index"), 0);
majorVersion = new CIntField(type.getCIntegerField("_major_version"), 0);
minorVersion = new CIntField(type.getCIntegerField("_minor_version"), 0);
headerSize = Oop.alignObjectOffset(type.getSize());
@@ -134,9 +134,9 @@ public class InstanceKlass extends Klass {
private static CIntField javaFieldsCount;
private static MetadataField constants;
private static AddressField classLoaderData;
private static AddressField sourceFileName;
private static AddressField sourceDebugExtension;
private static AddressField innerClasses;
private static CIntField sourceFileNameIndex;
private static CIntField nonstaticFieldSize;
private static CIntField staticFieldSize;
private static CIntField staticOopFieldCount;
@@ -146,7 +146,7 @@ public class InstanceKlass extends Klass {
private static CIntField vtableLen;
private static CIntField itableLen;
private static AddressField breakpoints;
private static AddressField genericSignature;
private static CIntField genericSignatureIndex;
private static CIntField majorVersion;
private static CIntField minorVersion;
@@ -346,7 +346,7 @@ public class InstanceKlass extends Klass {
public ConstantPool getConstants() { return (ConstantPool) constants.getValue(this); }
public ClassLoaderData getClassLoaderData() { return ClassLoaderData.instantiateWrapperFor(classLoaderData.getValue(getAddress())); }
public Oop getClassLoader() { return getClassLoaderData().getClassLoader(); }
public Symbol getSourceFileName() { return getSymbol(sourceFileName); }
public Symbol getSourceFileName() { return getConstants().getSymbolAt(sourceFileNameIndex.getValue(this)); }
public String getSourceDebugExtension(){ return CStringUtilities.getString(sourceDebugExtension.getValue(getAddress())); }
public long getNonstaticFieldSize() { return nonstaticFieldSize.getValue(this); }
public long getStaticOopFieldCount() { return staticOopFieldCount.getValue(this); }
@@ -354,7 +354,7 @@ public class InstanceKlass extends Klass {
public boolean getIsMarkedDependent() { return isMarkedDependent.getValue(this) != 0; }
public long getVtableLen() { return vtableLen.getValue(this); }
public long getItableLen() { return itableLen.getValue(this); }
public Symbol getGenericSignature() { return getSymbol(genericSignature); }
public Symbol getGenericSignature() { return getConstants().getSymbolAt(genericSignatureIndex.getValue(this)); }
public long majorVersion() { return majorVersion.getValue(this); }
public long minorVersion() { return minorVersion.getValue(this); }

View File

@@ -44,7 +44,7 @@ public class PhaseCFG extends Phase {
Type type = db.lookupType("PhaseCFG");
numBlocksField = new CIntField(type.getCIntegerField("_num_blocks"), 0);
blocksField = type.getAddressField("_blocks");
bbsField = type.getAddressField("_bbs");
bbsField = type.getAddressField("_node_to_block_mapping");
brootField = type.getAddressField("_broot");
}

View File

@@ -32,7 +32,7 @@ import sun.jvm.hotspot.types.*;
// to the sys_thread_t structure of the classic JVM implementation.
public class OSThread extends VMObject {
private static JIntField interruptedField;
private static JIntField threadIdField;
private static Field threadIdField;
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
@@ -44,7 +44,7 @@ public class OSThread extends VMObject {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("OSThread");
interruptedField = type.getJIntField("_interrupted");
threadIdField = type.getJIntField("_thread_id");
threadIdField = type.getField("_thread_id");
}
public OSThread(Address addr) {
@@ -56,7 +56,7 @@ public class OSThread extends VMObject {
}
public int threadId() {
return (int)threadIdField.getValue(addr);
return threadIdField.getJInt(addr);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. 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
@@ -74,25 +74,31 @@ public class ClassDump extends Tool {
public void run() {
// Ready to go with the database...
try {
// The name of the filter always comes from a System property.
// If we have a pkgList, pass it, otherwise let the filter read
// its own System property for the list of classes.
String filterClassName = System.getProperty("sun.jvm.hotspot.tools.jcore.filter",
"sun.jvm.hotspot.tools.jcore.PackageNameFilter");
try {
Class filterClass = Class.forName(filterClassName);
if (pkgList == null) {
classFilter = (ClassFilter) filterClass.newInstance();
} else {
Constructor con = filterClass.getConstructor(String.class);
classFilter = (ClassFilter) con.newInstance(pkgList);
if (classFilter == null) {
// If not already set, the name of the filter comes from a System property.
// If we have a pkgList, pass it, otherwise let the filter read
// its own System property for the list of classes.
String filterClassName = System.getProperty("sun.jvm.hotspot.tools.jcore.filter",
"sun.jvm.hotspot.tools.jcore.PackageNameFilter");
try {
Class filterClass = Class.forName(filterClassName);
if (pkgList == null) {
classFilter = (ClassFilter) filterClass.newInstance();
} else {
Constructor con = filterClass.getConstructor(String.class);
classFilter = (ClassFilter) con.newInstance(pkgList);
}
} catch(Exception exp) {
System.err.println("Warning: Can not create class filter!");
}
} catch(Exception exp) {
System.err.println("Warning: Can not create class filter!");
}
String outputDirectory = System.getProperty("sun.jvm.hotspot.tools.jcore.outputDir", ".");
setOutputDirectory(outputDirectory);
// outputDirectory and jarStream are alternatives: setting one closes the other.
// If neither is set, use outputDirectory from the System property:
if (outputDirectory == null && jarStream == null) {
String dirName = System.getProperty("sun.jvm.hotspot.tools.jcore.outputDir", ".");
setOutputDirectory(dirName);
}
// walk through the system dictionary
SystemDictionary dict = VM.getVM().getSystemDictionary();

View File

@@ -41,13 +41,11 @@ SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
ifeq ("${Platform_arch_model}", "${Platform_arch}")
SOURCES.AD = \
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad)
else
SOURCES.AD = \
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch).ad) \
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch).ad)
endif
EXEC = $(OUTDIR)/adlc

View File

@@ -247,7 +247,7 @@ ifeq ($(USE_CLANG), true)
# Not yet supported by clang in Xcode 4.6.2
# WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare
WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
WARNINGS_ARE_ERRORS += -Wno-empty-body
endif
WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef

View File

@@ -24,16 +24,20 @@
TYPE=MINIMAL1
INCLUDE_JVMTI ?= false
INCLUDE_FPROF ?= false
INCLUDE_VM_STRUCTS ?= false
INCLUDE_JNI_CHECK ?= false
INCLUDE_SERVICES ?= false
INCLUDE_MANAGEMENT ?= false
INCLUDE_ALL_GCS ?= false
INCLUDE_NMT ?= false
INCLUDE_TRACE ?= false
INCLUDE_CDS ?= false
# Force all variables to false, overriding any other
# setting that may have occurred in the makefiles. These
# can still be overridden by passing the variable as an
# argument to 'make'
INCLUDE_JVMTI := false
INCLUDE_FPROF := false
INCLUDE_VM_STRUCTS := false
INCLUDE_JNI_CHECK := false
INCLUDE_SERVICES := false
INCLUDE_MANAGEMENT := false
INCLUDE_ALL_GCS := false
INCLUDE_NMT := false
INCLUDE_TRACE := false
INCLUDE_CDS := false
CXXFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
CFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"

View File

@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
HS_MAJOR_VER=25
HS_MINOR_VER=0
HS_BUILD_NUMBER=42
HS_BUILD_NUMBER=47
JDK_MAJOR_VER=1
JDK_MINOR_VER=8

View File

@@ -41,13 +41,11 @@ SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
ifeq ("${Platform_arch_model}", "${Platform_arch}")
SOURCES.AD = \
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad)
else
SOURCES.AD = \
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch).ad) \
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch).ad)
endif
EXEC = $(OUTDIR)/adlc

View File

@@ -24,16 +24,20 @@
TYPE=MINIMAL1
INCLUDE_JVMTI ?= false
INCLUDE_FPROF ?= false
INCLUDE_VM_STRUCTS ?= false
INCLUDE_JNI_CHECK ?= false
INCLUDE_SERVICES ?= false
INCLUDE_MANAGEMENT ?= false
INCLUDE_ALL_GCS ?= false
INCLUDE_NMT ?= false
INCLUDE_TRACE ?= false
INCLUDE_CDS ?= false
# Force all variables to false, overriding any other
# setting that may have occurred in the makefiles. These
# can still be overridden by passing the variable as an
# argument to 'make'
INCLUDE_JVMTI := false
INCLUDE_FPROF := false
INCLUDE_VM_STRUCTS := false
INCLUDE_JNI_CHECK := false
INCLUDE_SERVICES := false
INCLUDE_MANAGEMENT := false
INCLUDE_ALL_GCS := false
INCLUDE_NMT := false
INCLUDE_TRACE := false
INCLUDE_CDS := false
CXXFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
CFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"

View File

@@ -212,6 +212,12 @@ ifeq ($(Platform_arch_model), x86_64)
Src_Files_EXCLUDE += \*x86_32\*
endif
# Alternate vm.make
# This has to be included here to allow changes to the source
# directories and excluded files before they are expanded
# by the definition of Src_Files.
-include $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make
# Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
define findsrc
$(notdir $(shell find $(1)/. ! -name . -prune \
@@ -381,4 +387,4 @@ build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC) dtraceChe
install: install_jvm install_jsig install_saproc
.PHONY: default build install install_jvm $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/$(BUILDARCH).make
.PHONY: default build install install_jvm $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/$(BUILDARCH).make $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make

View File

@@ -42,13 +42,11 @@ SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
ifeq ("${Platform_arch_model}", "${Platform_arch}")
SOURCES.AD = \
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad)
else
SOURCES.AD = \
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch).ad) \
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch).ad)
endif
EXEC = $(OUTDIR)/adlc

View File

@@ -283,9 +283,9 @@ $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
$(DTraced_Files) ||\
STATUS=$$?;\
if [ x"$$STATUS" = x"1" -a \
x`uname -r` = x"5.10" -a \
x`uname -p` = x"sparc" ]; then\
if [ x"$$STATUS" = x"1" ]; then \
if [ x`uname -r` = x"5.10" -a \
x`uname -p` = x"sparc" ]; then\
echo "*****************************************************************";\
echo "* If you are building server compiler, and the error message is ";\
echo "* \"incorrect ELF machine type...\", you have run into solaris bug ";\
@@ -294,6 +294,20 @@ $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
echo "* environment variable HOTSPOT_DISABLE_DTRACE_PROBES to disable ";\
echo "* dtrace probes for this build.";\
echo "*****************************************************************";\
elif [ x`uname -r` = x"5.10" ]; then\
echo "*****************************************************************";\
echo "* If you are seeing 'syntax error near \"umpiconninfo_t\"' on Solaris";\
echo "* 10, try doing 'cd /usr/lib/dtrace && gzip mpi.d' as root, ";\
echo "* or set the environment variable HOTSPOT_DISABLE_DTRACE_PROBES";\
echo "* to disable dtrace probes for this build.";\
echo "*****************************************************************";\
else \
echo "*****************************************************************";\
echo "* If you cannot fix dtrace build issues, try to ";\
echo "* set the environment variable HOTSPOT_DISABLE_DTRACE_PROBES";\
echo "* to disable dtrace probes for this build.";\
echo "*****************************************************************";\
fi; \
fi;\
exit $$STATUS
# Since some DTraced_Files are in LIBJVM.o and they are touched by this

View File

@@ -1,6 +1,6 @@
@echo off
REM
REM Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
REM Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
REM
REM This code is free software; you can redistribute it and/or modify it
@@ -148,7 +148,7 @@ echo HotSpotJDKDist=%HotSpotJDKDist%
REM This is now safe to do.
:copyfiles
for /D %%i in (compiler1, compiler2, tiered, core) do (
for /D %%i in (compiler1, compiler2, tiered ) do (
if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated
copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL
)
@@ -156,7 +156,7 @@ copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\
REM force regneration of ProjectFile
if exist %ProjectFile% del %ProjectFile%
for /D %%i in (compiler1, compiler2, tiered, core) do (
for /D %%i in (compiler1, compiler2, tiered ) do (
echo -- %%i --
echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make
echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make

View File

@@ -73,19 +73,17 @@ done
BASE_PATHS="${BASE_PATHS} ${GENERATED}/jvmtifiles ${GENERATED}/tracefiles"
if [ -d "${ALTSRC}/share/vm/jfr" ]; then
BASE_PATHS="${BASE_PATHS} ${ALTSRC}/share/vm/jfr"
if [ -d "${ALTSRC}/share/vm/jfr/buffers" ]; then
BASE_PATHS="${BASE_PATHS} ${ALTSRC}/share/vm/jfr/buffers"
fi
BASE_PATHS="${BASE_PATHS} ${COMMONSRC}/share/vm/prims/wbtestmethods"
CORE_PATHS="${BASE_PATHS}"
# shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS.
if [ -d "${ALTSRC}/share/vm/gc_implementation" ]; then
CORE_PATHS="${CORE_PATHS} `$FIND ${ALTSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
BASE_PATHS="${BASE_PATHS} `$FIND ${ALTSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
fi
CORE_PATHS="${CORE_PATHS} `$FIND ${COMMONSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
BASE_PATHS="${BASE_PATHS} `$FIND ${COMMONSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
if [ -d "${ALTSRC}/share/vm/c1" ]; then
COMPILER1_PATHS="${ALTSRC}/share/vm/c1"
@@ -104,12 +102,11 @@ COMPILER2_PATHS="${COMPILER2_PATHS} ${GENERATED}/adfiles"
# Include dirs per type.
case "${TYPE}" in
"core") Src_Dirs="${CORE_PATHS}" ;;
"compiler1") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS}" ;;
"compiler2") Src_Dirs="${CORE_PATHS} ${COMPILER2_PATHS}" ;;
"tiered") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS} ${COMPILER2_PATHS}" ;;
"zero") Src_Dirs="${CORE_PATHS}" ;;
"shark") Src_Dirs="${CORE_PATHS}" ;;
"compiler1") Src_Dirs="${BASE_PATHS} ${COMPILER1_PATHS}" ;;
"compiler2") Src_Dirs="${BASE_PATHS} ${COMPILER2_PATHS}" ;;
"tiered") Src_Dirs="${BASE_PATHS} ${COMPILER1_PATHS} ${COMPILER2_PATHS}" ;;
"zero") Src_Dirs="${BASE_PATHS}" ;;
"shark") Src_Dirs="${BASE_PATHS}" ;;
esac
COMPILER2_SPECIFIC_FILES="opto libadt bcEscapeAnalyzer.cpp c2_* runtime_*"
@@ -122,7 +119,6 @@ Src_Files_EXCLUDE="jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp"
# Exclude per type.
case "${TYPE}" in
"core") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
"compiler1") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
"compiler2") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;;
"tiered") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;;
@@ -149,9 +145,17 @@ for e in ${Src_Dirs}; do
Src_Files="${Src_Files}`findsrc ${e}` "
done
Obj_Files=
Obj_Files=" "
for e in ${Src_Files}; do
Obj_Files="${Obj_Files}${e%\.[!.]*}.obj "
o="${e%\.[!.]*}.obj"
set +e
chk=`expr "${Obj_Files}" : ".* $o"`
set -e
if [ "$chk" != 0 ]; then
echo "# INFO: skipping duplicate $o"
continue
fi
Obj_Files="${Obj_Files}$o "
done
echo Obj_Files=${Obj_Files}

View File

@@ -55,13 +55,11 @@ CXX_INCLUDE_DIRS=\
!if "$(Platform_arch_model)" == "$(Platform_arch)"
SOURCES_AD=\
$(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad \
$(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad
$(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad
!else
SOURCES_AD=\
$(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad \
$(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch).ad \
$(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad
$(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch).ad
!endif
# NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_DIR

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1997, 2013, Oracle and/or its affiliates. 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
@@ -110,6 +110,7 @@ CXX_FLAGS=$(CXX_FLAGS) /D TARGET_COMPILER_visCPP
# 1400 is for VS2005
# 1500 is for VS2008
# 1600 is for VS2010
# 1700 is for VS2012
# Do not confuse this MSC_VER with the predefined macro _MSC_VER that the
# compiler provides, when MSC_VER==1399, _MSC_VER will be 1400.
# Normally they are the same, but a pre-release of the VS2005 compilers
@@ -142,6 +143,9 @@ COMPILER_NAME=VS2008
!if "$(MSC_VER)" == "1600"
COMPILER_NAME=VS2010
!endif
!if "$(MSC_VER)" == "1700"
COMPILER_NAME=VS2012
!endif
!endif
# By default, we do not want to use the debug version of the msvcrt.dll file
@@ -151,9 +155,13 @@ MS_RUNTIME_OPTION = /MD
MS_RUNTIME_OPTION = /MTd /D "_DEBUG"
!endif
# VS2012 and later won't work with:
# /D _STATIC_CPPLIB /D _DISABLE_DEPRECATE_STATIC_CPPLIB
!if "$(MSC_VER)" < "1700"
# Always add the _STATIC_CPPLIB flag
STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB /D _DISABLE_DEPRECATE_STATIC_CPPLIB
MS_RUNTIME_OPTION = $(MS_RUNTIME_OPTION) $(STATIC_CPPLIB_OPTION)
!endif
CXX_FLAGS=$(CXX_FLAGS) $(MS_RUNTIME_OPTION)
# How /GX option is spelled
@@ -221,6 +229,22 @@ LD_FLAGS = /SAFESEH $(LD_FLAGS)
!endif
!endif
!if "$(COMPILER_NAME)" == "VS2012"
PRODUCT_OPT_OPTION = /O2 /Oy-
FASTDEBUG_OPT_OPTION = /O2 /Oy-
DEBUG_OPT_OPTION = /Od
GX_OPTION = /EHsc
LD_FLAGS = /manifest $(LD_FLAGS)
# Manifest Tool - used in VS2005 and later to adjust manifests stored
# as resources inside build artifacts.
!if "x$(MT)" == "x"
MT=mt.exe
!endif
!if "$(BUILDARCH)" == "i486"
LD_FLAGS = /SAFESEH $(LD_FLAGS)
!endif
!endif
# If NO_OPTIMIZATIONS is defined in the environment, turn everything off
!ifdef NO_OPTIMIZATIONS
PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION)

View File

@@ -44,10 +44,11 @@ ProjectCreatorSources=\
# This is only used internally
ProjectCreatorIncludesPRIVATE=\
-relativeInclude src\closed\share\vm \
-relativeInclude src\closed\os\windows\vm \
-relativeInclude src\closed\os_cpu\windows_$(Platform_arch)\vm \
-relativeInclude src\closed\cpu\$(Platform_arch)\vm \
-relativeAltSrcInclude src\closed \
-altRelativeInclude share\vm \
-altRelativeInclude os\windows\vm \
-altRelativeInclude os_cpu\windows_$(Platform_arch)\vm \
-altRelativeInclude cpu\$(Platform_arch)\vm \
-relativeInclude src\share\vm \
-relativeInclude src\share\vm\precompiled \
-relativeInclude src\share\vm\prims\wbtestmethods \
@@ -91,7 +92,7 @@ ProjectCreatorIDEOptions = \
-disablePch getThread_windows_$(Platform_arch).cpp \
-disablePch_compiler2 opcodes.cpp
# Common options for the IDE builds for core, c1, and c2
# Common options for the IDE builds for c1, and c2
ProjectCreatorIDEOptions=\
$(ProjectCreatorIDEOptions) \
-sourceBase $(HOTSPOTWORKSPACE) \
@@ -157,19 +158,11 @@ ProjectCreatorIDEOptionsIgnoreCompiler2=\
-ignoreFile_TARGET ciTypeFlow.hpp \
-ignoreFile_TARGET $(Platform_arch_model).ad
##################################################
# Without compiler(core) specific options
##################################################
ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
$(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=core) \
$(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=core)
##################################################
# Client(C1) compiler specific options
##################################################
ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
-define_compiler1 COMPILER1 \
-ignorePath_compiler1 core \
$(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=compiler1)
##################################################
@@ -178,7 +171,6 @@ $(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=compiler1)
#NOTE! This list must be kept in sync with GENERATED_NAMES in adlc.make.
ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
-define_compiler2 COMPILER2 \
-ignorePath_compiler2 core \
-additionalFile_compiler2 $(Platform_arch_model).ad \
-additionalFile_compiler2 ad_$(Platform_arch_model).cpp \
-additionalFile_compiler2 ad_$(Platform_arch_model).hpp \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. 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
@@ -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 "1500" if "$(MSC_VER)" NEQ "1600" \
@ if "$(MSC_VER)" NEQ "1310" if "$(MSC_VER)" NEQ "1399" if "$(MSC_VER)" NEQ "1400" if "$(MSC_VER)" NEQ "1500" if "$(MSC_VER)" NEQ "1600" if "$(MSC_VER)" NEQ "1700" \
echo *** WARNING *** unrecognized cl.exe version $(MSC_VER) ($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection.
checkLink:
@ if "$(LD_VER)" NEQ "710" if "$(LD_VER)" NEQ "800" if "$(LD_VER)" NEQ "900" if "$(LD_VER)" NEQ "1000" \
@ if "$(LD_VER)" NEQ "710" if "$(LD_VER)" NEQ "800" if "$(LD_VER)" NEQ "900" if "$(LD_VER)" NEQ "1000" if "$(LD_VER)" NEQ "1100" \
echo *** WARNING *** unrecognized link.exe version $(LD_VER) ($(RAW_LD_VER)). Use FORCE_LD_VER to override automatic detection.

View File

@@ -90,25 +90,25 @@ $(TraceOutDir)/traceTypes.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceType
!if "$(OPENJDK)" == "true"
$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS)
@echo Generating $@
@echo Generating OpenJDK $@
@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceSrcDir)/traceEventClasses.xsl -OUT $(TraceOutDir)/traceEventClasses.hpp
!else
$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
@echo Generating $@
@echo Generating AltSrc $@
@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceAltSrcDir)/traceEventClasses.xsl -OUT $(TraceOutDir)/traceEventClasses.hpp
$(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
@echo Generating $@
@echo Generating AltSrc $@
@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceAltSrcDir)/traceProducer.xsl -OUT $(TraceOutDir)/traceProducer.cpp
$(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
@echo Generating $@
@echo Generating AltSrc $@
@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceAltSrcDir)/traceRequestables.xsl -OUT $(TraceOutDir)/traceRequestables.hpp
$(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventControl.xsl $(XML_DEPS)
@echo Generating $@
@echo Generating AltSrc $@
@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceAltSrcDir)/traceEventControl.xsl -OUT $(TraceOutDir)/traceEventControl.hpp
!endif

View File

@@ -36,10 +36,6 @@ CXX_FLAGS=$(CXX_FLAGS) /D "PRODUCT"
CXX_FLAGS=$(CXX_FLAGS) /D "ASSERT"
!endif
!if "$(Variant)" == "core"
# No need to define anything, CORE is defined as !COMPILER1 && !COMPILER2
!endif
!if "$(Variant)" == "compiler1"
CXX_FLAGS=$(CXX_FLAGS) /D "COMPILER1"
!endif
@@ -132,6 +128,10 @@ CXX_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
!if "$(USE_PRECOMPILED_HEADER)" != "0"
CXX_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
!if "$(COMPILER_NAME)" == "VS2012"
# VS2012 requires this object file to be listed:
LD_FLAGS=$(LD_FLAGS) _build_pch_file.obj
!endif
!else
CXX_USE_PCH=$(CXX_DONT_USE_PCH)
!endif

View File

@@ -112,6 +112,7 @@ ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -def
ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
$(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
@if "$(MSC_VER)"=="1500" echo Make sure you have VS2008 SP1 or later, or you may see 'expanded command line too long'
@$(RUN_JAVA) -Djava.class.path="$(HOTSPOTBUILDSPACE)/classes" ProjectCreator WinGammaPlatform$(VcVersion) $(ProjectCreatorIDEOptions)
clean:

View File

@@ -42,7 +42,7 @@ define_pd_global(bool, ProfileInterpreter, false);
#else
define_pd_global(bool, ProfileInterpreter, true);
#endif // CC_INTERP
define_pd_global(bool, TieredCompilation, false);
define_pd_global(bool, TieredCompilation, trueInTiered);
define_pd_global(intx, CompileThreshold, 10000);
define_pd_global(intx, BackEdgeThreshold, 140000);

View File

@@ -240,10 +240,10 @@ inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
#endif // CC_INTERP
inline JavaCallWrapper* frame::entry_frame_call_wrapper() const {
inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
// note: adjust this code if the link argument in StubGenerator::call_stub() changes!
const Argument link = Argument(0, false);
return (JavaCallWrapper*)sp()[link.as_in().as_register()->sp_offset_in_saved_window()];
return (JavaCallWrapper**)&sp()[link.as_in().as_register()->sp_offset_in_saved_window()];
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. 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 @@
#include "interpreter/interpreter.hpp"
#include "memory/cardTableModRefBS.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/interfaceSupport.hpp"
@@ -1145,7 +1146,7 @@ void MacroAssembler::set_narrow_klass(Klass* k, Register d) {
assert(oop_recorder() != NULL, "this assembler needs an OopRecorder");
int klass_index = oop_recorder()->find_index(k);
RelocationHolder rspec = metadata_Relocation::spec(klass_index);
narrowOop encoded_k = oopDesc::encode_klass(k);
narrowOop encoded_k = Klass::encode_klass(k);
assert_not_delayed();
// Relocation with special format (see relocInfo_sparc.hpp).
@@ -1419,7 +1420,6 @@ void MacroAssembler::verify_oop_subroutine() {
load_klass(O0_obj, O0_obj);
// assert((klass != NULL)
br_null_short(O0_obj, pn, fail);
// TODO: Future assert that klass is lower 4g memory for UseCompressedKlassPointers
wrccr( O5_save_flags ); // Restore CCR's
@@ -4089,52 +4089,91 @@ void MacroAssembler::decode_heap_oop_not_null(Register src, Register dst) {
}
void MacroAssembler::encode_klass_not_null(Register r) {
assert(Metaspace::is_initialized(), "metaspace should be initialized");
assert (UseCompressedKlassPointers, "must be compressed");
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
if (Universe::narrow_klass_base() != NULL)
sub(r, G6_heapbase, r);
srlx(r, LogKlassAlignmentInBytes, r);
assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized");
assert(r != G6_heapbase, "bad register choice");
set((intptr_t)Universe::narrow_klass_base(), G6_heapbase);
sub(r, G6_heapbase, r);
if (Universe::narrow_klass_shift() != 0) {
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
srlx(r, LogKlassAlignmentInBytes, r);
}
reinit_heapbase();
}
void MacroAssembler::encode_klass_not_null(Register src, Register dst) {
assert(Metaspace::is_initialized(), "metaspace should be initialized");
assert (UseCompressedKlassPointers, "must be compressed");
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
if (Universe::narrow_klass_base() == NULL) {
srlx(src, LogKlassAlignmentInBytes, dst);
if (src == dst) {
encode_klass_not_null(src);
} else {
sub(src, G6_heapbase, dst);
srlx(dst, LogKlassAlignmentInBytes, dst);
assert (UseCompressedKlassPointers, "must be compressed");
assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized");
set((intptr_t)Universe::narrow_klass_base(), dst);
sub(src, dst, dst);
if (Universe::narrow_klass_shift() != 0) {
srlx(dst, LogKlassAlignmentInBytes, dst);
}
}
}
// Function instr_size_for_decode_klass_not_null() counts the instructions
// generated by decode_klass_not_null() and reinit_heapbase(). Hence, if
// the instructions they generate change, then this method needs to be updated.
int MacroAssembler::instr_size_for_decode_klass_not_null() {
assert (UseCompressedKlassPointers, "only for compressed klass ptrs");
// set + add + set
int num_instrs = insts_for_internal_set((intptr_t)Universe::narrow_klass_base()) + 1 +
insts_for_internal_set((intptr_t)Universe::narrow_ptrs_base());
if (Universe::narrow_klass_shift() == 0) {
return num_instrs * BytesPerInstWord;
} else { // sllx
return (num_instrs + 1) * BytesPerInstWord;
}
}
// !!! If the instructions that get generated here change then function
// instr_size_for_decode_klass_not_null() needs to get updated.
void MacroAssembler::decode_klass_not_null(Register r) {
assert(Metaspace::is_initialized(), "metaspace should be initialized");
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
// pd_code_size_limit.
assert (UseCompressedKlassPointers, "must be compressed");
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
sllx(r, LogKlassAlignmentInBytes, r);
if (Universe::narrow_klass_base() != NULL)
add(r, G6_heapbase, r);
assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized");
assert(r != G6_heapbase, "bad register choice");
set((intptr_t)Universe::narrow_klass_base(), G6_heapbase);
if (Universe::narrow_klass_shift() != 0)
sllx(r, LogKlassAlignmentInBytes, r);
add(r, G6_heapbase, r);
reinit_heapbase();
}
void MacroAssembler::decode_klass_not_null(Register src, Register dst) {
assert(Metaspace::is_initialized(), "metaspace should be initialized");
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
// pd_code_size_limit.
assert (UseCompressedKlassPointers, "must be compressed");
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
sllx(src, LogKlassAlignmentInBytes, dst);
if (Universe::narrow_klass_base() != NULL)
add(dst, G6_heapbase, dst);
if (src == dst) {
decode_klass_not_null(src);
} else {
// Do not add assert code to this unless you change vtableStubs_sparc.cpp
// pd_code_size_limit.
assert (UseCompressedKlassPointers, "must be compressed");
assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized");
if (Universe::narrow_klass_shift() != 0) {
assert((src != G6_heapbase) && (dst != G6_heapbase), "bad register choice");
set((intptr_t)Universe::narrow_klass_base(), G6_heapbase);
sllx(src, LogKlassAlignmentInBytes, dst);
add(dst, G6_heapbase, dst);
reinit_heapbase();
} else {
set((intptr_t)Universe::narrow_klass_base(), dst);
add(src, dst, dst);
}
}
}
void MacroAssembler::reinit_heapbase() {
if (UseCompressedOops || UseCompressedKlassPointers) {
AddressLiteral base(Universe::narrow_ptrs_base_addr());
load_ptr_contents(base, G6_heapbase);
if (Universe::heap() != NULL) {
set((intptr_t)Universe::narrow_ptrs_base(), G6_heapbase);
} else {
AddressLiteral base(Universe::narrow_ptrs_base_addr());
load_ptr_contents(base, G6_heapbase);
}
}
}

View File

@@ -1177,6 +1177,9 @@ public:
void push_CPU_state();
void pop_CPU_state();
// Returns the byte size of the instructions generated by decode_klass_not_null().
static int instr_size_for_decode_klass_not_null();
// if heap base register is used - reinit it with the correct value
void reinit_heapbase();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. 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
@@ -97,7 +97,7 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi");
if (format() != 0) {
assert(type() == relocInfo::oop_type || type() == relocInfo::metadata_type, "only narrow oops or klasses case");
jint np = type() == relocInfo::oop_type ? oopDesc::encode_heap_oop((oop)x) : oopDesc::encode_klass((Klass*)x);
jint np = type() == relocInfo::oop_type ? oopDesc::encode_heap_oop((oop)x) : Klass::encode_klass((Klass*)x);
inst &= ~Assembler::hi22(-1);
inst |= Assembler::hi22((intptr_t)np);
if (verify_only) {

View File

@@ -559,10 +559,7 @@ int MachCallDynamicJavaNode::ret_addr_offset() {
int klass_load_size;
if (UseCompressedKlassPointers) {
assert(Universe::heap() != NULL, "java heap should be initialized");
if (Universe::narrow_klass_base() == NULL)
klass_load_size = 2*BytesPerInstWord; // see MacroAssembler::load_klass()
else
klass_load_size = 3*BytesPerInstWord;
klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord;
} else {
klass_load_size = 1*BytesPerInstWord;
}
@@ -1663,9 +1660,12 @@ void MachUEPNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
if (UseCompressedKlassPointers) {
assert(Universe::heap() != NULL, "java heap should be initialized");
st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass");
st->print_cr("\tSLL R_G5,3,R_G5");
if (Universe::narrow_klass_base() != NULL)
st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5");
st->print_cr("\tSET Universe::narrow_klass_base,R_G6_heap_base");
if (Universe::narrow_klass_shift() != 0) {
st->print_cr("\tSLL R_G5,3,R_G5");
}
st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5");
st->print_cr("\tSET Universe::narrow_ptrs_base,R_G6_heap_base");
} else {
st->print_cr("\tLDX [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check");
}
@@ -2563,10 +2563,7 @@ encode %{
int klass_load_size;
if (UseCompressedKlassPointers) {
assert(Universe::heap() != NULL, "java heap should be initialized");
if (Universe::narrow_klass_base() == NULL)
klass_load_size = 2*BytesPerInstWord;
else
klass_load_size = 3*BytesPerInstWord;
klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord;
} else {
klass_load_size = 1*BytesPerInstWord;
}

View File

@@ -1887,6 +1887,27 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
if (ProfileInterpreter) {
__ set_method_data_pointer_for_bcp();
}
#if INCLUDE_JVMTI
if (EnableInvokeDynamic) {
Label L_done;
__ ldub(Address(Lbcp, 0), G1_scratch); // Load current bytecode
__ cmp_and_br_short(G1_scratch, Bytecodes::_invokestatic, Assembler::notEqual, Assembler::pn, L_done);
// The member name argument must be restored if _invokestatic is re-executed after a PopFrame call.
// Detect such a case in the InterpreterRuntime function and return the member name argument, or NULL.
__ call_VM(G1_scratch, CAST_FROM_FN_PTR(address, InterpreterRuntime::member_name_arg_or_null), I0, Lmethod, Lbcp);
__ br_null(G1_scratch, false, Assembler::pn, L_done);
__ delayed()->nop();
__ st_ptr(G1_scratch, Lesp, wordSize);
__ bind(L_done);
}
#endif // INCLUDE_JVMTI
// Resume bytecode interpretation at the current bcp
__ dispatch_next(vtos);
// end of JVMTI PopFrame support

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. 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
@@ -219,13 +219,13 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
const int basic = 5*BytesPerInstWord +
// shift;add for load_klass (only shift with zero heap based)
(UseCompressedKlassPointers ?
((Universe::narrow_klass_base() == NULL) ? BytesPerInstWord : 2*BytesPerInstWord) : 0);
MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
return basic + slop;
} else {
const int basic = (28 LP64_ONLY(+ 6)) * BytesPerInstWord +
// shift;add for load_klass (only shift with zero heap based)
(UseCompressedKlassPointers ?
((Universe::narrow_klass_base() == NULL) ? BytesPerInstWord : 2*BytesPerInstWord) : 0);
MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
return (basic + slop);
}
}

View File

@@ -44,7 +44,7 @@ define_pd_global(bool, ProfileInterpreter, false);
#else
define_pd_global(bool, ProfileInterpreter, true);
#endif // CC_INTERP
define_pd_global(bool, TieredCompilation, false);
define_pd_global(bool, TieredCompilation, trueInTiered);
define_pd_global(intx, CompileThreshold, 10000);
define_pd_global(intx, BackEdgeThreshold, 100000);

View File

@@ -272,11 +272,10 @@ inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
// Entry frames
inline JavaCallWrapper* frame::entry_frame_call_wrapper() const {
return (JavaCallWrapper*)at(entry_frame_call_wrapper_offset);
inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
return (JavaCallWrapper**)addr_at(entry_frame_call_wrapper_offset);
}
// Compiled frames
inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {

View File

@@ -30,6 +30,7 @@
#include "interpreter/interpreter.hpp"
#include "memory/cardTableModRefBS.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/interfaceSupport.hpp"
@@ -4810,23 +4811,8 @@ void MacroAssembler::load_klass(Register dst, Register src) {
}
void MacroAssembler::load_prototype_header(Register dst, Register src) {
#ifdef _LP64
if (UseCompressedKlassPointers) {
assert (Universe::heap() != NULL, "java heap should be initialized");
movl(dst, Address(src, oopDesc::klass_offset_in_bytes()));
if (Universe::narrow_klass_shift() != 0) {
assert(LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
assert(LogKlassAlignmentInBytes == Address::times_8, "klass not aligned on 64bits?");
movq(dst, Address(r12_heapbase, dst, Address::times_8, Klass::prototype_header_offset()));
} else {
movq(dst, Address(dst, Klass::prototype_header_offset()));
}
} else
#endif
{
movptr(dst, Address(src, oopDesc::klass_offset_in_bytes()));
movptr(dst, Address(dst, Klass::prototype_header_offset()));
}
load_klass(dst, src);
movptr(dst, Address(dst, Klass::prototype_header_offset()));
}
void MacroAssembler::store_klass(Register dst, Register src) {
@@ -4914,7 +4900,7 @@ void MacroAssembler::store_klass_gap(Register dst, Register src) {
#ifdef ASSERT
void MacroAssembler::verify_heapbase(const char* msg) {
assert (UseCompressedOops || UseCompressedKlassPointers, "should be compressed");
assert (UseCompressedOops, "should be compressed");
assert (Universe::heap() != NULL, "java heap should be initialized");
if (CheckCompressedOops) {
Label ok;
@@ -5058,69 +5044,80 @@ void MacroAssembler::decode_heap_oop_not_null(Register dst, Register src) {
}
void MacroAssembler::encode_klass_not_null(Register r) {
assert(Metaspace::is_initialized(), "metaspace should be initialized");
#ifdef ASSERT
verify_heapbase("MacroAssembler::encode_klass_not_null: heap base corrupted?");
#endif
if (Universe::narrow_klass_base() != NULL) {
subq(r, r12_heapbase);
}
assert(Universe::narrow_klass_base() != NULL, "Base should be initialized");
// Use r12 as a scratch register in which to temporarily load the narrow_klass_base.
assert(r != r12_heapbase, "Encoding a klass in r12");
mov64(r12_heapbase, (int64_t)Universe::narrow_klass_base());
subq(r, r12_heapbase);
if (Universe::narrow_klass_shift() != 0) {
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
shrq(r, LogKlassAlignmentInBytes);
}
reinit_heapbase();
}
void MacroAssembler::encode_klass_not_null(Register dst, Register src) {
assert(Metaspace::is_initialized(), "metaspace should be initialized");
#ifdef ASSERT
verify_heapbase("MacroAssembler::encode_klass_not_null2: heap base corrupted?");
#endif
if (dst != src) {
movq(dst, src);
}
if (Universe::narrow_klass_base() != NULL) {
subq(dst, r12_heapbase);
}
if (Universe::narrow_klass_shift() != 0) {
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
shrq(dst, LogKlassAlignmentInBytes);
if (dst == src) {
encode_klass_not_null(src);
} else {
mov64(dst, (int64_t)Universe::narrow_klass_base());
negq(dst);
addq(dst, src);
if (Universe::narrow_klass_shift() != 0) {
assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
shrq(dst, LogKlassAlignmentInBytes);
}
}
}
// Function instr_size_for_decode_klass_not_null() counts the instructions
// generated by decode_klass_not_null(register r) and reinit_heapbase(),
// when (Universe::heap() != NULL). Hence, if the instructions they
// generate change, then this method needs to be updated.
int MacroAssembler::instr_size_for_decode_klass_not_null() {
assert (UseCompressedKlassPointers, "only for compressed klass ptrs");
// mov64 + addq + shlq? + mov64 (for reinit_heapbase()).
return (Universe::narrow_klass_shift() == 0 ? 20 : 24);
}
// !!! If the instructions that get generated here change then function
// instr_size_for_decode_klass_not_null() needs to get updated.
void MacroAssembler::decode_klass_not_null(Register r) {
assert(Metaspace::is_initialized(), "metaspace should be initialized");
// Note: it will change flags
assert(Universe::narrow_klass_base() != NULL, "Base should be initialized");
assert (UseCompressedKlassPointers, "should only be used for compressed headers");
assert(r != r12_heapbase, "Decoding a klass in r12");
// Cannot assert, unverified entry point counts instructions (see .ad file)
// vtableStubs also counts instructions in pd_code_size_limit.
// Also do not verify_oop as this is called by verify_oop.
if (Universe::narrow_klass_shift() != 0) {
assert(LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
shlq(r, LogKlassAlignmentInBytes);
if (Universe::narrow_klass_base() != NULL) {
addq(r, r12_heapbase);
}
} else {
assert (Universe::narrow_klass_base() == NULL, "sanity");
}
// Use r12 as a scratch register in which to temporarily load the narrow_klass_base.
mov64(r12_heapbase, (int64_t)Universe::narrow_klass_base());
addq(r, r12_heapbase);
reinit_heapbase();
}
void MacroAssembler::decode_klass_not_null(Register dst, Register src) {
assert(Metaspace::is_initialized(), "metaspace should be initialized");
// Note: it will change flags
assert(Universe::narrow_klass_base() != NULL, "Base should be initialized");
assert (UseCompressedKlassPointers, "should only be used for compressed headers");
// Cannot assert, unverified entry point counts instructions (see .ad file)
// vtableStubs also counts instructions in pd_code_size_limit.
// Also do not verify_oop as this is called by verify_oop.
if (Universe::narrow_klass_shift() != 0) {
assert(LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
assert(LogKlassAlignmentInBytes == Address::times_8, "klass not aligned on 64bits?");
leaq(dst, Address(r12_heapbase, src, Address::times_8, 0));
if (dst == src) {
decode_klass_not_null(dst);
} else {
assert (Universe::narrow_klass_base() == NULL, "sanity");
if (dst != src) {
movq(dst, src);
// Cannot assert, unverified entry point counts instructions (see .ad file)
// vtableStubs also counts instructions in pd_code_size_limit.
// Also do not verify_oop as this is called by verify_oop.
mov64(dst, (int64_t)Universe::narrow_klass_base());
if (Universe::narrow_klass_shift() != 0) {
assert(LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
assert(LogKlassAlignmentInBytes == Address::times_8, "klass not aligned on 64bits?");
leaq(dst, Address(dst, src, Address::times_8, 0));
} else {
addq(dst, src);
}
}
}
@@ -5148,7 +5145,7 @@ void MacroAssembler::set_narrow_klass(Register dst, Klass* k) {
assert (oop_recorder() != NULL, "this assembler needs an OopRecorder");
int klass_index = oop_recorder()->find_index(k);
RelocationHolder rspec = metadata_Relocation::spec(klass_index);
mov_narrow_oop(dst, oopDesc::encode_klass(k), rspec);
mov_narrow_oop(dst, Klass::encode_klass(k), rspec);
}
void MacroAssembler::set_narrow_klass(Address dst, Klass* k) {
@@ -5156,7 +5153,7 @@ void MacroAssembler::set_narrow_klass(Address dst, Klass* k) {
assert (oop_recorder() != NULL, "this assembler needs an OopRecorder");
int klass_index = oop_recorder()->find_index(k);
RelocationHolder rspec = metadata_Relocation::spec(klass_index);
mov_narrow_oop(dst, oopDesc::encode_klass(k), rspec);
mov_narrow_oop(dst, Klass::encode_klass(k), rspec);
}
void MacroAssembler::cmp_narrow_oop(Register dst, jobject obj) {
@@ -5182,7 +5179,7 @@ void MacroAssembler::cmp_narrow_klass(Register dst, Klass* k) {
assert (oop_recorder() != NULL, "this assembler needs an OopRecorder");
int klass_index = oop_recorder()->find_index(k);
RelocationHolder rspec = metadata_Relocation::spec(klass_index);
Assembler::cmp_narrow_oop(dst, oopDesc::encode_klass(k), rspec);
Assembler::cmp_narrow_oop(dst, Klass::encode_klass(k), rspec);
}
void MacroAssembler::cmp_narrow_klass(Address dst, Klass* k) {
@@ -5190,14 +5187,23 @@ void MacroAssembler::cmp_narrow_klass(Address dst, Klass* k) {
assert (oop_recorder() != NULL, "this assembler needs an OopRecorder");
int klass_index = oop_recorder()->find_index(k);
RelocationHolder rspec = metadata_Relocation::spec(klass_index);
Assembler::cmp_narrow_oop(dst, oopDesc::encode_klass(k), rspec);
Assembler::cmp_narrow_oop(dst, Klass::encode_klass(k), rspec);
}
void MacroAssembler::reinit_heapbase() {
if (UseCompressedOops || UseCompressedKlassPointers) {
movptr(r12_heapbase, ExternalAddress((address)Universe::narrow_ptrs_base_addr()));
if (Universe::heap() != NULL) {
if (Universe::narrow_oop_base() == NULL) {
MacroAssembler::xorptr(r12_heapbase, r12_heapbase);
} else {
mov64(r12_heapbase, (int64_t)Universe::narrow_ptrs_base());
}
} else {
movptr(r12_heapbase, ExternalAddress((address)Universe::narrow_ptrs_base_addr()));
}
}
}
#endif // _LP64

View File

@@ -371,6 +371,10 @@ class MacroAssembler: public Assembler {
void cmp_narrow_klass(Register dst, Klass* k);
void cmp_narrow_klass(Address dst, Klass* k);
// Returns the byte size of the instructions generated by decode_klass_not_null()
// when compressed klass pointers are being used.
static int instr_size_for_decode_klass_not_null();
// if heap base register is used - reinit it with the correct value
void reinit_heapbase();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. 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
@@ -55,9 +55,9 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
}
} else {
if (verify_only) {
assert(*(uint32_t*) disp == oopDesc::encode_klass((Klass*)x), "instructions must match");
assert(*(uint32_t*) disp == Klass::encode_klass((Klass*)x), "instructions must match");
} else {
*(int32_t*) disp = oopDesc::encode_klass((Klass*)x);
*(int32_t*) disp = Klass::encode_klass((Klass*)x);
}
}
} else {

View File

@@ -675,7 +675,6 @@ class StubGenerator: public StubCodeGenerator {
__ movptr(rax, Address(rax, oopDesc::klass_offset_in_bytes())); // get klass
__ testptr(rax, rax);
__ jcc(Assembler::zero, error); // if klass is NULL it is broken
// TODO: Future assert that klass is lower 4g memory for UseCompressedKlassPointers
// return if everything seems ok
__ bind(exit);

View File

@@ -279,7 +279,7 @@ class StubGenerator: public StubCodeGenerator {
__ stmxcsr(mxcsr_save);
__ movl(rax, mxcsr_save);
__ andl(rax, MXCSR_MASK); // Only check control and mask bits
ExternalAddress mxcsr_std(StubRoutines::x86::mxcsr_std());
ExternalAddress mxcsr_std(StubRoutines::addr_mxcsr_std());
__ cmp32(rax, mxcsr_std);
__ jcc(Assembler::equal, skip_ldmx);
__ ldmxcsr(mxcsr_std);
@@ -729,17 +729,18 @@ class StubGenerator: public StubCodeGenerator {
if (CheckJNICalls) {
Label ok_ret;
ExternalAddress mxcsr_std(StubRoutines::addr_mxcsr_std());
__ push(rax);
__ subptr(rsp, wordSize); // allocate a temp location
__ stmxcsr(mxcsr_save);
__ movl(rax, mxcsr_save);
__ andl(rax, MXCSR_MASK); // Only check control and mask bits
__ cmpl(rax, *(int *)(StubRoutines::x86::mxcsr_std()));
__ cmp32(rax, mxcsr_std);
__ jcc(Assembler::equal, ok_ret);
__ warn("MXCSR changed by native JNI code, use -XX:+RestoreMXCSROnJNICall");
__ ldmxcsr(ExternalAddress(StubRoutines::x86::mxcsr_std()));
__ ldmxcsr(mxcsr_std);
__ bind(ok_ret);
__ addptr(rsp, wordSize);
@@ -1020,7 +1021,6 @@ class StubGenerator: public StubCodeGenerator {
__ load_klass(rax, rax); // get klass
__ testptr(rax, rax);
__ jcc(Assembler::zero, error); // if klass is NULL it is broken
// TODO: Future assert that klass is lower 4g memory for UseCompressedKlassPointers
// return if everything seems ok
__ bind(exit);
@@ -3767,12 +3767,35 @@ class StubGenerator: public StubCodeGenerator {
return stub->entry_point();
}
void create_control_words() {
// Round to nearest, 53-bit mode, exceptions masked
StubRoutines::_fpu_cntrl_wrd_std = 0x027F;
// Round to zero, 53-bit mode, exception mased
StubRoutines::_fpu_cntrl_wrd_trunc = 0x0D7F;
// Round to nearest, 24-bit mode, exceptions masked
StubRoutines::_fpu_cntrl_wrd_24 = 0x007F;
// Round to nearest, 64-bit mode, exceptions masked
StubRoutines::_fpu_cntrl_wrd_64 = 0x037F;
// Round to nearest, 64-bit mode, exceptions masked
StubRoutines::_mxcsr_std = 0x1F80;
// Note: the following two constants are 80-bit values
// layout is critical for correct loading by FPU.
// Bias for strict fp multiply/divide
StubRoutines::_fpu_subnormal_bias1[0]= 0x00000000; // 2^(-15360) == 0x03ff 8000 0000 0000 0000
StubRoutines::_fpu_subnormal_bias1[1]= 0x80000000;
StubRoutines::_fpu_subnormal_bias1[2]= 0x03ff;
// Un-Bias for strict fp multiply/divide
StubRoutines::_fpu_subnormal_bias2[0]= 0x00000000; // 2^(+15360) == 0x7bff 8000 0000 0000 0000
StubRoutines::_fpu_subnormal_bias2[1]= 0x80000000;
StubRoutines::_fpu_subnormal_bias2[2]= 0x7bff;
}
// Initialization
void generate_initial() {
// Generates all stubs and initializes the entry points
// This platform-specific stub is needed by generate_call_stub()
StubRoutines::x86::_mxcsr_std = generate_fp_mask("mxcsr_std", 0x0000000000001F80);
// This platform-specific settings are needed by generate_call_stub()
create_control_words();
// entry points that exist in all platforms Note: This is code
// that could be shared among different platforms - however the

View File

@@ -42,4 +42,3 @@ address StubRoutines::x86::_float_sign_mask = NULL;
address StubRoutines::x86::_float_sign_flip = NULL;
address StubRoutines::x86::_double_sign_mask = NULL;
address StubRoutines::x86::_double_sign_flip = NULL;
address StubRoutines::x86::_mxcsr_std = NULL;

View File

@@ -52,7 +52,6 @@ class x86 {
static address _float_sign_flip;
static address _double_sign_mask;
static address _double_sign_flip;
static address _mxcsr_std;
public:
@@ -106,11 +105,6 @@ class x86 {
return _double_sign_flip;
}
static address mxcsr_std()
{
return _mxcsr_std;
}
# include "stubRoutines_x86.hpp"
};

View File

@@ -1920,6 +1920,29 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
__ get_thread(thread);
__ movl(Address(thread, JavaThread::popframe_condition_offset()), JavaThread::popframe_inactive);
#if INCLUDE_JVMTI
if (EnableInvokeDynamic) {
Label L_done;
const Register local0 = rdi;
__ cmpb(Address(rsi, 0), Bytecodes::_invokestatic);
__ jcc(Assembler::notEqual, L_done);
// The member name argument must be restored if _invokestatic is re-executed after a PopFrame call.
// Detect such a case in the InterpreterRuntime function and return the member name argument, or NULL.
__ get_method(rdx);
__ movptr(rax, Address(local0, 0));
__ call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::member_name_arg_or_null), rax, rdx, rsi);
__ testptr(rax, rax);
__ jcc(Assembler::zero, L_done);
__ movptr(Address(rbx, 0), rax);
__ bind(L_done);
}
#endif // INCLUDE_JVMTI
__ dispatch_next(vtos);
// end of PopFrame support

View File

@@ -849,9 +849,9 @@ address InterpreterGenerator::generate_CRC32_update_entry() {
address entry = __ pc();
// rbx,: Method*
// rsi: senderSP must preserved for slow path, set SP to it on fast path
// rdx: scratch
// rdi: scratch
// r13: senderSP must preserved for slow path, set SP to it on fast path
// c_rarg0: scratch (rdi on non-Win64, rcx on Win64)
// c_rarg1: scratch (rsi on non-Win64, rdx on Win64)
Label slow_path;
// If we need a safepoint check, generate full interpreter entry.
@@ -865,8 +865,8 @@ address InterpreterGenerator::generate_CRC32_update_entry() {
// Load parameters
const Register crc = rax; // crc
const Register val = rdx; // source java byte value
const Register tbl = rdi; // scratch
const Register val = c_rarg0; // source java byte value
const Register tbl = c_rarg1; // scratch
// Arguments are reversed on java expression stack
__ movl(val, Address(rsp, wordSize)); // byte value
@@ -880,7 +880,7 @@ address InterpreterGenerator::generate_CRC32_update_entry() {
// _areturn
__ pop(rdi); // get return address
__ mov(rsp, rsi); // set sp to sender sp
__ mov(rsp, r13); // set sp to sender sp
__ jmp(rdi);
// generate a vanilla native entry as the slow path
@@ -919,20 +919,24 @@ address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpret
const Register crc = c_rarg0; // crc
const Register buf = c_rarg1; // source java byte array address
const Register len = c_rarg2; // length
const Register off = len; // offset (never overlaps with 'len')
// Arguments are reversed on java expression stack
__ movl(len, Address(rsp, wordSize)); // Length
// Calculate address of start element
if (kind == Interpreter::java_util_zip_CRC32_updateByteBuffer) {
__ movptr(buf, Address(rsp, 3*wordSize)); // long buf
__ addptr(buf, Address(rsp, 2*wordSize)); // + offset
__ movl2ptr(off, Address(rsp, 2*wordSize)); // offset
__ addq(buf, off); // + offset
__ movl(crc, Address(rsp, 5*wordSize)); // Initial CRC
} else {
__ movptr(buf, Address(rsp, 3*wordSize)); // byte[] array
__ addptr(buf, arrayOopDesc::base_offset_in_bytes(T_BYTE)); // + header size
__ addptr(buf, Address(rsp, 2*wordSize)); // + offset
__ movl2ptr(off, Address(rsp, 2*wordSize)); // offset
__ addq(buf, off); // + offset
__ movl(crc, Address(rsp, 4*wordSize)); // Initial CRC
}
// Can now load 'len' since we're finished with 'off'
__ movl(len, Address(rsp, wordSize)); // Length
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32()), crc, buf, len);
// result in rax
@@ -1929,6 +1933,29 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
__ movl(Address(r15_thread, JavaThread::popframe_condition_offset()),
JavaThread::popframe_inactive);
#if INCLUDE_JVMTI
if (EnableInvokeDynamic) {
Label L_done;
const Register local0 = r14;
__ cmpb(Address(r13, 0), Bytecodes::_invokestatic);
__ jcc(Assembler::notEqual, L_done);
// The member name argument must be restored if _invokestatic is re-executed after a PopFrame call.
// Detect such a case in the InterpreterRuntime function and return the member name argument, or NULL.
__ get_method(rdx);
__ movptr(rax, Address(local0, 0));
__ call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::member_name_arg_or_null), rax, rdx, r13);
__ testptr(rax, rax);
__ jcc(Assembler::zero, L_done);
__ movptr(Address(rbx, 0), rax);
__ bind(L_done);
}
#endif // INCLUDE_JVMTI
__ dispatch_next(vtos);
// end of PopFrame support

View File

@@ -211,11 +211,11 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
if (is_vtable_stub) {
// Vtable stub size
return (DebugVtables ? 512 : 24) + (CountCompiledCalls ? 13 : 0) +
(UseCompressedKlassPointers ? 16 : 0); // 1 leaq can be 3 bytes + 1 long
(UseCompressedKlassPointers ? MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
} else {
// Itable stub size
return (DebugVtables ? 512 : 74) + (CountCompiledCalls ? 13 : 0) +
(UseCompressedKlassPointers ? 32 : 0); // 2 leaqs
(UseCompressedKlassPointers ? MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
}
// In order to tune these parameters, run the JVM with VM options
// +PrintMiscellaneous and +WizardMode to see information about

View File

@@ -1393,9 +1393,7 @@ void MachUEPNode::format(PhaseRegAlloc* ra_, outputStream* st) const
{
if (UseCompressedKlassPointers) {
st->print_cr("movl rscratch1, [j_rarg0 + oopDesc::klass_offset_in_bytes()]\t# compressed klass");
if (Universe::narrow_klass_shift() != 0) {
st->print_cr("\tdecode_klass_not_null rscratch1, rscratch1");
}
st->print_cr("\tdecode_klass_not_null rscratch1, rscratch1");
st->print_cr("\tcmpq rax, rscratch1\t # Inline cache check");
} else {
st->print_cr("\tcmpq rax, [j_rarg0 + oopDesc::klass_offset_in_bytes()]\t"
@@ -4035,146 +4033,6 @@ operand indPosIndexScaleOffsetNarrow(rRegN reg, immL32 off, rRegI idx, immI2 sca
%}
%}
operand indirectNarrowKlass(rRegN reg)
%{
predicate(Universe::narrow_klass_shift() == 0);
constraint(ALLOC_IN_RC(ptr_reg));
match(DecodeNKlass reg);
format %{ "[$reg]" %}
interface(MEMORY_INTER) %{
base($reg);
index(0x4);
scale(0x0);
disp(0x0);
%}
%}
operand indOffset8NarrowKlass(rRegN reg, immL8 off)
%{
predicate(Universe::narrow_klass_shift() == 0);
constraint(ALLOC_IN_RC(ptr_reg));
match(AddP (DecodeNKlass reg) off);
format %{ "[$reg + $off (8-bit)]" %}
interface(MEMORY_INTER) %{
base($reg);
index(0x4);
scale(0x0);
disp($off);
%}
%}
operand indOffset32NarrowKlass(rRegN reg, immL32 off)
%{
predicate(Universe::narrow_klass_shift() == 0);
constraint(ALLOC_IN_RC(ptr_reg));
match(AddP (DecodeNKlass reg) off);
format %{ "[$reg + $off (32-bit)]" %}
interface(MEMORY_INTER) %{
base($reg);
index(0x4);
scale(0x0);
disp($off);
%}
%}
operand indIndexOffsetNarrowKlass(rRegN reg, rRegL lreg, immL32 off)
%{
predicate(Universe::narrow_klass_shift() == 0);
constraint(ALLOC_IN_RC(ptr_reg));
match(AddP (AddP (DecodeNKlass reg) lreg) off);
op_cost(10);
format %{"[$reg + $off + $lreg]" %}
interface(MEMORY_INTER) %{
base($reg);
index($lreg);
scale(0x0);
disp($off);
%}
%}
operand indIndexNarrowKlass(rRegN reg, rRegL lreg)
%{
predicate(Universe::narrow_klass_shift() == 0);
constraint(ALLOC_IN_RC(ptr_reg));
match(AddP (DecodeNKlass reg) lreg);
op_cost(10);
format %{"[$reg + $lreg]" %}
interface(MEMORY_INTER) %{
base($reg);
index($lreg);
scale(0x0);
disp(0x0);
%}
%}
operand indIndexScaleNarrowKlass(rRegN reg, rRegL lreg, immI2 scale)
%{
predicate(Universe::narrow_klass_shift() == 0);
constraint(ALLOC_IN_RC(ptr_reg));
match(AddP (DecodeNKlass reg) (LShiftL lreg scale));
op_cost(10);
format %{"[$reg + $lreg << $scale]" %}
interface(MEMORY_INTER) %{
base($reg);
index($lreg);
scale($scale);
disp(0x0);
%}
%}
operand indIndexScaleOffsetNarrowKlass(rRegN reg, immL32 off, rRegL lreg, immI2 scale)
%{
predicate(Universe::narrow_klass_shift() == 0);
constraint(ALLOC_IN_RC(ptr_reg));
match(AddP (AddP (DecodeNKlass reg) (LShiftL lreg scale)) off);
op_cost(10);
format %{"[$reg + $off + $lreg << $scale]" %}
interface(MEMORY_INTER) %{
base($reg);
index($lreg);
scale($scale);
disp($off);
%}
%}
operand indCompressedKlassOffset(rRegN reg, immL32 off) %{
predicate(UseCompressedKlassPointers && (Universe::narrow_klass_shift() == Address::times_8));
constraint(ALLOC_IN_RC(ptr_reg));
match(AddP (DecodeNKlass reg) off);
op_cost(10);
format %{"[R12 + $reg << 3 + $off] (compressed klass addressing)" %}
interface(MEMORY_INTER) %{
base(0xc); // R12
index($reg);
scale(0x3);
disp($off);
%}
%}
operand indPosIndexScaleOffsetNarrowKlass(rRegN reg, immL32 off, rRegI idx, immI2 scale)
%{
constraint(ALLOC_IN_RC(ptr_reg));
predicate(Universe::narrow_klass_shift() == 0 && n->in(2)->in(3)->in(1)->as_Type()->type()->is_long()->_lo >= 0);
match(AddP (AddP (DecodeNKlass reg) (LShiftL (ConvI2L idx) scale)) off);
op_cost(10);
format %{"[$reg + $off + $idx << $scale]" %}
interface(MEMORY_INTER) %{
base($reg);
index($idx);
scale($scale);
disp($off);
%}
%}
//----------Special Memory Operands--------------------------------------------
// Stack Slot Operand - This operand is used for loading and storing temporary
// values on the stack where a match requires a value to
@@ -4345,11 +4203,7 @@ opclass memory(indirect, indOffset8, indOffset32, indIndexOffset, indIndex,
indCompressedOopOffset,
indirectNarrow, indOffset8Narrow, indOffset32Narrow,
indIndexOffsetNarrow, indIndexNarrow, indIndexScaleNarrow,
indIndexScaleOffsetNarrow, indPosIndexScaleOffsetNarrow,
indCompressedKlassOffset,
indirectNarrowKlass, indOffset8NarrowKlass, indOffset32NarrowKlass,
indIndexOffsetNarrowKlass, indIndexNarrowKlass, indIndexScaleNarrowKlass,
indIndexScaleOffsetNarrowKlass, indPosIndexScaleOffsetNarrowKlass);
indIndexScaleOffsetNarrow, indPosIndexScaleOffsetNarrow);
//----------PIPELINE-----------------------------------------------------------
// Rules which define the behavior of the target architectures pipeline.
@@ -6665,7 +6519,7 @@ instruct decodeHeapOop_not_null(rRegP dst, rRegN src, rFlagsReg cr) %{
instruct encodeKlass_not_null(rRegN dst, rRegP src, rFlagsReg cr) %{
match(Set dst (EncodePKlass src));
effect(KILL cr);
format %{ "encode_heap_oop_not_null $dst,$src" %}
format %{ "encode_klass_not_null $dst,$src" %}
ins_encode %{
__ encode_klass_not_null($dst$$Register, $src$$Register);
%}
@@ -6675,7 +6529,7 @@ instruct encodeKlass_not_null(rRegN dst, rRegP src, rFlagsReg cr) %{
instruct decodeKlass_not_null(rRegP dst, rRegN src, rFlagsReg cr) %{
match(Set dst (DecodeNKlass src));
effect(KILL cr);
format %{ "decode_heap_oop_not_null $dst,$src" %}
format %{ "decode_klass_not_null $dst,$src" %}
ins_encode %{
Register s = $src$$Register;
Register d = $dst$$Register;

View File

@@ -50,6 +50,7 @@ int AbstractAssembler::code_fill_byte() {
#ifdef ASSERT
bool AbstractAssembler::pd_check_instruction_mark() {
ShouldNotCallThis();
return false;
}
#endif
@@ -73,6 +74,7 @@ void MacroAssembler::advance(int bytes) {
RegisterOrConstant MacroAssembler::delayed_value_impl(
intptr_t* delayed_value_addr, Register tmpl, int offset) {
ShouldNotCallThis();
return RegisterOrConstant();
}
void MacroAssembler::store_oop(jobject obj) {

View File

@@ -1008,6 +1008,7 @@ void BytecodeInterpreter::layout_interpreterState(interpreterState istate,
address CppInterpreter::return_entry(TosState state, int length) {
ShouldNotCallThis();
return NULL;
}
address CppInterpreter::deopt_entry(TosState state, int length) {

View File

@@ -58,8 +58,8 @@ class EntryFrame : public ZeroFrame {
JavaCallWrapper* call_wrapper,
TRAPS);
public:
JavaCallWrapper *call_wrapper() const {
return (JavaCallWrapper *) value_of_word(call_wrapper_off);
JavaCallWrapper **call_wrapper() const {
return (JavaCallWrapper **) addr_of_word(call_wrapper_off);
}
public:

View File

@@ -116,6 +116,7 @@ void frame::patch_pc(Thread* thread, address pc) {
bool frame::safe_for_sender(JavaThread *thread) {
ShouldNotCallThis();
return false;
}
void frame::pd_gc_epilog() {
@@ -123,6 +124,7 @@ void frame::pd_gc_epilog() {
bool frame::is_interpreted_frame_valid(JavaThread *thread) const {
ShouldNotCallThis();
return false;
}
BasicType frame::interpreter_frame_result(oop* oop_result,
@@ -184,9 +186,8 @@ BasicType frame::interpreter_frame_result(oop* oop_result,
int frame::frame_size(RegisterMap* map) const {
#ifdef PRODUCT
ShouldNotCallThis();
#else
return 0; // make javaVFrame::print_value work
#endif // PRODUCT
return 0; // make javaVFrame::print_value work
}
intptr_t* frame::interpreter_frame_tos_at(jint offset) const {

View File

@@ -36,7 +36,7 @@ inline frame::frame() {
_deopt_state = unknown;
}
inline address frame::sender_pc() const { ShouldNotCallThis(); }
inline address frame::sender_pc() const { ShouldNotCallThis(); return NULL; }
inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
_zeroframe = zf;
@@ -89,6 +89,7 @@ inline intptr_t* frame::real_fp() const {
inline intptr_t* frame::link() const {
ShouldNotCallThis();
return NULL;
}
#ifdef CC_INTERP
@@ -141,7 +142,7 @@ inline intptr_t* frame::id() const {
return fp();
}
inline JavaCallWrapper* frame::entry_frame_call_wrapper() const {
inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
return zero_entryframe()->call_wrapper();
}
@@ -151,14 +152,17 @@ inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
inline oop frame::saved_oop_result(RegisterMap* map) const {
ShouldNotCallThis();
return NULL;
}
inline bool frame::is_older(intptr_t* id) const {
ShouldNotCallThis();
return false;
}
inline intptr_t* frame::entry_frame_argument_at(int offset) const {
ShouldNotCallThis();
return NULL;
}
inline intptr_t* frame::unextended_sp() const {

View File

@@ -49,8 +49,10 @@ void InlineCacheBuffer::assemble_ic_buffer_code(address code_begin,
address InlineCacheBuffer::ic_buffer_entry_point(address code_begin) {
// NB ic_stub_code_size() must return the size of the code we generate
ShouldNotCallThis();
return NULL;
}
void* InlineCacheBuffer::ic_buffer_cached_value(address code_begin) {
ShouldNotCallThis();
return NULL;
}

View File

@@ -40,6 +40,7 @@ class InterpreterMacroAssembler : public MacroAssembler {
Register tmp,
int offset) {
ShouldNotCallThis();
return RegisterOrConstant();
}
};

View File

@@ -64,6 +64,7 @@ address InterpreterGenerator::generate_math_entry(
return NULL;
Unimplemented();
return NULL;
}
address InterpreterGenerator::generate_abstract_entry() {

View File

@@ -51,15 +51,18 @@ class NativeInstruction VALUE_OBJ_CLASS_SPEC {
public:
bool is_jump() {
ShouldNotCallThis();
return false;
}
bool is_safepoint_poll() {
ShouldNotCallThis();
return false;
}
};
inline NativeInstruction* nativeInstruction_at(address address) {
ShouldNotCallThis();
return NULL;
}
class NativeCall : public NativeInstruction {
@@ -70,18 +73,22 @@ class NativeCall : public NativeInstruction {
address instruction_address() const {
ShouldNotCallThis();
return NULL;
}
address next_instruction_address() const {
ShouldNotCallThis();
return NULL;
}
address return_address() const {
ShouldNotCallThis();
return NULL;
}
address destination() const {
ShouldNotCallThis();
return NULL;
}
void set_destination_mt_safe(address dest) {
@@ -98,25 +105,30 @@ class NativeCall : public NativeInstruction {
static bool is_call_before(address return_address) {
ShouldNotCallThis();
return false;
}
};
inline NativeCall* nativeCall_before(address return_address) {
ShouldNotCallThis();
return NULL;
}
inline NativeCall* nativeCall_at(address address) {
ShouldNotCallThis();
return NULL;
}
class NativeMovConstReg : public NativeInstruction {
public:
address next_instruction_address() const {
ShouldNotCallThis();
return NULL;
}
intptr_t data() const {
ShouldNotCallThis();
return 0;
}
void set_data(intptr_t x) {
@@ -126,12 +138,14 @@ class NativeMovConstReg : public NativeInstruction {
inline NativeMovConstReg* nativeMovConstReg_at(address address) {
ShouldNotCallThis();
return NULL;
}
class NativeMovRegMem : public NativeInstruction {
public:
int offset() const {
ShouldNotCallThis();
return 0;
}
void set_offset(intptr_t x) {
@@ -145,6 +159,7 @@ class NativeMovRegMem : public NativeInstruction {
inline NativeMovRegMem* nativeMovRegMem_at(address address) {
ShouldNotCallThis();
return NULL;
}
class NativeJump : public NativeInstruction {
@@ -155,6 +170,7 @@ class NativeJump : public NativeInstruction {
address jump_destination() const {
ShouldNotCallThis();
return NULL;
}
void set_jump_destination(address dest) {
@@ -172,12 +188,14 @@ class NativeJump : public NativeInstruction {
inline NativeJump* nativeJump_at(address address) {
ShouldNotCallThis();
return NULL;
}
class NativeGeneralJump : public NativeInstruction {
public:
address jump_destination() const {
ShouldNotCallThis();
return NULL;
}
static void insert_unconditional(address code_pos, address entry) {
@@ -191,6 +209,7 @@ class NativeGeneralJump : public NativeInstruction {
inline NativeGeneralJump* nativeGeneralJump_at(address address) {
ShouldNotCallThis();
return NULL;
}
#endif // CPU_ZERO_VM_NATIVEINST_ZERO_HPP

View File

@@ -32,8 +32,10 @@ const int ConcreteRegisterImpl::max_fpr =
const char* RegisterImpl::name() const {
ShouldNotCallThis();
return NULL;
}
const char* FloatRegisterImpl::name() const {
ShouldNotCallThis();
return NULL;
}

View File

@@ -37,6 +37,7 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
address Relocation::pd_call_destination(address orig_addr) {
ShouldNotCallThis();
return NULL;
}
void Relocation::pd_set_call_destination(address x) {
@@ -45,6 +46,7 @@ void Relocation::pd_set_call_destination(address x) {
address Relocation::pd_get_address_from_code() {
ShouldNotCallThis();
return NULL;
}
address* Relocation::pd_address_in_code() {

View File

@@ -89,6 +89,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
ret_type);
#else
ShouldNotCallThis();
return NULL;
#endif // SHARK
}
@@ -99,6 +100,7 @@ int Deoptimization::last_frame_adjust(int callee_parameters,
uint SharedRuntime::out_preserve_stack_slots() {
ShouldNotCallThis();
return 0;
}
JRT_LEAF(void, zero_stub())
@@ -135,4 +137,5 @@ int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
VMRegPair *regs,
int total_args_passed) {
ShouldNotCallThis();
return 0;
}

View File

@@ -176,6 +176,19 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_oop_arraycopy;
}
static int SafeFetch32(int *adr, int errValue) {
int value = errValue;
value = *adr;
return value;
}
static intptr_t SafeFetchN(intptr_t *adr, intptr_t errValue) {
intptr_t value = errValue;
value = *adr;
return value;
}
void generate_initial() {
// Generates all stubs and initializes the entry points
@@ -225,6 +238,15 @@ class StubGenerator: public StubCodeGenerator {
// arraycopy stubs used by compilers
generate_arraycopy_stubs();
// Safefetch stubs.
StubRoutines::_safefetch32_entry = CAST_FROM_FN_PTR(address, StubGenerator::SafeFetch32);
StubRoutines::_safefetch32_fault_pc = NULL;
StubRoutines::_safefetch32_continuation_pc = NULL;
StubRoutines::_safefetchN_entry = CAST_FROM_FN_PTR(address, StubGenerator::SafeFetchN);
StubRoutines::_safefetchN_fault_pc = NULL;
StubRoutines::_safefetchN_continuation_pc = NULL;
}
public:

View File

@@ -39,16 +39,20 @@
VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
ShouldNotCallThis();
return NULL;
}
VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
ShouldNotCallThis();
return NULL;
}
int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
ShouldNotCallThis();
return 0;
}
int VtableStub::pd_code_alignment() {
ShouldNotCallThis();
return 0;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. 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
@@ -437,6 +437,30 @@ AttachOperation* AttachListener::dequeue() {
return op;
}
// Performs initialization at vm startup
// For BSD we remove any stale .java_pid file which could cause
// an attaching process to think we are ready to receive on the
// domain socket before we are properly initialized
void AttachListener::vm_start() {
char fn[UNIX_PATH_MAX];
struct stat st;
int ret;
int n = snprintf(fn, UNIX_PATH_MAX, "%s/.java_pid%d",
os::get_temp_directory(), os::current_process_id());
assert(n < (int)UNIX_PATH_MAX, "java_pid file name buffer overflow");
RESTARTABLE(::stat(fn, &st), ret);
if (ret == 0) {
ret = ::unlink(fn);
if (ret == -1) {
debug_only(warning("failed to remove stale attach pid file at %s", fn));
}
}
}
int AttachListener::pd_init() {
JavaThread* thread = JavaThread::current();
ThreadBlockInVM tbivm(thread);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. 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
@@ -432,6 +432,30 @@ AttachOperation* AttachListener::dequeue() {
return op;
}
// Performs initialization at vm startup
// For Linux we remove any stale .java_pid file which could cause
// an attaching process to think we are ready to receive on the
// domain socket before we are properly initialized
void AttachListener::vm_start() {
char fn[UNIX_PATH_MAX];
struct stat64 st;
int ret;
int n = snprintf(fn, UNIX_PATH_MAX, "%s/.java_pid%d",
os::get_temp_directory(), os::current_process_id());
assert(n < (int)UNIX_PATH_MAX, "java_pid file name buffer overflow");
RESTARTABLE(::stat64(fn, &st), ret);
if (ret == 0) {
ret = ::unlink(fn);
if (ret == -1) {
debug_only(warning("failed to remove stale attach pid file at %s", fn));
}
}
}
int AttachListener::pd_init() {
JavaThread* thread = JavaThread::current();
ThreadBlockInVM tbivm(thread);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. 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
@@ -107,7 +107,7 @@ static sa_handler_t set_signal(int sig, sa_handler_t disp, bool is_sigset) {
signal_lock();
sigused = (MASK(sig) & jvmsigs) != 0;
sigused = (sig < MAXSIGNUM) && ((MASK(sig) & jvmsigs) != 0);
if (jvm_signal_installed && sigused) {
/* jvm has installed its signal handler for this signal. */
/* Save the handler. Don't really install it. */
@@ -116,7 +116,7 @@ static sa_handler_t set_signal(int sig, sa_handler_t disp, bool is_sigset) {
signal_unlock();
return oldhandler;
} else if (jvm_signal_installing) {
} else if (sig < MAXSIGNUM && jvm_signal_installing) {
/* jvm is installing its signal handlers. Install the new
* handlers and save the old ones. jvm uses sigaction().
* Leave the piece here just in case. */
@@ -165,7 +165,7 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
signal_lock();
sigused = (MASK(sig) & jvmsigs) != 0;
sigused = (sig < MAXSIGNUM) && ((MASK(sig) & jvmsigs) != 0);
if (jvm_signal_installed && sigused) {
/* jvm has installed its signal handler for this signal. */
/* Save the handler. Don't really install it. */
@@ -178,7 +178,7 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
signal_unlock();
return 0;
} else if (jvm_signal_installing) {
} else if (sig < MAXSIGNUM && jvm_signal_installing) {
/* jvm is installing its signal handlers. Install the new
* handlers and save the old ones. */
res = call_os_sigaction(sig, act, &oldAct);

View File

@@ -259,3 +259,52 @@ const char* os::get_current_directory(char *buf, size_t buflen) {
FILE* os::open(int fd, const char* mode) {
return ::fdopen(fd, mode);
}
os::WatcherThreadCrashProtection::WatcherThreadCrashProtection() {
assert(Thread::current()->is_Watcher_thread(), "Must be WatcherThread");
}
/*
* See the caveats for this class in os_posix.hpp
* Protects the callback call so that SIGSEGV / SIGBUS jumps back into this
* method and returns false. If none of the signals are raised, returns true.
* The callback is supposed to provide the method that should be protected.
*/
bool os::WatcherThreadCrashProtection::call(os::CrashProtectionCallback& cb) {
assert(Thread::current()->is_Watcher_thread(), "Only for WatcherThread");
assert(!WatcherThread::watcher_thread()->has_crash_protection(),
"crash_protection already set?");
if (sigsetjmp(_jmpbuf, 1) == 0) {
// make sure we can see in the signal handler that we have crash protection
// installed
WatcherThread::watcher_thread()->set_crash_protection(this);
cb.call();
// and clear the crash protection
WatcherThread::watcher_thread()->set_crash_protection(NULL);
return true;
}
// this happens when we siglongjmp() back
WatcherThread::watcher_thread()->set_crash_protection(NULL);
return false;
}
void os::WatcherThreadCrashProtection::restore() {
assert(WatcherThread::watcher_thread()->has_crash_protection(),
"must have crash protection");
siglongjmp(_jmpbuf, 1);
}
void os::WatcherThreadCrashProtection::check_crash_protection(int sig,
Thread* thread) {
if (thread != NULL &&
thread->is_Watcher_thread() &&
WatcherThread::watcher_thread()->has_crash_protection()) {
if (sig == SIGSEGV || sig == SIGBUS) {
WatcherThread::watcher_thread()->crash_protection()->restore();
}
}
}

View File

@@ -37,5 +37,24 @@ protected:
};
/*
* Crash protection for the watcher thread. Wrap the callback
* with a sigsetjmp and in case of a SIGSEGV/SIGBUS we siglongjmp
* back.
* To be able to use this - don't take locks, don't rely on destructors,
* don't make OS library calls, don't allocate memory, don't print,
* don't call code that could leave the heap / memory in an inconsistent state,
* or anything else where we are not in control if we suddenly jump out.
*/
class WatcherThreadCrashProtection : public StackObj {
public:
WatcherThreadCrashProtection();
bool call(os::CrashProtectionCallback& cb);
static void check_crash_protection(int signal, Thread* thread);
private:
void restore();
sigjmp_buf _jmpbuf;
};
#endif

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. 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
@@ -576,6 +576,30 @@ AttachOperation* AttachListener::dequeue() {
return op;
}
// Performs initialization at vm startup
// For Solaris we remove any stale .java_pid file which could cause
// an attaching process to think we are ready to receive a door_call
// before we are properly initialized
void AttachListener::vm_start() {
char fn[PATH_MAX+1];
struct stat64 st;
int ret;
int n = snprintf(fn, sizeof(fn), "%s/.java_pid%d",
os::get_temp_directory(), os::current_process_id());
assert(n < sizeof(fn), "java_pid file name buffer overflow");
RESTARTABLE(::stat64(fn, &st), ret);
if (ret == 0) {
ret = ::unlink(fn);
if (ret == -1) {
debug_only(warning("failed to remove stale attach pid file at %s", fn));
}
}
}
int AttachListener::pd_init() {
JavaThread* thread = JavaThread::current();
ThreadBlockInVM tbivm(thread);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. 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
@@ -358,6 +358,10 @@ AttachOperation* AttachListener::dequeue() {
return op;
}
void AttachListener::vm_start() {
// nothing to do
}
int AttachListener::pd_init() {
return Win32AttachListener::init();
}

View File

@@ -1642,6 +1642,8 @@ void os::print_os_info(outputStream* st) {
void os::win32::print_windows_version(outputStream* st) {
OSVERSIONINFOEX osvi;
SYSTEM_INFO si;
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
@@ -1651,6 +1653,18 @@ void os::win32::print_windows_version(outputStream* st) {
}
int os_vers = osvi.dwMajorVersion * 1000 + osvi.dwMinorVersion;
ZeroMemory(&si, sizeof(SYSTEM_INFO));
if (os_vers >= 5002) {
// Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could
// find out whether we are running on 64 bit processor or not.
if (os::Kernel32Dll::GetNativeSystemInfoAvailable()) {
os::Kernel32Dll::GetNativeSystemInfo(&si);
} else {
GetSystemInfo(&si);
}
}
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
switch (os_vers) {
case 3051: st->print(" Windows NT 3.51"); break;
@@ -1658,57 +1672,48 @@ void os::win32::print_windows_version(outputStream* st) {
case 5000: st->print(" Windows 2000"); break;
case 5001: st->print(" Windows XP"); break;
case 5002:
case 6000:
case 6001:
case 6002: {
// Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could
// find out whether we are running on 64 bit processor or not.
SYSTEM_INFO si;
ZeroMemory(&si, sizeof(SYSTEM_INFO));
if (!os::Kernel32Dll::GetNativeSystemInfoAvailable()){
GetSystemInfo(&si);
if (osvi.wProductType == VER_NT_WORKSTATION &&
si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) {
st->print(" Windows XP x64 Edition");
} else {
os::Kernel32Dll::GetNativeSystemInfo(&si);
}
if (os_vers == 5002) {
if (osvi.wProductType == VER_NT_WORKSTATION &&
si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
st->print(" Windows XP x64 Edition");
else
st->print(" Windows Server 2003 family");
} else if (os_vers == 6000) {
if (osvi.wProductType == VER_NT_WORKSTATION)
st->print(" Windows Vista");
else
st->print(" Windows Server 2008");
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
st->print(" , 64 bit");
} else if (os_vers == 6001) {
if (osvi.wProductType == VER_NT_WORKSTATION) {
st->print(" Windows 7");
} else {
// Unrecognized windows, print out its major and minor versions
st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
}
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
st->print(" , 64 bit");
} else if (os_vers == 6002) {
if (osvi.wProductType == VER_NT_WORKSTATION) {
st->print(" Windows 8");
} else {
st->print(" Windows Server 2012");
}
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
st->print(" , 64 bit");
} else { // future os
// Unrecognized windows, print out its major and minor versions
st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
st->print(" , 64 bit");
st->print(" Windows Server 2003 family");
}
break;
}
default: // future windows, print out its major and minor versions
case 6000:
if (osvi.wProductType == VER_NT_WORKSTATION) {
st->print(" Windows Vista");
} else {
st->print(" Windows Server 2008");
}
break;
case 6001:
if (osvi.wProductType == VER_NT_WORKSTATION) {
st->print(" Windows 7");
} else {
st->print(" Windows Server 2008 R2");
}
break;
case 6002:
if (osvi.wProductType == VER_NT_WORKSTATION) {
st->print(" Windows 8");
} else {
st->print(" Windows Server 2012");
}
break;
case 6003:
if (osvi.wProductType == VER_NT_WORKSTATION) {
st->print(" Windows 8.1");
} else {
st->print(" Windows Server 2012 R2");
}
break;
default: // future os
// Unrecognized windows, print out its major and minor versions
st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
}
} else {
@@ -1720,6 +1725,11 @@ void os::win32::print_windows_version(outputStream* st) {
st->print(" Windows %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
}
}
if (os_vers >= 6000 && si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) {
st->print(" , 64 bit");
}
st->print(" Build %d", osvi.dwBuildNumber);
st->print(" %s", osvi.szCSDVersion); // service pack
st->cr();
@@ -4689,6 +4699,34 @@ void os::pause() {
}
}
os::WatcherThreadCrashProtection::WatcherThreadCrashProtection() {
assert(Thread::current()->is_Watcher_thread(), "Must be WatcherThread");
}
/*
* See the caveats for this class in os_windows.hpp
* Protects the callback call so that raised OS EXCEPTIONS causes a jump back
* into this method and returns false. If no OS EXCEPTION was raised, returns
* true.
* The callback is supposed to provide the method that should be protected.
*/
bool os::WatcherThreadCrashProtection::call(os::CrashProtectionCallback& cb) {
assert(Thread::current()->is_Watcher_thread(), "Only for WatcherThread");
assert(!WatcherThread::watcher_thread()->has_crash_protection(),
"crash_protection already set?");
bool success = true;
__try {
WatcherThread::watcher_thread()->set_crash_protection(this);
cb.call();
} __except(EXCEPTION_EXECUTE_HANDLER) {
// only for protection, nothing to do
success = false;
}
WatcherThread::watcher_thread()->set_crash_protection(NULL);
return success;
}
// An Event wraps a win32 "CreateEvent" kernel handle.
//
// We have a number of choices regarding "CreateEvent" win32 handle leakage:

View File

@@ -102,6 +102,20 @@ class win32 {
static LONG WINAPI serialize_fault_filter(struct _EXCEPTION_POINTERS* e);
};
/*
* Crash protection for the watcher thread. Wrap the callback
* with a __try { call() }
* To be able to use this - don't take locks, don't rely on destructors,
* don't make OS library calls, don't allocate memory, don't print,
* don't call code that could leave the heap / memory in an inconsistent state,
* or anything else where we are not in control if we suddenly jump out.
*/
class WatcherThreadCrashProtection : public StackObj {
public:
WatcherThreadCrashProtection();
bool call(os::CrashProtectionCallback& cb);
};
class PlatformEvent : public CHeapObj<mtInternal> {
private:
double CachePad [4] ; // increase odds that _Event is sole occupant of cache line

View File

@@ -1,26 +0,0 @@
//
// Copyright (c) 1999, 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
// or visit www.oracle.com if you need additional information or have any
// questions.
//
//
// X86 Bsd Architecture Description File

View File

@@ -1,65 +0,0 @@
//
// Copyright (c) 2003, 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
// or visit www.oracle.com if you need additional information or have any
// questions.
//
//
// AMD64 Bsd Architecture Description File
//----------OS-DEPENDENT ENCODING BLOCK----------------------------------------
// This block specifies the encoding classes used by the compiler to
// output byte streams. Encoding classes generate functions which are
// called by Machine Instruction Nodes in order to generate the bit
// encoding of the instruction. Operands specify their base encoding
// interface with the interface keyword. There are currently
// supported four interfaces, REG_INTER, CONST_INTER, MEMORY_INTER, &
// COND_INTER. REG_INTER causes an operand to generate a function
// which returns its register number when queried. CONST_INTER causes
// an operand to generate a function which returns the value of the
// constant when queried. MEMORY_INTER causes an operand to generate
// four functions which return the Base Register, the Index Register,
// the Scale Value, and the Offset Value of the operand when queried.
// COND_INTER causes an operand to generate six functions which return
// the encoding code (ie - encoding bits for the instruction)
// associated with each basic boolean condition for a conditional
// instruction. Instructions specify two basic values for encoding.
// They use the ins_encode keyword to specify their encoding class
// (which must be one of the class names specified in the encoding
// block), and they use the opcode keyword to specify, in order, their
// primary, secondary, and tertiary opcode. Only the opcode sections
// which a particular instruction needs for encoding need to be
// specified.
encode %{
// Build emit functions for each basic byte or larger field in the intel
// encoding scheme (opcode, rm, sib, immediate), and call them from C++
// code in the enc_class source block. Emit functions will live in the
// main source block for now. In future, we can generalize this by
// adding a syntax that specifies the sizes of fields in an order,
// so that the adlc can build the emit functions automagically
%}
// Platform dependent source
source %{
%}

View File

@@ -72,7 +72,7 @@ inline jushort OrderAccess::load_acquire(volatile jushort* p) { return *p; }
inline juint OrderAccess::load_acquire(volatile juint* p) { return *p; }
inline julong OrderAccess::load_acquire(volatile julong* p) { return Atomic::load((volatile jlong*)p); }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return jdouble_cast(Atomic::load((volatile jlong*)p)); }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return *p; }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return *(void* volatile *)p; }
@@ -87,7 +87,7 @@ inline void OrderAccess::release_store(volatile jushort* p, jushort v) { *p
inline void OrderAccess::release_store(volatile juint* p, juint v) { *p = v; }
inline void OrderAccess::release_store(volatile julong* p, julong v) { Atomic::store((jlong)v, (volatile jlong*)p); }
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { release_store((volatile jlong*)p, jlong_cast(v)); }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { *(void* volatile *)p = v; }
@@ -190,7 +190,7 @@ inline void OrderAccess::release_store_fence(volatile juint* p, juint v)
inline void OrderAccess::release_store_fence(volatile julong* p, julong v) { release_store_fence((volatile jlong*)p, (jlong)v); }
inline void OrderAccess::release_store_fence(volatile jfloat* p, jfloat v) { *p = v; fence(); }
inline void OrderAccess::release_store_fence(volatile jdouble* p, jdouble v) { *p = v; fence(); }
inline void OrderAccess::release_store_fence(volatile jdouble* p, jdouble v) { release_store_fence((volatile jlong*)p, jlong_cast(v)); }
inline void OrderAccess::release_store_ptr_fence(volatile intptr_t* p, intptr_t v) {
#ifdef AMD64

View File

@@ -394,6 +394,10 @@ JVM_handle_bsd_signal(int sig,
Thread* t = ThreadLocalStorage::get_thread_slow();
// Must do this before SignalHandlerMark, if crash protection installed we will longjmp away
// (no destructors can be run)
os::WatcherThreadCrashProtection::check_crash_protection(sig, t);
SignalHandlerMark shm(t);
// Note: it's not uncommon that JNI code uses signal/sigset to install
@@ -711,6 +715,7 @@ JVM_handle_bsd_signal(int sig,
err.report_and_die();
ShouldNotReachHere();
return false;
}
// From solaris_i486.s ported to bsd_i486.s

View File

@@ -66,6 +66,7 @@ address os::current_stack_pointer() {
frame os::get_sender_for_C_frame(frame* fr) {
ShouldNotCallThis();
return frame();
}
frame os::current_frame() {
@@ -103,16 +104,19 @@ void os::initialize_thread(Thread* thr) {
address os::Bsd::ucontext_get_pc(ucontext_t* uc) {
ShouldNotCallThis();
return NULL;
}
ExtendedPC os::fetch_frame_from_context(void* ucVoid,
intptr_t** ret_sp,
intptr_t** ret_fp) {
ShouldNotCallThis();
return ExtendedPC();
}
frame os::fetch_frame_from_context(void* ucVoid) {
ShouldNotCallThis();
return frame();
}
extern "C" JNIEXPORT int
@@ -240,6 +244,7 @@ JVM_handle_bsd_signal(int sig,
sprintf(buf, fmt, sig, info->si_addr);
fatal(buf);
return false;
}
void os::Bsd::init_thread_fpu_state(void) {
@@ -373,17 +378,7 @@ void os::print_register_info(outputStream *st, void *context) {
extern "C" {
int SpinPause() {
}
int SafeFetch32(int *adr, int errValue) {
int value = errValue;
value = *adr;
return value;
}
intptr_t SafeFetchN(intptr_t *adr, intptr_t errValue) {
intptr_t value = errValue;
value = *adr;
return value;
return 1;
}
void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {

View File

@@ -110,6 +110,7 @@
void* ucontext,
bool isInJava) {
ShouldNotCallThis();
return false;
}
// These routines are only used on cpu architectures that

View File

@@ -544,6 +544,10 @@ JVM_handle_linux_signal(int sig,
Thread* t = ThreadLocalStorage::get_thread_slow();
// Must do this before SignalHandlerMark, if crash protection installed we will longjmp away
// (no destructors can be run)
os::WatcherThreadCrashProtection::check_crash_protection(sig, t);
SignalHandlerMark shm(t);
// Note: it's not uncommon that JNI code uses signal/sigset to install

View File

@@ -1,26 +0,0 @@
//
// Copyright (c) 1999, 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
// or visit www.oracle.com if you need additional information or have any
// questions.
//
//
// X86 Linux Architecture Description File

View File

@@ -1,65 +0,0 @@
//
// Copyright (c) 2003, 2012, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
// or visit www.oracle.com if you need additional information or have any
// questions.
//
//
// AMD64 Linux Architecture Description File
//----------OS-DEPENDENT ENCODING BLOCK----------------------------------------
// This block specifies the encoding classes used by the compiler to
// output byte streams. Encoding classes generate functions which are
// called by Machine Instruction Nodes in order to generate the bit
// encoding of the instruction. Operands specify their base encoding
// interface with the interface keyword. There are currently
// supported four interfaces, REG_INTER, CONST_INTER, MEMORY_INTER, &
// COND_INTER. REG_INTER causes an operand to generate a function
// which returns its register number when queried. CONST_INTER causes
// an operand to generate a function which returns the value of the
// constant when queried. MEMORY_INTER causes an operand to generate
// four functions which return the Base Register, the Index Register,
// the Scale Value, and the Offset Value of the operand when queried.
// COND_INTER causes an operand to generate six functions which return
// the encoding code (ie - encoding bits for the instruction)
// associated with each basic boolean condition for a conditional
// instruction. Instructions specify two basic values for encoding.
// They use the ins_encode keyword to specify their encoding class
// (which must be one of the class names specified in the encoding
// block), and they use the opcode keyword to specify, in order, their
// primary, secondary, and tertiary opcode. Only the opcode sections
// which a particular instruction needs for encoding need to be
// specified.
encode %{
// Build emit functions for each basic byte or larger field in the intel
// encoding scheme (opcode, rm, sib, immediate), and call them from C++
// code in the enc_class source block. Emit functions will live in the
// main source block for now. In future, we can generalize this by
// adding a syntax that specifies the sizes of fields in an order,
// so that the adlc can build the emit functions automagically
%}
// Platform dependent source
source %{
%}

View File

@@ -72,7 +72,7 @@ inline jushort OrderAccess::load_acquire(volatile jushort* p) { return *p; }
inline juint OrderAccess::load_acquire(volatile juint* p) { return *p; }
inline julong OrderAccess::load_acquire(volatile julong* p) { return Atomic::load((volatile jlong*)p); }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return jdouble_cast(Atomic::load((volatile jlong*)p)); }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return *p; }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return *(void* volatile *)p; }
@@ -87,7 +87,7 @@ inline void OrderAccess::release_store(volatile jushort* p, jushort v) { *p
inline void OrderAccess::release_store(volatile juint* p, juint v) { *p = v; }
inline void OrderAccess::release_store(volatile julong* p, julong v) { Atomic::store((jlong)v, (volatile jlong*)p); }
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { release_store((volatile jlong *)p, jlong_cast(v)); }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { *(void* volatile *)p = v; }
@@ -129,7 +129,7 @@ inline void OrderAccess::store_fence(jushort* p, jushort v) { store_fence((j
inline void OrderAccess::store_fence(juint* p, juint v) { store_fence((jint*)p, (jint)v); }
inline void OrderAccess::store_fence(julong* p, julong v) { store_fence((jlong*)p, (jlong)v); }
inline void OrderAccess::store_fence(jfloat* p, jfloat v) { *p = v; fence(); }
inline void OrderAccess::store_fence(jdouble* p, jdouble v) { *p = v; fence(); }
inline void OrderAccess::store_fence(jdouble* p, jdouble v) { store_fence((jlong*)p, jlong_cast(v)); }
inline void OrderAccess::store_ptr_fence(intptr_t* p, intptr_t v) {
#ifdef AMD64
@@ -190,7 +190,7 @@ inline void OrderAccess::release_store_fence(volatile juint* p, juint v)
inline void OrderAccess::release_store_fence(volatile julong* p, julong v) { release_store_fence((volatile jlong*)p, (jlong)v); }
inline void OrderAccess::release_store_fence(volatile jfloat* p, jfloat v) { *p = v; fence(); }
inline void OrderAccess::release_store_fence(volatile jdouble* p, jdouble v) { *p = v; fence(); }
inline void OrderAccess::release_store_fence(volatile jdouble* p, jdouble v) { release_store_fence((volatile jlong*)p, jlong_cast(v)); }
inline void OrderAccess::release_store_ptr_fence(volatile intptr_t* p, intptr_t v) {
#ifdef AMD64

View File

@@ -218,6 +218,10 @@ JVM_handle_linux_signal(int sig,
Thread* t = ThreadLocalStorage::get_thread_slow();
// Must do this before SignalHandlerMark, if crash protection installed we will longjmp away
// (no destructors can be run)
os::WatcherThreadCrashProtection::check_crash_protection(sig, t);
SignalHandlerMark shm(t);
// Note: it's not uncommon that JNI code uses signal/sigset to install

Some files were not shown because too many files have changed in this diff Show More