From mr at sun.com Sun Mar 1 22:58:21 2009 From: mr at sun.com (mr at sun.com) Date: Mon, 02 Mar 2009 06:58:21 +0000 Subject: hg: jigsaw/jigsaw: Added tag jdk7-b49 for changeset aee93a8992d2 Message-ID: <20090302065821.4959BE55D@hg.openjdk.java.net> Changeset: 5111e13e44e5 Author: xdono Date: 2009-02-26 10:57 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/rev/5111e13e44e5 Added tag jdk7-b49 for changeset aee93a8992d2 ! .hgtags From mr at sun.com Sun Mar 1 22:59:45 2009 From: mr at sun.com (mr at sun.com) Date: Mon, 02 Mar 2009 06:59:45 +0000 Subject: hg: jigsaw/jigsaw/corba: Added tag jdk7-b49 for changeset d70978bc64bc Message-ID: <20090302065947.0DF38E564@hg.openjdk.java.net> Changeset: 0edbd0074b02 Author: xdono Date: 2009-02-26 10:57 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/corba/rev/0edbd0074b02 Added tag jdk7-b49 for changeset d70978bc64bc ! .hgtags From mr at sun.com Sun Mar 1 23:02:45 2009 From: mr at sun.com (mr at sun.com) Date: Mon, 02 Mar 2009 07:02:45 +0000 Subject: hg: jigsaw/jigsaw/hotspot: 34 new changesets Message-ID: <20090302070351.94AA9E56B@hg.openjdk.java.net> Changeset: 23673011938d Author: ysr Date: 2009-01-30 14:17 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/23673011938d 6787254: Work queue capacity can be increased substantially on some platforms Summary: Increased the default and maximum size of the CMS marking stack and the size of the parallel workers' work queues in 64-bit mode. The latter was accomplished by an increase in the width of the Taskqueue's Age struct and its Tag field in 64-bit mode. Reviewed-by: jmasa, tonyp ! src/share/vm/runtime/globals.hpp ! src/share/vm/utilities/taskqueue.cpp ! src/share/vm/utilities/taskqueue.hpp Changeset: 9a25e0c45327 Author: jmasa Date: 2009-01-31 00:15 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/9a25e0c45327 6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark) Summary: The CMS concurrent precleaning and concurrent marking phases should work around classes that are undergoing redefinition. Reviewed-by: ysr, tonyp ! src/share/vm/gc_interface/collectedHeap.hpp ! src/share/vm/interpreter/rewriter.cpp ! src/share/vm/memory/oopFactory.cpp ! src/share/vm/memory/oopFactory.hpp ! src/share/vm/oops/cpCacheKlass.cpp ! src/share/vm/oops/cpCacheKlass.hpp ! src/share/vm/oops/cpCacheOop.hpp Changeset: a268411445d9 Author: ysr Date: 2009-02-04 15:42 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/a268411445d9 Merge Changeset: 82a980778b92 Author: never Date: 2009-02-05 11:42 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/82a980778b92 6793828: G1: invariant: queues are empty when activated Reviewed-by: jrose, kvn ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/memnode.cpp Changeset: 58054a18d735 Author: apetrusenko Date: 2009-02-06 01:38 +0300 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/58054a18d735 6484959: G1: introduce survivor spaces 6797754: G1: combined bugfix Summary: Implemented a policy to control G1 survivor space parameters. Reviewed-by: tonyp, iveresov ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp ! src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp ! src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp ! src/share/vm/gc_implementation/g1/g1RemSet.cpp ! src/share/vm/gc_implementation/g1/g1_globals.hpp ! src/share/vm/gc_implementation/g1/heapRegion.hpp ! src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp ! src/share/vm/gc_implementation/g1/survRateGroup.cpp ! src/share/vm/gc_implementation/g1/survRateGroup.hpp ! src/share/vm/gc_implementation/includeDB_gc_g1 ! src/share/vm/gc_implementation/shared/ageTable.cpp ! src/share/vm/gc_implementation/shared/ageTable.hpp Changeset: 05c6d52fa7a9 Author: jmasa Date: 2009-02-08 13:18 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/05c6d52fa7a9 6690928: Use spinning in combination with yields for workstealing termination. Summary: Substitute a spin loop for most calls to yield() to reduce the stress on the system. Reviewed-by: tonyp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp ! src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp ! src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp ! src/share/vm/memory/genCollectedHeap.cpp ! src/share/vm/oops/cpCacheKlass.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/utilities/taskqueue.cpp ! src/share/vm/utilities/taskqueue.hpp Changeset: 1e458753107d Author: apetrusenko Date: 2009-02-09 17:33 +0300 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/1e458753107d 6802413: G1: G1FixedSurvivorSpaceSize should be converted into regions in calculate_survivors_policy() Reviewed-by: tonyp, jmasa ! src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Changeset: 773234c55e8c Author: ysr Date: 2009-02-09 12:26 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/773234c55e8c 6800586: -XX:+PrintGCDateStamps is using mt-unsafe localtime function Summary: replaced localtime() with localtime_r() on Solaris and Linux. Reviewed-by: apetrusenko, dholmes, jmasa ! src/os/linux/vm/os_linux.cpp ! src/os/solaris/vm/os_solaris.cpp ! src/os/windows/vm/os_windows.cpp ! src/share/vm/runtime/os.cpp ! src/share/vm/runtime/os.hpp Changeset: fe3d7c11b4b7 Author: apetrusenko Date: 2009-02-10 18:39 +0300 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/fe3d7c11b4b7 6700941: G1: allocation spec missing for some G1 classes Reviewed-by: tonyp ! src/share/vm/gc_implementation/g1/collectionSetChooser.hpp ! src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp ! src/share/vm/gc_implementation/g1/concurrentMark.hpp ! src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp ! src/share/vm/gc_implementation/g1/g1MMUTracker.hpp ! src/share/vm/gc_implementation/g1/g1RemSet.hpp ! src/share/vm/gc_implementation/g1/heapRegion.hpp ! src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp ! src/share/vm/gc_implementation/g1/ptrQueue.hpp ! src/share/vm/gc_implementation/g1/sparsePRT.hpp ! src/share/vm/gc_implementation/includeDB_gc_g1 ! src/share/vm/utilities/workgroup.hpp Changeset: 96964ebdb154 Author: kvn Date: 2009-01-07 11:04 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/96964ebdb154 6782232: assert("CreateEx must be first instruction in block" ) Summary: Add the missing check for CreateEx. Add new notproduct flag VerifyRegisterAllocator. Reviewed-by: never ! src/share/vm/opto/c2_globals.hpp ! src/share/vm/opto/chaitin.cpp ! src/share/vm/opto/live.cpp ! src/share/vm/opto/reg_split.cpp Changeset: 6c4cda924d2e Author: kvn Date: 2009-01-07 11:23 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/6c4cda924d2e 6790182: matcher.cpp:1375: assert(false,"bad AD file") Summary: Add a match rule for regD_low in regD definition. Reviewed-by: never ! src/cpu/sparc/vm/sparc.ad Changeset: 011517bbcd7b Author: kvn Date: 2009-01-13 11:10 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/011517bbcd7b 6784930: server jvm fails with assert(!n->is_SpillCopy(),"") Summary: Set minimum block frequency MIN_BLOCK_FREQUENCY 1.e-35f. Reviewed-by: never, rasbold ! src/share/vm/opto/gcm.cpp Changeset: 041fe019d769 Author: never Date: 2009-01-13 11:43 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/041fe019d769 6791132: bad control in autobox split code Reviewed-by: kvn ! src/share/vm/opto/memnode.cpp Changeset: 78144dc3db03 Author: never Date: 2009-01-13 14:02 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/78144dc3db03 Merge Changeset: 35ae4dd6c27c Author: never Date: 2009-01-14 14:12 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/35ae4dd6c27c 6788347: C2Compiler crash 6u7 Reviewed-by: kvn ! src/share/vm/opto/cfgnode.cpp ! src/share/vm/opto/type.cpp ! src/share/vm/opto/type.hpp Changeset: 48bb4a49b7ac Author: kvn Date: 2009-01-16 11:23 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/48bb4a49b7ac 6790209: server VM fails with assert(will_link,"_new: typeflow responsibility") Summary: Add missing code for reflection class loader in SystemDictionary::find(). Reviewed-by: never, jrose ! src/share/vm/classfile/systemDictionary.cpp Changeset: 465813e0303a Author: kvn Date: 2009-01-21 11:18 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/465813e0303a 6794939: assert(_base == OopPtr,"subclass must override cast_to_ptr_type") Summary: Fix the assert in TypeKlassPtr::cast_to_ptr_type(). Reviewed-by: never ! src/share/vm/opto/type.cpp Changeset: 3b5ac9e7e6ea Author: twisti Date: 2009-01-26 16:22 +0100 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/3b5ac9e7e6ea 6796746: rename LoadC (char) opcode class to LoadUS (unsigned short) Summary: Renaming LoadC to LoadUS would round up the planned introduction of LoadUB and LoadUI. Reviewed-by: phh, kvn ! src/cpu/sparc/vm/sparc.ad ! src/cpu/x86/vm/x86_32.ad ! src/cpu/x86/vm/x86_64.ad ! src/share/vm/adlc/forms.cpp ! src/share/vm/adlc/formssel.cpp ! src/share/vm/opto/classes.hpp ! src/share/vm/opto/compile.cpp ! src/share/vm/opto/lcm.cpp ! src/share/vm/opto/loopnode.cpp ! src/share/vm/opto/matcher.cpp ! src/share/vm/opto/memnode.cpp ! src/share/vm/opto/memnode.hpp ! src/share/vm/opto/mulnode.cpp ! src/share/vm/opto/superword.cpp ! src/share/vm/opto/vectornode.cpp Changeset: 7628781568e1 Author: twisti Date: 2009-02-03 01:39 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/7628781568e1 6795362: 32bit server compiler leads to wrong results on solaris-x86 Summary: The C2 compiler leads to wrong results on solaris-i486 (32-bit) for a testcase given in the CR. Reviewed-by: never, rasbold ! src/share/vm/opto/mulnode.cpp ! src/share/vm/utilities/globalDefinitions.hpp + test/compiler/6795362/Test6795362.java Changeset: b79faa366fbd Author: twisti Date: 2009-02-03 08:10 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/b79faa366fbd 6799452: HotSpot tests Makefile should take care of ALT_SLASH_JAVA Summary: The HotSpot tests Makefile has a hardcoded SLASH_JAVA which makes it difficult to run the tests on non-Sun build machines which do not have a /java infrastructure. Reviewed-by: kamg ! test/Makefile Changeset: 5bfdb08ea692 Author: never Date: 2009-02-03 18:05 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/5bfdb08ea692 6782260: Memory leak in CodeBuffer::create_patch_overflow Reviewed-by: phh, kvn ! src/share/vm/asm/codeBuffer.cpp Changeset: 1580954e694c Author: never Date: 2009-02-04 11:44 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/1580954e694c 6798785: Crash in OopFlow::build_oop_map: incorrect comparison of 64bit pointers Reviewed-by: phh, kvn ! src/share/vm/adlc/dict2.cpp ! src/share/vm/libadt/dict.cpp Changeset: 1b9fc6e3171b Author: never Date: 2009-02-04 23:17 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/1b9fc6e3171b 6442502: assert(bits,"Use TypePtr for NULL") on linux-x86 Reviewed-by: kvn ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/graphKit.hpp Changeset: 323728917cf4 Author: kvn Date: 2009-02-05 13:38 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/323728917cf4 6788376: allow to ignore unrecognized VM options Summary: Add new product flag -XX:+IgnoreUnrecognizedVMOptions Reviewed-by: ysr, xlu ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/globals.hpp ! test/compiler/6775880/Test.java Changeset: 7fe62bb75bf4 Author: kvn Date: 2009-02-05 14:43 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/7fe62bb75bf4 6799693: Server compiler leads to data corruption when expression throws an Exception Summary: Use merged memory state for an allocation's slow path. Reviewed-by: never ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/macro.cpp + test/compiler/6795161/Test.java + test/compiler/6799693/Test.java Changeset: 91263420e1c6 Author: kvn Date: 2009-02-06 13:31 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/91263420e1c6 6791852: assert(b->_nodes[insidx] == n,"got insidx set incorrectly") Summary: Move the CreateEx up before each round of IFG construction Reviewed-by: never, phh ! src/share/vm/opto/block.cpp ! src/share/vm/opto/chaitin.cpp ! src/share/vm/opto/chaitin.hpp ! src/share/vm/opto/ifg.cpp ! src/share/vm/opto/live.cpp ! src/share/vm/opto/reg_split.cpp Changeset: bbef4344adb2 Author: twisti Date: 2009-02-13 09:09 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/bbef4344adb2 6800154: Add comments to long_by_long_mulhi() for better understandability Summary: This patch adds a comment pointing to the Hacker's Delight version of the algorithm plus a verbatim copy of it. Furthermore it adds inline comments. Reviewed-by: kvn, jrose ! src/share/vm/opto/divnode.cpp + test/compiler/6603011/Test.java + test/compiler/6800154/Test6800154.java Changeset: 30663ca5e8f4 Author: twisti Date: 2009-02-16 07:19 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/30663ca5e8f4 6805724: ModLNode::Ideal() generates functionally incorrect graph when divisor is any (2^k-1) constant. Summary: C2, ModLNode::Ideal() generates functionally incorrect graph when divisor is any (2^k-1) constant. Reviewed-by: rasbold ! src/share/vm/opto/divnode.cpp ! src/share/vm/utilities/globalDefinitions.hpp + test/compiler/6805724/Test6805724.java Changeset: 2cacccded90f Author: twisti Date: 2009-02-17 11:19 +0100 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/2cacccded90f 6805950: Typos in andL_rReg_imm instructions in x86_64.ad Summary: There are two typos in andL_rReg_imm instructions in x86_64.ad. Reviewed-by: kvn ! src/cpu/x86/vm/x86_64.ad Changeset: dca06e7f503d Author: kvn Date: 2009-02-17 14:30 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/dca06e7f503d Merge ! src/cpu/x86/vm/x86_32.ad ! src/share/vm/classfile/systemDictionary.cpp ! src/share/vm/opto/graphKit.cpp ! src/share/vm/opto/memnode.cpp ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/utilities/globalDefinitions.hpp Changeset: 6b7f6a17455e Author: trims Date: 2009-02-18 18:14 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/6b7f6a17455e Merge Changeset: 1605bb4eb5a7 Author: trims Date: 2009-02-18 18:20 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/1605bb4eb5a7 6807345: Bump HS15 build number to 02 Summary: Update the HS15 Build number to 02 Reviewed-by: jcoomes ! make/hotspot_version Changeset: 8b22ccb5aba2 Author: trims Date: 2009-02-25 23:16 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/8b22ccb5aba2 Merge Changeset: dae503d9f04c Author: xdono Date: 2009-02-26 10:57 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/dae503d9f04c Added tag jdk7-b49 for changeset 8b22ccb5aba2 ! .hgtags From mr at sun.com Sun Mar 1 23:07:42 2009 From: mr at sun.com (mr at sun.com) Date: Mon, 02 Mar 2009 07:07:42 +0000 Subject: hg: jigsaw/jigsaw/jaxp: Added tag jdk7-b49 for changeset 5c1f24531903 Message-ID: <20090302070745.085A1E572@hg.openjdk.java.net> Changeset: e8514e2be76d Author: xdono Date: 2009-02-26 10:57 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jaxp/rev/e8514e2be76d Added tag jdk7-b49 for changeset 5c1f24531903 ! .hgtags From mr at sun.com Sun Mar 1 23:09:09 2009 From: mr at sun.com (mr at sun.com) Date: Mon, 02 Mar 2009 07:09:09 +0000 Subject: hg: jigsaw/jigsaw/jaxws: Added tag jdk7-b49 for changeset 18ca864890f3 Message-ID: <20090302070911.CD194E579@hg.openjdk.java.net> Changeset: 5be52db581f1 Author: xdono Date: 2009-02-26 10:57 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jaxws/rev/5be52db581f1 Added tag jdk7-b49 for changeset 18ca864890f3 ! .hgtags From mr at sun.com Sun Mar 1 23:10:38 2009 From: mr at sun.com (mr at sun.com) Date: Mon, 02 Mar 2009 07:10:38 +0000 Subject: hg: jigsaw/jigsaw/jdk: 22 new changesets Message-ID: <20090302071506.A0E0BE580@hg.openjdk.java.net> Changeset: 383d6bebfba6 Author: xdono Date: 2009-02-26 10:57 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/383d6bebfba6 Added tag jdk7-b49 for changeset 8311105ea7a3 ! .hgtags Changeset: 40ce81649cd6 Author: poonam Date: 2009-02-10 03:26 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/40ce81649cd6 6755621: Include SA binaries into Windows JDK Summary: These changes will enable inclusion of sa-jdi.jar and sawindbg.dll into Windows JDK bundle. Reviewed-by: never, jjh, alanb ! make/common/Defs-windows.gmk Changeset: 043dfafc41a5 Author: chegar Date: 2009-02-11 13:16 +0000 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/043dfafc41a5 6799040: Portability issues in src/solaris/native/java/net/Inet4AddressImpl.c Reviewed-by: alanb Contributed-by: christos at zoulas.com ! src/solaris/native/java/net/Inet4AddressImpl.c ! src/solaris/native/java/net/Inet6AddressImpl.c Changeset: f06f30b29f36 Author: alanb Date: 2009-02-15 12:25 +0000 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/f06f30b29f36 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99 4313887: New I/O: Improved filesystem interface 4607272: New I/O: Support asynchronous I/O Reviewed-by: sherman, chegar ! make/docs/CORE_PKGS.gmk ! make/docs/NON_CORE_PKGS.gmk ! make/java/nio/Exportedfiles.gmk ! make/java/nio/FILES_c.gmk ! make/java/nio/FILES_java.gmk ! make/java/nio/Makefile ! make/java/nio/mapfile-linux ! make/java/nio/mapfile-solaris ! make/mksample/nio/Makefile + make/mksample/nio/file/Makefile + src/share/classes/com/sun/nio/file/ExtendedCopyOption.java + src/share/classes/com/sun/nio/file/ExtendedOpenOption.java + src/share/classes/com/sun/nio/file/ExtendedWatchEventModifier.java + src/share/classes/com/sun/nio/file/SensitivityWatchEventModifier.java ! src/share/classes/java/io/File.java ! src/share/classes/java/io/FilePermission.java ! src/share/classes/java/net/StandardProtocolFamily.java ! src/share/classes/java/net/StandardSocketOption.java + src/share/classes/java/nio/channels/AsynchronousByteChannel.java + src/share/classes/java/nio/channels/AsynchronousChannel.java + src/share/classes/java/nio/channels/AsynchronousChannelGroup.java + src/share/classes/java/nio/channels/AsynchronousDatagramChannel.java + src/share/classes/java/nio/channels/AsynchronousFileChannel.java + src/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java + src/share/classes/java/nio/channels/AsynchronousSocketChannel.java ! src/share/classes/java/nio/channels/Channels.java + src/share/classes/java/nio/channels/CompletionHandler.java ! src/share/classes/java/nio/channels/DatagramChannel.java ! src/share/classes/java/nio/channels/FileChannel.java ! src/share/classes/java/nio/channels/FileLock.java ! src/share/classes/java/nio/channels/MembershipKey.java ! src/share/classes/java/nio/channels/MulticastChannel.java ! src/share/classes/java/nio/channels/NetworkChannel.java + src/share/classes/java/nio/channels/SeekableByteChannel.java ! src/share/classes/java/nio/channels/ServerSocketChannel.java ! src/share/classes/java/nio/channels/SocketChannel.java ! src/share/classes/java/nio/channels/exceptions ! src/share/classes/java/nio/channels/package-info.java + src/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java ! src/share/classes/java/nio/channels/spi/SelectorProvider.java ! src/share/classes/java/nio/channels/spi/package.html + src/share/classes/java/nio/file/AccessDeniedException.java + src/share/classes/java/nio/file/AccessMode.java + src/share/classes/java/nio/file/AtomicMoveNotSupportedException.java + src/share/classes/java/nio/file/ClosedDirectoryStreamException.java + src/share/classes/java/nio/file/ClosedFileSystemException.java + src/share/classes/java/nio/file/ClosedWatchServiceException.java + src/share/classes/java/nio/file/CopyOption.java + src/share/classes/java/nio/file/DirectoryNotEmptyException.java + src/share/classes/java/nio/file/DirectoryStream.java + src/share/classes/java/nio/file/DirectoryStreamFilters.java + src/share/classes/java/nio/file/FileAction.java + src/share/classes/java/nio/file/FileAlreadyExistsException.java + src/share/classes/java/nio/file/FileRef.java + src/share/classes/java/nio/file/FileStore.java + src/share/classes/java/nio/file/FileSystem.java + src/share/classes/java/nio/file/FileSystemAlreadyExistsException.java + src/share/classes/java/nio/file/FileSystemException.java + src/share/classes/java/nio/file/FileSystemNotFoundException.java + src/share/classes/java/nio/file/FileSystems.java + src/share/classes/java/nio/file/FileTreeWalker.java + src/share/classes/java/nio/file/FileVisitOption.java + src/share/classes/java/nio/file/FileVisitResult.java + src/share/classes/java/nio/file/FileVisitor.java + src/share/classes/java/nio/file/Files.java + src/share/classes/java/nio/file/InvalidPathException.java + src/share/classes/java/nio/file/LinkOption.java + src/share/classes/java/nio/file/LinkPermission.java + src/share/classes/java/nio/file/NoSuchFileException.java + src/share/classes/java/nio/file/NotDirectoryException.java + src/share/classes/java/nio/file/NotLinkException.java + src/share/classes/java/nio/file/OpenOption.java + src/share/classes/java/nio/file/Path.java + src/share/classes/java/nio/file/PathMatcher.java + src/share/classes/java/nio/file/Paths.java + src/share/classes/java/nio/file/ProviderMismatchException.java + src/share/classes/java/nio/file/ProviderNotFoundException.java + src/share/classes/java/nio/file/ReadOnlyFileSystemException.java + src/share/classes/java/nio/file/SecureDirectoryStream.java + src/share/classes/java/nio/file/SimpleFileVisitor.java + src/share/classes/java/nio/file/StandardCopyOption.java + src/share/classes/java/nio/file/StandardOpenOption.java + src/share/classes/java/nio/file/StandardWatchEventKind.java + src/share/classes/java/nio/file/WatchEvent.java + src/share/classes/java/nio/file/WatchKey.java + src/share/classes/java/nio/file/WatchService.java + src/share/classes/java/nio/file/Watchable.java + src/share/classes/java/nio/file/attribute/AclEntry.java + src/share/classes/java/nio/file/attribute/AclEntryFlag.java + src/share/classes/java/nio/file/attribute/AclEntryPermission.java + src/share/classes/java/nio/file/attribute/AclEntryType.java + src/share/classes/java/nio/file/attribute/AclFileAttributeView.java + src/share/classes/java/nio/file/attribute/AttributeView.java + src/share/classes/java/nio/file/attribute/Attributes.java + src/share/classes/java/nio/file/attribute/BasicFileAttributeView.java + src/share/classes/java/nio/file/attribute/BasicFileAttributes.java + src/share/classes/java/nio/file/attribute/DosFileAttributeView.java + src/share/classes/java/nio/file/attribute/DosFileAttributes.java + src/share/classes/java/nio/file/attribute/FileAttribute.java + src/share/classes/java/nio/file/attribute/FileAttributeView.java + src/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java + src/share/classes/java/nio/file/attribute/FileStoreAttributeView.java + src/share/classes/java/nio/file/attribute/FileStoreSpaceAttributeView.java + src/share/classes/java/nio/file/attribute/FileStoreSpaceAttributes.java + src/share/classes/java/nio/file/attribute/GroupPrincipal.java + src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java + src/share/classes/java/nio/file/attribute/PosixFileAttributes.java + src/share/classes/java/nio/file/attribute/PosixFilePermission.java + src/share/classes/java/nio/file/attribute/PosixFilePermissions.java + src/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java + src/share/classes/java/nio/file/attribute/UserPrincipal.java + src/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java + src/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java + src/share/classes/java/nio/file/attribute/package-info.java + src/share/classes/java/nio/file/package-info.java + src/share/classes/java/nio/file/spi/AbstractPath.java + src/share/classes/java/nio/file/spi/FileSystemProvider.java + src/share/classes/java/nio/file/spi/FileTypeDetector.java + src/share/classes/java/nio/file/spi/package-info.java ! src/share/classes/java/util/Scanner.java + src/share/classes/sun/nio/ch/AbstractFuture.java + src/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java + src/share/classes/sun/nio/ch/AsynchronousFileChannelImpl.java + src/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java + src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java + src/share/classes/sun/nio/ch/Cancellable.java + src/share/classes/sun/nio/ch/CompletedFuture.java ! src/share/classes/sun/nio/ch/DatagramChannelImpl.java ! src/share/classes/sun/nio/ch/ExtendedSocketOption.java ! src/share/classes/sun/nio/ch/FileChannelImpl.java + src/share/classes/sun/nio/ch/FileDispatcher.java ! src/share/classes/sun/nio/ch/FileLockImpl.java + src/share/classes/sun/nio/ch/FileLockTable.java + src/share/classes/sun/nio/ch/Groupable.java ! src/share/classes/sun/nio/ch/IOUtil.java + src/share/classes/sun/nio/ch/Invoker.java ! src/share/classes/sun/nio/ch/MembershipKeyImpl.java ! src/share/classes/sun/nio/ch/MembershipRegistry.java ! src/share/classes/sun/nio/ch/NativeThreadSet.java ! src/share/classes/sun/nio/ch/Net.java ! src/share/classes/sun/nio/ch/OptionKey.java + src/share/classes/sun/nio/ch/PendingFuture.java ! src/share/classes/sun/nio/ch/Reflect.java ! src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java + src/share/classes/sun/nio/ch/SimpleAsynchronousDatagramChannelImpl.java + src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java ! src/share/classes/sun/nio/ch/SocketChannelImpl.java + src/share/classes/sun/nio/ch/ThreadPool.java ! src/share/classes/sun/nio/ch/Util.java + src/share/classes/sun/nio/fs/AbstractAclFileAttributeView.java + src/share/classes/sun/nio/fs/AbstractBasicFileAttributeView.java + src/share/classes/sun/nio/fs/AbstractFileStoreSpaceAttributeView.java + src/share/classes/sun/nio/fs/AbstractFileTypeDetector.java + src/share/classes/sun/nio/fs/AbstractPoller.java + src/share/classes/sun/nio/fs/AbstractUserDefinedFileAttributeView.java + src/share/classes/sun/nio/fs/AbstractWatchKey.java + src/share/classes/sun/nio/fs/AbstractWatchService.java + src/share/classes/sun/nio/fs/Cancellable.java + src/share/classes/sun/nio/fs/FileOwnerAttributeViewImpl.java + src/share/classes/sun/nio/fs/Globs.java + src/share/classes/sun/nio/fs/MimeType.java + src/share/classes/sun/nio/fs/NativeBuffer.java + src/share/classes/sun/nio/fs/NativeBuffers.java + src/share/classes/sun/nio/fs/PollingWatchService.java + src/share/classes/sun/nio/fs/Reflect.java ! src/share/classes/sun/security/util/SecurityConstants.java ! src/share/native/sun/nio/ch/genSocketOptionRegistry.c + src/share/sample/nio/file/AclEdit.java + src/share/sample/nio/file/Chmod.java + src/share/sample/nio/file/Copy.java + src/share/sample/nio/file/DiskUsage.java + src/share/sample/nio/file/FileType.java + src/share/sample/nio/file/WatchDir.java + src/share/sample/nio/file/Xdd.java ! src/solaris/classes/sun/nio/ch/DatagramDispatcher.java + src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java ! src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java ! src/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java + src/solaris/classes/sun/nio/ch/EPoll.java ! src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java + src/solaris/classes/sun/nio/ch/EPollPort.java ! src/solaris/classes/sun/nio/ch/EPollSelectorImpl.java - src/solaris/classes/sun/nio/ch/FileDispatcher.java + src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java + src/solaris/classes/sun/nio/ch/LinuxAsynchronousChannelProvider.java ! src/solaris/classes/sun/nio/ch/PollSelectorImpl.java + src/solaris/classes/sun/nio/ch/Port.java ! src/solaris/classes/sun/nio/ch/SinkChannelImpl.java ! src/solaris/classes/sun/nio/ch/SocketDispatcher.java + src/solaris/classes/sun/nio/ch/SolarisAsynchronousChannelProvider.java + src/solaris/classes/sun/nio/ch/SolarisEventPort.java ! src/solaris/classes/sun/nio/ch/SourceChannelImpl.java + src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java + src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java + src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java + src/solaris/classes/sun/nio/fs/DefaultFileTypeDetector.java + src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java + src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java + src/solaris/classes/sun/nio/fs/LinuxFileStore.java + src/solaris/classes/sun/nio/fs/LinuxFileSystem.java + src/solaris/classes/sun/nio/fs/LinuxFileSystemProvider.java + src/solaris/classes/sun/nio/fs/LinuxNativeDispatcher.java + src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java + src/solaris/classes/sun/nio/fs/LinuxWatchService.java + src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java + src/solaris/classes/sun/nio/fs/SolarisFileStore.java + src/solaris/classes/sun/nio/fs/SolarisFileSystem.java + src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java + src/solaris/classes/sun/nio/fs/SolarisNativeDispatcher.java + src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java + src/solaris/classes/sun/nio/fs/SolarisWatchService.java + src/solaris/classes/sun/nio/fs/UnixChannelFactory.java + src/solaris/classes/sun/nio/fs/UnixCopyFile.java + src/solaris/classes/sun/nio/fs/UnixDirectoryStream.java + src/solaris/classes/sun/nio/fs/UnixException.java + src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java + src/solaris/classes/sun/nio/fs/UnixFileAttributes.java + src/solaris/classes/sun/nio/fs/UnixFileKey.java + src/solaris/classes/sun/nio/fs/UnixFileModeAttribute.java + src/solaris/classes/sun/nio/fs/UnixFileStore.java + src/solaris/classes/sun/nio/fs/UnixFileStoreAttributes.java + src/solaris/classes/sun/nio/fs/UnixFileSystem.java + src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java + src/solaris/classes/sun/nio/fs/UnixMountEntry.java + src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java + src/solaris/classes/sun/nio/fs/UnixPath.java + src/solaris/classes/sun/nio/fs/UnixSecureDirectoryStream.java + src/solaris/classes/sun/nio/fs/UnixUriUtils.java + src/solaris/classes/sun/nio/fs/UnixUserPrincipals.java + src/solaris/native/sun/nio/ch/EPoll.c + src/solaris/native/sun/nio/ch/EPollPort.c ! src/solaris/native/sun/nio/ch/FileChannelImpl.c - src/solaris/native/sun/nio/ch/FileDispatcher.c + src/solaris/native/sun/nio/ch/FileDispatcherImpl.c ! src/solaris/native/sun/nio/ch/SocketDispatcher.c + src/solaris/native/sun/nio/ch/SolarisEventPort.c + src/solaris/native/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.c + src/solaris/native/sun/nio/ch/UnixAsynchronousSocketChannelImpl.c + src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c + src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c + src/solaris/native/sun/nio/fs/LinuxWatchService.c + src/solaris/native/sun/nio/fs/SolarisNativeDispatcher.c + src/solaris/native/sun/nio/fs/SolarisWatchService.c + src/solaris/native/sun/nio/fs/UnixCopyFile.c + src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c + src/solaris/native/sun/nio/fs/genSolarisConstants.c + src/solaris/native/sun/nio/fs/genUnixConstants.c + src/windows/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java - src/windows/classes/sun/nio/ch/FileDispatcher.java + src/windows/classes/sun/nio/ch/FileDispatcherImpl.java + src/windows/classes/sun/nio/ch/Iocp.java + src/windows/classes/sun/nio/ch/PendingIoCache.java + src/windows/classes/sun/nio/ch/WindowsAsynchronousChannelProvider.java + src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java + src/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java + src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java + src/windows/classes/sun/nio/fs/DefaultFileSystemProvider.java + src/windows/classes/sun/nio/fs/DefaultFileTypeDetector.java + src/windows/classes/sun/nio/fs/RegistryFileTypeDetector.java + src/windows/classes/sun/nio/fs/WindowsAclFileAttributeView.java + src/windows/classes/sun/nio/fs/WindowsChannelFactory.java + src/windows/classes/sun/nio/fs/WindowsConstants.java + src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java + src/windows/classes/sun/nio/fs/WindowsException.java + src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java + src/windows/classes/sun/nio/fs/WindowsFileAttributes.java + src/windows/classes/sun/nio/fs/WindowsFileCopy.java + src/windows/classes/sun/nio/fs/WindowsFileStore.java + src/windows/classes/sun/nio/fs/WindowsFileSystem.java + src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java + src/windows/classes/sun/nio/fs/WindowsLinkSupport.java + src/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java + src/windows/classes/sun/nio/fs/WindowsPath.java + src/windows/classes/sun/nio/fs/WindowsPathParser.java + src/windows/classes/sun/nio/fs/WindowsPathType.java + src/windows/classes/sun/nio/fs/WindowsSecurity.java + src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java + src/windows/classes/sun/nio/fs/WindowsUriSupport.java + src/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java + src/windows/classes/sun/nio/fs/WindowsUserPrincipals.java + src/windows/classes/sun/nio/fs/WindowsWatchService.java ! src/windows/native/sun/nio/ch/FileChannelImpl.c - src/windows/native/sun/nio/ch/FileDispatcher.c + src/windows/native/sun/nio/ch/FileDispatcherImpl.c + src/windows/native/sun/nio/ch/Iocp.c + src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c + src/windows/native/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.c + src/windows/native/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.c + src/windows/native/sun/nio/fs/RegistryFileTypeDetector.c + src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c + test/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java + test/java/nio/channels/AsynchronousChannelGroup/Attack.java + test/java/nio/channels/AsynchronousChannelGroup/BadProperties.java + test/java/nio/channels/AsynchronousChannelGroup/Basic.java + test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java + test/java/nio/channels/AsynchronousChannelGroup/Identity.java + test/java/nio/channels/AsynchronousChannelGroup/PrivilegedThreadFactory.java + test/java/nio/channels/AsynchronousChannelGroup/Restart.java + test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java + test/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh + test/java/nio/channels/AsynchronousDatagramChannel/Basic.java + test/java/nio/channels/AsynchronousFileChannel/Basic.java + test/java/nio/channels/AsynchronousFileChannel/CustomThreadPool.java + test/java/nio/channels/AsynchronousFileChannel/Lock.java + test/java/nio/channels/AsynchronousFileChannel/MyThreadFactory.java + test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java + test/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java + test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow + test/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny + test/java/nio/channels/AsynchronousSocketChannel/Basic.java + test/java/nio/channels/AsynchronousSocketChannel/Leaky.java + test/java/nio/channels/Channels/Basic2.java ! test/java/nio/channels/DatagramChannel/BasicMulticastTests.java ! test/java/nio/channels/DatagramChannel/SocketOptionTests.java ! test/java/nio/channels/ServerSocketChannel/SocketOptionTests.java ! test/java/nio/channels/SocketChannel/SocketOptionTests.java ! test/java/nio/channels/etc/NetworkChannelTests.java + test/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java + test/java/nio/channels/spi/AsynchronousChannelProvider/META-INF/services/java.nio.channels.spi.AsynchronousChannelProvider + test/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java + test/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java + test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh + test/java/nio/file/DirectoryStream/Basic.java + test/java/nio/file/DirectoryStream/Filters.java + test/java/nio/file/DirectoryStream/SecureDS.java + test/java/nio/file/FileStore/Basic.java + test/java/nio/file/FileSystem/Basic.java + test/java/nio/file/Files/ContentType.java + test/java/nio/file/Files/CreateFileTree.java + test/java/nio/file/Files/ForceLoad.java + test/java/nio/file/Files/META-INF/services/java.nio.file.spi.FileTypeDetector + test/java/nio/file/Files/Misc.java + test/java/nio/file/Files/PrintFileTree.java + test/java/nio/file/Files/SimpleFileTypeDetector.java + test/java/nio/file/Files/SkipSiblings.java + test/java/nio/file/Files/TerminateWalk.java + test/java/nio/file/Files/content_type.sh + test/java/nio/file/Files/walk_file_tree.sh + test/java/nio/file/Path/CopyAndMove.java + test/java/nio/file/Path/DeleteOnClose.java + test/java/nio/file/Path/InterruptCopy.java + test/java/nio/file/Path/Links.java + test/java/nio/file/Path/Misc.java + test/java/nio/file/Path/PathOps.java + test/java/nio/file/Path/SBC.java + test/java/nio/file/Path/TemporaryFiles.java + test/java/nio/file/Path/UriImportExport.java + test/java/nio/file/Path/delete_on_close.sh + test/java/nio/file/Path/temporary_files.sh + test/java/nio/file/PathMatcher/Basic.java + test/java/nio/file/TestUtil.java + test/java/nio/file/WatchService/Basic.java + test/java/nio/file/WatchService/FileTreeModifier.java + test/java/nio/file/WatchService/SensitivityModifier.java + test/java/nio/file/WatchService/WithSecurityManager.java + test/java/nio/file/WatchService/denyAll.policy + test/java/nio/file/WatchService/grantDirAndOneLevel.policy + test/java/nio/file/WatchService/grantDirAndTree.policy + test/java/nio/file/WatchService/grantDirOnly.policy + test/java/nio/file/attribute/AclFileAttributeView/Basic.java + test/java/nio/file/attribute/Attributes/Basic.java + test/java/nio/file/attribute/BasicFileAttributeView/Basic.java + test/java/nio/file/attribute/DosFileAttributeView/Basic.java + test/java/nio/file/attribute/FileStoreAttributeView/Basic.java + test/java/nio/file/attribute/PosixFileAttributeView/Basic.java + test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java + test/java/nio/file/spi/SetDefaultProvider.java + test/java/nio/file/spi/TestProvider.java Changeset: f8a9a7aff362 Author: chegar Date: 2009-02-16 17:19 +0000 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/f8a9a7aff362 6800805: java.net.NetworkInterface.getNetworkInterfaces() does not list IPv6 network interfaces correctly Reviewed-by: jccollet ! src/solaris/native/java/net/NetworkInterface.c Changeset: 1109646be6f6 Author: tbell Date: 2009-02-19 18:04 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/1109646be6f6 Merge - src/solaris/classes/sun/nio/ch/FileDispatcher.java - src/solaris/native/sun/nio/ch/FileDispatcher.c - src/windows/classes/sun/nio/ch/FileDispatcher.java - src/windows/native/sun/nio/ch/FileDispatcher.c Changeset: a144afafb6fe Author: xuelei Date: 2009-02-20 12:50 +0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/a144afafb6fe 4918870: Examine session cache implementation (sun.misc.Cache) Summary: replace sun.misc.Cache with sun.security.util.Cache Reviewed-by: weijun ! src/share/classes/sun/security/ssl/SSLSessionContextImpl.java ! src/share/classes/sun/security/util/Cache.java Changeset: 6bdbb2f5c763 Author: xuelei Date: 2009-02-20 13:05 +0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/6bdbb2f5c763 6697270: Inputstream dosent behave correct Summary: do not try to read zero byte from a InputStream, and do always return immediately for zero byte reading in a InputStream implementation. Reviewed-by: weijun ! src/share/classes/sun/security/ssl/AppInputStream.java ! src/share/classes/sun/security/ssl/AppOutputStream.java ! src/share/classes/sun/security/ssl/ByteBufferInputStream.java + test/sun/security/ssl/com/sun/net/ssl/internal/ssl/AppInputStream/ReadZeroBytes.java Changeset: 7443278199cb Author: tbell Date: 2009-02-20 10:53 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/7443278199cb Merge Changeset: 9b1bc2e28518 Author: weijun Date: 2009-02-23 10:03 +0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/9b1bc2e28518 6535697: keytool can be more flexible on format of PEM-encoded X.509 certificates Reviewed-by: vinnie ! src/share/classes/sun/security/provider/X509Factory.java ! test/java/security/cert/CertificateFactory/BadX509CertData.java + test/java/security/cert/CertificateFactory/openssl/OpenSSLCert.java + test/java/security/cert/CertificateFactory/openssl/open + test/java/security/cert/CertificateFactory/openssl/pem Changeset: 33bc32405045 Author: weijun Date: 2009-02-23 10:04 +0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/33bc32405045 6789935: cross-realm capath search error Reviewed-by: xuelei ! src/share/classes/sun/security/krb5/Realm.java + test/sun/security/krb5/ParseCAPaths.java + test/sun/security/krb5/krb5-capaths.conf Changeset: ec98d5f9b338 Author: weijun Date: 2009-02-23 10:04 +0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/ec98d5f9b338 6804045: DerValue does not accept empty OCTET STRING Reviewed-by: xuelei ! src/share/classes/sun/security/util/DerValue.java + test/sun/security/util/DerValue/EmptyValue.java Changeset: 8edcd68fb6ac Author: weijun Date: 2009-02-23 10:05 +0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/8edcd68fb6ac 6803376: BasicConstraintsExtension does not encode when (ca==false && pathLen<0) Reviewed-by: xuelei ! src/share/classes/sun/security/x509/BasicConstraintsExtension.java + test/sun/security/x509/Extensions/BCNull.java Changeset: 90ab7b4891e3 Author: weijun Date: 2009-02-23 10:05 +0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/90ab7b4891e3 6780416: New keytool commands/options: -gencert, -printcertreq, -ext Reviewed-by: xuelei, mullan ! src/share/classes/sun/security/tools/KeyTool.java ! src/share/classes/sun/security/util/Resources.java ! src/share/classes/sun/security/x509/AccessDescription.java ! src/share/classes/sun/security/x509/AuthorityInfoAccessExtension.java ! src/share/classes/sun/security/x509/AuthorityKeyIdentifierExtension.java ! src/share/classes/sun/security/x509/CertAndKeyGen.java ! src/share/classes/sun/security/x509/CertificateExtensions.java ! src/share/classes/sun/security/x509/IssuerAlternativeNameExtension.java ! src/share/classes/sun/security/x509/OIDMap.java + src/share/classes/sun/security/x509/SubjectInfoAccessExtension.java ! test/sun/security/tools/keytool/KeyToolTest.java ! test/sun/security/tools/keytool/autotest.sh + test/sun/security/tools/keytool/standard.sh Changeset: 2a7c1a997102 Author: xuelei Date: 2009-02-23 17:32 +0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/2a7c1a997102 5067458: Loopback SSLSocketImpl createSocket is throwing an exception Summary: A null hostname should be regarded as a loopback address. Reviewed-by: weijun ! src/share/classes/sun/security/ssl/SSLSocketImpl.java + test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/LoopbackSSLSocket.java Changeset: 0f4497002345 Author: chegar Date: 2009-02-23 10:36 +0000 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/0f4497002345 6806649: synchronization bottleneck when constructing Thread subclasses Summary: Replace subclass audits synchronization with ConcurrentHashMap with weakly referenced Class keys Reviewed-by: peterjones, dholmes, martin ! src/share/classes/java/lang/Thread.java Changeset: 27e1141d436c Author: sherman Date: 2009-02-23 21:06 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/27e1141d436c 6350801: Add support for named (instead of numbered) capture groups in regular expression 6676425: Opensource unit/regression tests for java.util.regex Summary: Added "named capturing group" into regex. Moved most of reg/unit tests to openjdk. Reviewed-by: alanb, okutsu ! src/share/classes/java/util/regex/Matcher.java ! src/share/classes/java/util/regex/Pattern.java + test/java/util/regex/BMPTestCases.txt + test/java/util/regex/RegExTest.java + test/java/util/regex/SupplementaryTestCases.txt + test/java/util/regex/TestCases.txt Changeset: 910f9cceb0f8 Author: alanb Date: 2009-02-24 09:11 +0000 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/910f9cceb0f8 6808647: (file) Paths.get("C:").newDirectoryStream() iterates over Path elements with additional slash [win] 6808648: (file) Files.walkFileTree should obtain file attributes during iteration [win] Reviewed-by: sherman ! make/java/nio/FILES_java.gmk ! src/share/classes/java/nio/file/FileTreeWalker.java + src/share/classes/sun/nio/fs/BasicFileAttributesHolder.java ! src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java ! src/windows/classes/sun/nio/fs/WindowsFileAttributes.java ! src/windows/classes/sun/nio/fs/WindowsFileSystem.java ! src/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java ! src/windows/classes/sun/nio/fs/WindowsPath.java ! src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c + test/java/nio/file/DirectoryStream/DriveLetter.java Changeset: c7f39995fcf4 Author: alanb Date: 2009-02-24 11:31 +0000 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/c7f39995fcf4 6809132: (file) Javadoc style and consistency issues Reviewed-by: vinnie Contributed-by: cquinn at google.com ! src/share/classes/java/nio/file/AccessDeniedException.java ! src/share/classes/java/nio/file/AtomicMoveNotSupportedException.java ! src/share/classes/java/nio/file/DirectoryNotEmptyException.java ! src/share/classes/java/nio/file/DirectoryStream.java ! src/share/classes/java/nio/file/DirectoryStreamFilters.java ! src/share/classes/java/nio/file/FileAction.java ! src/share/classes/java/nio/file/FileAlreadyExistsException.java ! src/share/classes/java/nio/file/FileStore.java ! src/share/classes/java/nio/file/FileSystemAlreadyExistsException.java ! src/share/classes/java/nio/file/FileSystemException.java ! src/share/classes/java/nio/file/FileSystemNotFoundException.java ! src/share/classes/java/nio/file/FileSystems.java ! src/share/classes/java/nio/file/FileVisitor.java ! src/share/classes/java/nio/file/InvalidPathException.java ! src/share/classes/java/nio/file/LinkPermission.java ! src/share/classes/java/nio/file/NoSuchFileException.java ! src/share/classes/java/nio/file/NotDirectoryException.java ! src/share/classes/java/nio/file/NotLinkException.java ! src/share/classes/java/nio/file/Path.java ! src/share/classes/java/nio/file/PathMatcher.java ! src/share/classes/java/nio/file/Paths.java ! src/share/classes/java/nio/file/ProviderMismatchException.java ! src/share/classes/java/nio/file/ProviderNotFoundException.java ! src/share/classes/java/nio/file/SecureDirectoryStream.java ! src/share/classes/java/nio/file/SimpleFileVisitor.java ! src/share/classes/java/nio/file/WatchEvent.java ! src/share/classes/java/nio/file/WatchKey.java ! src/share/classes/java/nio/file/WatchService.java ! src/share/classes/java/nio/file/Watchable.java ! src/share/classes/java/nio/file/attribute/AclEntry.java ! src/share/classes/java/nio/file/attribute/AclFileAttributeView.java ! src/share/classes/java/nio/file/attribute/AttributeView.java ! src/share/classes/java/nio/file/attribute/BasicFileAttributeView.java ! src/share/classes/java/nio/file/attribute/BasicFileAttributes.java ! src/share/classes/java/nio/file/attribute/DosFileAttributeView.java ! src/share/classes/java/nio/file/attribute/DosFileAttributes.java ! src/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java ! src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java ! src/share/classes/java/nio/file/attribute/PosixFileAttributes.java ! src/share/classes/java/nio/file/attribute/PosixFilePermissions.java ! src/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java ! src/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java ! src/share/classes/java/nio/file/package-info.java Changeset: abe5e7125bd3 Author: alanb Date: 2009-02-24 11:33 +0000 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/abe5e7125bd3 Merge Changeset: dc237aecf7cf Author: kevinw Date: 2009-02-24 14:22 +0000 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/dc237aecf7cf 6599383: Unable to open zip files more than 2GB in size Reviewed-by: alanb ! src/share/native/java/util/zip/zip_util.c ! src/share/native/java/util/zip/zip_util.h + test/java/util/zip/ZipFile/LargeZipFile.java Changeset: 59e76cdc647a Author: tbell Date: 2009-02-27 10:53 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/59e76cdc647a Merge From mr at sun.com Sun Mar 1 23:16:31 2009 From: mr at sun.com (mr at sun.com) Date: Mon, 02 Mar 2009 07:16:31 +0000 Subject: hg: jigsaw/jigsaw/langtools: 9 new changesets Message-ID: <20090302071646.68E79E587@hg.openjdk.java.net> Changeset: cc69a0495ac5 Author: xdono Date: 2009-02-26 10:57 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/cc69a0495ac5 Added tag jdk7-b49 for changeset d17d927ad9bd ! .hgtags Changeset: 6ada6122dd4f Author: mcimadamore Date: 2009-02-13 11:57 +0000 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/6ada6122dd4f 6769027: Source line should be displayed immediately after the first diagnostic line Summary: Added support for customizing diagnostic output via API/command line flags Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java ! src/share/classes/com/sun/tools/javac/api/Messages.java ! src/share/classes/com/sun/tools/javac/main/OptionName.java ! src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java ! src/share/classes/com/sun/tools/javac/resources/compiler.properties ! src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java ! src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java ! src/share/classes/com/sun/tools/javac/util/LayoutCharacters.java ! src/share/classes/com/sun/tools/javac/util/Log.java ! src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java ! test/tools/javac/6304921/T6304921.out ! test/tools/javac/6668794/badClass/Test.java ! test/tools/javac/6668794/badSource/Test.out ! test/tools/javac/6758789/T6758789b.out + test/tools/javac/Diagnostics/6769027/T6769027.java + test/tools/javac/Diagnostics/6769027/tester.properties ! test/tools/javac/ExtendArray.out ! test/tools/javac/T5048776b.out ! test/tools/javac/T6214885a.out ! test/tools/javac/T6214885b.out ! test/tools/javac/T6230128.out ! test/tools/javac/annotations/6365854/test1.out ! test/tools/javac/cast/6557182/T6557182.out ! test/tools/javac/cast/6665356/T6665356.out ! test/tools/javac/cast/6795580/T6795580.out ! test/tools/javac/generics/6207386/T6207386.out ! test/tools/javac/generics/inference/6315770/T6315770.out ! test/tools/javac/generics/inference/6718364/T6718364.out ! test/tools/javac/generics/typevars/6680106/T6680106.out ! test/tools/javac/missingSuperRecovery/MissingSuperRecovery.out ! test/tools/javac/unicode/UnicodeNewline.out Changeset: d424ed561993 Author: bpatel Date: 2009-02-18 13:47 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/d424ed561993 6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form Reviewed-by: jjg ! src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java ! src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java ! src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java ! src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java ! src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java ! src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclet.xml + test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java + test/com/sun/javadoc/testSerializedFormDeprecationInfo/pkg1/C1.java + test/com/sun/javadoc/testSerializedFormDeprecationInfo/pkg1/C2.java + test/com/sun/javadoc/testSerializedFormDeprecationInfo/pkg1/C3.java Changeset: f4717c901346 Author: tbell Date: 2009-02-19 18:04 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/f4717c901346 Merge Changeset: dab918a1c907 Author: darcy Date: 2009-02-20 11:56 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/dab918a1c907 6460529: Provide mixin interfaces for getQualifiedName and getTypeParameters Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java ! src/share/classes/javax/lang/model/element/ExecutableElement.java ! src/share/classes/javax/lang/model/element/PackageElement.java + src/share/classes/javax/lang/model/element/Parameterizable.java + src/share/classes/javax/lang/model/element/QualifiedNameable.java ! src/share/classes/javax/lang/model/element/TypeElement.java Changeset: c4d3cbe3765a Author: tbell Date: 2009-02-21 09:58 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/c4d3cbe3765a Merge Changeset: 1a902c0eb3f9 Author: tbell Date: 2009-02-24 07:55 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/1a902c0eb3f9 Merge Changeset: 46f2f6ed96f1 Author: tbell Date: 2009-02-27 10:54 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/46f2f6ed96f1 Merge Changeset: 6817ef61007a Author: mr Date: 2009-03-01 22:54 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/6817ef61007a Automated merge with http://hg.openjdk.java.net/jdk7/jdk7/langtools ! src/share/classes/com/sun/tools/javac/resources/compiler.properties From Jonathan.Gibbons at Sun.COM Mon Mar 2 11:46:51 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Mon, 02 Mar 2009 11:46:51 -0800 Subject: module version query syntax Message-ID: <49AC37AB.4000504@sun.com> The syntax for module version queries includes support for ranges introduced by '(' and '[', but doesn't allow ',', so you can't write requires M@[1,2) without quoting the stuff after the @. Is this intentional? -- Jon From jonathan.gibbons at sun.com Mon Mar 2 12:08:38 2009 From: jonathan.gibbons at sun.com (jonathan.gibbons at sun.com) Date: Mon, 02 Mar 2009 20:08:38 +0000 Subject: hg: jigsaw/jigsaw/langtools: Support < = > as leading characters in module version string Message-ID: <20090302200840.182AAE5A6@hg.openjdk.java.net> Changeset: 58c073a08e44 Author: jjg Date: 2009-03-02 12:06 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/58c073a08e44 Support < = > as leading characters in module version string ! src/share/classes/com/sun/tools/javac/parser/Scanner.java + test/tools/javac/modules/ModuleVersionTest01.java From mr at sun.com Mon Mar 2 13:42:47 2009 From: mr at sun.com (Mark Reinhold) Date: Mon, 02 Mar 2009 13:42:47 -0800 Subject: module version query syntax In-Reply-To: jonathan.gibbons@sun.com; Mon, 02 Mar 2009 11:46:51 PST; <49AC37AB.4000504@sun.com> Message-ID: <20090302214247.F050F28E0EE@eggemoggin.niobe.net> > Date: Mon, 02 Mar 2009 11:46:51 -0800 > From: jonathan.gibbons at sun.com > The syntax for module version queries includes support for ranges > introduced by '(' and '[', but doesn't allow ',', so you can't write > requires M@[1,2) > without quoting the stuff after the @. > > Is this intentional? No, I doubt it. Looks like a bug. - Mark From Alex.Buckley at Sun.COM Mon Mar 2 13:56:20 2009 From: Alex.Buckley at Sun.COM (Alex Buckley) Date: Mon, 02 Mar 2009 13:56:20 -0800 Subject: module version query syntax In-Reply-To: <20090302214247.F050F28E0EE@eggemoggin.niobe.net> References: <20090302214247.F050F28E0EE@eggemoggin.niobe.net> Message-ID: <49AC5604.1050508@sun.com> Mark Reinhold wrote: >> Date: Mon, 02 Mar 2009 11:46:51 -0800 >> From: jonathan.gibbons at sun.com > >> The syntax for module version queries includes support for ranges >> introduced by '(' and '[', but doesn't allow ',', so you can't write >> requires M@[1,2) >> without quoting the stuff after the @. >> >> Is this intentional? > > No, I doubt it. Looks like a bug. If comma is allowed in the token after the @, then comma cannot also be used to separate module identities. In that case, a 'requires' clause could only take one module identity, a la 'import'. This may be a good thing. Semicolon is harder, since its role as end-of-statement is so well known. Dropping that to allow semicolons in version ranges, e.g. 1-3;5 to exclude v4, looks undesirable to me. I have not received any EG feedback in this area, and will bring up the dual meaning of comma+semicolon soon. Alex From mr at sun.com Mon Mar 2 14:49:37 2009 From: mr at sun.com (mr at sun.com) Date: Mon, 02 Mar 2009 22:49:37 +0000 Subject: hg: jigsaw/jigsaw/jdk: Disable jcheck Message-ID: <20090302225000.63EAFE5C2@hg.openjdk.java.net> Changeset: 4bcdf21e751e Author: mr Date: 2009-03-02 14:47 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/4bcdf21e751e Disable jcheck - .jcheck/conf From mr at sun.com Mon Mar 2 15:08:41 2009 From: mr at sun.com (Mark Reinhold) Date: Mon, 02 Mar 2009 15:08:41 -0800 Subject: module version query syntax In-Reply-To: alex.buckley@sun.com; Mon, 02 Mar 2009 13:56:20 PST; <49AC5604.1050508@sun.com> Message-ID: <20090302230841.BE56E28E0EE@eggemoggin.niobe.net> > Date: Mon, 02 Mar 2009 13:56:20 -0800 > From: alex.buckley at sun.com > Mark Reinhold wrote: >>> Date: Mon, 02 Mar 2009 11:46:51 -0800 >>> From: jonathan.gibbons at sun.com >> >>> The syntax for module version queries includes support for ranges >>> introduced by '(' and '[', but doesn't allow ',', so you can't write >>> requires M@[1,2) >>> without quoting the stuff after the @. >>> >>> Is this intentional? >> >> No, I doubt it. Looks like a bug. > > If comma is allowed in the token after the @, then comma cannot also be > used to separate module identities. Ouch. > In that case, a 'requires' clause > could only take one module identity, a la 'import'. This may be a good > thing. I suppose -- by analogy with "import". > Semicolon is harder, since its role as end-of-statement is so well > known. Dropping that to allow semicolons in version ranges, e.g. 1-3;5 > to exclude v4, looks undesirable to me. Agreed. > I have not received any EG feedback in this area, and will bring up the > dual meaning of comma+semicolon soon. Okay, thanks. - Mark From Jonathan.Gibbons at Sun.COM Mon Mar 2 15:34:37 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Mon, 02 Mar 2009 15:34:37 -0800 Subject: module version query syntax In-Reply-To: <20090302214247.F050F28E0EE@eggemoggin.niobe.net> References: <20090302214247.F050F28E0EE@eggemoggin.niobe.net> Message-ID: <49AC6D0D.10109@sun.com> I spoke to Alex about it. There's a conflict; the syntax also suggests you should be able to go requires M at 1.0, N at 2.0; so for that, comma and semicolon have to be excluded from the version query string. -- Jon Mark Reinhold wrote: >> Date: Mon, 02 Mar 2009 11:46:51 -0800 >> From: jonathan.gibbons at sun.com >> > > >> The syntax for module version queries includes support for ranges >> introduced by '(' and '[', but doesn't allow ',', so you can't write >> requires M@[1,2) >> without quoting the stuff after the @. >> >> Is this intentional? >> > > No, I doubt it. Looks like a bug. > > - Mark > From mr at sun.com Mon Mar 2 15:40:17 2009 From: mr at sun.com (mr at sun.com) Date: Mon, 02 Mar 2009 23:40:17 +0000 Subject: hg: jigsaw/jigsaw/jdk: First cut: java.lang.module, org.openjdk.jigsaw, jmod Message-ID: <20090302234030.4AA33E5D7@hg.openjdk.java.net> Changeset: 2019a2812efb Author: mr Date: 2009-03-02 15:38 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/2019a2812efb First cut: java.lang.module, org.openjdk.jigsaw, jmod ! make/java/java/FILES_java.gmk ! make/launchers/Makefile ! make/org/Makefile + make/org/openjdk/Makefile + make/org/openjdk/jigsaw/Makefile + src/share/classes/java/lang/module/Dependence.java + src/share/classes/java/lang/module/ModuleId.java + src/share/classes/java/lang/module/ModuleIdQuery.java + src/share/classes/java/lang/module/ModuleInfo.java + src/share/classes/java/lang/module/ModuleInfoReader.java + src/share/classes/java/lang/module/ModuleSystem.java + src/share/classes/java/lang/module/Version.java + src/share/classes/java/lang/module/VersionQuery.java + src/share/classes/java/lang/module/package-info.java + src/share/classes/org/openjdk/internal/joptsimple/AbstractOptionSpec.java + src/share/classes/org/openjdk/internal/joptsimple/AlternativeLongOptionSpec.java + src/share/classes/org/openjdk/internal/joptsimple/ArgumentAcceptingOptionSpec.java + src/share/classes/org/openjdk/internal/joptsimple/ArgumentList.java + src/share/classes/org/openjdk/internal/joptsimple/HelpFormatter.java + src/share/classes/org/openjdk/internal/joptsimple/IllegalOptionClusterException.java + src/share/classes/org/openjdk/internal/joptsimple/IllegalOptionSpecificationException.java + src/share/classes/org/openjdk/internal/joptsimple/MultipleArgumentsForOptionException.java + src/share/classes/org/openjdk/internal/joptsimple/NoArgumentOptionSpec.java + src/share/classes/org/openjdk/internal/joptsimple/OptionArgumentConversionException.java + src/share/classes/org/openjdk/internal/joptsimple/OptionException.java + src/share/classes/org/openjdk/internal/joptsimple/OptionMissingRequiredArgumentException.java + src/share/classes/org/openjdk/internal/joptsimple/OptionParser.java + src/share/classes/org/openjdk/internal/joptsimple/OptionParserState.java + src/share/classes/org/openjdk/internal/joptsimple/OptionSet.java + src/share/classes/org/openjdk/internal/joptsimple/OptionSpec.java + src/share/classes/org/openjdk/internal/joptsimple/OptionSpecBuilder.java + src/share/classes/org/openjdk/internal/joptsimple/OptionSpecTokenizer.java + src/share/classes/org/openjdk/internal/joptsimple/OptionSpecVisitor.java + src/share/classes/org/openjdk/internal/joptsimple/OptionalArgumentOptionSpec.java + src/share/classes/org/openjdk/internal/joptsimple/ParserRules.java + src/share/classes/org/openjdk/internal/joptsimple/RequiredArgumentOptionSpec.java + src/share/classes/org/openjdk/internal/joptsimple/UnrecognizedOptionException.java + src/share/classes/org/openjdk/internal/joptsimple/internal/AbbreviationMap.java + src/share/classes/org/openjdk/internal/joptsimple/internal/Classes.java + src/share/classes/org/openjdk/internal/joptsimple/internal/Column.java + src/share/classes/org/openjdk/internal/joptsimple/internal/ColumnWidthCalculator.java + src/share/classes/org/openjdk/internal/joptsimple/internal/ColumnarData.java + src/share/classes/org/openjdk/internal/joptsimple/internal/Reflection.java + src/share/classes/org/openjdk/internal/joptsimple/internal/ReflectionException.java + src/share/classes/org/openjdk/internal/joptsimple/internal/Strings.java + src/share/classes/org/openjdk/internal/joptsimple/internal/ValueConverter.java + src/share/classes/org/openjdk/internal/joptsimple/util/KeyValuePair.java + src/share/classes/org/openjdk/jigsaw/FileConstants.java + src/share/classes/org/openjdk/jigsaw/Files.java + src/share/classes/org/openjdk/jigsaw/JigsawModuleSystem.java + src/share/classes/org/openjdk/jigsaw/JigsawVersion.java + src/share/classes/org/openjdk/jigsaw/JigsawVersionQuery.java + src/share/classes/org/openjdk/jigsaw/Library.java + src/share/classes/org/openjdk/jigsaw/cli/Command.java + src/share/classes/org/openjdk/jigsaw/cli/Librarian.java + src/share/classes/org/openjdk/jigsaw/cli/package-info.java + src/share/classes/org/openjdk/jigsaw/package-info.java + test/java/lang/module/_ModuleId.java + test/java/lang/module/_ModuleInfoReader.java + test/java/lang/module/module-info.java + test/org/openjdk/jigsaw/_JigsawVersion.java + test/org/openjdk/jigsaw/_JigsawVersionQuery.java + test/org/openjdk/jigsaw/_Library.java + test/org/openjdk/jigsaw/cli/jmod-basic.sh + test/org/openjdk/jigsaw/eg/com/foo/bar/Main.java + test/org/openjdk/jigsaw/eg/com/foo/bar/module-info.java From mr at sun.com Mon Mar 2 16:00:44 2009 From: mr at sun.com (Mark Reinhold) Date: Mon, 02 Mar 2009 16:00:44 -0800 Subject: First cut: java.lang.module, org.openjdk.jigsaw, jmod Message-ID: <20090303000044.46DAE28E0EE@eggemoggin.niobe.net> I've just pushed a rough first cut of the above-named components. Javadoc (nearly comment-free at the moment, I'm afraid) is available here: http://cr.openjdk.java.net/~mr/jigsaw/api "jmod" is the command-line tool for manipulating module libraries. At the moment it can install modules, directly from a javac classes directory, and also list the modules in a library. See the unit tests in test/org/openjdk/jigsaw/cli for examples. I've integrated jopt-simple [1] for use in jmod as well as any other command-line tools we build. (Thanks to Paul Holser for writing such a clean, compact command-line parsing library!) - Mark [1] http://jopt-simple.sourceforge.net/ From Jonathan.Gibbons at Sun.COM Mon Mar 2 18:52:27 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Mon, 02 Mar 2009 18:52:27 -0800 Subject: First cut: java.lang.module, org.openjdk.jigsaw, jmod In-Reply-To: <20090303000044.46DAE28E0EE@eggemoggin.niobe.net> References: <20090303000044.46DAE28E0EE@eggemoggin.niobe.net> Message-ID: <9A9A8262-8442-421E-8AA5-A2DECDD09CB4@sun.com> While short term use of jopt-simple is fine, longer term it would represent a departure in style for our command line tools, to be using the GNU- style --long-option style of options. I'm not saying that's a bad thing, just a decision we should make deliberately. -- Jon On Mar 2, 2009, at 4:00 PM, Mark Reinhold wrote: > I've just pushed a rough first cut of the above-named components. > > Javadoc (nearly comment-free at the moment, I'm afraid) is available > here: > > http://cr.openjdk.java.net/~mr/jigsaw/api > > "jmod" is the command-line tool for manipulating module libraries. > At the moment it can install modules, directly from a javac classes > directory, and also list the modules in a library. See the unit > tests in test/org/openjdk/jigsaw/cli for examples. > > I've integrated jopt-simple [1] for use in jmod as well as any other > command-line tools we build. (Thanks to Paul Holser for writing such > a clean, compact command-line parsing library!) > > - Mark > > > [1] http://jopt-simple.sourceforge.net/ From mr at sun.com Mon Mar 2 20:18:01 2009 From: mr at sun.com (Mark Reinhold) Date: Mon, 02 Mar 2009 20:18:01 -0800 Subject: First cut: java.lang.module, org.openjdk.jigsaw, jmod In-Reply-To: jonathan.gibbons@sun.com; Mon, 02 Mar 2009 18:52:27 PST; <9A9A8262-8442-421E-8AA5-A2DECDD09CB4@sun.com> Message-ID: <20090303041801.111F27B98@callebaut.niobe.net> > Date: Mon, 02 Mar 2009 18:52:27 -0800 > From: jonathan.gibbons at sun.com > While short term use of jopt-simple is fine, longer term it would > represent a departure in style for our command line tools, to be using > the GNU- style --long-option style of options. I'm not saying that's a > bad thing, just a decision we should make deliberately. Consider it made. It's about time we entered the late-20th century with regard to command-line option syntax. Our present CLIs are such a wondrous hodgepodge of inconsistencies that I suspect few will notice that a new tool has an ever-so-slightly different syntax. At least this one will be more familiar to more people. jmod would not be the first CLI to blaze this particular trail. Have a look at $JAVA_HOME/bin/pack200 --help some time. - Mark From mr at sun.com Mon Mar 2 21:26:55 2009 From: mr at sun.com (Mark Reinhold) Date: Mon, 02 Mar 2009 21:26:55 -0800 Subject: ModuleClass In-Reply-To: jonathan.gibbons@sun.com; Mon, 02 Mar 2009 12:21:09 PST; <49AC3FB5.2020500@sun.com> Message-ID: <20090303052655.69EF0D06B@callebaut.niobe.net> > Date: Mon, 02 Mar 2009 12:21:09 -0800 > From: jonathan.gibbons at sun.com > I'm not seeing any issues with the ModuleClass attribute. See > highlighted text below, or else just search through this message for > [cC]lass. You're right. The "ModuleClass" attribute is making it into the .class file, but the ModuleInfoReader code is looking for a "ModuleMain" attribute. Fixing this in ModuleInfoReader isn't quite enough, though; it seems that the ModuleClass attribute's single parameter is a utf8 string rather than the binary name of a class, so in the end the following diff does the trick: @@ -114,7 +114,7 @@ private static final String MODULE_PROVIDES = "ModuleProvides"; private static final String MODULE_REQUIRES = "ModuleRequires"; private static final String MODULE_PERMITS = "ModulePermits"; - private static final String MODULE_MAIN = "ModuleMain"; + private static final String MODULE_MAIN = "ModuleClass"; private void readAttributes() throws IOException { int count = in.readUnsignedShort(); @@ -173,7 +173,7 @@ private void readModuleMain() throws IOException { int index = in.readUnsignedShort(); - mainClass = cpool.getClassName(index); + mainClass = cpool.getUtf8(index); } private static class ModuleInfoImpl I suspect we really want ModuleClass to name a class rather than just convey a plain utf8 string, so I'm loathe to commit the above patch except possibly as a temporary measure. Alex? - Mark From Jonathan.Gibbons at Sun.COM Tue Mar 3 07:54:39 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Tue, 03 Mar 2009 07:54:39 -0800 Subject: ModuleClass In-Reply-To: <20090303052655.69EF0D06B@callebaut.niobe.net> References: <20090303052655.69EF0D06B@callebaut.niobe.net> Message-ID: <10F99A30-2FC0-494B-8AF3-2ED7ED2131C1@Sun.COM> Point noted about the incorrect use of CONSTANT_Utf8 instead of CONSTANT_Class. I'll check that out. Also, if I recall correctly, that item is followed by an array of Utf8 strings representing an open ended set of flags/modifiers, similar to that used for the requires entry. If nothing else, you might need to skip over them if there is any info to follow. -- Jon On Mar 2, 2009, at 9:26 PM, Mark Reinhold wrote: >> Date: Mon, 02 Mar 2009 12:21:09 -0800 >> From: jonathan.gibbons at sun.com > >> I'm not seeing any issues with the ModuleClass attribute. See >> highlighted text below, or else just search through this message for >> [cC]lass. > > You're right. The "ModuleClass" attribute is making it into > the .class > file, but the ModuleInfoReader code is looking for a "ModuleMain" > attribute. > > Fixing this in ModuleInfoReader isn't quite enough, though; it seems > that > the ModuleClass attribute's single parameter is a utf8 string rather > than > the binary name of a class, so in the end the following diff does the > trick: > > @@ -114,7 +114,7 @@ > private static final String MODULE_PROVIDES = "ModuleProvides"; > private static final String MODULE_REQUIRES = "ModuleRequires"; > private static final String MODULE_PERMITS = "ModulePermits"; > - private static final String MODULE_MAIN = "ModuleMain"; > + private static final String MODULE_MAIN = "ModuleClass"; > > private void readAttributes() throws IOException { > int count = in.readUnsignedShort(); > @@ -173,7 +173,7 @@ > > private void readModuleMain() throws IOException { > int index = in.readUnsignedShort(); > - mainClass = cpool.getClassName(index); > + mainClass = cpool.getUtf8(index); > } > > private static class ModuleInfoImpl > > I suspect we really want ModuleClass to name a class rather than just > convey a plain utf8 string, so I'm loathe to commit the above patch > except possibly as a temporary measure. > > Alex? > > - Mark From mr at sun.com Tue Mar 3 09:21:06 2009 From: mr at sun.com (Mark Reinhold) Date: Tue, 03 Mar 2009 09:21:06 -0800 Subject: ModuleClass In-Reply-To: jonathan.gibbons@sun.com; Tue, 03 Mar 2009 07:54:39 PST; <10F99A30-2FC0-494B-8AF3-2ED7ED2131C1@Sun.COM> Message-ID: <20090303172106.87A6C28E0EE@eggemoggin.niobe.net> > Date: Tue, 03 Mar 2009 07:54:39 -0800 > From: jonathan.gibbons at sun.com > Point noted about the incorrect use of CONSTANT_Utf8 instead of > CONSTANT_Class. I'll check that out. Okay, thanks. > Also, if I recall correctly, > that item is followed by an array of Utf8 strings representing an open > ended set of flags/modifiers, similar to that used for the requires > entry. If nothing else, you might need to skip over them if there is > any info to follow. Hmm, didn't know that, and neither does the ModuleInfoReader code. I don't recall having discussed the need for modifiers in the main-class declaration. Do we have use cases? - Mark From Jonathan.Gibbons at Sun.COM Tue Mar 3 09:32:21 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Tue, 03 Mar 2009 09:32:21 -0800 Subject: ModuleClass In-Reply-To: <20090303172106.87A6C28E0EE@eggemoggin.niobe.net> References: <20090303172106.87A6C28E0EE@eggemoggin.niobe.net> Message-ID: <1FBE6156-A6A7-4774-B05A-8FE4CBA4D3AE@Sun.COM> Alex suggested adding it when I asked him for a spec of the ModuleClass attribute. At the time, the thought was to be able to mark the type of class, main class, applet etc. A more topical example, from a separate email thread going on now, would be to be able to mark a JavaFX class. [Kumar is working on changes to the launcher to make it capable of starting FX programs, given an FX main class.] So the ability to give simple attributes regarding the class appears somewhat reasonable. I guess the updated classfile spec got pre-empted by FOSDEM ;-) -- Jon On Mar 3, 2009, at 9:21 AM, Mark Reinhold wrote: >> Date: Tue, 03 Mar 2009 07:54:39 -0800 >> From: jonathan.gibbons at sun.com > >> Point noted about the incorrect use of CONSTANT_Utf8 instead of >> CONSTANT_Class. I'll check that out. > > Okay, thanks. > >> Also, if I recall correctly, >> that item is followed by an array of Utf8 strings representing an >> open >> ended set of flags/modifiers, similar to that used for the requires >> entry. If nothing else, you might need to skip over them if there is >> any info to follow. > > Hmm, didn't know that, and neither does the ModuleInfoReader code. > > I don't recall having discussed the need for modifiers in the main- > class > declaration. Do we have use cases? > > - Mark From Alex.Buckley at Sun.COM Tue Mar 3 11:47:03 2009 From: Alex.Buckley at Sun.COM (Alex Buckley) Date: Tue, 03 Mar 2009 11:47:03 -0800 Subject: ModuleClass In-Reply-To: <1FBE6156-A6A7-4774-B05A-8FE4CBA4D3AE@Sun.COM> References: <20090303172106.87A6C28E0EE@eggemoggin.niobe.net> <1FBE6156-A6A7-4774-B05A-8FE4CBA4D3AE@Sun.COM> Message-ID: <49AD8937.6020608@sun.com> Being able to put flags in the main class attribute would probably be worthwhile if multiple main class attributes were allowed: "Main class M is flagged as an FX 1.1 app", "Main class N is flagged as a bundle activator and can be assumed to implement interface...". However, I think for now one ModuleClass attribute is enough, pointing to a CONSTANT_Class_info, and without flags. The ModuleClass attribute is defined as follows: ModuleClass_attribute { u2 attribute_name_index; u4 attribute_length; u2 main_class; } attribute_name_index The value of the attribute_name_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info structure representing the string "ModuleClass". attribute_length The value of the attribute_length item is the length of the attribute excluding the initial six bytes. main_class The value of the main_class item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Class_info structure representing the name of the class which the host system should treat as the entrypoint to the module. Attached is an updated (+ tiny corrections) classfile spec. Alex Jonathan Gibbons wrote: > Alex suggested adding it when I asked him for a spec of the ModuleClass > attribute. At the time, the thought was to be able to mark the type of > class, > main class, applet etc. A more topical example, from a separate email > thread going on now, would be to be able to mark a JavaFX class. > [Kumar is working on changes to the launcher to make it capable of > starting FX programs, given an FX main class.] So the ability to give > simple attributes regarding the class appears somewhat reasonable. > > I guess the updated classfile spec got pre-empted by FOSDEM ;-) > > -- Jon > > > On Mar 3, 2009, at 9:21 AM, Mark Reinhold wrote: > >>> Date: Tue, 03 Mar 2009 07:54:39 -0800 >>> From: jonathan.gibbons at sun.com >> >>> Point noted about the incorrect use of CONSTANT_Utf8 instead of >>> CONSTANT_Class. I'll check that out. >> >> Okay, thanks. >> >>> Also, if I recall correctly, >>> that item is followed by an array of Utf8 strings representing an open >>> ended set of flags/modifiers, similar to that used for the requires >>> entry. If nothing else, you might need to skip over them if there is >>> any info to follow. >> >> Hmm, didn't know that, and neither does the ModuleInfoReader code. >> >> I don't recall having discussed the need for modifiers in the main-class >> declaration. Do we have use cases? >> >> - Mark > From Jonathan.Gibbons at Sun.COM Tue Mar 3 11:54:16 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Tue, 03 Mar 2009 11:54:16 -0800 Subject: ModuleClass In-Reply-To: <49AD8937.6020608@sun.com> References: <20090303172106.87A6C28E0EE@eggemoggin.niobe.net> <1FBE6156-A6A7-4774-B05A-8FE4CBA4D3AE@Sun.COM> <49AD8937.6020608@sun.com> Message-ID: NOOOOOOOOOOOOOO. Please stop gratuitous changing of the spec like this! I guess I distrust a spec that includes the words "For now". -- Jon On Mar 3, 2009, at 11:47 AM, Alex Buckley wrote: > Being able to put flags in the main class attribute would probably > be worthwhile if multiple main class attributes were allowed: "Main > class M is flagged as an FX 1.1 app", "Main class N is flagged as a > bundle activator and can be assumed to implement interface...". > > However, I think for now one ModuleClass attribute is enough, > pointing to a CONSTANT_Class_info, and without flags. > > The ModuleClass attribute is defined as follows: > > ModuleClass_attribute { > u2 attribute_name_index; > u4 attribute_length; > u2 main_class; > } > > attribute_name_index > The value of the attribute_name_index item must be a valid index > into the constant_pool table. The constant_pool entry at that index > must be a CONSTANT_Utf8_info structure representing the string > "ModuleClass". > > attribute_length > The value of the attribute_length item is the length of the > attribute excluding the initial six bytes. > > main_class > The value of the main_class item must be a valid index into the > constant_pool table. The constant_pool entry at that index must be a > CONSTANT_Class_info structure representing the name of the class > which the host system should treat as the entrypoint to the module. > > Attached is an updated (+ tiny corrections) classfile spec. > > Alex > > Jonathan Gibbons wrote: >> Alex suggested adding it when I asked him for a spec of the >> ModuleClass >> attribute. At the time, the thought was to be able to mark the >> type of class, >> main class, applet etc. A more topical example, from a separate >> email >> thread going on now, would be to be able to mark a JavaFX class. >> [Kumar is working on changes to the launcher to make it capable of >> starting FX programs, given an FX main class.] So the ability to give >> simple attributes regarding the class appears somewhat reasonable. >> I guess the updated classfile spec got pre-empted by FOSDEM ;-) >> -- Jon >> On Mar 3, 2009, at 9:21 AM, Mark Reinhold wrote: >>>> Date: Tue, 03 Mar 2009 07:54:39 -0800 >>>> From: jonathan.gibbons at sun.com >>> >>>> Point noted about the incorrect use of CONSTANT_Utf8 instead of >>>> CONSTANT_Class. I'll check that out. >>> >>> Okay, thanks. >>> >>>> Also, if I recall correctly, >>>> that item is followed by an array of Utf8 strings representing an >>>> open >>>> ended set of flags/modifiers, similar to that used for the requires >>>> entry. If nothing else, you might need to skip over them if there >>>> is >>>> any info to follow. >>> >>> Hmm, didn't know that, and neither does the ModuleInfoReader code. >>> >>> I don't recall having discussed the need for modifiers in the main- >>> class >>> declaration. Do we have use cases? >>> >>> - Mark > ClassFile changes in v51.0 for Modules > > Access flags > > Module-private accessibility is expressed with a new access_flags > flag, ACC_MODULE, value 0x8000, description: "Declared module; may > not be accessed from outside its module. May only be set if the > ClassFile has a Module attribute." The flag appears in JVMS 4.1 > (ClassFile.access_flags), 4.5 (field_info.access_flags), and 4.6 > (method_info.access_flags), which gain the following rules: > 4.1 > At most one of the ACC_MODULE and ACC_PUBLIC flags may be set (JLS3 > ?6.6.1). > 4.5 > Fields of classes may set any of the flags in Table 4.4. However, a > specific field of a class may have at most one of its ACC_PRIVATE, > ACC_PROTECTED, ACC_MODULE, and ACC_PUBLIC flags set (JLS3 ?8.3.1) > and must not have both its ACC_FINAL and ACC_VOLATILE flags set > (JLS3 ?8.3.1.4). > All fields of interfaces must have their ACC_STATIC and ACC_FINAL > and either ACC_PUBLIC or ACC_MODULE flags set; they may have their > ACC_SYNTHETIC flag set and must not have any of the other flags in > Table 4.4 set (JLS3 ?9.3). > 4.6 > Methods of classes may set any of the flags in Table 4.5. However, a > specific method of a class may have at most one of its ACC_PRIVATE, > ACC_PROTECTED, ACC_MODULE, and ACC_PUBLIC flags set (JLS3 ?8.4.3). > All interface methods must have their ACC_ABSTRACT and either > ACC_PUBLIC or ACC_MODULE flags set; they may have their ACC_VARARGS, > ACC_BRIDGE and ACC_SYNTHETIC flags set and must not have any of the > other flags in Table 4.5 set (JLS3 ?9.4). > A specific instance initialization method (?3.9) may have at most > one of its ACC_PRIVATE, ACC_PROTECTED, ACC_MODULE, and ACC_PUBLIC > flags set, and may also have its ACC_STRICT, ACC_VARARGS and > ACC_SYNTHETIC flags set, but must not have any of the other flags in > Table 4.5 set. > In the InnerClasses attribute's inner_class_access_flags table, > ACC_MODULE means "Marked module in source. May only be set if the > ClassFile has a Module attribute." > The ACC_PUBLIC flag in all access_flags is now defined as "Declared > public; may be accessed from outside its package or module." > > 4.8.21 The Module attribute > > The Module attribute is a fixed-length attribute in the attributes > table of a ClassFile (JVMS 4.1) structure. The Module attribute > records the named module (JLS 7.4.5) to which the class belongs. A > ClassFile structure without a Module attribute is considered to be a > member of the unnamed module (JLS 7.4.6). > There can be no more than one Module attribute in the attributes > table of a given ClassFile structure. A Module attribute may only > appear in a ClassFile structure that represents a class whose binary > name in internal form (as given by the constant pool entry > referenced by the name_index item of the CONSTANT_Class_info > structure referenced by ClassFile.this_class) is qualified, i.e. > contains at least one /. > > The Module attribute has the following format: > > Module_attribute { > u2 attribute_name_index; > u4 attribute_length; > u2 module_id_index; > } > The items of the Module_attribute structure are as follows: > attribute_name_index > The value of the attribute_name_index item must be a valid index > into the constant_pool table. The constant_pool entry at that index > must be a CONSTANT_Utf8_info structure representing the string > "Module". > attribute_length > The value of the attribute_length item must be 2. > module_id_index > The value of the module_id_index item must be a valid index into the > constant_pool table. The constant_pool entry at that index must be a > CONSTANT_ModuleId_info structure representing the name and version > of the named module of which this ClassFile is a member. The module > name must be encoded in internal form (4.2.1). If the version_index > item of the CONSTANT_ModuleId_info structure is 0, then this > ClassFile is a member of any version of the module named by the > name_index item. > The CONSTANT_ModuleId_info structure has the following format: > CONSTANT_ModuleId_info { > u1 tag; > // 13 > u2 name_index; > // Points to a CONSTANT_Utf8_info representing module name > u2 version_index; > // Points to a CONSTANT_Utf8_info representing module version > } > The module-info.class file > > A module compilation unit (module-info.java) is compiled to a > ClassFile structure like any other compilation unit. It follows the > precedent set by compiling a package compilation unit (package- > info.java) which has been possible since Java 5.0. Since neither > compilation unit describes a class as such, the following > conventions are adopted for their ClassFile structures. > package-info.class > > major_version, minor_version: >=49.0 > this_class: [Package name in internal form (4.2.1)]/package-info > access_flags: v49: ACC_INTERFACE ACC_ABSTRACT >=v50: ACC_INTERFACE > ACC_ABSTRACT ACC_SYNTHETIC > super_class, interfaces_count, fields_count, methods_count: 0 > attributes: except for Module, SourceFile, RuntimeVisibleAnnotations > and RuntimeInvisibleAnnotations, none of the pre-defined attributes > in JVMS 4.7 may appear. > module-info.class > > major_version, minor_version: >=51.0 > this_class: [Module name in internal form (4.2.1)]/module-info > access_flags: ACC_INTERFACE ACC_ABSTRACT ACC_SYNTHETIC > attributes: One Module attribute must be present, for the module > name given in the this_class item. > super_class, interfaces_count, fields_count, methods_count: 0 > attributes: One Module attribute must be present, for the module > name given in the this_class item. At most one of each of the > ModuleRequires, ModulePermits, ModuleProvides, and ModuleClass > attributes must be present if the module has metadata. Except for > these attributes and SourceFile, RuntimeVisibleAnnotations, and > RuntimeInvisibleAnnotations, none of the pre-defined attributes in > JVMS 4.7 may appear. > A module name may be referenced by at most one entry in the > requires_table of a ModuleRequires attribute and at most one entry > in the permits_table of a ModulePermits attribute and at most one > entry in the provides_table of a ModuleProvides attribute of a > ClassFile. > Attributes for the module-info.class file > > The ModuleRequires attribute is defined as follows: > ModuleRequires_attribute { > u2 attribute_name_index; > u4 attribute_length; > u2 requires_length; > { u2 requires_index; u1 flags; } requires_table[requires_length]; > } > attribute_name_index > The value of the attribute_name_index item must be a valid index > into the constant_pool table. The constant_pool entry at that index > must be a CONSTANT_Utf8_info structure representing the string > "ModuleRequires". > attribute_length > The value of the attribute_length item is the length of the > attribute excluding the initial six bytes. > requires_length > The value of the requires_length indicates the number of entries in > the requires_table. > requires_table > Each requires_index must be a valid index into the constant_pool > table. The constant_pool entry at that index must be a > CONSTANT_ModuleId_info structure representing the target module on > which this module depends. > flags: 0x01 if this dependency on the target module is optional > flags: 0x02 if the target module's types must be loaded by the > same defining classloader as the > types of the module represented by this ClassFile > flags: 0x04 if the target module's public types are NOT observable to > types of the module represented by this ClassFile > The ModulePermits attribute is defined as follows: > ModulePermits_attribute { > u2 attribute_name_index; > u4 attribute_length; > u2 permits_length; > { u2 permits_index } permits_table[permits_length]; > } > attribute_name_index > The value of the attribute_name_index item must be a valid index > into the constant_pool table. The constant_pool entry at that index > must be a CONSTANT_Utf8_info structure representing the string > "ModulePermits". > attribute_length > The value of the attribute_length item is the length of the > attribute excluding the initial six bytes. > permits_length > The value of the permits_length indicates the number of entries in > the permits_table. > permits_table > The value of each permits_index in this item must be a valid index > into the constant_pool table. The constant_pool entry at that index > must be a CONSTANT_Utf8_info structure representing the name of a > module which is permitted by the host system to have a dependency on > the module represented by this ClassFile. > The ModuleProvides attribute is defined as follows: > ModuleProvides_attribute { > u2 attribute_name_index; > u4 attribute_length; > u2 provides_length; > { u2 provides_index; } provides_table[provides_length]; > } > attribute_name_index > The value of the attribute_name_index item must be a valid index > into the constant_pool table. The constant_pool entry at that index > must be a CONSTANT_Utf8_info structure representing the string > "ModuleProvides". > attribute_length > The value of the attribute_length item is the length of the > attribute excluding the initial six bytes. > provides_length > The value of the provides_length indicates the number of entries in > the provides_table. > provides_table > The value of each provides_index in this item must be a valid index > into the constant_pool table. The constant_pool entry at that index > must be a CONSTANT_ModuleId_info structure representing a module > identity that is an alias for the module represented by this > ClassFile. > The ModuleClass attribute is defined as follows: > ModuleClass_attribute { > u2 attribute_name_index; > u4 attribute_length; > u2 main_class; > } > attribute_name_index > The value of the attribute_name_index item must be a valid index > into the constant_pool table. The constant_pool entry at that index > must be a CONSTANT_Utf8_info structure representing the string > "ModuleClass". > attribute_length > The value of the attribute_length item is the length of the > attribute excluding the initial six bytes. > main_class > The value of the main_class item must be a valid index into the > constant_pool table. The constant_pool entry at that index must be a > CONSTANT_Class_info structure representing the name of the class > which the host system should treat as the entrypoint to the module. From Alex.Buckley at Sun.COM Tue Mar 3 12:10:49 2009 From: Alex.Buckley at Sun.COM (Alex Buckley) Date: Tue, 03 Mar 2009 12:10:49 -0800 Subject: ModuleClass In-Reply-To: References: <20090303172106.87A6C28E0EE@eggemoggin.niobe.net> <1FBE6156-A6A7-4774-B05A-8FE4CBA4D3AE@Sun.COM> <49AD8937.6020608@sun.com> Message-ID: <49AD8EC9.7080307@sun.com> I guess I should have been clearer: the spec section starts at "The ModuleClass attribute is defined as follows...". "For now" is certainly not in the spec! Nothing has changed. I wrote up ModuleClass in line with Mark's comment "I suspect we really want ModuleClass to name a class rather than just convey a plain utf8 string" and with ModuleInfoReader's current parsing. Alex Jonathan Gibbons wrote: > NOOOOOOOOOOOOOO. > > Please stop gratuitous changing of the spec like this! > > I guess I distrust a spec that includes the words "For now". > > -- Jon > > On Mar 3, 2009, at 11:47 AM, Alex Buckley wrote: > >> Being able to put flags in the main class attribute would probably be >> worthwhile if multiple main class attributes were allowed: "Main class >> M is flagged as an FX 1.1 app", "Main class N is flagged as a bundle >> activator and can be assumed to implement interface...". >> >> However, I think for now one ModuleClass attribute is enough, pointing >> to a CONSTANT_Class_info, and without flags. >> >> The ModuleClass attribute is defined as follows: >> >> ModuleClass_attribute { >> u2 attribute_name_index; >> u4 attribute_length; >> u2 main_class; >> } >> >> attribute_name_index >> The value of the attribute_name_index item must be a valid index >> into the constant_pool table. The constant_pool entry at that index >> must be a CONSTANT_Utf8_info structure representing the string >> "ModuleClass". >> >> attribute_length >> The value of the attribute_length item is the length of the >> attribute excluding the initial six bytes. >> >> main_class >> The value of the main_class item must be a valid index into the >> constant_pool table. The constant_pool entry at that index must be a >> CONSTANT_Class_info structure representing the name of the class which >> the host system should treat as the entrypoint to the module. >> >> Attached is an updated (+ tiny corrections) classfile spec. >> >> Alex >> >> Jonathan Gibbons wrote: >>> Alex suggested adding it when I asked him for a spec of the ModuleClass >>> attribute. At the time, the thought was to be able to mark the type >>> of class, >>> main class, applet etc. A more topical example, from a separate email >>> thread going on now, would be to be able to mark a JavaFX class. >>> [Kumar is working on changes to the launcher to make it capable of >>> starting FX programs, given an FX main class.] So the ability to give >>> simple attributes regarding the class appears somewhat reasonable. >>> I guess the updated classfile spec got pre-empted by FOSDEM ;-) >>> -- Jon >>> On Mar 3, 2009, at 9:21 AM, Mark Reinhold wrote: >>>>> Date: Tue, 03 Mar 2009 07:54:39 -0800 >>>>> From: jonathan.gibbons at sun.com >>>> >>>>> Point noted about the incorrect use of CONSTANT_Utf8 instead of >>>>> CONSTANT_Class. I'll check that out. >>>> >>>> Okay, thanks. >>>> >>>>> Also, if I recall correctly, >>>>> that item is followed by an array of Utf8 strings representing an open >>>>> ended set of flags/modifiers, similar to that used for the requires >>>>> entry. If nothing else, you might need to skip over them if there is >>>>> any info to follow. >>>> >>>> Hmm, didn't know that, and neither does the ModuleInfoReader code. >>>> >>>> I don't recall having discussed the need for modifiers in the main-class >>>> declaration. Do we have use cases? >>>> >>>> - Mark >> >> >> |ClassFile| changes in v51.0 for Modules >> >> >> Access flags >> >> Module-private accessibility is expressed with a new |access_flags| >> flag, |ACC_MODULE|, value 0x8000, description: "Declared |module|; may >> not be accessed from outside its module. May only be set if the >> |ClassFile| has a |Module| attribute." The flag appears in JVMS 4.1 >> (|ClassFile.access_flags|), 4.5 (|field_info.access_flags|), and 4.6 >> (|method_info.access_flags|), which gain the following rules: >> >> 4.1 >> *At most one of the |ACC_MODULE| and |ACC_PUBLIC| flags may be set >> (JLS3 ?6.6.1).* >> 4.5 >> Fields of classes may set any of the flags in Table 4.4. However, >> a specific field of a class may have at most one of its >> |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and |ACC_PUBLIC| >> flags set (JLS3 ?8.3.1) and must not have both its |ACC_FINAL| and >> |ACC_VOLATILE| flags set (JLS3 ?8.3.1.4). >> All fields of interfaces must have their |ACC_STATIC| and >> |ACC_FINAL| and *either |ACC_PUBLIC| or |ACC_MODULE|* flags set; >> they may have their |ACC_SYNTHETIC| flag set and must not have any >> of the other flags in Table 4.4 set (JLS3 ?9.3). >> 4.6 >> Methods of classes may set any of the flags in Table 4.5. However, >> a specific method of a class may have at most one of its >> |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and |ACC_PUBLIC| >> flags set (JLS3 ?8.4.3). >> All interface methods must have their |ACC_ABSTRACT| and *either >> |ACC_PUBLIC| or |ACC_MODULE|* flags set; they may have their >> |ACC_VARARGS|, |ACC_BRIDGE| and |ACC_SYNTHETIC| flags set and must >> not have any of the other flags in Table 4.5 set (JLS3 ?9.4). >> A specific instance initialization method (?3.9) may have at most >> one of its |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and >> |ACC_PUBLIC| flags set, and may also have its |ACC_STRICT|, >> |ACC_VARARGS| and |ACC_SYNTHETIC| flags set, but must not have any >> of the other flags in Table 4.5 set. >> >> In the |InnerClasses| attribute's |inner_class_access_flags| table, >> |ACC_MODULE| means "Marked |module| in source. May only be set if the >> |ClassFile| has a |Module| attribute." >> >> The |ACC_PUBLIC| flag in all |access_flags| is now defined as >> "Declared |public|; may be accessed from outside its package or module." >> >> >> 4.8.21 The |Module| attribute >> >> The |Module| attribute is a fixed-length attribute in the |attributes| >> table of a |ClassFile| (JVMS 4.1) structure. The |Module| attribute >> records the /named module/ (JLS 7.4.5) to which the class belongs. A >> |ClassFile| structure without a |Module| attribute is considered to be >> a member of the /unnamed module/ (JLS 7.4.6). >> >> There can be no more than one |Module| attribute in the |attributes| >> table of a given |ClassFile| structure. A |Module| attribute may only >> appear in a |ClassFile| structure that represents a class whose binary >> name in internal form (as given by the constant pool entry referenced >> by the |name_index| item of the |CONSTANT_Class_info| structure >> referenced by |ClassFile.this_class|) is qualified, i.e. contains at >> least one |/|. >> >> The |Module| attribute has the following format: >> >> Module_attribute { >> u2 attribute_name_index; >> u4 attribute_length; >> u2 module_id_index; >> } >> The items of the |Module_attribute| structure are as follows: >> >> |attribute_name_index| >> The value of the |attribute_name_index| item must be a valid index >> into the |constant_pool| table. The |constant_pool| entry at that >> index must be a |CONSTANT_Utf8_info| structure representing the >> string "Module". >> |attribute_length| >> The value of the |attribute_length| item must be 2. >> |module_id_index| >> The value of the |module_id_index| item must be a valid index into >> the |constant_pool| table. The |constant_pool| entry at that index >> must be a |CONSTANT_ModuleId_info| structure representing the name >> and version of the named module of which this |ClassFile| is a >> member. The module name must be encoded in internal form (4.2.1). >> If the |version_index| item of the |CONSTANT_ModuleId_info| >> structure is 0, then this |ClassFile| is a member of any version >> of the module named by the |name_index| item. >> >> The |CONSTANT_ModuleId_info| structure has the following format: >> CONSTANT_ModuleId_info { >> u1 tag; >> // 13 >> u2 name_index; >> // Points to a CONSTANT_Utf8_info representing module name >> u2 version_index; >> // Points to a CONSTANT_Utf8_info representing module version >> } >> >> >> The module-info.class file >> >> A module compilation unit (|module-info.java|) is compiled to a >> |ClassFile| structure like any other compilation unit. It follows the >> precedent set by compiling a package compilation unit >> (|package-info.java|) which has been possible since Java 5.0. Since >> neither compilation unit describes a class as such, the following >> conventions are adopted for their |ClassFile| structures. >> >> >> package-info.class >> >> * |major_version, minor_version|: >=49.0 >> * |this_class|: [Package name in internal form (4.2.1)]/package-info >> * |access_flags|: v49: ACC_INTERFACE ACC_ABSTRACT >=v50: >> ACC_INTERFACE ACC_ABSTRACT ACC_SYNTHETIC >> * |super_class|, |interfaces_count|, |fields_count|, >> |methods_count|: 0 >> * |attributes|: except for |Module|, |SourceFile|, >> |RuntimeVisibleAnnotations| and |RuntimeInvisibleAnnotations|, >> none of the pre-defined attributes in JVMS 4.7 may appear. >> >> >> module-info.class >> >> * |major_version, minor_version|: >=51.0 >> * |this_class|: [Module name in internal form (4.2.1)]/module-info >> * |access_flags|: ACC_INTERFACE ACC_ABSTRACT ACC_SYNTHETIC >> * |attributes|: One |Module| attribute must be present, for the >> module name given in the |this_class| item. >> * |super_class|, |interfaces_count|, |fields_count|, >> |methods_count|: 0 >> * |attributes|: One |Module| attribute must be present, for the >> module name given in the |this_class| item. At most one of each >> of the |ModuleRequires|, |ModulePermits|, |ModuleProvides|, and >> |ModuleClass| attributes must be present if the module has >> metadata. Except for these attributes and |SourceFile|, >> |RuntimeVisibleAnnotations|, and |RuntimeInvisibleAnnotations|, >> none of the pre-defined attributes in JVMS 4.7 may appear. >> * A module name may be referenced by at most one entry in the >> |requires_table| of a |ModuleRequires| attribute and at most one >> entry in the |permits_table| of a |ModulePermits| attribute and >> at most one entry in the |provides_table| of a |ModuleProvides| >> attribute of a |ClassFile|. >> >> >> Attributes for the module-info.class file >> >> The |ModuleRequires| attribute is defined as follows: >> ModuleRequires_attribute { >> u2 attribute_name_index; >> u4 attribute_length; >> u2 requires_length; >> { u2 requires_index; u1 flags; } requires_table[requires_length]; >> } >> >> |attribute_name_index| >> The value of the |attribute_name_index| item must be a valid index >> into the |constant_pool| table. The |constant_pool| entry at that >> index must be a |CONSTANT_Utf8_info| structure representing the >> string "ModuleRequires". >> |attribute_length| >> The value of the |attribute_length| item is the length of the >> attribute excluding the initial six bytes. >> |requires_length| >> The value of the |requires_length| indicates the number of entries >> in the |requires_table|. >> |requires_table| >> Each |requires_index| must be a valid index into the >> |constant_pool| table. The |constant_pool| entry at that index >> must be a |CONSTANT_ModuleId_info| structure representing the >> target module on which this module depends. >> flags: 0x01 if this dependency on the target module is optional >> flags: 0x02 if the target module's types must be loaded by the >> same defining classloader as the >> types of the module represented by this ClassFile >> flags: 0x04 if the target module's public types are NOT observable to >> types of the module represented by this ClassFile >> >> The |ModulePermits| attribute is defined as follows: >> ModulePermits_attribute { >> u2 attribute_name_index; >> u4 attribute_length; >> u2 permits_length; >> { u2 permits_index } permits_table[permits_length]; >> } >> >> |attribute_name_index| >> The value of the |attribute_name_index| item must be a valid index >> into the |constant_pool| table. The |constant_pool| entry at that >> index must be a |CONSTANT_Utf8_info| structure representing the >> string "ModulePermits". >> |attribute_length| >> The value of the |attribute_length| item is the length of the >> attribute excluding the initial six bytes. >> |permits_length| >> The value of the |permits_length| indicates the number of entries >> in the |permits_table|. >> |permits_table| >> The value of each |permits_index| in this item must be a valid >> index into the |constant_pool| table. The |constant_pool| entry at >> that index must be a |CONSTANT_Utf8_info| structure representing >> the name of a module which is permitted by the host system to have >> a dependency on the module represented by this |ClassFile|. >> >> The |ModuleProvides| attribute is defined as follows: >> ModuleProvides_attribute { >> u2 attribute_name_index; >> u4 attribute_length; >> u2 provides_length; >> { u2 provides_index; } provides_table[provides_length]; >> } >> >> |attribute_name_index| >> The value of the |attribute_name_index| item must be a valid index >> into the |constant_pool| table. The |constant_pool| entry at that >> index must be a |CONSTANT_Utf8_info| structure representing the >> string "ModuleProvides". >> |attribute_length| >> The value of the |attribute_length| item is the length of the >> attribute excluding the initial six bytes. >> |provides_length| >> The value of the |provides_length| indicates the number of entries >> in the |provides_table|. >> |provides_table| >> The value of each |provides_index| in this item must be a valid >> index into the |constant_pool| table. The |constant_pool| entry at >> that index must be a |CONSTANT_ModuleId_info| structure >> representing a module identity that is an alias for the module >> represented by this |ClassFile|. >> >> The |ModuleClass| attribute is defined as follows: >> ModuleClass_attribute { >> u2 attribute_name_index; >> u4 attribute_length; >> u2 main_class; >> } >> >> |attribute_name_index| >> The value of the |attribute_name_index| item must be a valid index >> into the |constant_pool| table. The |constant_pool| entry at that >> index must be a |CONSTANT_Utf8_info| structure representing the >> string "ModuleClass". >> |attribute_length| >> The value of the |attribute_length| item is the length of the >> attribute excluding the initial six bytes. >> |main_class| >> The value of the |main_class| item must be a valid index into the >> |constant_pool| table. The |constant_pool| entry at that index >> must be a |CONSTANT_Class_info| structure representing the name of >> the class which the host system should treat as the entrypoint to >> the module. >> > From Jonathan.Gibbons at Sun.COM Tue Mar 3 12:19:38 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Tue, 03 Mar 2009 12:19:38 -0800 Subject: ModuleClass In-Reply-To: <49AD8EC9.7080307@sun.com> References: <20090303172106.87A6C28E0EE@eggemoggin.niobe.net> <1FBE6156-A6A7-4774-B05A-8FE4CBA4D3AE@Sun.COM> <49AD8937.6020608@sun.com> <49AD8EC9.7080307@sun.com> Message-ID: <49AD90DA.90405@sun.com> Yes, it's a change. It's not in line with what we previously agreed and which I have already implemented. Yes, there was a bug in the impl such that I was using CONSTANT_Utf8 instead of CONSTANT_Class, and I have spent the morning fixing that and writing related test programs, and now you're telling me you're changing the spec on me. Your proposed spec change does *not* bring this in line with ModuleInfoReader's current parsing, because that still uses an even older version of the spec that uses the "ModuleMain" attribute, not "ModuleClass". -- Jon Alex Buckley wrote: > I guess I should have been clearer: the spec section starts at "The > ModuleClass attribute is defined as follows...". "For now" is > certainly not in the spec! > > Nothing has changed. I wrote up ModuleClass in line with Mark's > comment "I suspect we really want ModuleClass to name a class rather > than just convey a plain utf8 string" and with ModuleInfoReader's > current parsing. > > Alex > > Jonathan Gibbons wrote: >> NOOOOOOOOOOOOOO. >> >> Please stop gratuitous changing of the spec like this! >> >> I guess I distrust a spec that includes the words "For now". >> -- Jon >> >> On Mar 3, 2009, at 11:47 AM, Alex Buckley wrote: >> >>> Being able to put flags in the main class attribute would probably >>> be worthwhile if multiple main class attributes were allowed: "Main >>> class M is flagged as an FX 1.1 app", "Main class N is flagged as a >>> bundle activator and can be assumed to implement interface...". >>> >>> However, I think for now one ModuleClass attribute is enough, >>> pointing to a CONSTANT_Class_info, and without flags. >>> >>> The ModuleClass attribute is defined as follows: >>> >>> ModuleClass_attribute { >>> u2 attribute_name_index; >>> u4 attribute_length; >>> u2 main_class; >>> } >>> >>> attribute_name_index >>> The value of the attribute_name_index item must be a valid index >>> into the constant_pool table. The constant_pool entry at that index >>> must be a CONSTANT_Utf8_info structure representing the string >>> "ModuleClass". >>> >>> attribute_length >>> The value of the attribute_length item is the length of the >>> attribute excluding the initial six bytes. >>> >>> main_class >>> The value of the main_class item must be a valid index into the >>> constant_pool table. The constant_pool entry at that index must be a >>> CONSTANT_Class_info structure representing the name of the class >>> which the host system should treat as the entrypoint to the module. >>> >>> Attached is an updated (+ tiny corrections) classfile spec. >>> >>> Alex >>> >>> Jonathan Gibbons wrote: >>>> Alex suggested adding it when I asked him for a spec of the >>>> ModuleClass >>>> attribute. At the time, the thought was to be able to mark the >>>> type of class, >>>> main class, applet etc. A more topical example, from a separate email >>>> thread going on now, would be to be able to mark a JavaFX class. >>>> [Kumar is working on changes to the launcher to make it capable of >>>> starting FX programs, given an FX main class.] So the ability to give >>>> simple attributes regarding the class appears somewhat reasonable. >>>> I guess the updated classfile spec got pre-empted by FOSDEM ;-) >>>> -- Jon >>>> On Mar 3, 2009, at 9:21 AM, Mark Reinhold wrote: >>>>>> Date: Tue, 03 Mar 2009 07:54:39 -0800 >>>>>> From: jonathan.gibbons at sun.com >>>>> >>>>>> Point noted about the incorrect use of CONSTANT_Utf8 instead of >>>>>> CONSTANT_Class. I'll check that out. >>>>> >>>>> Okay, thanks. >>>>> >>>>>> Also, if I recall correctly, >>>>>> that item is followed by an array of Utf8 strings representing an >>>>>> open >>>>>> ended set of flags/modifiers, similar to that used for the requires >>>>>> entry. If nothing else, you might need to skip over them if there is >>>>>> any info to follow. >>>>> >>>>> Hmm, didn't know that, and neither does the ModuleInfoReader code. >>>>> >>>>> I don't recall having discussed the need for modifiers in the >>>>> main-class >>>>> declaration. Do we have use cases? >>>>> >>>>> - Mark >>> >>> >>> |ClassFile| changes in v51.0 for Modules >>> >>> >>> Access flags >>> >>> Module-private accessibility is expressed with a new |access_flags| >>> flag, |ACC_MODULE|, value 0x8000, description: "Declared |module|; >>> may not be accessed from outside its module. May only be set if the >>> |ClassFile| has a |Module| attribute." The flag appears in JVMS 4.1 >>> (|ClassFile.access_flags|), 4.5 (|field_info.access_flags|), and 4.6 >>> (|method_info.access_flags|), which gain the following rules: >>> >>> 4.1 >>> *At most one of the |ACC_MODULE| and |ACC_PUBLIC| flags may be set >>> (JLS3 ?6.6.1).* 4.5 >>> Fields of classes may set any of the flags in Table 4.4. However, >>> a specific field of a class may have at most one of its >>> |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and |ACC_PUBLIC| >>> flags set (JLS3 ?8.3.1) and must not have both its |ACC_FINAL| and >>> |ACC_VOLATILE| flags set (JLS3 ?8.3.1.4). All fields of >>> interfaces must have their |ACC_STATIC| and >>> |ACC_FINAL| and *either |ACC_PUBLIC| or |ACC_MODULE|* flags set; >>> they may have their |ACC_SYNTHETIC| flag set and must not have any >>> of the other flags in Table 4.4 set (JLS3 ?9.3). 4.6 >>> Methods of classes may set any of the flags in Table 4.5. However, >>> a specific method of a class may have at most one of its >>> |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and |ACC_PUBLIC| >>> flags set (JLS3 ?8.4.3). All interface methods must have >>> their |ACC_ABSTRACT| and *either >>> |ACC_PUBLIC| or |ACC_MODULE|* flags set; they may have their >>> |ACC_VARARGS|, |ACC_BRIDGE| and |ACC_SYNTHETIC| flags set and must >>> not have any of the other flags in Table 4.5 set (JLS3 ?9.4). >>> A specific instance initialization method (?3.9) may have at most >>> one of its |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and >>> |ACC_PUBLIC| flags set, and may also have its |ACC_STRICT|, >>> |ACC_VARARGS| and |ACC_SYNTHETIC| flags set, but must not have any >>> of the other flags in Table 4.5 set. >>> In the |InnerClasses| attribute's |inner_class_access_flags| table, >>> |ACC_MODULE| means "Marked |module| in source. May only be set if >>> the |ClassFile| has a |Module| attribute." >>> >>> The |ACC_PUBLIC| flag in all |access_flags| is now defined as >>> "Declared |public|; may be accessed from outside its package or >>> module." >>> >>> >>> 4.8.21 The |Module| attribute >>> >>> The |Module| attribute is a fixed-length attribute in the >>> |attributes| table of a |ClassFile| (JVMS 4.1) structure. The >>> |Module| attribute records the /named module/ (JLS 7.4.5) to which >>> the class belongs. A |ClassFile| structure without a |Module| >>> attribute is considered to be a member of the /unnamed module/ (JLS >>> 7.4.6). >>> >>> There can be no more than one |Module| attribute in the |attributes| >>> table of a given |ClassFile| structure. A |Module| attribute may >>> only appear in a |ClassFile| structure that represents a class whose >>> binary name in internal form (as given by the constant pool entry >>> referenced by the |name_index| item of the |CONSTANT_Class_info| >>> structure referenced by |ClassFile.this_class|) is qualified, i.e. >>> contains at least one |/|. >>> >>> The |Module| attribute has the following format: >>> >>> Module_attribute { >>> u2 attribute_name_index; >>> u4 attribute_length; >>> u2 module_id_index; >>> } >>> The items of the |Module_attribute| structure are as follows: >>> >>> |attribute_name_index| >>> The value of the |attribute_name_index| item must be a valid index >>> into the |constant_pool| table. The |constant_pool| entry at that >>> index must be a |CONSTANT_Utf8_info| structure representing the >>> string "Module". |attribute_length| >>> The value of the |attribute_length| item must be 2. >>> |module_id_index| >>> The value of the |module_id_index| item must be a valid index into >>> the |constant_pool| table. The |constant_pool| entry at that index >>> must be a |CONSTANT_ModuleId_info| structure representing the name >>> and version of the named module of which this |ClassFile| is a >>> member. The module name must be encoded in internal form (4.2.1). >>> If the |version_index| item of the |CONSTANT_ModuleId_info| >>> structure is 0, then this |ClassFile| is a member of any version >>> of the module named by the |name_index| item. >>> The |CONSTANT_ModuleId_info| structure has the following format: >>> CONSTANT_ModuleId_info { >>> u1 tag; >>> // 13 >>> u2 name_index; >>> // Points to a CONSTANT_Utf8_info representing module name >>> u2 version_index; >>> // Points to a CONSTANT_Utf8_info representing module version >>> } >>> >>> >>> The module-info.class file >>> >>> A module compilation unit (|module-info.java|) is compiled to a >>> |ClassFile| structure like any other compilation unit. It follows >>> the precedent set by compiling a package compilation unit >>> (|package-info.java|) which has been possible since Java 5.0. Since >>> neither compilation unit describes a class as such, the following >>> conventions are adopted for their |ClassFile| structures. >>> >>> >>> package-info.class >>> >>> * |major_version, minor_version|: >=49.0 >>> * |this_class|: [Package name in internal form >>> (4.2.1)]/package-info >>> * |access_flags|: v49: ACC_INTERFACE ACC_ABSTRACT >=v50: >>> ACC_INTERFACE ACC_ABSTRACT ACC_SYNTHETIC >>> * |super_class|, |interfaces_count|, |fields_count|, >>> |methods_count|: 0 >>> * |attributes|: except for |Module|, |SourceFile|, >>> |RuntimeVisibleAnnotations| and |RuntimeInvisibleAnnotations|, >>> none of the pre-defined attributes in JVMS 4.7 may appear. >>> >>> module-info.class >>> >>> * |major_version, minor_version|: >=51.0 >>> * |this_class|: [Module name in internal form (4.2.1)]/module-info >>> * |access_flags|: ACC_INTERFACE ACC_ABSTRACT ACC_SYNTHETIC >>> * |attributes|: One |Module| attribute must be present, for the >>> module name given in the |this_class| item. >>> * |super_class|, |interfaces_count|, |fields_count|, >>> |methods_count|: 0 >>> * |attributes|: One |Module| attribute must be present, for the >>> module name given in the |this_class| item. At most one of each >>> of the |ModuleRequires|, |ModulePermits|, |ModuleProvides|, and >>> |ModuleClass| attributes must be present if the module has >>> metadata. Except for these attributes and |SourceFile|, >>> |RuntimeVisibleAnnotations|, and |RuntimeInvisibleAnnotations|, >>> none of the pre-defined attributes in JVMS 4.7 may appear. >>> * A module name may be referenced by at most one entry in the >>> |requires_table| of a |ModuleRequires| attribute and at most one >>> entry in the |permits_table| of a |ModulePermits| attribute and >>> at most one entry in the |provides_table| of a |ModuleProvides| >>> attribute of a |ClassFile|. >>> >>> Attributes for the module-info.class file >>> >>> The |ModuleRequires| attribute is defined as follows: >>> ModuleRequires_attribute { >>> u2 attribute_name_index; >>> u4 attribute_length; >>> u2 requires_length; >>> { u2 requires_index; u1 flags; } requires_table[requires_length]; >>> } >>> >>> |attribute_name_index| >>> The value of the |attribute_name_index| item must be a valid index >>> into the |constant_pool| table. The |constant_pool| entry at that >>> index must be a |CONSTANT_Utf8_info| structure representing the >>> string "ModuleRequires". |attribute_length| >>> The value of the |attribute_length| item is the length of the >>> attribute excluding the initial six bytes. |requires_length| >>> The value of the |requires_length| indicates the number of entries >>> in the |requires_table|. |requires_table| >>> Each |requires_index| must be a valid index into the >>> |constant_pool| table. The |constant_pool| entry at that index >>> must be a |CONSTANT_ModuleId_info| structure representing the >>> target module on which this module depends. >>> flags: 0x01 if this dependency on the target module is optional >>> flags: 0x02 if the target module's types must be loaded by the >>> same defining classloader as the >>> types of the module represented by this ClassFile >>> flags: 0x04 if the target module's public types are NOT >>> observable to >>> types of the module represented by this ClassFile >>> >>> The |ModulePermits| attribute is defined as follows: >>> ModulePermits_attribute { >>> u2 attribute_name_index; >>> u4 attribute_length; >>> u2 permits_length; >>> { u2 permits_index } permits_table[permits_length]; >>> } >>> >>> |attribute_name_index| >>> The value of the |attribute_name_index| item must be a valid index >>> into the |constant_pool| table. The |constant_pool| entry at that >>> index must be a |CONSTANT_Utf8_info| structure representing the >>> string "ModulePermits". |attribute_length| >>> The value of the |attribute_length| item is the length of the >>> attribute excluding the initial six bytes. |permits_length| >>> The value of the |permits_length| indicates the number of entries >>> in the |permits_table|. |permits_table| >>> The value of each |permits_index| in this item must be a valid >>> index into the |constant_pool| table. The |constant_pool| entry at >>> that index must be a |CONSTANT_Utf8_info| structure representing >>> the name of a module which is permitted by the host system to have >>> a dependency on the module represented by this |ClassFile|. >>> The |ModuleProvides| attribute is defined as follows: >>> ModuleProvides_attribute { >>> u2 attribute_name_index; >>> u4 attribute_length; >>> u2 provides_length; >>> { u2 provides_index; } provides_table[provides_length]; >>> } >>> >>> |attribute_name_index| >>> The value of the |attribute_name_index| item must be a valid index >>> into the |constant_pool| table. The |constant_pool| entry at that >>> index must be a |CONSTANT_Utf8_info| structure representing the >>> string "ModuleProvides". |attribute_length| >>> The value of the |attribute_length| item is the length of the >>> attribute excluding the initial six bytes. |provides_length| >>> The value of the |provides_length| indicates the number of entries >>> in the |provides_table|. |provides_table| >>> The value of each |provides_index| in this item must be a valid >>> index into the |constant_pool| table. The |constant_pool| entry at >>> that index must be a |CONSTANT_ModuleId_info| structure >>> representing a module identity that is an alias for the module >>> represented by this |ClassFile|. >>> The |ModuleClass| attribute is defined as follows: >>> ModuleClass_attribute { >>> u2 attribute_name_index; >>> u4 attribute_length; >>> u2 main_class; >>> } >>> >>> |attribute_name_index| >>> The value of the |attribute_name_index| item must be a valid index >>> into the |constant_pool| table. The |constant_pool| entry at that >>> index must be a |CONSTANT_Utf8_info| structure representing the >>> string "ModuleClass". |attribute_length| >>> The value of the |attribute_length| item is the length of the >>> attribute excluding the initial six bytes. |main_class| >>> The value of the |main_class| item must be a valid index into the >>> |constant_pool| table. The |constant_pool| entry at that index >>> must be a |CONSTANT_Class_info| structure representing the name of >>> the class which the host system should treat as the entrypoint to >>> the module. >> From Alex.Buckley at Sun.COM Tue Mar 3 12:31:03 2009 From: Alex.Buckley at Sun.COM (Alex Buckley) Date: Tue, 03 Mar 2009 12:31:03 -0800 Subject: ModuleClass In-Reply-To: <49AD90DA.90405@sun.com> References: <20090303172106.87A6C28E0EE@eggemoggin.niobe.net> <1FBE6156-A6A7-4774-B05A-8FE4CBA4D3AE@Sun.COM> <49AD8937.6020608@sun.com> <49AD8EC9.7080307@sun.com> <49AD90DA.90405@sun.com> Message-ID: <49AD9387.8060100@sun.com> I'm confused. In: ModuleClass_attribute { u2 attribute_name_index; u4 attribute_length; u2 main_class; } attribute_name_index points to a "ModuleClass" string, which is what Mark's patch from 21:26 yesterday used and a name he seemed happy with. (I think the bit of that patch he was loathe to commit was reading a class name from a Utf8.) main_class points to a CONSTANT_Class, which you agreed at 07:54 was the right thing to do. I can add an array of flags after main_class - no ModuleInfoReader code reads them yet anyway. Does this reflect what javac emits: ModuleClass_attribute { u2 attribute_name_index; u4 attribute_length; u2 main_class; u2 flags_length; { u2 flag; /*Points to Utf8_info*/ } main_class_flags[flags_length]; } Alex Jonathan Gibbons wrote: > Yes, it's a change. It's not in line with what we previously agreed and > which I have already implemented. > > Yes, there was a bug in the impl such that I was using CONSTANT_Utf8 > instead of CONSTANT_Class, and I have spent the morning fixing that and > writing related test programs, and now you're telling me you're changing > the spec on me. > > Your proposed spec change does *not* bring this in line with > ModuleInfoReader's current parsing, because that still uses an even > older version of the spec that uses the "ModuleMain" attribute, not > "ModuleClass". > > -- Jon > > Alex Buckley wrote: >> I guess I should have been clearer: the spec section starts at "The >> ModuleClass attribute is defined as follows...". "For now" is >> certainly not in the spec! >> >> Nothing has changed. I wrote up ModuleClass in line with Mark's >> comment "I suspect we really want ModuleClass to name a class rather >> than just convey a plain utf8 string" and with ModuleInfoReader's >> current parsing. >> >> Alex >> >> Jonathan Gibbons wrote: >>> NOOOOOOOOOOOOOO. >>> >>> Please stop gratuitous changing of the spec like this! >>> >>> I guess I distrust a spec that includes the words "For now". -- Jon >>> >>> On Mar 3, 2009, at 11:47 AM, Alex Buckley wrote: >>> >>>> Being able to put flags in the main class attribute would probably >>>> be worthwhile if multiple main class attributes were allowed: "Main >>>> class M is flagged as an FX 1.1 app", "Main class N is flagged as a >>>> bundle activator and can be assumed to implement interface...". >>>> >>>> However, I think for now one ModuleClass attribute is enough, >>>> pointing to a CONSTANT_Class_info, and without flags. >>>> >>>> The ModuleClass attribute is defined as follows: >>>> >>>> ModuleClass_attribute { >>>> u2 attribute_name_index; >>>> u4 attribute_length; >>>> u2 main_class; >>>> } >>>> >>>> attribute_name_index >>>> The value of the attribute_name_index item must be a valid index >>>> into the constant_pool table. The constant_pool entry at that index >>>> must be a CONSTANT_Utf8_info structure representing the string >>>> "ModuleClass". >>>> >>>> attribute_length >>>> The value of the attribute_length item is the length of the >>>> attribute excluding the initial six bytes. >>>> >>>> main_class >>>> The value of the main_class item must be a valid index into the >>>> constant_pool table. The constant_pool entry at that index must be a >>>> CONSTANT_Class_info structure representing the name of the class >>>> which the host system should treat as the entrypoint to the module. >>>> >>>> Attached is an updated (+ tiny corrections) classfile spec. >>>> >>>> Alex >>>> >>>> Jonathan Gibbons wrote: >>>>> Alex suggested adding it when I asked him for a spec of the >>>>> ModuleClass >>>>> attribute. At the time, the thought was to be able to mark the >>>>> type of class, >>>>> main class, applet etc. A more topical example, from a separate email >>>>> thread going on now, would be to be able to mark a JavaFX class. >>>>> [Kumar is working on changes to the launcher to make it capable of >>>>> starting FX programs, given an FX main class.] So the ability to give >>>>> simple attributes regarding the class appears somewhat reasonable. >>>>> I guess the updated classfile spec got pre-empted by FOSDEM ;-) >>>>> -- Jon >>>>> On Mar 3, 2009, at 9:21 AM, Mark Reinhold wrote: >>>>>>> Date: Tue, 03 Mar 2009 07:54:39 -0800 >>>>>>> From: jonathan.gibbons at sun.com >>>>>> >>>>>>> Point noted about the incorrect use of CONSTANT_Utf8 instead of >>>>>>> CONSTANT_Class. I'll check that out. >>>>>> >>>>>> Okay, thanks. >>>>>> >>>>>>> Also, if I recall correctly, >>>>>>> that item is followed by an array of Utf8 strings representing an >>>>>>> open >>>>>>> ended set of flags/modifiers, similar to that used for the requires >>>>>>> entry. If nothing else, you might need to skip over them if there is >>>>>>> any info to follow. >>>>>> >>>>>> Hmm, didn't know that, and neither does the ModuleInfoReader code. >>>>>> >>>>>> I don't recall having discussed the need for modifiers in the >>>>>> main-class >>>>>> declaration. Do we have use cases? >>>>>> >>>>>> - Mark >>>> >>>> >>>> |ClassFile| changes in v51.0 for Modules >>>> >>>> >>>> Access flags >>>> >>>> Module-private accessibility is expressed with a new |access_flags| >>>> flag, |ACC_MODULE|, value 0x8000, description: "Declared |module|; >>>> may not be accessed from outside its module. May only be set if the >>>> |ClassFile| has a |Module| attribute." The flag appears in JVMS 4.1 >>>> (|ClassFile.access_flags|), 4.5 (|field_info.access_flags|), and 4.6 >>>> (|method_info.access_flags|), which gain the following rules: >>>> >>>> 4.1 >>>> *At most one of the |ACC_MODULE| and |ACC_PUBLIC| flags may be set >>>> (JLS3 ?6.6.1).* 4.5 >>>> Fields of classes may set any of the flags in Table 4.4. However, >>>> a specific field of a class may have at most one of its >>>> |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and |ACC_PUBLIC| >>>> flags set (JLS3 ?8.3.1) and must not have both its |ACC_FINAL| and >>>> |ACC_VOLATILE| flags set (JLS3 ?8.3.1.4). All fields of >>>> interfaces must have their |ACC_STATIC| and >>>> |ACC_FINAL| and *either |ACC_PUBLIC| or |ACC_MODULE|* flags set; >>>> they may have their |ACC_SYNTHETIC| flag set and must not have any >>>> of the other flags in Table 4.4 set (JLS3 ?9.3). 4.6 >>>> Methods of classes may set any of the flags in Table 4.5. However, >>>> a specific method of a class may have at most one of its >>>> |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and |ACC_PUBLIC| >>>> flags set (JLS3 ?8.4.3). All interface methods must have >>>> their |ACC_ABSTRACT| and *either >>>> |ACC_PUBLIC| or |ACC_MODULE|* flags set; they may have their >>>> |ACC_VARARGS|, |ACC_BRIDGE| and |ACC_SYNTHETIC| flags set and must >>>> not have any of the other flags in Table 4.5 set (JLS3 ?9.4). >>>> A specific instance initialization method (?3.9) may have at most >>>> one of its |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and >>>> |ACC_PUBLIC| flags set, and may also have its |ACC_STRICT|, >>>> |ACC_VARARGS| and |ACC_SYNTHETIC| flags set, but must not have any >>>> of the other flags in Table 4.5 set. >>>> In the |InnerClasses| attribute's |inner_class_access_flags| table, >>>> |ACC_MODULE| means "Marked |module| in source. May only be set if >>>> the |ClassFile| has a |Module| attribute." >>>> >>>> The |ACC_PUBLIC| flag in all |access_flags| is now defined as >>>> "Declared |public|; may be accessed from outside its package or >>>> module." >>>> >>>> >>>> 4.8.21 The |Module| attribute >>>> >>>> The |Module| attribute is a fixed-length attribute in the >>>> |attributes| table of a |ClassFile| (JVMS 4.1) structure. The >>>> |Module| attribute records the /named module/ (JLS 7.4.5) to which >>>> the class belongs. A |ClassFile| structure without a |Module| >>>> attribute is considered to be a member of the /unnamed module/ (JLS >>>> 7.4.6). >>>> >>>> There can be no more than one |Module| attribute in the |attributes| >>>> table of a given |ClassFile| structure. A |Module| attribute may >>>> only appear in a |ClassFile| structure that represents a class whose >>>> binary name in internal form (as given by the constant pool entry >>>> referenced by the |name_index| item of the |CONSTANT_Class_info| >>>> structure referenced by |ClassFile.this_class|) is qualified, i.e. >>>> contains at least one |/|. >>>> >>>> The |Module| attribute has the following format: >>>> >>>> Module_attribute { >>>> u2 attribute_name_index; >>>> u4 attribute_length; >>>> u2 module_id_index; >>>> } >>>> The items of the |Module_attribute| structure are as follows: >>>> >>>> |attribute_name_index| >>>> The value of the |attribute_name_index| item must be a valid index >>>> into the |constant_pool| table. The |constant_pool| entry at that >>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>> string "Module". |attribute_length| >>>> The value of the |attribute_length| item must be 2. >>>> |module_id_index| >>>> The value of the |module_id_index| item must be a valid index into >>>> the |constant_pool| table. The |constant_pool| entry at that index >>>> must be a |CONSTANT_ModuleId_info| structure representing the name >>>> and version of the named module of which this |ClassFile| is a >>>> member. The module name must be encoded in internal form (4.2.1). >>>> If the |version_index| item of the |CONSTANT_ModuleId_info| >>>> structure is 0, then this |ClassFile| is a member of any version >>>> of the module named by the |name_index| item. >>>> The |CONSTANT_ModuleId_info| structure has the following format: >>>> CONSTANT_ModuleId_info { >>>> u1 tag; >>>> // 13 >>>> u2 name_index; >>>> // Points to a CONSTANT_Utf8_info representing module name >>>> u2 version_index; >>>> // Points to a CONSTANT_Utf8_info representing module version >>>> } >>>> >>>> >>>> The module-info.class file >>>> >>>> A module compilation unit (|module-info.java|) is compiled to a >>>> |ClassFile| structure like any other compilation unit. It follows >>>> the precedent set by compiling a package compilation unit >>>> (|package-info.java|) which has been possible since Java 5.0. Since >>>> neither compilation unit describes a class as such, the following >>>> conventions are adopted for their |ClassFile| structures. >>>> >>>> >>>> package-info.class >>>> >>>> * |major_version, minor_version|: >=49.0 >>>> * |this_class|: [Package name in internal form >>>> (4.2.1)]/package-info >>>> * |access_flags|: v49: ACC_INTERFACE ACC_ABSTRACT >=v50: >>>> ACC_INTERFACE ACC_ABSTRACT ACC_SYNTHETIC >>>> * |super_class|, |interfaces_count|, |fields_count|, >>>> |methods_count|: 0 >>>> * |attributes|: except for |Module|, |SourceFile|, >>>> |RuntimeVisibleAnnotations| and |RuntimeInvisibleAnnotations|, >>>> none of the pre-defined attributes in JVMS 4.7 may appear. >>>> >>>> module-info.class >>>> >>>> * |major_version, minor_version|: >=51.0 >>>> * |this_class|: [Module name in internal form (4.2.1)]/module-info >>>> * |access_flags|: ACC_INTERFACE ACC_ABSTRACT ACC_SYNTHETIC >>>> * |attributes|: One |Module| attribute must be present, for the >>>> module name given in the |this_class| item. >>>> * |super_class|, |interfaces_count|, |fields_count|, >>>> |methods_count|: 0 >>>> * |attributes|: One |Module| attribute must be present, for the >>>> module name given in the |this_class| item. At most one of each >>>> of the |ModuleRequires|, |ModulePermits|, |ModuleProvides|, and >>>> |ModuleClass| attributes must be present if the module has >>>> metadata. Except for these attributes and |SourceFile|, >>>> |RuntimeVisibleAnnotations|, and |RuntimeInvisibleAnnotations|, >>>> none of the pre-defined attributes in JVMS 4.7 may appear. >>>> * A module name may be referenced by at most one entry in the >>>> |requires_table| of a |ModuleRequires| attribute and at most one >>>> entry in the |permits_table| of a |ModulePermits| attribute and >>>> at most one entry in the |provides_table| of a |ModuleProvides| >>>> attribute of a |ClassFile|. >>>> >>>> Attributes for the module-info.class file >>>> >>>> The |ModuleRequires| attribute is defined as follows: >>>> ModuleRequires_attribute { >>>> u2 attribute_name_index; >>>> u4 attribute_length; >>>> u2 requires_length; >>>> { u2 requires_index; u1 flags; } requires_table[requires_length]; >>>> } >>>> >>>> |attribute_name_index| >>>> The value of the |attribute_name_index| item must be a valid index >>>> into the |constant_pool| table. The |constant_pool| entry at that >>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>> string "ModuleRequires". |attribute_length| >>>> The value of the |attribute_length| item is the length of the >>>> attribute excluding the initial six bytes. |requires_length| >>>> The value of the |requires_length| indicates the number of entries >>>> in the |requires_table|. |requires_table| >>>> Each |requires_index| must be a valid index into the >>>> |constant_pool| table. The |constant_pool| entry at that index >>>> must be a |CONSTANT_ModuleId_info| structure representing the >>>> target module on which this module depends. >>>> flags: 0x01 if this dependency on the target module is optional >>>> flags: 0x02 if the target module's types must be loaded by the >>>> same defining classloader as the >>>> types of the module represented by this ClassFile >>>> flags: 0x04 if the target module's public types are NOT >>>> observable to >>>> types of the module represented by this ClassFile >>>> >>>> The |ModulePermits| attribute is defined as follows: >>>> ModulePermits_attribute { >>>> u2 attribute_name_index; >>>> u4 attribute_length; >>>> u2 permits_length; >>>> { u2 permits_index } permits_table[permits_length]; >>>> } >>>> >>>> |attribute_name_index| >>>> The value of the |attribute_name_index| item must be a valid index >>>> into the |constant_pool| table. The |constant_pool| entry at that >>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>> string "ModulePermits". |attribute_length| >>>> The value of the |attribute_length| item is the length of the >>>> attribute excluding the initial six bytes. |permits_length| >>>> The value of the |permits_length| indicates the number of entries >>>> in the |permits_table|. |permits_table| >>>> The value of each |permits_index| in this item must be a valid >>>> index into the |constant_pool| table. The |constant_pool| entry at >>>> that index must be a |CONSTANT_Utf8_info| structure representing >>>> the name of a module which is permitted by the host system to have >>>> a dependency on the module represented by this |ClassFile|. >>>> The |ModuleProvides| attribute is defined as follows: >>>> ModuleProvides_attribute { >>>> u2 attribute_name_index; >>>> u4 attribute_length; >>>> u2 provides_length; >>>> { u2 provides_index; } provides_table[provides_length]; >>>> } >>>> >>>> |attribute_name_index| >>>> The value of the |attribute_name_index| item must be a valid index >>>> into the |constant_pool| table. The |constant_pool| entry at that >>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>> string "ModuleProvides". |attribute_length| >>>> The value of the |attribute_length| item is the length of the >>>> attribute excluding the initial six bytes. |provides_length| >>>> The value of the |provides_length| indicates the number of entries >>>> in the |provides_table|. |provides_table| >>>> The value of each |provides_index| in this item must be a valid >>>> index into the |constant_pool| table. The |constant_pool| entry at >>>> that index must be a |CONSTANT_ModuleId_info| structure >>>> representing a module identity that is an alias for the module >>>> represented by this |ClassFile|. >>>> The |ModuleClass| attribute is defined as follows: >>>> ModuleClass_attribute { >>>> u2 attribute_name_index; >>>> u4 attribute_length; >>>> u2 main_class; >>>> } >>>> >>>> |attribute_name_index| >>>> The value of the |attribute_name_index| item must be a valid index >>>> into the |constant_pool| table. The |constant_pool| entry at that >>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>> string "ModuleClass". |attribute_length| >>>> The value of the |attribute_length| item is the length of the >>>> attribute excluding the initial six bytes. |main_class| >>>> The value of the |main_class| item must be a valid index into the >>>> |constant_pool| table. The |constant_pool| entry at that index >>>> must be a |CONSTANT_Class_info| structure representing the name of >>>> the class which the host system should treat as the entrypoint to >>>> the module. >>> > From jonathan.gibbons at sun.com Tue Mar 3 12:49:23 2009 From: jonathan.gibbons at sun.com (jonathan.gibbons at sun.com) Date: Tue, 03 Mar 2009 20:49:23 +0000 Subject: hg: jigsaw/jigsaw/langtools: Fix javac to emit ModuleClass using CONSTANT_Class_info instead of CONSTANT_Utf8_info for the classname. Message-ID: <20090303204925.16ECEE6A2@hg.openjdk.java.net> Changeset: ae4daa853869 Author: jjg Date: 2009-03-03 12:47 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/langtools/rev/ae4daa853869 Fix javac to emit ModuleClass using CONSTANT_Class_info instead of CONSTANT_Utf8_info for the classname. ! src/share/classes/com/sun/tools/classfile/ModuleClass_attribute.java ! src/share/classes/com/sun/tools/javac/code/Symbol.java ! src/share/classes/com/sun/tools/javac/comp/Enter.java + test/tools/javac/modules/ModuleClassAttributeTest01.java From Jonathan.Gibbons at Sun.COM Tue Mar 3 12:56:34 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Tue, 03 Mar 2009 12:56:34 -0800 Subject: ModuleClass In-Reply-To: <49AD9387.8060100@sun.com> References: <20090303172106.87A6C28E0EE@eggemoggin.niobe.net> <1FBE6156-A6A7-4774-B05A-8FE4CBA4D3AE@Sun.COM> <49AD8937.6020608@sun.com> <49AD8EC9.7080307@sun.com> <49AD90DA.90405@sun.com> <49AD9387.8060100@sun.com> Message-ID: <5280C5E2-3D9F-4D64-BA54-47C4192644E5@Sun.COM> On Mar 3, 2009, at 12:31 PM, Alex Buckley wrote: > I'm confused. In: > > ModuleClass_attribute { > u2 attribute_name_index; > u4 attribute_length; > u2 main_class; > } > > attribute_name_index points to a "ModuleClass" string, which is what > Mark's patch from 21:26 yesterday used and a name he seemed happy > with. (I think the bit of that patch he was loathe to commit was > reading a class name from a Utf8.) > > main_class points to a CONSTANT_Class, which you agreed at 07:54 was > the right thing to do. > > I can add an array of flags after main_class - no ModuleInfoReader > code reads them yet anyway. Does this reflect what javac emits: > > ModuleClass_attribute { > u2 attribute_name_index; > u4 attribute_length; > u2 main_class; > u2 flags_length; > { u2 flag; /*Points to Utf8_info*/ } main_class_flags[flags_length]; > } > Yes, this is what I understood we agreed to a couple of weeks back, and which corresponds to javac/javap/classfile. -- Jon > Alex > > Jonathan Gibbons wrote: >> Yes, it's a change. It's not in line with what we previously >> agreed and which I have already implemented. >> Yes, there was a bug in the impl such that I was using >> CONSTANT_Utf8 instead of CONSTANT_Class, and I have spent the >> morning fixing that and writing related test programs, and now >> you're telling me you're changing the spec on me. >> Your proposed spec change does *not* bring this in line with >> ModuleInfoReader's current parsing, because that still uses an even >> older version of the spec that uses the "ModuleMain" attribute, not >> "ModuleClass". >> -- Jon >> Alex Buckley wrote: >>> I guess I should have been clearer: the spec section starts at >>> "The ModuleClass attribute is defined as follows...". "For now" is >>> certainly not in the spec! >>> >>> Nothing has changed. I wrote up ModuleClass in line with Mark's >>> comment "I suspect we really want ModuleClass to name a class >>> rather than just convey a plain utf8 string" and with >>> ModuleInfoReader's current parsing. >>> >>> Alex >>> >>> Jonathan Gibbons wrote: >>>> NOOOOOOOOOOOOOO. >>>> >>>> Please stop gratuitous changing of the spec like this! >>>> >>>> I guess I distrust a spec that includes the words "For now". -- >>>> Jon >>>> >>>> On Mar 3, 2009, at 11:47 AM, Alex Buckley wrote: >>>> >>>>> Being able to put flags in the main class attribute would >>>>> probably be worthwhile if multiple main class attributes were >>>>> allowed: "Main class M is flagged as an FX 1.1 app", "Main class >>>>> N is flagged as a bundle activator and can be assumed to >>>>> implement interface...". >>>>> >>>>> However, I think for now one ModuleClass attribute is enough, >>>>> pointing to a CONSTANT_Class_info, and without flags. >>>>> >>>>> The ModuleClass attribute is defined as follows: >>>>> >>>>> ModuleClass_attribute { >>>>> u2 attribute_name_index; >>>>> u4 attribute_length; >>>>> u2 main_class; >>>>> } >>>>> >>>>> attribute_name_index >>>>> The value of the attribute_name_index item must be a valid >>>>> index into the constant_pool table. The constant_pool entry at >>>>> that index must be a CONSTANT_Utf8_info structure representing >>>>> the string "ModuleClass". >>>>> >>>>> attribute_length >>>>> The value of the attribute_length item is the length of the >>>>> attribute excluding the initial six bytes. >>>>> >>>>> main_class >>>>> The value of the main_class item must be a valid index into >>>>> the constant_pool table. The constant_pool entry at that index >>>>> must be a CONSTANT_Class_info structure representing the name of >>>>> the class which the host system should treat as the entrypoint >>>>> to the module. >>>>> >>>>> Attached is an updated (+ tiny corrections) classfile spec. >>>>> >>>>> Alex >>>>> >>>>> Jonathan Gibbons wrote: >>>>>> Alex suggested adding it when I asked him for a spec of the >>>>>> ModuleClass >>>>>> attribute. At the time, the thought was to be able to mark the >>>>>> type of class, >>>>>> main class, applet etc. A more topical example, from a >>>>>> separate email >>>>>> thread going on now, would be to be able to mark a JavaFX class. >>>>>> [Kumar is working on changes to the launcher to make it capable >>>>>> of >>>>>> starting FX programs, given an FX main class.] So the ability >>>>>> to give >>>>>> simple attributes regarding the class appears somewhat >>>>>> reasonable. >>>>>> I guess the updated classfile spec got pre-empted by FOSDEM ;-) >>>>>> -- Jon >>>>>> On Mar 3, 2009, at 9:21 AM, Mark Reinhold wrote: >>>>>>>> Date: Tue, 03 Mar 2009 07:54:39 -0800 >>>>>>>> From: jonathan.gibbons at sun.com >>>>>>>> >>>>>>> >>>>>>>> Point noted about the incorrect use of CONSTANT_Utf8 instead of >>>>>>>> CONSTANT_Class. I'll check that out. >>>>>>> >>>>>>> Okay, thanks. >>>>>>> >>>>>>>> Also, if I recall >>>>>>>> correctly, >>>>>>>> that item is followed by an array of Utf8 strings >>>>>>>> representing an open >>>>>>>> ended set of flags/modifiers, similar to that used for the >>>>>>>> requires >>>>>>>> entry. If nothing else, you might need to skip over them if >>>>>>>> there is >>>>>>>> any info to follow. >>>>>>> >>>>>>> Hmm, didn't know that, and neither does the ModuleInfoReader >>>>>>> code. >>>>>>> >>>>>>> I don't recall having discussed the need for modifiers in the >>>>>>> main-class >>>>>>> declaration. Do we have use cases? >>>>>>> >>>>>>> - Mark >>>>> >>>>> >>>>> |ClassFile| changes in v51.0 for Modules >>>>> >>>>> >>>>> Access flags >>>>> >>>>> Module-private accessibility is expressed with a new | >>>>> access_flags| flag, |ACC_MODULE|, value 0x8000, description: >>>>> "Declared |module|; may not be accessed from outside its module. >>>>> May only be set if the |ClassFile| has a |Module| attribute." >>>>> The flag appears in JVMS 4.1 (|ClassFile.access_flags|), 4.5 (| >>>>> field_info.access_flags|), and 4.6 (|method_info.access_flags|), >>>>> which gain the following rules: >>>>> >>>>> 4.1 >>>>> *At most one of the |ACC_MODULE| and |ACC_PUBLIC| flags may >>>>> be set >>>>> (JLS3 ?6.6.1).* 4.5 >>>>> Fields of classes may set any of the flags in Table 4.4. >>>>> However, >>>>> a specific field of a class may have at most one of its >>>>> |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and | >>>>> ACC_PUBLIC| >>>>> flags set (JLS3 ?8.3.1) and must not have both its | >>>>> ACC_FINAL| and >>>>> |ACC_VOLATILE| flags set (JLS3 ?8.3.1.4). All fields of >>>>> interfaces must have their |ACC_STATIC| and >>>>> |ACC_FINAL| and *either |ACC_PUBLIC| or |ACC_MODULE|* flags >>>>> set; >>>>> they may have their |ACC_SYNTHETIC| flag set and must not >>>>> have any >>>>> of the other flags in Table 4.4 set (JLS3 ?9.3). 4.6 >>>>> Methods of classes may set any of the flags in Table 4.5. >>>>> However, >>>>> a specific method of a class may have at most one of its >>>>> |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and | >>>>> ACC_PUBLIC| >>>>> flags set (JLS3 ?8.4.3). All interface methods must have >>>>> their |ACC_ABSTRACT| and *either >>>>> |ACC_PUBLIC| or |ACC_MODULE|* flags set; they may have their >>>>> |ACC_VARARGS|, |ACC_BRIDGE| and |ACC_SYNTHETIC| flags set and >>>>> must >>>>> not have any of the other flags in Table 4.5 set (JLS3 >>>>> ?9.4). A specific instance initialization method (?3.9) may >>>>> have at most >>>>> one of its |ACC_PRIVATE|, |ACC_PROTECTED|, *|ACC_MODULE|,* and >>>>> |ACC_PUBLIC| flags set, and may also have its |ACC_STRICT|, >>>>> |ACC_VARARGS| and |ACC_SYNTHETIC| flags set, but must not >>>>> have any >>>>> of the other flags in Table 4.5 set. >>>>> In the |InnerClasses| attribute's |inner_class_access_flags| >>>>> table, |ACC_MODULE| means "Marked |module| in source. May only >>>>> be set if the |ClassFile| has a |Module| attribute." >>>>> >>>>> The |ACC_PUBLIC| flag in all |access_flags| is now defined as >>>>> "Declared |public|; may be accessed from outside its package or >>>>> module." >>>>> >>>>> >>>>> 4.8.21 The |Module| attribute >>>>> >>>>> The |Module| attribute is a fixed-length attribute in the | >>>>> attributes| table of a |ClassFile| (JVMS 4.1) structure. The | >>>>> Module| attribute records the /named module/ (JLS 7.4.5) to >>>>> which the class belongs. A |ClassFile| structure without a | >>>>> Module| attribute is considered to be a member of the /unnamed >>>>> module/ (JLS 7.4.6). >>>>> >>>>> There can be no more than one |Module| attribute in the | >>>>> attributes| table of a given |ClassFile| structure. A |Module| >>>>> attribute may only appear in a |ClassFile| structure that >>>>> represents a class whose binary name in internal form (as given >>>>> by the constant pool entry referenced by the |name_index| item >>>>> of the |CONSTANT_Class_info| structure referenced by | >>>>> ClassFile.this_class|) is qualified, i.e. contains at least one >>>>> |/|. >>>>> >>>>> The |Module| attribute has the following format: >>>>> >>>>> Module_attribute { >>>>> u2 attribute_name_index; >>>>> u4 attribute_length; >>>>> u2 module_id_index; >>>>> } >>>>> The items of the |Module_attribute| structure are as follows: >>>>> >>>>> |attribute_name_index| >>>>> The value of the |attribute_name_index| item must be a valid >>>>> index >>>>> into the |constant_pool| table. The |constant_pool| entry at >>>>> that >>>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>>> string "Module". |attribute_length| >>>>> The value of the |attribute_length| item must be 2. | >>>>> module_id_index| >>>>> The value of the |module_id_index| item must be a valid index >>>>> into >>>>> the |constant_pool| table. The |constant_pool| entry at that >>>>> index >>>>> must be a |CONSTANT_ModuleId_info| structure representing the >>>>> name >>>>> and version of the named module of which this |ClassFile| is a >>>>> member. The module name must be encoded in internal form >>>>> (4.2.1). >>>>> If the |version_index| item of the |CONSTANT_ModuleId_info| >>>>> structure is 0, then this |ClassFile| is a member of any >>>>> version >>>>> of the module named by the |name_index| item. >>>>> The |CONSTANT_ModuleId_info| structure has the following format: >>>>> CONSTANT_ModuleId_info { >>>>> u1 tag; >>>>> // 13 >>>>> u2 name_index; >>>>> // Points to a CONSTANT_Utf8_info representing module name >>>>> u2 version_index; >>>>> // Points to a CONSTANT_Utf8_info representing module version >>>>> } >>>>> >>>>> >>>>> The module-info.class file >>>>> >>>>> A module compilation unit (|module-info.java|) is compiled to a | >>>>> ClassFile| structure like any other compilation unit. It follows >>>>> the precedent set by compiling a package compilation unit (| >>>>> package-info.java|) which has been possible since Java 5.0. >>>>> Since neither compilation unit describes a class as such, the >>>>> following conventions are adopted for their |ClassFile| >>>>> structures. >>>>> >>>>> >>>>> package-info.class >>>>> >>>>> * |major_version, minor_version|: >=49.0 >>>>> * |this_class|: [Package name in internal form (4.2.1)]/ >>>>> package-info >>>>> * |access_flags|: v49: ACC_INTERFACE ACC_ABSTRACT >=v50: >>>>> ACC_INTERFACE ACC_ABSTRACT ACC_SYNTHETIC >>>>> * |super_class|, |interfaces_count|, |fields_count|, >>>>> |methods_count|: 0 >>>>> * |attributes|: except for |Module|, |SourceFile|, >>>>> |RuntimeVisibleAnnotations| and | >>>>> RuntimeInvisibleAnnotations|, >>>>> none of the pre-defined attributes in JVMS 4.7 may appear. >>>>> >>>>> module-info.class >>>>> >>>>> * |major_version, minor_version|: >=51.0 >>>>> * |this_class|: [Module name in internal form (4.2.1)]/module- >>>>> info >>>>> * |access_flags|: ACC_INTERFACE ACC_ABSTRACT ACC_SYNTHETIC >>>>> * |attributes|: One |Module| attribute must be present, for the >>>>> module name given in the |this_class| item. >>>>> * |super_class|, |interfaces_count|, |fields_count|, >>>>> |methods_count|: 0 >>>>> * |attributes|: One |Module| attribute must be present, for the >>>>> module name given in the |this_class| item. At most one of >>>>> each >>>>> of the |ModuleRequires|, |ModulePermits|, |ModuleProvides|, >>>>> and >>>>> |ModuleClass| attributes must be present if the module has >>>>> metadata. Except for these attributes and |SourceFile|, >>>>> |RuntimeVisibleAnnotations|, and | >>>>> RuntimeInvisibleAnnotations|, >>>>> none of the pre-defined attributes in JVMS 4.7 may appear. >>>>> * A module name may be referenced by at most one entry in the >>>>> |requires_table| of a |ModuleRequires| attribute and at >>>>> most one >>>>> entry in the |permits_table| of a |ModulePermits| attribute >>>>> and >>>>> at most one entry in the |provides_table| of a | >>>>> ModuleProvides| >>>>> attribute of a |ClassFile|. >>>>> >>>>> Attributes for the module-info.class file >>>>> >>>>> The |ModuleRequires| attribute is defined as follows: >>>>> ModuleRequires_attribute { >>>>> u2 attribute_name_index; >>>>> u4 attribute_length; >>>>> u2 requires_length; >>>>> { u2 requires_index; u1 flags; } requires_table[requires_length]; >>>>> } >>>>> >>>>> |attribute_name_index| >>>>> The value of the |attribute_name_index| item must be a valid >>>>> index >>>>> into the |constant_pool| table. The |constant_pool| entry at >>>>> that >>>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>>> string "ModuleRequires". |attribute_length| >>>>> The value of the |attribute_length| item is the length of the >>>>> attribute excluding the initial six bytes. |requires_length| >>>>> The value of the |requires_length| indicates the number of >>>>> entries >>>>> in the |requires_table|. |requires_table| >>>>> Each |requires_index| must be a valid index into the >>>>> |constant_pool| table. The |constant_pool| entry at that index >>>>> must be a |CONSTANT_ModuleId_info| structure representing the >>>>> target module on which this module depends. >>>>> flags: 0x01 if this dependency on the target module is optional >>>>> flags: 0x02 if the target module's types must be loaded by the >>>>> same defining classloader as the >>>>> types of the module represented by this ClassFile >>>>> flags: 0x04 if the target module's public types are NOT >>>>> observable to >>>>> types of the module represented by this ClassFile >>>>> >>>>> The |ModulePermits| attribute is defined as follows: >>>>> ModulePermits_attribute { >>>>> u2 attribute_name_index; >>>>> u4 attribute_length; >>>>> u2 permits_length; >>>>> { u2 permits_index } permits_table[permits_length]; >>>>> } >>>>> >>>>> |attribute_name_index| >>>>> The value of the |attribute_name_index| item must be a valid >>>>> index >>>>> into the |constant_pool| table. The |constant_pool| entry at >>>>> that >>>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>>> string "ModulePermits". |attribute_length| >>>>> The value of the |attribute_length| item is the length of the >>>>> attribute excluding the initial six bytes. |permits_length| >>>>> The value of the |permits_length| indicates the number of >>>>> entries >>>>> in the |permits_table|. |permits_table| >>>>> The value of each |permits_index| in this item must be a valid >>>>> index into the |constant_pool| table. The |constant_pool| >>>>> entry at >>>>> that index must be a |CONSTANT_Utf8_info| structure >>>>> representing >>>>> the name of a module which is permitted by the host system to >>>>> have >>>>> a dependency on the module represented by this |ClassFile|. >>>>> The |ModuleProvides| attribute is defined as follows: >>>>> ModuleProvides_attribute { >>>>> u2 attribute_name_index; >>>>> u4 attribute_length; >>>>> u2 provides_length; >>>>> { u2 provides_index; } provides_table[provides_length]; >>>>> } >>>>> >>>>> |attribute_name_index| >>>>> The value of the |attribute_name_index| item must be a valid >>>>> index >>>>> into the |constant_pool| table. The |constant_pool| entry at >>>>> that >>>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>>> string "ModuleProvides". |attribute_length| >>>>> The value of the |attribute_length| item is the length of the >>>>> attribute excluding the initial six bytes. |provides_length| >>>>> The value of the |provides_length| indicates the number of >>>>> entries >>>>> in the |provides_table|. |provides_table| >>>>> The value of each |provides_index| in this item must be a valid >>>>> index into the |constant_pool| table. The |constant_pool| >>>>> entry at >>>>> that index must be a |CONSTANT_ModuleId_info| structure >>>>> representing a module identity that is an alias for the module >>>>> represented by this |ClassFile|. >>>>> The |ModuleClass| attribute is defined as follows: >>>>> ModuleClass_attribute { >>>>> u2 attribute_name_index; >>>>> u4 attribute_length; >>>>> u2 main_class; >>>>> } >>>>> >>>>> |attribute_name_index| >>>>> The value of the |attribute_name_index| item must be a valid >>>>> index >>>>> into the |constant_pool| table. The |constant_pool| entry at >>>>> that >>>>> index must be a |CONSTANT_Utf8_info| structure representing the >>>>> string "ModuleClass". |attribute_length| >>>>> The value of the |attribute_length| item is the length of the >>>>> attribute excluding the initial six bytes. |main_class| >>>>> The value of the |main_class| item must be a valid index into >>>>> the >>>>> |constant_pool| table. The |constant_pool| entry at that index >>>>> must be a |CONSTANT_Class_info| structure representing the >>>>> name of >>>>> the class which the host system should treat as the >>>>> entrypoint to >>>>> the module. >>>> From mr at sun.com Tue Mar 3 15:21:55 2009 From: mr at sun.com (mr at sun.com) Date: Tue, 03 Mar 2009 23:21:55 +0000 Subject: hg: jigsaw/jigsaw/jdk: Fix ModuleInfoReader to read the ModuleClass attribute properly Message-ID: <20090303232208.066CBE6DB@hg.openjdk.java.net> Changeset: 9dbdb9aa31b3 Author: mr Date: 2009-03-03 15:19 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/9dbdb9aa31b3 Fix ModuleInfoReader to read the ModuleClass attribute properly ! src/share/classes/java/lang/module/ModuleInfoReader.java + test/java/lang/module/Main.java ! test/java/lang/module/_ModuleInfoReader.java ! test/java/lang/module/module-info.java From mr at sun.com Tue Mar 3 15:28:17 2009 From: mr at sun.com (Mark Reinhold) Date: Tue, 03 Mar 2009 15:28:17 -0800 Subject: ModuleClass In-Reply-To: jonathan.gibbons@sun.com; Tue, 03 Mar 2009 12:56:34 PST; <5280C5E2-3D9F-4D64-BA54-47C4192644E5@Sun.COM> Message-ID: <20090303232818.0605928E0EE@eggemoggin.niobe.net> Thanks for resolving this. I've fixed up ModuleInfoReader to read what Jon's latest javac generates, though the main-class flags aren't visible in the ModuleInfo interface. I'm far from convinced that ModuleClass needs flags, but for the purpose of getting off the ground I can live with the current code. - Mark From mr at sun.com Tue Mar 3 15:07:34 2009 From: mr at sun.com (mr at sun.com) Date: Tue, 03 Mar 2009 23:07:34 +0000 Subject: hg: jigsaw/jigsaw/jdk: org.openjdk.jigsaw.Library.find{Module{Ids, Info}, Class} Message-ID: <20090303230758.1CEB3E6CB@hg.openjdk.java.net> Changeset: e599ab90846d Author: mr Date: 2009-03-03 15:05 -0800 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/e599ab90846d org.openjdk.jigsaw.Library.find{Module{Ids,Info},Class} ! src/share/classes/java/lang/module/ModuleId.java ! src/share/classes/java/lang/module/ModuleIdQuery.java ! src/share/classes/java/lang/module/ModuleSystem.java ! src/share/classes/org/openjdk/jigsaw/JigsawModuleSystem.java ! src/share/classes/org/openjdk/jigsaw/Library.java ! src/share/classes/org/openjdk/jigsaw/cli/Command.java ! src/share/classes/org/openjdk/jigsaw/cli/Librarian.java ! test/org/openjdk/jigsaw/_Library.java ! test/org/openjdk/jigsaw/cli/jmod-basic.sh - test/org/openjdk/jigsaw/eg/com/foo/bar/Main.java - test/org/openjdk/jigsaw/eg/com/foo/bar/module-info.java + test/org/openjdk/jigsaw/library.sh From mr at sun.com Sun Mar 8 20:10:58 2009 From: mr at sun.com (Mark Reinhold) Date: Sun, 08 Mar 2009 20:10:58 -0700 Subject: Need a VM that accepts, if not understands, JVM_CONSTANT_ModuleId Message-ID: <20090309031059.E3BA8CFF7@callebaut.niobe.net> I spent some time this weekend trying to get the basic end-to-end module-loading mechanism working. I pretty quickly ran up against the fact that HotSpot -- not even in Karen's prototype version -- doesn't grok constant-pool items with tag 13 for CONSTANT_ModuleId_info and instead throws a ClassFormatError, as well it should in this case. I tried hacking on jvm.h and classFileParser.cpp to make this work but failed, most likely because I'm missing something obvious. Karen, does the following patch make any sense? If not, could you please send me one -- or push one -- that does? Note that right now I don't need the VM to do anything with these items, I just need it not to give up when it does see them. (For the moment I worked around this problem by using a hacked-up copy of the ASM library to strip the offending items and related attributes.) Thanks, - Mark -------------- next part -------------- diff -r dae503d9f04c src/share/vm/classfile/classFileParser.cpp --- a/src/share/vm/classfile/classFileParser.cpp Thu Feb 26 10:57:13 2009 -0800 +++ b/src/share/vm/classfile/classFileParser.cpp Sun Mar 08 20:02:11 2009 -0700 @@ -159,6 +159,14 @@ cp->name_and_type_at_put(index, name_index, signature_index); } break; + case JVM_CONSTANT_ModuleId : + { + cfs->guarantee_more(5, CHECK); // name_index, version_index, tag/access_flags + u2 name_index = cfs->get_u2_fast(); + u2 version_index = cfs->get_u2_fast(); + // ## cp->name_and_type_at_put(index, name_index, signature_index); + } + break; case JVM_CONSTANT_Utf8 : { cfs->guarantee_more(2, CHECK); // utf8_length @@ -301,6 +309,8 @@ signature_ref_index, CHECK_(nullHandle)); break; } + case JVM_CONSTANT_ModuleId : // ## + break; case JVM_CONSTANT_Utf8 : break; case JVM_CONSTANT_UnresolvedClass : // fall-through diff -r dae503d9f04c src/share/vm/prims/jvm.h --- a/src/share/vm/prims/jvm.h Thu Feb 26 10:57:13 2009 -0800 +++ b/src/share/vm/prims/jvm.h Sun Mar 08 20:02:11 2009 -0700 @@ -1038,8 +1038,11 @@ JVM_CONSTANT_Fieldref, JVM_CONSTANT_Methodref, JVM_CONSTANT_InterfaceMethodref, - JVM_CONSTANT_NameAndType + JVM_CONSTANT_NameAndType, + JVM_CONSTANT_ModuleId }; + +#define JVM_CONSTANT_MAX JVM_CONSTANT_ModuleId /* Used in the newarray instruction. */ diff -r dae503d9f04c src/share/vm/utilities/constantTag.cpp --- a/src/share/vm/utilities/constantTag.cpp Thu Feb 26 10:57:13 2009 -0800 +++ b/src/share/vm/utilities/constantTag.cpp Sun Mar 08 20:02:11 2009 -0700 @@ -59,6 +59,9 @@ case JVM_CONSTANT_NameAndType : st->print("NameAndType"); break; + case JVM_CONSTANT_ModuleId : + st-print("ModuleId"); + break; case JVM_CONSTANT_Utf8 : st->print("Utf8"); break; diff -r dae503d9f04c src/share/vm/utilities/constantTag.hpp --- a/src/share/vm/utilities/constantTag.hpp Thu Feb 26 10:57:13 2009 -0800 +++ b/src/share/vm/utilities/constantTag.hpp Sun Mar 08 20:02:11 2009 -0700 @@ -76,7 +76,7 @@ bool is_symbol() const { return is_utf8(); } constantTag(jbyte tag) { - assert((tag >= 0 && tag <= JVM_CONSTANT_NameAndType) || + assert((tag >= 0 && tag <= JVM_CONSTANT_MAX) || (tag >= JVM_CONSTANT_InternalMin && tag <= JVM_CONSTANT_InternalMax), "Invalid constant tag"); _tag = tag; } From mr at sun.com Fri Mar 13 10:40:02 2009 From: mr at sun.com (mr at sun.com) Date: Fri, 13 Mar 2009 17:40:02 +0000 Subject: hg: jigsaw/jigsaw/hotspot: Disable jcheck Message-ID: <20090313174006.2383CEE53@hg.openjdk.java.net> Changeset: 25068bbfee4f Author: mr Date: 2009-03-13 10:37 -0700 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/25068bbfee4f Disable jcheck - .jcheck/conf From Jonathan.Gibbons at Sun.COM Mon Mar 30 15:24:59 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Mon, 30 Mar 2009 15:24:59 -0700 Subject: Jigsaw FileConstants Message-ID: <49D146BB.90105@sun.com> Re: http://cr.openjdk.java.net/~mr/jigsaw/api/ Minor comment: FileConstants should probably have a private constructor. -- Jon From Jonathan.Gibbons at Sun.COM Mon Mar 30 15:30:01 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Mon, 30 Mar 2009 15:30:01 -0700 Subject: Need a VM that accepts, if not understands, JVM_CONSTANT_ModuleId In-Reply-To: <20090309031059.E3BA8CFF7@callebaut.niobe.net> References: <20090309031059.E3BA8CFF7@callebaut.niobe.net> Message-ID: <49D147E9.4030807@sun.com> Mark, Karen, Was there a resolution to this? -- Jon Mark Reinhold wrote: > I spent some time this weekend trying to get the basic end-to-end > module-loading mechanism working. I pretty quickly ran up against the > fact that HotSpot -- not even in Karen's prototype version -- doesn't > grok constant-pool items with tag 13 for CONSTANT_ModuleId_info and > instead throws a ClassFormatError, as well it should in this case. > > I tried hacking on jvm.h and classFileParser.cpp to make this work but > failed, most likely because I'm missing something obvious. > > Karen, does the following patch make any sense? If not, could you please > send me one -- or push one -- that does? > > Note that right now I don't need the VM to do anything with these items, > I just need it not to give up when it does see them. > > (For the moment I worked around this problem by using a hacked-up copy of > the ASM library to strip the offending items and related attributes.) > > Thanks, > - Mark > > > ------------------------------------------------------------------------ > > diff -r dae503d9f04c src/share/vm/classfile/classFileParser.cpp > --- a/src/share/vm/classfile/classFileParser.cpp Thu Feb 26 10:57:13 2009 -0800 > +++ b/src/share/vm/classfile/classFileParser.cpp Sun Mar 08 20:02:11 2009 -0700 > @@ -159,6 +159,14 @@ > cp->name_and_type_at_put(index, name_index, signature_index); > } > break; > + case JVM_CONSTANT_ModuleId : > + { > + cfs->guarantee_more(5, CHECK); // name_index, version_index, tag/access_flags > + u2 name_index = cfs->get_u2_fast(); > + u2 version_index = cfs->get_u2_fast(); > + // ## cp->name_and_type_at_put(index, name_index, signature_index); > + } > + break; > case JVM_CONSTANT_Utf8 : > { > cfs->guarantee_more(2, CHECK); // utf8_length > @@ -301,6 +309,8 @@ > signature_ref_index, CHECK_(nullHandle)); > break; > } > + case JVM_CONSTANT_ModuleId : // ## > + break; > case JVM_CONSTANT_Utf8 : > break; > case JVM_CONSTANT_UnresolvedClass : // fall-through > diff -r dae503d9f04c src/share/vm/prims/jvm.h > --- a/src/share/vm/prims/jvm.h Thu Feb 26 10:57:13 2009 -0800 > +++ b/src/share/vm/prims/jvm.h Sun Mar 08 20:02:11 2009 -0700 > @@ -1038,8 +1038,11 @@ > JVM_CONSTANT_Fieldref, > JVM_CONSTANT_Methodref, > JVM_CONSTANT_InterfaceMethodref, > - JVM_CONSTANT_NameAndType > + JVM_CONSTANT_NameAndType, > + JVM_CONSTANT_ModuleId > }; > + > +#define JVM_CONSTANT_MAX JVM_CONSTANT_ModuleId > > /* Used in the newarray instruction. */ > > diff -r dae503d9f04c src/share/vm/utilities/constantTag.cpp > --- a/src/share/vm/utilities/constantTag.cpp Thu Feb 26 10:57:13 2009 -0800 > +++ b/src/share/vm/utilities/constantTag.cpp Sun Mar 08 20:02:11 2009 -0700 > @@ -59,6 +59,9 @@ > case JVM_CONSTANT_NameAndType : > st->print("NameAndType"); > break; > + case JVM_CONSTANT_ModuleId : > + st-print("ModuleId"); > + break; > case JVM_CONSTANT_Utf8 : > st->print("Utf8"); > break; > diff -r dae503d9f04c src/share/vm/utilities/constantTag.hpp > --- a/src/share/vm/utilities/constantTag.hpp Thu Feb 26 10:57:13 2009 -0800 > +++ b/src/share/vm/utilities/constantTag.hpp Sun Mar 08 20:02:11 2009 -0700 > @@ -76,7 +76,7 @@ > bool is_symbol() const { return is_utf8(); } > > constantTag(jbyte tag) { > - assert((tag >= 0 && tag <= JVM_CONSTANT_NameAndType) || > + assert((tag >= 0 && tag <= JVM_CONSTANT_MAX) || > (tag >= JVM_CONSTANT_InternalMin && tag <= JVM_CONSTANT_InternalMax), "Invalid constant tag"); > _tag = tag; > } > From mr at sun.com Mon Mar 30 16:52:46 2009 From: mr at sun.com (Mark Reinhold) Date: Mon, 30 Mar 2009 16:52:46 -0700 Subject: Need a VM that accepts, if not understands, JVM_CONSTANT_ModuleId In-Reply-To: jonathan.gibbons@sun.com; Mon, 30 Mar 2009 15:30:01 PDT; <49D147E9.4030807@sun.com> Message-ID: <20090330235246.B08B52665C@callebaut.niobe.net> From mr at sun.com Mon Mar 30 16:55:15 2009 From: mr at sun.com (Mark Reinhold) Date: Mon, 30 Mar 2009 16:55:15 -0700 Subject: Need a VM that accepts, if not understands, JVM_CONSTANT_ModuleId In-Reply-To: jonathan.gibbons@sun.com; Mon, 30 Mar 2009 15:30:01 PDT; <49D147E9.4030807@sun.com> Message-ID: <20090330235515.B53532665C@callebaut.niobe.net> (oops, ignore that first empty e-mail) > Date: Mon, 30 Mar 2009 15:30:01 -0700 > From: jonathan.gibbons at sun.com > Was there a resolution to this? Karen provided me a linux-i586 build that's kept me going. She said she could push the relevant changes into our forest once some other required changes were pushed into HotSpot, last week. Not sure what the status of those changes is -- Karen? - Mark From Karen.Kinnear at Sun.COM Tue Mar 31 06:04:42 2009 From: Karen.Kinnear at Sun.COM (Karen Kinnear) Date: Tue, 31 Mar 2009 09:04:42 -0400 Subject: Need a VM that accepts, if not understands, JVM_CONSTANT_ModuleId In-Reply-To: <20090330235515.B53532665C@callebaut.niobe.net> References: <20090330235515.B53532665C@callebaut.niobe.net> Message-ID: <5E3D5FBA-68DF-47B4-B25D-A85EBB79FA41@sun.com> Mark, Thanks for the reminder. Here is the webrev: http://cr.openjdk.java.net/~acorn/6613575/ I will let you know as soon as the repository is updated. thanks, Karen On Mar 30, 2009, at 7:55 PM, Mark Reinhold wrote: > (oops, ignore that first empty e-mail) > >> Date: Mon, 30 Mar 2009 15:30:01 -0700 >> From: jonathan.gibbons at sun.com > >> Was there a resolution to this? > > Karen provided me a linux-i586 build that's kept me going. She said > she > could push the relevant changes into our forest once some other > required > changes were pushed into HotSpot, last week. Not sure what the status > of those changes is -- Karen? > > - Mark From karen.kinnear at sun.com Tue Mar 31 16:41:30 2009 From: karen.kinnear at sun.com (karen.kinnear at sun.com) Date: Tue, 31 Mar 2009 23:41:30 +0000 Subject: hg: jigsaw/jigsaw/hotspot: 6613575: Initial prototype for JSR 294 Message-ID: <20090331234135.06225EDFA@hg.openjdk.java.net> Changeset: 7cd3f8fafd22 Author: acorn Date: 2009-03-31 09:11 -0400 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/hotspot/rev/7cd3f8fafd22 6613575: Initial prototype for JSR 294 ! agent/src/share/classes/sun/jvm/hotspot/utilities/ConstantTag.java ! src/share/vm/classfile/classFileParser.cpp ! src/share/vm/classfile/classFileParser.hpp ! src/share/vm/classfile/classLoader.cpp ! src/share/vm/classfile/systemDictionary.cpp ! src/share/vm/classfile/systemDictionary.hpp ! src/share/vm/classfile/vmSymbols.hpp ! src/share/vm/interpreter/linkResolver.cpp ! src/share/vm/oops/constantPoolKlass.cpp ! src/share/vm/oops/constantPoolOop.cpp ! src/share/vm/oops/constantPoolOop.hpp ! src/share/vm/oops/instanceKlass.cpp ! src/share/vm/oops/instanceKlass.hpp ! src/share/vm/oops/instanceKlassKlass.cpp ! src/share/vm/oops/klass.hpp ! src/share/vm/oops/klassVtable.cpp ! src/share/vm/oops/klassVtable.hpp ! src/share/vm/oops/methodOop.hpp ! src/share/vm/oops/objArrayKlass.cpp ! src/share/vm/prims/jni.cpp ! src/share/vm/prims/jvm.cpp ! src/share/vm/prims/jvm.h ! src/share/vm/prims/jvmtiRedefineClasses.cpp ! src/share/vm/prims/unsafe.cpp ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/fieldDescriptor.hpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/reflection.cpp ! src/share/vm/runtime/vmStructs.cpp ! src/share/vm/utilities/accessFlags.cpp ! src/share/vm/utilities/accessFlags.hpp ! src/share/vm/utilities/constantTag.cpp ! src/share/vm/utilities/constantTag.hpp